PageSourceSearch

https://bib.ulb.be/wro/scriptsFo_fr_FR/db9f9aad41f6f7137baa4d11bdf01aba3cd9d3da.js

js ulb.be collected 2026-10-01 10:16:20 UTC 1,301,530 bytes, 4,351 lines download raw bytes

vendor: 88,327 bytes, lines 1-388
1
2(function(global,factory){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");}
3return factory(w);};}else{factory(global);}}(typeof window!=="undefined"?window:this,function(window,noGlobal){var deletedIds=[];var slice=deletedIds.slice;var concat=deletedIds.concat;var push=deletedIds.push;var indexOf=deletedIds.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var trim="".trim;var support={};var
4version="1.11.0",jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase();};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this);},get:function(num){return num!=null?(num<0?this[num+this.length]:this[num]):slice.call(this);},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret;},each:function(callback,args){return jQuery.each(this,callback,args);},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},slice:function(){return this.pushStack(slice.apply(this,arguments));},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[]);},end:function(){return this.prevObject||this.constructor(null);},push:push,sort:deletedIds.sort,splice:deletedIds.splice};jQuery.extend=jQuery.fn.extend=function(){var src,copyIsArray,copy,name,options,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++;}
5if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};}
6if(i===length){target=this;i--;}
7for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;}
8if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&jQuery.isArray(src)?src:[];}else{clone=src&&jQuery.isPlainObject(src)?src:{};}
9target[name]=jQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}}
10return target;};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg);},noop:function(){},isFunction:function(obj){return jQuery.type(obj)==="function";},isArray:Array.isArray||function(obj){return jQuery.type(obj)==="array";},isWindow:function(obj){return obj!=null&&obj==obj.window;},isNumeric:function(obj){return obj-parseFloat(obj)>=0;},isEmptyObject:function(obj){var name;for(name in obj){return false;}
11return true;},isPlainObject:function(obj){var key;if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false;}
12try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false;}}catch(e){return false;}
13if(support.ownLast){for(key in obj){return hasOwn.call(obj,key);}}
14for(key in obj){}
15return key===undefined||hasOwn.call(obj,key);},type:function(obj){if(obj==null){return obj+"";}
16return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj;},globalEval:function(data){if(data&&jQuery.trim(data)){(window.execScript||function(data){window["eval"].call(window,data);})(data);}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i<length;i++){value=callback.apply(obj[i],args);if(value===false){break;}}}else{for(i in obj){value=callback.apply(obj[i],args);if(value===false){break;}}}}else{if(isArray){for(;i<length;i++){value=callback.call(obj[i],i,obj[i]);if(value===false){break;}}}else{for(i in obj){value=callback.call(obj[i],i,obj[i]);if(value===false){break;}}}}
17return obj;},trim:trim&&!trim.call("\uFEFF\xA0")?function(text){return text==null?"":trim.call(text);}:function(text){return text==null?"":(text+"").replace(rtrim,"");},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArraylike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr);}else{push.call(ret,arr);}}
18return ret;},inArray:function(elem,arr,i){var len;if(arr){if(indexOf){return indexOf.call(arr,elem,i);}
19len=arr.length;i=i?i<0?Math.max(0,len+i):i:0;for(;i<len;i++){if(i in arr&&arr[i]===elem){return i;}}}
20return-1;},merge:function(first,second){var len=+second.length,j=0,i=first.length;while(j<len){first[i++]=second[j++];}
21if(len!==len){while(second[j]!==undefined){first[i++]=second[j++];}}
22first.length=i;return first;},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i]);}}
23return matches;},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];if(isArray){for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}
24return concat.apply([],ret);},guid:1,proxy:function(fn,context){var args,proxy,tmp;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp;}
25if(!jQuery.isFunction(fn)){return undefined;}
26args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)));};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy;},now:function(){return+(new Date());},support:support});jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});function isArraylike(obj){var length=obj.length,type=jQuery.type(obj);if(type==="function"||jQuery.isWindow(obj)){return false;}
27if(obj.nodeType===1&&length){return true;}
28return type==="array"||length===0||typeof length==="number"&&length>0&&(length-1)in obj;}
29var Sizzle=(function(window){var i,support,Expr,getText,isXML,compile,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+-(new Date()),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true;}
30return 0;},strundefined=typeof undefined,MAX_NEGATIVE=1<<31,hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){var i=0,len=this.length;for(;i<len;i++){if(this[i]===elem){return i;}}
31return-1;},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")"+whitespace+"*(?:([*^$|!~]?=)"+whitespace+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+identifier+")|)|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+attributes.replace(3,8)+")*)|.*)\\)|)",rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={"ID":new RegExp("^#("+characterEncoding+")"),"CLASS":new RegExp("^\\.("+characterEncoding+")"),"TAG":new RegExp("^("+characterEncoding.replace("w","w*")+")"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),"bool":new RegExp("^(?:"+booleans+")$","i"),"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+
32whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-0x10000;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+0x10000):String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);};try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els));}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}
33target.length=j-1;}};}
34function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context);}
35context=context||document;results=results||[];if(!selector||typeof selector!=="string"){return results;}
36if((nodeType=context.nodeType)!==1&&nodeType!==9){return[];}
37if(documentIsHTML&&!seed){if((match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results;}}else{return results;}}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results;}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results;}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}}
38if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=expando;newContext=context;newSelector=nodeType===9&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if((old=context.getAttribute("id"))){nid=old.replace(rescape,"\\$&");}else{context.setAttribute("id",nid);}
39nid="[id='"+nid+"'] ";i=groups.length;while(i--){groups[i]=nid+toSelector(groups[i]);}
40newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",");}
41if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){}finally{if(!old){context.removeAttribute("id");}}}}}
42return select(selector.replace(rtrim,"$1"),context,results,seed);}
43function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()];}
44return(cache[key+" "]=value);}
45return cache;}
46function markFunction(fn){fn[expando]=true;return fn;}
47function assert(fn){var div=document.createElement("div");try{return!!fn(div);}catch(e){return false;}finally{if(div.parentNode){div.parentNode.removeChild(div);}
48div=null;}}
49function addHandle(attrs,handler){var arr=attrs.split("|"),i=attrs.length;while(i--){Expr.attrHandle[arr[i]]=handler;}}
50function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-
51(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff;}
52if(cur){while((cur=cur.nextSibling)){if(cur===b){return-1;}}}
53return a?1:-1;}
54function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type;};}
55function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type;};}
56function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j]);}}});});}
57function testContext(context){return context&&typeof context.getElementsByTagName!==strundefined&&context;}
58support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};setDocument=Sizzle.setDocument=function(node){var hasCompare,doc=node?node.ownerDocument||node:preferredDoc,parent=doc.defaultView;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;}
59document=doc;docElem=doc.documentElement;documentIsHTML=!isXML(doc);if(parent&&parent!==parent.top){if(parent.addEventListener){parent.addEventListener("unload",function(){setDocument();},false);}else if(parent.attachEvent){parent.attachEvent("onunload",function(){setDocument();});}}
60support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className");});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return!div.getElementsByTagName("*").length;});support.getElementsByClassName=rnative.test(doc.getElementsByClassName)&&assert(function(div){div.innerHTML="<div class='a'></div><div class='a i'></div>";div.firstChild.className="i";return div.getElementsByClassName("i").length===2;});support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!doc.getElementsByName||!doc.getElementsByName(expando).length;});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!==strundefined&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[];}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId;};};}else{delete Expr.find["ID"];Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");return node&&node.value===attrId;};};}
61Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!==strundefined){return context.getElementsByTagName(tag);}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem);}}
62return tmp;}
63return results;};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!==strundefined&&documentIsHTML){return context.getElementsByClassName(className);}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(doc.querySelectorAll))){assert(function(div){div.innerHTML="<select t=''><option selected=''></option></select>";if(div.querySelectorAll("[t^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");}
64if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");}
65if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");}});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=");}
66if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled");}
67div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});}
68if((support.matchesSelector=rnative.test((matches=docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos);});}
69rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16));}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true;}}}
70return false;};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0;}
71var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare;}
72compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1;}
73if(b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1;}
74return sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):0;}
75return compare&4?-1:1;}:function(a,b){if(a===b){hasDuplicate=true;return 0;}
76var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):0;}else if(aup===bup){return siblingCheck(a,b);}
77cur=a;while((cur=cur.parentNode)){ap.unshift(cur);}
78cur=b;while((cur=cur.parentNode)){bp.unshift(cur);}
79while(ap[i]===bp[i]){i++;}
80return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0;};return doc;};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements);};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem);}
81expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret;}}catch(e){}}
82return Sizzle(expr,document,null,[elem]).length>0;};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context);}
83return contains(context,elem);};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem);}
84var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null;};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i);}}
85while(j--){results.splice(duplicates[j],1);}}
86sortInput=null;return results;};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node);}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent;}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem);}}}else if(nodeType===3||nodeType===4){return elem.nodeValue;}
87return ret;};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" ";}
88return match.slice(0,4);},"CHILD":function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0]);}
89match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd");}else if(match[3]){Sizzle.error(match[0]);}
90return match;},"PSEUDO":function(match){var excess,unquoted=!match[5]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null;}
91if(match[3]&&match[4]!==undefined){match[2]=match[4];}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess);}
92return match.slice(0,3);}},filter:{"TAG":function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName;};},"CLASS":function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!==strundefined&&elem.getAttribute("class")||"");});},"ATTR":function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!=";}
93if(!operator){return true;}
94result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false;};},"CHILD":function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode;}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false;}}
95start=dir=type==="only"&&!start&&"nextSibling";}
96return true;}
97start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=cache[0]===dirruns&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break;}}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns){diff=cache[1];}else{while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){(node[expando]||(node[expando]={}))[type]=[dirruns,diff];}
98if(node===elem){break;}}}}
99diff-=last;return diff===first||(diff%first===0&&diff/first>=0);}};},"PSEUDO":function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument);}
100if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf.call(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i]);}}):function(elem){return fn(elem,0,args);};}
101return fn;}},pseudos:{"not":markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem);}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);return!results.pop();};}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0;};}),"contains":markFunction(function(text){return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1;};}),"lang":markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang);}
102lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0;}}while((elem=elem.parentNode)&&elem.nodeType===1);return false;};}),"target":function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id;},"root":function(elem){return elem===docElem;},"focus":function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex);},"enabled":function(elem){return elem.disabled===false;},"disabled":function(elem){return elem.disabled===true;},"checked":function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected);},"selected":function(elem){if(elem.parentNode){elem.parentNode.selectedIndex;}
103return elem.selected===true;},"empty":function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false;}}
104return true;},"parent":function(elem){return!Expr.pseudos["empty"](elem);},"header":function(elem){return rheader.test(elem.nodeName);},"input":function(elem){return rinputs.test(elem.nodeName);},"button":function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button";},"text":function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text");},"first":createPositionalPseudo(function(){return[0];}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1];}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument];}),"even":createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i);}
105return matchIndexes;}),"odd":createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i);}
106return matchIndexes;}),"lt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i);}
107return matchIndexes;}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i);}
108return matchIndexes;})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i);}
109for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i);}
110function setFilters(){}
111setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters();function tokenize(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0);}
112soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar;}
113groups.push((tokens=[]));}
114matched=false;if((match=rcombinators.exec(soFar))){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length);}
115for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length);}}
116if(!matched){break;}}
117return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0);}
118function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value;}
119return selector;}
120function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&dir==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml);}}}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];if(xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true;}}}}else{while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});if((oldCache=outerCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return(newCache[2]=oldCache[2]);}else{outerCache[dir]=newCache;if((newCache[2]=matcher(elem,context,xml))){return true;}}}}}};}
121function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false;}}
122return true;}:matchers[0];}
123function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if((elem=unmatched[i])){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i);}}}}
124return newUnmatched;}
125function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter);}
126if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector);}
127return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml);}
128if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if((elem=temp[i])){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);}}}
129if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if((elem=matcherOut[i])){temp.push((matcherIn[i]=elem));}}
130postFinder(null,(matcherOut=[]),temp,xml);}
131i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem);}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml);}else{push.apply(results,matcherOut);}}});}
132function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext;},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1;},implicitRelative,true),matchers=[function(elem,context,xml){return(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));}];for(;i<len;i++){if((matcher=Expr.relative[tokens[i].type])){matchers=[addCombinator(elementMatcher(matchers),matcher)];}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break;}}
133return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens((tokens=tokens.slice(j))),j<len&&toSelector(tokens));}
134matchers.push(matcher);}}
135return elementMatcher(matchers);}
136function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context!==document&&context;}
137for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;while((matcher=elementMatchers[j++])){if(matcher(elem,context,xml)){results.push(elem);break;}}
138if(outermost){dirruns=dirrunsUnique;}}
139if(bySet){if((elem=!matcher&&elem)){matchedCount--;}
140if(seed){unmatched.push(elem);}}}
141matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml);}
142if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}}
143setMatched=condense(setMatched);}
144push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results);}}
145if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup;}
146return unmatched;};return bySet?markFunction(superMatcher):superMatcher;}
147compile=Sizzle.compile=function(selector,group){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!group){group=tokenize(selector);}
148i=group.length;while(i--){cached=matcherFromTokens(group[i]);if(cached[expando]){setMatchers.push(cached);}else{elementMatchers.push(cached);}}
149cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));}
150return cached;};function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results);}
151return results;}
152function select(selector,context,results,seed){var i,tokens,token,type,find,match=tokenize(selector);if(!seed){if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results;}
153selector=selector.slice(tokens.shift().value.length);}
154i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break;}
155if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;}
156break;}}}}}
157compile(selector,match)(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context);return results;}
158support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1;});if(!assert(function(div){div.innerHTML="<a href='#'></a>";return div.firstChild.getAttribute("href")==="#";})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2);}});}
159if(!support.attributes||!assert(function(div){div.innerHTML="<input/>";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")==="";})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue;}});}
160if(!assert(function(div){return div.getAttribute("disabled")==null;})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null;}});}
161return Sizzle;})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=(/^<(\w+)\s*\/?>(?:<\/\1>|)$/);var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not;});}
162if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not;});}
163if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}
164qualifier=jQuery.filter(qualifier,elements);}
165return jQuery.grep(elements,function(elem){return(jQuery.inArray(elem,qualifier)>=0)!==not;});}
166jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";}
167return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));};jQuery.fn.extend({find:function(selector){var i,ret=[],self=this,len=self.length;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true;}}}));}
168for(i=0;i<len;i++){jQuery.find(selector,self[i],ret);}
169ret=this.pushStack(len>1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret;},filter:function(selector){return this.pushStack(winnow(this,selector||[],false));},not:function(selector){return this.pushStack(winnow(this,selector||[],true));},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length;}});var rootjQuery,document=window.document,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector){return this;}
170if(typeof selector==="string"){if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3){match=[null,selector,null];}else{match=rquickExpr.exec(selector);}
171if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match]);}else{this.attr(match,context[match]);}}}
172return this;}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2]){return rootjQuery.find(selector);}
173this.length=1;this[0]=elem;}
174this.context=document;this.selector=selector;return this;}}else if(!context||context.jquery){return(context||rootjQuery).find(selector);}else{return this.constructor(context).find(selector);}}else if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;}else if(jQuery.isFunction(selector)){return typeof rootjQuery.ready!=="undefined"?rootjQuery.ready(selector):selector(jQuery);}
175if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;}
176return jQuery.makeArray(selector,this);};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.extend({dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);}
177cur=cur[dir];}
178return matched;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}}
179return r;}});jQuery.fn.extend({has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;i<len;i++){if(jQuery.contains(this,targets[i])){return true;}}});},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||typeof selectors!=="string"?jQuery(selectors,context||this.context):0;for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(pos?pos.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break;}}}
180return this.pushStack(matched.length>1?jQuery.unique(matched):matched);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;}
181if(typeof elem==="string"){return jQuery.inArray(this[0],jQuery(elem));}
182return jQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))));},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));}});function sibling(cur,dir){do{cur=cur[dir];}while(cur&&cur.nodeType!==1);return cur;}
183jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return jQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},next:function(elem){return sibling(elem,"nextSibling");},prev:function(elem){return sibling(elem,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.merge([],elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until;}
184if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret);}
185if(this.length>1){if(!guaranteedUnique[name]){ret=jQuery.unique(ret);}
186if(rparentsprev.test(name)){ret=ret.reverse();}}
187return this.pushStack(ret);};});var rnotwhite=(/\S+/g);var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}
188jQuery.Callbacks=function(options){options=typeof options==="string"?(optionsCache[options]||createOptions(options)):jQuery.extend({},options);var
189firing,memory,fired,firingLength,firingIndex,firingStart,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex<firingLength;firingIndex++){if(list[firingIndex].apply(data[0],data[1])===false&&options.stopOnFalse){memory=false;break;}}
190firing=false;if(list){if(stack){if(stack.length){fire(stack.shift());}}else if(memory){list=[];}else{self.disable();}}},self={add:function(){if(list){var start=list.length;(function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);if(type==="function"){if(!options.unique||!self.has(arg)){list.push(arg);}}else if(arg&&arg.length&&type!=="string"){add(arg);}});})(arguments);if(firing){firingLength=list.length;}else if(memory){firingStart=start;fire(memory);}}
191return this;},remove:function(){if(list){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(firing){if(index<=firingLength){firingLength--;}
192if(index<=firingIndex){firingIndex--;}}}});}
193return this;},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length);},empty:function(){list=[];firingLength=0;return this;},disable:function(){list=stack=memory=undefined;return this;},disabled:function(){return!list;},lock:function(){stack=undefined;if(!memory){self.disable();}
194return this;},locked:function(){return!stack;},fireWith:function(context,args){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];if(firing){stack.push(args);}else{fire(args);}}
195return this;},fire:function(){self.fireWith(this,arguments);return this;},fired:function(){return!!fired;}};return self;};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state;},always:function(){deferred.done(arguments).fail(arguments);return this;},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify);}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments);}});});fns=null;}).promise();},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise;}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString;},tuples[i^1][2].disable,tuples[2][2].lock);}
196deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this;};deferred[tuple[0]+"With"]=list.fireWith;});promise.promise(deferred);if(func){func.call(deferred,deferred);}
197return deferred;},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||(subordinate&&jQuery.isFunction(subordinate.promise))?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values);}else if(!(--remaining)){deferred.resolveWith(contexts,values);}};},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i<length;i++){if(resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)){resolveValues[i].promise().done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i,progressContexts,progressValues));}else{--remaining;}}}
198if(!remaining){deferred.resolveWith(resolveContexts,resolveValues);}
199return deferred.promise();}});var readyList;jQuery.fn.ready=function(fn){jQuery.ready.promise().done(fn);return this;};jQuery.extend({isReady:false,readyWait:1,holdReady:function(hold){if(hold){jQuery.readyWait++;}else{jQuery.ready(true);}},ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return;}
200if(!document.body){return setTimeout(jQuery.ready);}
201jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return;}
202readyList.resolveWith(document,[jQuery]);if(jQuery.fn.trigger){jQuery(document).trigger("ready").off("ready");}}});function detach(){if(document.addEventListener){document.removeEventListener("DOMContentLoaded",completed,false);window.removeEventListener("load",completed,false);}else{document.detachEvent("onreadystatechange",completed);window.detachEvent("onload",completed);}}
203function completed(){if(document.addEventListener||event.type==="load"||document.readyState==="complete"){detach();jQuery.ready();}}
204jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"){setTimeout(jQuery.ready);}else if(document.addEventListener){document.addEventListener("DOMContentLoaded",completed,false);window.addEventListener("load",completed,false);}else{document.attachEvent("onreadystatechange",completed);window.attachEvent("onload",completed);var top=false;try{top=window.frameElement==null&&document.documentElement;}catch(e){}
205if(top&&top.doScroll){(function doScrollCheck(){if(!jQuery.isReady){try{top.doScroll("left");}catch(e){return setTimeout(doScrollCheck,50);}
206detach();jQuery.ready();}})();}}}
207return readyList.promise(obj);};var strundefined=typeof undefined;var i;for(i in jQuery(support)){break;}
208support.ownLast=i!=="0";support.inlineBlockNeedsLayout=false;jQuery(function(){var container,div,body=document.getElementsByTagName("body")[0];if(!body){return;}
209container=document.createElement("div");container.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";div=document.createElement("div");body.appendChild(container).appendChild(div);if(typeof div.style.zoom!==strundefined){div.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1";if((support.inlineBlockNeedsLayout=(div.offsetWidth===3))){body.style.zoom=1;}}
210body.removeChild(container);container=div=null;});(function(){var div=document.createElement("div");if(support.deleteExpando==null){support.deleteExpando=true;try{delete div.test;}catch(e){support.deleteExpando=false;}}
211div=null;})();jQuery.acceptData=function(elem){var noData=jQuery.noData[(elem.nodeName+" ").toLowerCase()],nodeType=+elem.nodeType||1;return nodeType!==1&&nodeType!==9?false:!noData||noData!==true&&elem.getAttribute("classid")===noData;};var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data;}catch(e){}
212jQuery.data(elem,key,data);}else{data=undefined;}}
213return data;}
214function isEmptyDataObject(obj){var name;for(name in obj){if(name==="data"&&jQuery.isEmptyObject(obj[name])){continue;}
215if(name!=="toJSON"){return false;}}
216return true;}
217function internalData(elem,name,data,pvt){if(!jQuery.acceptData(elem)){return;}
218var ret,thisCache,internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if((!id||!cache[id]||(!pvt&&!cache[id].data))&&data===undefined&&typeof name==="string"){return;}
219if(!id){if(isNode){id=elem[internalKey]=deletedIds.pop()||jQuery.guid++;}else{id=internalKey;}}
220if(!cache[id]){cache[id]=isNode?{}:{toJSON:jQuery.noop};}
221if(typeof name==="object"||typeof name==="function"){if(pvt){cache[id]=jQuery.extend(cache[id],name);}else{cache[id].data=jQuery.extend(cache[id].data,name);}}
222thisCache=cache[id];if(!pvt){if(!thisCache.data){thisCache.data={};}
223thisCache=thisCache.data;}
224if(data!==undefined){thisCache[jQuery.camelCase(name)]=data;}
225if(typeof name==="string"){ret=thisCache[name];if(ret==null){ret=thisCache[jQuery.camelCase(name)];}}else{ret=thisCache;}
226return ret;}
227function internalRemoveData(elem,name,pvt){if(!jQuery.acceptData(elem)){return;}
228var thisCache,i,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(!cache[id]){return;}
229if(name){thisCache=pvt?cache[id]:cache[id].data;if(thisCache){if(!jQuery.isArray(name)){if(name in thisCache){name=[name];}else{name=jQuery.camelCase(name);if(name in thisCache){name=[name];}else{name=name.split(" ");}}}else{name=name.concat(jQuery.map(name,jQuery.camelCase));}
230i=name.length;while(i--){delete thisCache[name[i]];}
231if(pvt?!isEmptyDataObject(thisCache):!jQuery.isEmptyObject(thisCache)){return;}}}
232if(!pvt){delete cache[id].data;if(!isEmptyDataObject(cache[id])){return;}}
233if(isNode){jQuery.cleanData([elem],true);}else if(support.deleteExpando||cache!=cache.window){delete cache[id];}else{cache[id]=null;}}
234jQuery.extend({cache:{},noData:{"applet ":true,"embed ":true,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(elem){elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando];return!!elem&&!isEmptyDataObject(elem);},data:function(elem,name,data){return internalData(elem,name,data);},removeData:function(elem,name){return internalRemoveData(elem,name);},_data:function(elem,name,data){return internalData(elem,name,data,true);},_removeData:function(elem,name){return internalRemoveData(elem,name,true);}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=jQuery.data(elem);if(elem.nodeType===1&&!jQuery._data(elem,"parsedAttrs")){i=attrs.length;while(i--){name=attrs[i].name;if(name.indexOf("data-")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name]);}}
235jQuery._data(elem,"parsedAttrs",true);}}
236return data;}
237if(typeof key==="object"){return this.each(function(){jQuery.data(this,key);});}
238return arguments.length>1?this.each(function(){jQuery.data(this,key,value);}):elem?dataAttr(elem,key,jQuery.data(elem,key)):undefined;},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=jQuery._data(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=jQuery._data(elem,type,jQuery.makeArray(data));}else{queue.push(data);}}
239return queue||[];}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type);};if(fn==="inprogress"){fn=queue.shift();startLength--;}
240if(fn){if(type==="fx"){queue.unshift("inprogress");}
241delete hooks.stop;fn.call(elem,next,hooks);}
242if(!startLength&&hooks){hooks.empty.fire();}},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem,type+"queue");jQuery._removeData(elem,key);})});}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;}
243if(arguments.length<setter){return jQuery.queue(this[0],type);}
244return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});},clearQueue:function(type){return this.queue(type||"fx",[]);},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!(--count)){defer.resolveWith(elements,[elements]);}};if(typeof type!=="string"){obj=type;type=undefined;}
245type=type||"fx";while(i--){tmp=jQuery._data(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve);}}
246resolve();return defer.promise(obj);}});var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;var cssExpand=["Top","Right","Bottom","Left"];var isHidden=function(elem,el){elem=el||elem;return jQuery.css(elem,"display")==="none"||!jQuery.contains(elem.ownerDocument,elem);};var access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,length=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){jQuery.access(elems,fn,i,key[i],true,emptyGet,raw);}}else if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true;}
247if(bulk){if(raw){fn.call(elems,value);fn=null;}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value);};}}
248if(fn){for(;i<length;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));}}}
249return chainable?elems:bulk?fn.call(elems):length?fn(elems[0],key):emptyGet;};var rcheckableType=(/^(?:checkbox|radio)$/i);(function(){var fragment=document.createDocumentFragment(),div=document.createElement("div"),input=document.createElement("input");div.setAttribute("className","t");div.innerHTML="  <link/><table></table><a href='/a'>a</a>";support.leadingWhitespace=div.firstChild.nodeType===3;support.tbody=!div.getElementsByTagName("tbody").length;support.htmlSerialize=!!div.getElementsByTagName("link").length;support.html5Clone=document.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>";input.type="checkbox";input.checked=true;fragment.appendChild(input);support.appendChecked=input.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;fragment.appendChild(div);div.innerHTML="<input type='radio' checked='checked' name='t'/>";support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;support.noCloneEvent=true;if(div.attachEvent){div.attachEvent("onclick",function(){support.noCloneEvent=false;});div.cloneNode(true).click();}
250if(support.deleteExpando==null){support.deleteExpando=true;try{delete div.test;}catch(e){support.deleteExpando=false;}}
251fragment=div=input=null;})();(function(){var i,eventName,div=document.createElement("div");for(i in{submit:true,change:true,focusin:true}){eventName="on"+i;if(!(support[i+"Bubbles"]=eventName in window)){div.setAttribute(eventName,"t");support[i+"Bubbles"]=div.attributes[eventName].expando===false;}}
252div=null;})();var rformElems=/^(?:input|select|textarea)$/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true;}
253function returnFalse(){return false;}
254function safeActiveElement(){try{return document.activeElement;}catch(err){}}
255jQuery.event={global:{},add:function(elem,types,handler,data,selector){var tmp,events,t,handleObjIn,special,eventHandle,handleObj,handlers,type,namespaces,origType,elemData=jQuery._data(elem);if(!elemData){return;}
256if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;}
257if(!handler.guid){handler.guid=jQuery.guid++;}
258if(!(events=elemData.events)){events=elemData.events={};}
259if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&(!e||jQuery.event.triggered!==e.type)?jQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined;};eventHandle.elem=elem;}
260types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue;}
261special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}
262if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
263if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);}
264jQuery.event.global[type]=true;}
265elem=null;},remove:function(elem,types,handler,selector,mappedTypes){var j,handleObj,tmp,origCount,t,events,special,handlers,type,namespaces,origType,elemData=jQuery.hasData(elem)&&jQuery._data(elem);if(!elemData||!(events=elemData.events)){return;}
266types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);}
267continue;}
268special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;}
269if(special.remove){special.remove.call(elem,handleObj);}}}
270if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle);}
271delete events[type];}}
272if(jQuery.isEmptyObject(events)){delete elemData.handle;jQuery._removeData(elem,"events");}},trigger:function(event,data,elem,onlyHandlers){var handle,ontype,cur,bubbleType,special,tmp,i,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return;}
273if(rfocusMorph.test(type+jQuery.event.triggered)){return;}
274if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();}
275ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem;}
276data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return;}
277if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode;}
278for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur;}
279if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window);}}
280i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(jQuery._data(cur,"events")||{})[event.type]&&jQuery._data(cur,"handle");if(handle){handle.apply(cur,data);}
281handle=ontype&&cur[ontype];if(handle&&handle.apply&&jQuery.acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault();}}}
282event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&jQuery.acceptData(elem)){if(ontype&&elem[type]&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null;}
283jQuery.event.triggered=type;try{elem[type]();}catch(e){}
284jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp;}}}}
285return event.result;},dispatch:function(event){event=jQuery.event.fix(event);var i,ret,handleObj,matched,j,handlerQueue=[],args=slice.call(arguments),handlers=(jQuery._data(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;}
286handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation();}}}}}
287if(special.postDispatch){special.postDispatch.call(this,event);}
288return event.result;},handlers:function(event,handlers){var sel,handleObj,matches,i,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click")){for(;cur!=this;cur=cur.parentNode||this){if(cur.nodeType===1&&(cur.disabled!==true||event.type!=="click")){matches=[];for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matches[sel]===undefined){matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length;}
289if(matches[sel]){matches.push(handleObj);}}
290if(matches.length){handlerQueue.push({elem:cur,handlers:matches});}}}}
291if(delegateCount<handlers.length){handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)});}
292return handlerQueue;},fix:function(event){if(event[jQuery.expando]){return event;}
293var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];if(!fixHook){this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{};}
294copy=fixHook.props?this.props.concat(fixHook.props):this.props;event=new jQuery.Event(originalEvent);i=copy.length;while(i--){prop=copy[i];event[prop]=originalEvent[prop];}
295if(!event.target){event.target=originalEvent.srcElement||document;}
296if(event.target.nodeType===3){event.target=event.target.parentNode;}
297event.metaKey=!!event.metaKey;return fixHook.filter?fixHook.filter(event,originalEvent):event;},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){if(event.which==null){event.which=original.charCode!=null?original.charCode:original.keyCode;}
298return event;}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var body,eventDoc,doc,button=original.button,fromElement=original.fromElement;if(event.pageX==null&&original.clientX!=null){eventDoc=event.target.ownerDocument||document;doc=eventDoc.documentElement;body=eventDoc.body;event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);}
299if(!event.relatedTarget&&fromElement){event.relatedTarget=fromElement===event.target?original.toElement:fromElement;}
300if(!event.which&&button!==undefined){event.which=(button&1?1:(button&2?3:(button&4?2:0)));}
301return event;}},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){try{this.focus();return false;}catch(e){}}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false;}},delegateType:"focusout"},click:{trigger:function(){if(jQuery.nodeName(this,"input")&&this.type==="checkbox"&&this.click){this.click();return false;}},_default:function(event){return jQuery.nodeName(event.target,"a");}},beforeunload:{postDispatch:function(event){if(event.result!==undefined){event.originalEvent.returnValue=event.result;}}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true,originalEvent:{}});if(bubble){jQuery.event.trigger(e,null,elem);}else{jQuery.event.dispatch.call(elem,e);}
302if(e.isDefaultPrevented()){event.preventDefault();}}};jQuery.removeEvent=document.removeEventListener?function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle,false);}}:function(elem,type,handle){var name="on"+type;if(elem.detachEvent){if(typeof elem[name]===strundefined){elem[name]=null;}
303elem.detachEvent(name,handle);}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props);}
304if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&(src.returnValue===false||src.getPreventDefault&&src.getPreventDefault())?returnTrue:returnFalse;}else{this.type=src;}
305if(props){jQuery.extend(this,props);}
306this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true;};jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(!e){return;}
307if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(!e){return;}
308if(e.stopPropagation){e.stopPropagation();}
309e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();}};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||(related!==target&&!jQuery.contains(target,related))){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;}
310return ret;}};});if(!support.submitBubbles){jQuery.event.special.submit={setup:function(){if(jQuery.nodeName(this,"form")){return false;}
311jQuery.event.add(this,"click._submit keypress._submit",function(e){var elem=e.target,form=jQuery.nodeName(elem,"input")||jQuery.nodeName(elem,"button")?elem.form:undefined;if(form&&!jQuery._data(form,"submitBubbles")){jQuery.event.add(form,"submit._submit",function(event){event._submit_bubble=true;});jQuery._data(form,"submitBubbles",true);}});},postDispatch:function(event){if(event._submit_bubble){delete event._submit_bubble;if(this.parentNode&&!event.isTrigger){jQuery.event.simulate("submit",this.parentNode,event,true);}}},teardown:function(){if(jQuery.nodeName(this,"form")){return false;}
312jQuery.event.remove(this,"._submit");}};}
313if(!support.changeBubbles){jQuery.event.special.change={setup:function(){if(rformElems.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){jQuery.event.add(this,"propertychange._change",function(event){if(event.originalEvent.propertyName==="checked"){this._just_changed=true;}});jQuery.event.add(this,"click._change",function(event){if(this._just_changed&&!event.isTrigger){this._just_changed=false;}
314jQuery.event.simulate("change",this,event,true);});}
315return false;}
316jQuery.event.add(this,"beforeactivate._change",function(e){var elem=e.target;if(rformElems.test(elem.nodeName)&&!jQuery._data(elem,"changeBubbles")){jQuery.event.add(elem,"change._change",function(event){if(this.parentNode&&!event.isSimulated&&!event.isTrigger){jQuery.event.simulate("change",this.parentNode,event,true);}});jQuery._data(elem,"changeBubbles",true);}});},handle:function(event){var elem=event.target;if(this!==elem||event.isSimulated||event.isTrigger||(elem.type!=="radio"&&elem.type!=="checkbox")){return event.handleObj.handler.apply(this,arguments);}},teardown:function(){jQuery.event.remove(this,"._change");return!rformElems.test(this.nodeName);}};}
317if(!support.focusinBubbles){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),true);};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true);}
318jQuery._data(doc,fix,(attaches||0)+1);},teardown:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);jQuery._removeData(doc,fix);}else{jQuery._data(doc,fix,attaches);}}};});}
319jQuery.fn.extend({on:function(types,selector,data,fn,one){var type,origFn;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined;}
320for(type in types){this.on(type,selector,data,types[type],one);}
321return this;}
322if(data==null&&fn==null){fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined;}else{fn=data;data=selector;selector=undefined;}}
323if(fn===false){fn=returnFalse;}else if(!fn){return this;}
324if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments);};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);}
325return this.each(function(){jQuery.event.add(this,types,fn,data,selector);});},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1);},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;}
326if(typeof types==="object"){for(type in types){this.off(type,selector,types[type]);}
327return this;}
328if(selector===false||typeof selector==="function"){fn=selector;selector=undefined;}
329if(fn===false){fn=returnFalse;}
330return this.each(function(){jQuery.event.remove(this,types,fn,selector);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement){while(list.length){safeFrag.createElement(list.pop());}}
331return safeFrag;}
332var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:null|\d+)"/g,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},safeFragment=createSafeFragment(document),fragmentDiv=safeFragment.appendChild(document.createElement("div"));wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var elems,elem,i=0,found=typeof context.getElementsByTagName!==strundefined?context.getElementsByTagName(tag||"*"):typeof context.querySelectorAll!==strundefined?context.querySelectorAll(tag||"*"):undefined;if(!found){for(found=[],elems=context.childNodes||context;(elem=elems[i])!=null;i++){if(!tag||jQuery.nodeName(elem,tag)){found.push(elem);}else{jQuery.merge(found,getAll(elem,tag));}}}
333return tag===undefined||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],found):found;}
334function fixDefaultChecked(elem){if(rcheckableType.test(elem.type)){elem.defaultChecked=elem.checked;}}
335function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem;}
336function disableScript(elem){elem.type=(jQuery.find.attr(elem,"type")!==null)+"/"+elem.type;return elem;}
337function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1];}else{elem.removeAttribute("type");}
338return elem;}
339function setGlobalEval(elems,refElements){var elem,i=0;for(;(elem=elems[i])!=null;i++){jQuery._data(elem,"globalEval",!refElements||jQuery._data(refElements[i],"globalEval"));}}
340function cloneCopyEvent(src,dest){if(dest.nodeType!==1||!jQuery.hasData(src)){return;}
341var type,i,l,oldData=jQuery._data(src),curData=jQuery._data(dest,oldData),events=oldData.events;if(events){delete curData.handle;curData.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i]);}}}
342if(curData.data){curData.data=jQuery.extend({},curData.data);}}
343function fixCloneNodeIssues(src,dest){var nodeName,e,data;if(dest.nodeType!==1){return;}
344nodeName=dest.nodeName.toLowerCase();if(!support.noCloneEvent&&dest[jQuery.expando]){data=jQuery._data(dest);for(e in data.events){jQuery.removeEvent(dest,e,data.handle);}
345dest.removeAttribute(jQuery.expando);}
346if(nodeName==="script"&&dest.text!==src.text){disableScript(dest).text=src.text;restoreScript(dest);}else if(nodeName==="object"){if(dest.parentNode){dest.outerHTML=src.outerHTML;}
347if(support.html5Clone&&(src.innerHTML&&!jQuery.trim(dest.innerHTML))){dest.innerHTML=src.innerHTML;}}else if(nodeName==="input"&&rcheckableType.test(src.type)){dest.defaultChecked=dest.checked=src.checked;if(dest.value!==src.value){dest.value=src.value;}}else if(nodeName==="option"){dest.defaultSelected=dest.selected=src.defaultSelected;}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}}
348jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var destElements,node,clone,i,srcElements,inPage=jQuery.contains(elem.ownerDocument,elem);if(support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")){clone=elem.cloneNode(true);}else{fragmentDiv.innerHTML=elem.outerHTML;fragmentDiv.removeChild(clone=fragmentDiv.firstChild);}
349if((!support.noCloneEvent||!support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0;(node=srcElements[i])!=null;++i){if(destElements[i]){fixCloneNodeIssues(node,destElements[i]);}}}
350if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0;(node=srcElements[i])!=null;i++){cloneCopyEvent(node,destElements[i]);}}else{cloneCopyEvent(elem,clone);}}
351destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));}
352destElements=srcElements=node=null;return clone;},buildFragment:function(elems,context,scripts,selection){var j,elem,contains,tmp,tag,tbody,wrap,l=elems.length,safe=createSafeFragment(context),nodes=[],i=0;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(jQuery.type(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem);}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem));}else{tmp=tmp||safe.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild;}
353if(!support.leadingWhitespace&&rleadingWhitespace.test(elem)){nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0]));}
354if(!support.tbody){elem=tag==="table"&&!rtbody.test(elem)?tmp.firstChild:wrap[1]==="<table>"&&!rtbody.test(elem)?tmp:0;j=elem&&elem.childNodes.length;while(j--){if(jQuery.nodeName((tbody=elem.childNodes[j]),"tbody")&&!tbody.childNodes.length){elem.removeChild(tbody);}}}
355jQuery.merge(nodes,tmp.childNodes);tmp.textContent="";while(tmp.firstChild){tmp.removeChild(tmp.firstChild);}
356tmp=safe.lastChild;}}}
357if(tmp){safe.removeChild(tmp);}
358if(!support.appendChecked){jQuery.grep(getAll(nodes,"input"),fixDefaultChecked);}
359i=0;while((elem=nodes[i++])){if(selection&&jQuery.inArray(elem,selection)!==-1){continue;}
360contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(safe.appendChild(elem),"script");if(contains){setGlobalEval(tmp);}
361if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem);}}}}
362tmp=null;return safe;},cleanData:function(elems,acceptData){var elem,type,id,data,i=0,internalKey=jQuery.expando,cache=jQuery.cache,deleteExpando=support.deleteExpando,special=jQuery.event.special;for(;(elem=elems[i])!=null;i++){if(acceptData||jQuery.acceptData(elem)){id=elem[internalKey];data=id&&cache[id];if(data){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{jQuery.removeEvent(elem,type,data.handle);}}}
363if(cache[id]){delete cache[id];if(deleteExpando){delete elem[internalKey];}else if(typeof elem.removeAttribute!==strundefined){elem.removeAttribute(internalKey);}else{elem[internalKey]=null;}
364deletedIds.push(id);}}}}}});jQuery.fn.extend({text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value));},null,value,arguments.length);},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},remove:function(selector,keepData){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem=elems[i])!=null;i++){if(!keepData&&elem.nodeType===1){jQuery.cleanData(getAll(elem));}
365if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem)){setGlobalEval(getAll(elem,"script"));}
366elem.parentNode.removeChild(elem);}}
367return this;},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));}
368while(elem.firstChild){elem.removeChild(elem.firstChild);}
369if(elem.options&&jQuery.nodeName(elem,"select")){elem.options.length=0;}}
370return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined){return elem.nodeType===1?elem.innerHTML.replace(rinlinejQuery,""):undefined;}
371if(typeof value==="string"&&!rnoInnerhtml.test(value)&&(support.htmlSerialize||!rnoshimcache.test(value))&&(support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value;}}
372elem=0;}catch(e){}}
373if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function(){var arg=arguments[0];this.domManip(arguments,function(elem){arg=this.parentNode;jQuery.cleanData(getAll(this));if(arg){arg.replaceChild(elem,this);}});return arg&&(arg.length||arg.nodeType)?this:this.remove();},detach:function(selector){return this.remove(selector,true);},domManip:function(args,callback){args=concat.apply([],args);var first,node,hasScripts,scripts,doc,fragment,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||(l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return this.each(function(index){var self=set.eq(index);if(isFunction){args[0]=value.call(this,index,self.html());}
374self.domManip(args,callback);});}
375if(l){fragment=jQuery.buildFragment(args,this[0].ownerDocument,false,this);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first;}
376if(first){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"));}}
377callback.call(this[i],node,i);}
378if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!jQuery._data(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src){if(jQuery._evalUrl){jQuery._evalUrl(node.src);}}else{jQuery.globalEval((node.text||node.textContent||node.innerHTML||"").replace(rcleanScript,""));}}}}
379fragment=first=null;}}
380return this;}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,i=0,ret=[],insert=jQuery(selector),last=insert.length-1;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get());}
381return this.pushStack(ret);};});var iframe,elemdisplay={};function actualDisplay(name,doc){var elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=window.getDefaultComputedStyle?window.getDefaultComputedStyle(elem[0]).display:jQuery.css(elem[0],"display");elem.detach();return display;}
382function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];if(!display){display=actualDisplay(nodeName,doc);if(display==="none"||!display){iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement);doc=(iframe[0].contentWindow||iframe[0].contentDocument).document;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach();}
383elemdisplay[nodeName]=display;}
384return display;}
385(function(){var a,shrinkWrapBlocksVal,div=document.createElement("div"),divReset="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;"+"display:block;padding:0;margin:0;border:0";div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";a=div.getElementsByTagName("a")[0];a.style.cssText="float:left;opacity:.5";support.opacity=/^0.5/.test(a.style.opacity);support.cssFloat=!!a.style.cssFloat;div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";a=div=null;support.shrinkWrapBlocks=function(){var body,container,div,containerStyles;if(shrinkWrapBlocksVal==null){body=document.getElementsByTagName("body")[0];if(!body){return;}
386containerStyles="border:0;width:0;height:0;position:absolute;top:0;left:-9999px";container=document.createElement("div");div=document.createElement("div");body.appendChild(container).appendChild(div);shrinkWrapBlocksVal=false;if(typeof div.style.zoom!==strundefined){div.style.cssText=divReset+";width:1px;padding:1px;zoom:1";div.innerHTML="<div></div>";div.firstChild.style.width="5px";shrinkWrapBlocksVal=div.offsetWidth!==3;}
387body.removeChild(container);body=container=div=null;}
388return shrinkWrapBlocksVal;};})();var rmargin=(/^margin/);
388var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles,curCSS,rposition=/^(top|right|bottom|left)$/;if(window.getComputedStyle){getStyles=function(elem){return elem.ownerDocument.defaultView.getComputedStyle(elem,null);};curCSS=function(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);ret=computed?computed.getPropertyValue(name)||computed[name]:undefined;if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name);}
389if(rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth;}}
390return ret===undefined?ret:ret+"";};}else if(document.documentElement.currentStyle){getStyles=function(elem){return elem.currentStyle;};curCSS=function(elem,name,computed){var left,rs,rsLeft,ret,style=elem.style;computed=computed||getStyles(elem);ret=computed?computed[name]:undefined;if(ret==null&&style&&style[name]){ret=style[name];}
391if(rnumnonpx.test(ret)&&!rposition.test(name)){left=style.left;rs=elem.runtimeStyle;rsLeft=rs&&rs.left;if(rsLeft){rs.left=elem.currentStyle.left;}
392style.left=name==="fontSize"?"1em":ret;ret=style.pixelLeft+"px";style.left=left;if(rsLeft){rs.left=rsLeft;}}
393return ret===undefined?ret:ret+""||"auto";};}
394function addGetHookIf(conditionFn,hookFn){return{get:function(){var condition=conditionFn();if(condition==null){return;}
395if(condition){delete this.get;return;}
396return(this.get=hookFn).apply(this,arguments);}};}
397(function(){var a,reliableHiddenOffsetsVal,boxSizingVal,boxSizingReliableVal,pixelPositionVal,reliableMarginRightVal,div=document.createElement("div"),containerStyles="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",divReset="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;"+"display:block;padding:0;margin:0;border:0";div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";a=div.getElementsByTagName("a")[0];a.style.cssText="float:left;opacity:.5";support.opacity=/^0.5/.test(a.style.opacity);support.cssFloat=!!a.style.cssFloat;div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";a=div=null;jQuery.extend(support,{reliableHiddenOffsets:function(){if(reliableHiddenOffsetsVal!=null){return reliableHiddenOffsetsVal;}
398var container,tds,isSupported,div=document.createElement("div"),body=document.getElementsByTagName("body")[0];if(!body){return;}
399div.setAttribute("className","t");div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";container=document.createElement("div");container.style.cssText=containerStyles;body.appendChild(container).appendChild(div);div.innerHTML="<table><tr><td></td><td>t</td></tr></table>";tds=div.getElementsByTagName("td");tds[0].style.cssText="padding:0;margin:0;border:0;display:none";isSupported=(tds[0].offsetHeight===0);tds[0].style.display="";tds[1].style.display="none";reliableHiddenOffsetsVal=isSupported&&(tds[0].offsetHeight===0);body.removeChild(container);div=body=null;return reliableHiddenOffsetsVal;},boxSizing:function(){if(boxSizingVal==null){computeStyleTests();}
400return boxSizingVal;},boxSizingReliable:function(){if(boxSizingReliableVal==null){computeStyleTests();}
401return boxSizingReliableVal;},pixelPosition:function(){if(pixelPositionVal==null){computeStyleTests();}
402return pixelPositionVal;},reliableMarginRight:function(){var body,container,div,marginDiv;if(reliableMarginRightVal==null&&window.getComputedStyle){body=document.getElementsByTagName("body")[0];if(!body){return;}
403container=document.createElement("div");div=document.createElement("div");container.style.cssText=containerStyles;body.appendChild(container).appendChild(div);marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText=divReset;marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";reliableMarginRightVal=!parseFloat((window.getComputedStyle(marginDiv,null)||{}).marginRight);body.removeChild(container);}
404return reliableMarginRightVal;}});function computeStyleTests(){var container,div,body=document.getElementsByTagName("body")[0];if(!body){return;}
405container=document.createElement("div");div=document.createElement("div");container.style.cssText=containerStyles;body.appendChild(container).appendChild(div);div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;"+"position:absolute;display:block;padding:1px;border:1px;width:4px;"+"margin-top:1%;top:1%";jQuery.swap(body,body.style.zoom!=null?{zoom:1}:{},function(){boxSizingVal=div.offsetWidth===4;});boxSizingReliableVal=true;pixelPositionVal=false;reliableMarginRightVal=true;if(window.getComputedStyle){pixelPositionVal=(window.getComputedStyle(div,null)||{}).top!=="1%";boxSizingReliableVal=(window.getComputedStyle(div,null)||{width:"4px"}).width==="4px";}
406body.removeChild(container);div=body=null;}})();jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
407ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name];}
408return ret;};var
vendor: 57,569 bytes, lines 409-648
409ralpha=/alpha\([^)]*\)/i,ropacity=/opacity\s*=\s*([^)]*)/,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:0,fontWeight:400},cssPrefixes=["Webkit","O","Moz","ms"];function vendorPropName(style,name){if(name in style){return name;}
410var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style){return name;}}
411return origName;}
412function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue;}
413values[index]=jQuery._data(elem,"olddisplay");display=elem.style.display;if(show){if(!values[index]&&display==="none"){elem.style.display="";}
414if(elem.style.display===""&&isHidden(elem)){values[index]=jQuery._data(elem,"olddisplay",defaultDisplay(elem.nodeName));}}else{if(!values[index]){hidden=isHidden(elem);if(display&&display!=="none"||!hidden){jQuery._data(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"));}}}}
415for(index=0;index<length;index++){elem=elements[index];if(!elem.style){continue;}
416if(!show||elem.style.display==="none"||elem.style.display===""){elem.style.display=show?values[index]||"":"none";}}
417return elements;}
418function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value;}
419function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles);}
420if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);}
421if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}}
422return val;}
423function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=support.boxSizing()&&jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null){val=elem.style[name];}
424if(rnumnonpx.test(val)){return val;}
425valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0;}
426return(val+
427augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles))+"px";}
428jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}}}},cssNumber:{"columnCount":true,"fillOpacity":true,"fontWeight":true,"lineHeight":true,"opacity":true,"order":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;}
429var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name));type="number";}
430if(value==null||value!==value){return;}
431if(type==="number"&&!jQuery.cssNumber[origName]){value+="px";}
432if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit";}
433if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){try{style[name]="";style[name]=value;}catch(e){}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;}
434return style[name];}},css:function(elem,name,extra,styles){var num,val,hooks,origName=jQuery.camelCase(name);name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra);}
435if(val===undefined){val=curCSS(elem,name,styles);}
436if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name];}
437if(extra===""||extra){num=parseFloat(val);return extra===true||jQuery.isNumeric(num)?num||0:val;}
438return val;}});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){return elem.offsetWidth===0&&rdisplayswap.test(jQuery.css(elem,"display"))?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra);}):getWidthOrHeight(elem,name,extra);}},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,support.boxSizing()&&jQuery.css(elem,"boxSizing",false,styles)==="border-box",styles):0);}};});if(!support.opacity){jQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":computed?"1":"";},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=jQuery.isNumeric(value)?"alpha(opacity="+value*100+")":"",filter=currentStyle&&currentStyle.filter||style.filter||"";style.zoom=1;if((value>=1||value==="")&&jQuery.trim(filter.replace(ralpha,""))===""&&style.removeAttribute){style.removeAttribute("filter");if(value===""||currentStyle&&!currentStyle.filter){return;}}
439style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity;}};}
440jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){if(computed){return jQuery.swap(elem,{"display":"inline-block"},curCSS,[elem,"marginRight"]);}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];}
441return expanded;}};if(!rmargin.test(prefix)){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles);}
442return map;}
443return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name);},name,value,arguments.length>1);},show:function(){return showHide(this,true);},hide:function(){return showHide(this);},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide();}
444return this.each(function(){if(isHidden(this)){jQuery(this).show();}else{jQuery(this).hide();}});}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing);}
445jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px");},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this);},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);}else{this.pos=eased=percent;}
446this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);}
447if(hooks&&hooks.set){hooks.set(this);}else{Tween.propHooks._default.set(this);}
448return this;}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)){return tween.elem[tween.prop];}
449result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result;},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween);}else if(tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);}else{tween.elem[tween.prop]=tween.now;}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now;}}};jQuery.easing={linear:function(p){return p;},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2;}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var
450fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do{scale=scale||".5";start=start/scale;jQuery.style(tween.elem,prop,start+unit);}while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations);}
451if(parts){start=tween.start=+start||+target||0;tween.unit=unit;tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2];}
452return tween;}]};function createFxNow(){setTimeout(function(){fxNow=undefined;});return(fxNow=jQuery.now());}
453function genFx(type,includeWidth){var which,attrs={height:type},i=0;includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type;}
454if(includeWidth){attrs.opacity=attrs.width=type;}
455return attrs;}
456function createTween(value,prop,animation){var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if((tween=collection[index].call(animation,prop,value))){return tween;}}}
457function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,dDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=jQuery._data(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};}
458hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});}
459if(elem.nodeType===1&&("height"in props||"width"in props)){opts.overflow=[style.overflow,style.overflowX,style.overflowY];display=jQuery.css(elem,"display");dDisplay=defaultDisplay(elem.nodeName);if(display==="none"){display=dDisplay;}
460if(display==="inline"&&jQuery.css(elem,"float")==="none"){if(!support.inlineBlockNeedsLayout||dDisplay==="inline"){style.display="inline-block";}else{style.zoom=1;}}}
461if(opts.overflow){style.overflow="hidden";if(!support.shrinkWrapBlocks()){anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}}
462for(prop in props){value=props[prop];if(rfxtypes.exec(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;}else{continue;}}
463orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}}
464if(!jQuery.isEmptyObject(orig)){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else{dataShow=jQuery._data(elem,"fxshow",{});}
465if(toggle){dataShow.hidden=!hidden;}
466if(hidden){jQuery(elem).show();}else{anim.done(function(){jQuery(elem).hide();});}
467anim.done(function(){var prop;jQuery._removeData(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});for(prop in orig){tween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=tween.start;if(hidden){tween.end=tween.start;tween.start=prop==="width"||prop==="height"?1:0;}}}}}
468function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);easing=specialEasing[name];value=props[index];if(jQuery.isArray(value)){easing=value[1];value=props[index]=value[0];}
469if(index!==name){props[name]=value;delete props[index];}
470hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else{specialEasing[name]=easing;}}}
471function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem;}),tick=function(){if(stopped){return false;}
472var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent);}
473deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining;}else{deferred.resolveWith(elem,[animation]);return false;}},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween;},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this;}
474stopped=true;for(;index<length;index++){animation.tweens[index].run(1);}
475if(gotoEnd){deferred.resolveWith(elem,[animation,gotoEnd]);}else{deferred.rejectWith(elem,[animation,gotoEnd]);}
476return this;}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=animationPrefilters[index].call(animation,elem,props,animation.opts);if(result){return result;}}
477jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start)){animation.opts.start.call(elem,animation);}
478jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);}
479jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){if(jQuery.isFunction(props)){callback=props;props=["*"];}else{props=props.split(" ");}
480var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];tweeners[prop]=tweeners[prop]||[];tweeners[prop].unshift(callback);}},prefilter:function(callback,prepend){if(prepend){animationPrefilters.unshift(callback);}else{animationPrefilters.push(callback);}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default;if(opt.queue==null||opt.queue===true){opt.queue="fx";}
481opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old)){opt.old.call(this);}
482if(opt.queue){jQuery.dequeue(this,opt.queue);}};return opt;};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||jQuery._data(this,"finish")){anim.stop(true);}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd);};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined;}
483if(clearQueue&&type!==false){this.queue(type||"fx",[]);}
484return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=jQuery._data(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index]);}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index]);}}}
485for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1);}}
486if(dequeue||!gotoEnd){jQuery.dequeue(this,type);}});},finish:function(type){if(type!==false){type=type||"fx";}
487return this.each(function(){var index,data=jQuery._data(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true);}
488for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1);}}
489for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this);}}
490delete data.finish;});}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback);};});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});jQuery.timers=[];jQuery.fx.tick=function(){var timer,timers=jQuery.timers,i=0;fxNow=jQuery.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1);}}
491if(!timers.length){jQuery.fx.stop();}
492fxNow=undefined;};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);if(timer()){jQuery.fx.start();}else{jQuery.timers.pop();}};jQuery.fx.interval=13;jQuery.fx.start=function(){if(!timerId){timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval);}};jQuery.fx.stop=function(){clearInterval(timerId);timerId=null;};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout);};});};(function(){var a,input,select,opt,div=document.createElement("div");div.setAttribute("className","t");div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";a=div.getElementsByTagName("a")[0];select=document.createElement("select");opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];a.style.cssText="top:1px";support.getSetAttribute=div.className!=="t";support.style=/top/.test(a.getAttribute("style"));support.hrefNormalized=a.getAttribute("href")==="/a";support.checkOn=!!input.value;support.optSelected=opt.selected;support.enctype=!!document.createElement("form").enctype;select.disabled=true;support.optDisabled=!opt.disabled;input=document.createElement("input");input.setAttribute("value","");support.input=input.getAttribute("value")==="";input.value="t";input.setAttribute("type","radio");support.radioValue=input.value==="t";a=input=select=opt=div=null;})();var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;}
493ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret;}
494return;}
495isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return;}
496if(isFunction){val=value.call(this,i,jQuery(this).val());}else{val=value;}
497if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});}
498hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.text(elem);}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i<max;i++){option=options[i];if((option.selected||i===index)&&(support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value;}
499values.push(value);}}
500return values;},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(jQuery.inArray(jQuery.valHooks.option.get(option),values)>=0){try{option.selected=optionSet=true;}catch(_){option.scrollHeight;}}else{option.selected=false;}}
501if(!optionSet){elem.selectedIndex=-1;}
502return options;}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0);}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle,ruseDefault=/^(?:checked|selected)$/i,getSetAttribute=support.getSetAttribute,getSetInput=support.input;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1);},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name);});}});jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return;}
503if(typeof elem.getAttribute===strundefined){return jQuery.prop(elem,name,value);}
504if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook);}
505if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);}else if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{elem.setAttribute(name,value+"");return value;}}else if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}else{ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret;}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name)){if(getSetInput&&getSetAttribute||!ruseDefault.test(name)){elem[propName]=false;}else{elem[jQuery.camelCase("default-"+name)]=elem[propName]=false;}}else{jQuery.attr(elem,name,"");}
506elem.removeAttribute(getSetAttribute?name:propName);}}},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;}
507return value;}}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name);}else if(getSetInput&&getSetAttribute||!ruseDefault.test(name)){elem.setAttribute(!getSetAttribute&&jQuery.propFix[name]||name,name);}else{elem[jQuery.camelCase("default-"+name)]=elem[name]=true;}
508return name;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=getSetInput&&getSetAttribute||!ruseDefault.test(name)?function(elem,name,isXML){var ret,handle;if(!isXML){handle=attrHandle[name];attrHandle[name]=ret;ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle;}
509return ret;}:function(elem,name,isXML){if(!isXML){return elem[jQuery.camelCase("default-"+name)]?name.toLowerCase():null;}};});if(!getSetInput||!getSetAttribute){jQuery.attrHooks.value={set:function(elem,value,name){if(jQuery.nodeName(elem,"input")){elem.defaultValue=value;}else{return nodeHook&&nodeHook.set(elem,value,name);}}};}
510if(!getSetAttribute){nodeHook={set:function(elem,value,name){var ret=elem.getAttributeNode(name);if(!ret){elem.setAttributeNode((ret=elem.ownerDocument.createAttribute(name)));}
511ret.value=value+="";if(name==="value"||value===elem.getAttribute(name)){return value;}}};attrHandle.id=attrHandle.name=attrHandle.coords=function(elem,name,isXML){var ret;if(!isXML){return(ret=elem.getAttributeNode(name))&&ret.value!==""?ret.value:null;}};jQuery.valHooks.button={get:function(elem,name){var ret=elem.getAttributeNode(name);if(ret&&ret.specified){return ret.value;}},set:nodeHook.set};jQuery.attrHooks.contenteditable={set:function(elem,value,name){nodeHook.set(elem,value===""?false:value,name);}};jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]={set:function(elem,value){if(value===""){elem.setAttribute(name,"auto");return value;}}};});}
512if(!support.style){jQuery.attrHooks.style={get:function(elem){return elem.style.cssText||undefined;},set:function(elem,value){return(elem.style.cssText=value+"");}};}
513var rfocusable=/^(?:input|select|textarea|button|object)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function(name){name=jQuery.propFix[name]||name;return this.each(function(){try{this[name]=undefined;delete this[name];}catch(e){}});}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return;}
514notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];}
515if(value!==undefined){return hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem[name]=value);}else{return hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name];}},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1;}}}});if(!support.hrefNormalized){jQuery.each(["href","src"],function(i,name){jQuery.propHooks[name]={get:function(elem){return elem.getAttribute(name,4);}};});}
516if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}
517return null;}};}
518jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});if(!support.enctype){jQuery.propFix.enctype="encoding";}
519var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed=typeof value==="string"&&value;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className));});}
520if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i<len;i++){elem=this[i];cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ");if(cur){j=0;while((clazz=classes[j++])){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" ";}}
521finalValue=jQuery.trim(cur);if(elem.className!==finalValue){elem.className=finalValue;}}}}
522return this;},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed=arguments.length===0||typeof value==="string"&&value;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className));});}
523if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i<len;i++){elem=this[i];cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"");if(cur){j=0;while((clazz=classes[j++])){while(cur.indexOf(" "+clazz+" ")>=0){cur=cur.replace(" "+clazz+" "," ");}}
524finalValue=value?jQuery.trim(cur):"";if(elem.className!==finalValue){elem.className=finalValue;}}}}
525return this;},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value);}
526if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal);});}
527return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className);}else{self.addClass(className);}}}else if(type===strundefined||type==="boolean"){if(this.className){jQuery._data(this,"__className__",this.className);}
528this.className=this.className||value===false?"":jQuery._data(this,"__className__")||"";}});},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i<l;i++){if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0){return true;}}
529return false;}});jQuery.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(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);},bind:function(types,data,fn){return this.on(types,null,data,fn);},unbind:function(types,fn){return this.off(types,null,fn);},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn);}});var nonce=jQuery.now();var rquery=(/\?/);var rvalidtokens=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;jQuery.parseJSON=function(data){if(window.JSON&&window.JSON.parse){return window.JSON.parse(data+"");}
530var requireNonComma,depth=null,str=jQuery.trim(data+"");return str&&!jQuery.trim(str.replace(rvalidtokens,function(token,comma,open,close){if(requireNonComma&&comma){depth=0;}
531if(depth===0){return token;}
532requireNonComma=open||comma;depth+=!close-!open;return"";}))?(Function("return "+str))():jQuery.error("Invalid JSON: "+data);};jQuery.parseXML=function(data){var xml,tmp;if(!data||typeof data!=="string"){return null;}
533try{if(window.DOMParser){tmp=new DOMParser();xml=tmp.parseFromString(data,"text/xml");}else{xml=new ActiveXObject("Microsoft.XMLDOM");xml.async="false";xml.loadXML(data);}}catch(e){xml=undefined;}
534if(!xml||!xml.documentElement||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);}
535return xml;};var
536ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href;}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;}
537ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";}
538var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func)){while((dataType=dataTypes[i++])){if(dataType.charAt(0)==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func);}else{(structure[dataType]=structure[dataType]||[]).push(func);}}}};}
539function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false;}else if(seekingTransport){return!(selected=dataTypeOrTransport);}});return selected;}
540return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");}
541function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];}}
542if(deep){jQuery.extend(true,target,deep);}
543return target;}
544function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");}}
545if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}
546if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}
547if(!firstDataType){firstDataType=type;}}
548finalDataType=finalDataType||firstDataType;}
549if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}
550return responses[finalDataType];}}
551function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}
552current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}
553if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}
554prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2];}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}
555break;}}}}
556if(conv!==true){if(conv&&s["throws"]){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}}
557return{state:"success",data:response};}
558jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,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":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target);},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;}
559options=options||{};var
560parts,i,cacheURL,responseHeadersString,timeoutTimer,fireGlobals,transport,responseHeaders,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}}
561match=responseHeaders[key.toLowerCase()];}
562return match==null?null:match;},getAllResponseHeaders:function(){return state===2?responseHeadersString:null;},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value;}
563return this;},overrideMimeType:function(type){if(!state){s.mimeType=type;}
564return this;},statusCode:function(map){var code;if(map){if(state<2){for(code in map){statusCode[code]=[statusCode[code],map[code]];}}else{jqXHR.always(map[jqXHR.status]);}}
565return this;},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText);}
566done(0,finalText);return this;}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))));}
567if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}
568inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return jqXHR;}
569fireGlobals=s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");}
570s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=(s.url+=(rquery.test(cacheURL)?"&":"?")+s.data);delete s.data;}
571if(s.cache===false){s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++;}}
572if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);}
573if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);}}
574if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);}
575jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);}
576if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){return jqXHR.abort();}
577strAbort="abort";for(i in{success:1,error:1,complete:1}){jqXHR[i](s[i]);}
578transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);}
579if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout");},s.timeout);}
580try{state=1;transport.send(requestHeaders,done);}catch(e){if(state<2){done(-1,e);}else{throw e;}}}
581function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(state===2){return;}
582state=2;if(timeoutTimer){clearTimeout(timeoutTimer);}
583transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses);}
584response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified;}
585modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified;}}
586if(status===204||s.type==="HEAD"){statusText="nocontent";}else if(status===304){statusText="notmodified";}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error;}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0;}}}
587jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);}
588jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]);}
589completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop");}}}
590return jqXHR;},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script");}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined;}
591return jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback});};});jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn);};});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true});};jQuery.fn.extend({wrapAll:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i));});}
592if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}
593wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;}
594return elem;}).append(this);}
595return this;},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}
596return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html);});},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes);}}).end();}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0||(!support.reliableHiddenOffsets()&&((elem.style&&elem.style.display)||jQuery.css(elem,"display"))==="none");};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem);};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add);}});}else if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}}
597jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():(value==null?"":value);s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);};if(traditional===undefined){traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional;}
598if(jQuery.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value);});}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add);}}
599return s.join("&").replace(r20,"+");};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this;}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}):{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});jQuery.ajaxSettings.xhr=window.ActiveXObject!==undefined?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&createStandardXHR()||createActiveXHR();}:createStandardXHR;var xhrId=0,xhrCallbacks={},xhrSupported=jQuery.ajaxSettings.xhr();if(window.ActiveXObject){jQuery(window).on("unload",function(){for(var key in xhrCallbacks){xhrCallbacks[key](undefined,true);}});}
600support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);xhrSupported=support.ajax=!!xhrSupported;if(xhrSupported){jQuery.ajaxTransport(function(options){if(!options.crossDomain||support.cors){var callback;return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}}
601if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);}
602if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";}
603for(i in headers){if(headers[i]!==undefined){xhr.setRequestHeader(i,headers[i]+"");}}
604xhr.send((options.hasContent&&options.data)||null);callback=function(_,isAbort){var status,statusText,responses;if(callback&&(isAbort||xhr.readyState===4)){delete xhrCallbacks[id];callback=undefined;xhr.onreadystatechange=jQuery.noop;if(isAbort){if(xhr.readyState!==4){xhr.abort();}}else{responses={};status=xhr.status;if(typeof xhr.responseText==="string"){responses.text=xhr.responseText;}
605try{statusText=xhr.statusText;}catch(e){statusText="";}
606if(!status&&options.isLocal&&!options.crossDomain){status=responses.text?200:404;}else if(status===1223){status=204;}}}
607if(responses){complete(status,statusText,responses,xhr.getAllResponseHeaders());}};if(!options.async){callback();}else if(xhr.readyState===4){setTimeout(callback);}else{xhr.onreadystatechange=xhrCallbacks[id]=callback;}},abort:function(){if(callback){callback(undefined,true);}}};}});}
608function createStandardXHR(){try{return new window.XMLHttpRequest();}catch(e){}}
609function createActiveXHR(){try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}
610jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){jQuery.globalEval(text);return text;}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;}
611if(s.crossDomain){s.type="GET";s.global=false;}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,head=document.head||jQuery("head")[0]||document.documentElement;return{send:function(_,callback){script=document.createElement("script");script.async=true;if(s.scriptCharset){script.charset=s.scriptCharset;}
612script.src=s.url;script.onload=script.onreadystatechange=function(_,isAbort){if(isAbort||!script.readyState||/loaded|complete/.test(script.readyState)){script.onload=script.onreadystatechange=null;if(script.parentNode){script.parentNode.removeChild(script);}
613script=null;if(!isAbort){callback(200,"success");}}};head.insertBefore(script,head.firstChild);},abort:function(){if(script){script.onload(undefined,true);}}};}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce++));this[callback]=true;return callback;}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;}
614s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called");}
615return responseContainer[0];};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments;};jqXHR.always(function(){window[callbackName]=overwritten;if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName);}
616if(responseContainer&&jQuery.isFunction(overwritten)){overwritten(responseContainer[0]);}
617responseContainer=overwritten=undefined;});return"script";}});jQuery.parseHTML=function(data,context,keepScripts){if(!data||typeof data!=="string"){return null;}
618if(typeof context==="boolean"){keepScripts=context;context=false;}
619context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])];}
620parsed=jQuery.buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove();}
621return jQuery.merge([],parsed.childNodes);};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if(typeof url!=="string"&&_load){return _load.apply(this,arguments);}
622var selector,response,type,self=this,off=url.indexOf(" ");if(off>=0){selector=url.slice(off,url.length);url=url.slice(0,off);}
623if(jQuery.isFunction(params)){callback=params;params=undefined;}else if(params&&typeof params==="object"){type="POST";}
624if(self.length>0){jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText);}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR]);});}
625return this;};jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};var docElem=window.document.documentElement;function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;}
626jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative";}
627curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;}
628if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset);}
629if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;}
630if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;}
631if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i);});}
632var docElem,win,box={top:0,left:0},elem=this[0],doc=elem&&elem.ownerDocument;if(!doc){return;}
633docElem=doc.documentElement;if(!jQuery.contains(docElem,elem)){return box;}
634if(typeof elem.getBoundingClientRect!==strundefined){box=elem.getBoundingClientRect();}
635win=getWindow(doc);return{top:box.top+(win.pageYOffset||docElem.scrollTop)-(docElem.clientTop||0),left:box.left+(win.pageXOffset||docElem.scrollLeft)-(docElem.clientLeft||0)};},position:function(){if(!this[0]){return;}
636var offsetParent,offset,parentOffset={top:0,left:0},elem=this[0];if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect();}else{offsetParent=this.offsetParent();offset=this.offset();if(!jQuery.nodeName(offsetParent[0],"html")){parentOffset=offsetParent.offset();}
637parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",true);}
638return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||docElem;while(offsetParent&&(!jQuery.nodeName(offsetParent,"html")&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;}
639return offsetParent||docElem;});}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined){return win?(prop in win)?win[prop]:win.document.documentElement[method]:elem[method];}
640if(win){win.scrollTo(!top?val:jQuery(win).scrollLeft(),top?val:jQuery(win).scrollTop());}else{elem[method]=val;}},method,val,arguments.length,null);};});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed;}});});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(jQuery.isWindow(elem)){return elem.document.documentElement["client"+name];}
641if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name]);}
642return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra);},type,chainable?margin:undefined,chainable,null);};});});jQuery.fn.size=function(){return this.length;};jQuery.fn.andSelf=jQuery.fn.addBack;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return jQuery;});}
643var
644_jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$;}
645if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery;}
646return jQuery;};if(typeof noGlobal===strundefined){window.jQuery=window.$=jQuery;}
647return jQuery;}));(function($,undefined){var uuid=0,runiqueId=/^ui-id-\d+$/;$.ui=$.ui||{};$.extend($.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});$.fn.extend({focus:(function(orig){return function(delay,fn){return typeof delay==="number"?this.each(function(){var elem=this;setTimeout(function(){$(elem).focus();if(fn){fn.call(elem);}},delay);}):orig.apply(this,arguments);};})($.fn.focus),scrollParent:function(){var scrollParent;if(($.ui.ie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.css(this,"position"))&&(/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));}).eq(0);}
648return(/fixed/).test(this.css("position"))||!scrollParent.length?$(d
vendor: 4,083 bytes, lines 648-665
648ocument):scrollParent;},zIndex:function(zIndex){if(zIndex!==undefined){return this.css("zIndex",zIndex);}
649if(this.length){var elem=$(this[0]),position,value;while(elem.length&&elem[0]!==document){position=elem.css("position");if(position==="absolute"||position==="relative"||position==="fixed"){value=parseInt(elem.css("zIndex"),10);if(!isNaN(value)&&value!==0){return value;}}
650elem=elem.parent();}}
651return 0;},uniqueId:function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++uuid);}});},removeUniqueId:function(){return this.each(function(){if(runiqueId.test(this.id)){$(this).removeAttr("id");}});}});function focusable(element,isTabIndexNotNaN){var map,mapName,img,nodeName=element.nodeName.toLowerCase();if("area"===nodeName){map=element.parentNode;mapName=map.name;if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){return false;}
652img=$("img[usemap=#"+mapName+"]")[0];return!!img&&visible(img);}
653return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"===nodeName?element.href||isTabIndexNotNaN:isTabIndexNotNaN)&&visible(element);}
654function visible(element){return $.expr.filters.visible(element)&&!$(element).parents().addBack().filter(function(){return $.css(this,"visibility")==="hidden";}).length;}
655$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName);};}):function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){return focusable(element,!isNaN($.attr(element,"tabindex")));},tabbable:function(element){var tabIndex=$.attr(element,"tabindex"),isTabIndexNaN=isNaN(tabIndex);return(isTabIndexNaN||tabIndex>=0)&&focusable(element,!isTabIndexNaN);}});if(!$("<a>").outerWidth(1).jquery){$.each(["Width","Height"],function(i,name){var side=name==="Width"?["Left","Right"]:["Top","Bottom"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};function reduce(elem,size,border,margin){$.each(side,function(){size-=parseFloat($.css(elem,"padding"+this))||0;if(border){size-=parseFloat($.css(elem,"border"+this+"Width"))||0;}
656if(margin){size-=parseFloat($.css(elem,"margin"+this))||0;}});return size;}
657$.fn["inner"+name]=function(size){if(size===undefined){return orig["inner"+name].call(this);}
658return this.each(function(){$(this).css(type,reduce(this,size)+"px");});};$.fn["outer"+name]=function(size,margin){if(typeof size!=="number"){return orig["outer"+name].call(this,size);}
659return this.each(function(){$(this).css(type,reduce(this,size,true,margin)+"px");});};});}
660if(!$.fn.addBack){$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));};}
661if($("<a>").data("a-b","a").removeData("a-b").data("a-b")){$.fn.removeData=(function(removeData){return function(key){if(arguments.length){return removeData.call(this,$.camelCase(key));}else{return removeData.call(this);}};})($.fn.removeData);}
662$.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());$.support.selectstart="onselectstart"in document.createElement("div");$.fn.extend({disableSelection:function(){return this.bind(($.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(event){event.preventDefault();});},enableSelection:function(){return this.unbind(".ui-disableSelection");}});$.extend($.ui,{plugin:{add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var i,set=instance.plugins[name];if(!set||!instance.element[0].parentNode||instance.element[0].parentNode.nodeType===11){return;}
663for(i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},hasScroll:function(el,a){if($(el).css("overflow")==="hidden"){return false;}
664var scroll=(a&&a==="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true;}
665el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;}});})(jQuery);
vendor: 5,262 bytes, lines 665-675
665(function($,undefined){var uuid=0,slice=Array.prototype.slice,_cleanData=$.cleanData;$.cleanData=function(elems){for(var i=0,elem;(elem=elems[i])!=null;i++){try{$(elem).triggerHandler("remove");}catch(e){}}
666_cleanData(elems);};$.widget=function(name,base,prototype){var fullName,existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(".")[0];name=name.split(".")[1];fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget;}
667$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName);};$[namespace]=$[namespace]||{};existingConstructor=$[namespace][name];constructor=$[namespace][name]=function(options,element){if(!this._createWidget){return new constructor(options,element);}
668if(arguments.length){this._createWidget(options,element);}};$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]});basePrototype=new base();basePrototype.options=$.widget.extend({},basePrototype.options);$.each(prototype,function(prop,value){if(!$.isFunction(value)){proxiedPrototype[prop]=value;return;}
669proxiedPrototype[prop]=(function(){var _super=function(){return base.prototype[prop].apply(this,arguments);},_superApply=function(args){return base.prototype[prop].apply(this,args);};return function(){var __super=this._super,__superApply=this._superApply,returnValue;this._super=_super;this._superApply=_superApply;returnValue=value.apply(this,arguments);this._super=__super;this._superApply=__superApply;return returnValue;};})();});constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix:name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName});if(existingConstructor){$.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto);});delete existingConstructor._childConstructors;}else{base._childConstructors.push(constructor);}
670$.widget.bridge(name,constructor);};$.widget.extend=function(target){var input=slice.call(arguments,1),inputIndex=0,inputLength=input.length,key,value;for(;inputIndex<inputLength;inputIndex++){for(key in input[inputIndex]){value=input[inputIndex][key];if(input[inputIndex].hasOwnProperty(key)&&value!==undefined){if($.isPlainObject(value)){target[key]=$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value);}else{target[key]=value;}}}}
671return target;};$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$.fn[name]=function(options){var isMethodCall=typeof options==="string",args=slice.call(arguments,1),returnValue=this;options=!isMethodCall&&args.length?$.widget.extend.apply(null,[options].concat(args)):options;if(isMethodCall){this.each(function(){var methodValue,instance=$.data(this,fullName);if(!instance){return $.error("cannot call methods on "+name+" prior to initialization; "+"attempted to call method '"+options+"'");}
672if(!$.isFunction(instance[options])||options.charAt(0)==="_"){return $.error("no such method '"+options+"' for "+name+" widget instance");}
673methodValue=instance[options].apply(instance,args);if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue;return false;}});}else{this.each(function(){var instance=$.data(this,fullName);if(instance){instance.option(options||{})._init();}else{$.data(this,fullName,new object(options,this));}});}
674return returnValue;};};$.Widget=function(){};$.Widget._childConstructors=[];$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0];this.element=$(element);this.uuid=uuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=$.widget.extend({},this.options,this._getCreateOptions(),options);this.bindings=$();this.hoverable=$();this.focusable=$();if(element!==this){$.data(element,this.widgetFullName,this);this._on(true,this.element,{remove:function(event){if(event.target===element){this.destroy();}}});this.document=$(element.style?element.ownerDocument:element.document||element);this.window=$(this.document[0].defaultView||this.document[0].parentWindow);}
675this._create();this._trigger("create",null,this._getCreateEventData());this._init();},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus");},_destroy:$.noop,widget:function(){return this.element;},option:function(key,value){var options=key,parts,curOption,i;if(arguments.length===0){return $.widget.extend({},this.options);}
vendor: 39,561 bytes, lines 676-816
676if(typeof key==="string"){options={};parts=key.split(".");key=parts.shift();if(parts.length){curOption=options[key]=$.widget.extend({},this.options[key]);for(i=0;i<parts.length-1;i++){curOption[parts[i]]=curOption[parts[i]]||{};curOption=curOption[parts[i]];}
677key=parts.pop();if(value===undefined){return curOption[key]===undefined?null:curOption[key];}
678curOption[key]=value;}else{if(value===undefined){return this.options[key]===undefined?null:this.options[key];}
679options[key]=value;}}
680this._setOptions(options);return this;},_setOptions:function(options){var key;for(key in options){this._setOption(key,options[key]);}
681return this;},_setOption:function(key,value){this.options[key]=value;if(key==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!value).attr("aria-disabled",value);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus");}
682return this;},enable:function(){return this._setOption("disabled",false);},disable:function(){return this._setOption("disabled",true);},_on:function(suppressDisabledCheck,element,handlers){var delegateElement,instance=this;if(typeof suppressDisabledCheck!=="boolean"){handlers=element;element=suppressDisabledCheck;suppressDisabledCheck=false;}
683if(!handlers){handlers=element;element=this.element;delegateElement=this.widget();}else{element=delegateElement=$(element);this.bindings=this.bindings.add(element);}
684$.each(handlers,function(event,handler){function handlerProxy(){if(!suppressDisabledCheck&&(instance.options.disabled===true||$(this).hasClass("ui-state-disabled"))){return;}
685return(typeof handler==="string"?instance[handler]:handler).apply(instance,arguments);}
686if(typeof handler!=="string"){handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++;}
687var match=event.match(/^(\w+)\s*(.*)$/),eventName=match[1]+instance.eventNamespace,selector=match[2];if(selector){delegateElement.delegate(selector,eventName,handlerProxy);}else{element.bind(eventName,handlerProxy);}});},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;element.unbind(eventName).undelegate(eventName);},_delay:function(handler,delay){function handlerProxy(){return(typeof handler==="string"?instance[handler]:handler).apply(instance,arguments);}
688var instance=this;return setTimeout(handlerProxy,delay||0);},_hoverable:function(element){this.hoverable=this.hoverable.add(element);this._on(element,{mouseenter:function(event){$(event.currentTarget).addClass("ui-state-hover");},mouseleave:function(event){$(event.currentTarget).removeClass("ui-state-hover");}});},_focusable:function(element){this.focusable=this.focusable.add(element);this._on(element,{focusin:function(event){$(event.currentTarget).addClass("ui-state-focus");},focusout:function(event){$(event.currentTarget).removeClass("ui-state-focus");}});},_trigger:function(type,event,data){var prop,orig,callback=this.options[type];data=data||{};event=$.Event(event);event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase();event.target=this.element[0];orig=event.originalEvent;if(orig){for(prop in orig){if(!(prop in event)){event[prop]=orig[prop];}}}
689this.element.trigger(event,data);return!($.isFunction(callback)&&callback.apply(this.element[0],[event].concat(data))===false||event.isDefaultPrevented());}};$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$.Widget.prototype["_"+method]=function(element,options,callback){if(typeof options==="string"){options={effect:options};}
690var hasOptions,effectName=!options?method:options===true||typeof options==="number"?defaultEffect:options.effect||defaultEffect;options=options||{};if(typeof options==="number"){options={duration:options};}
691hasOptions=!$.isEmptyObject(options);options.complete=callback;if(options.delay){element.delay(options.delay);}
692if(hasOptions&&$.effects&&$.effects.effect[effectName]){element[method](options);}else if(effectName!==method&&element[effectName]){element[effectName](options.duration,options.easing,callback);}else{element.queue(function(next){$(this)[method]();if(callback){callback.call(element[0]);}
693next();});}};});})(jQuery);(function($,undefined){var mouseHandled=false;$(document).mouseup(function(){mouseHandled=false;});$.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var that=this;this.element.bind("mousedown."+this.widgetName,function(event){return that._mouseDown(event);}).bind("click."+this.widgetName,function(event){if(true===$.data(event.target,that.widgetName+".preventClickEvent")){$.removeData(event.target,that.widgetName+".preventClickEvent");event.stopImmediatePropagation();return false;}});this.started=false;},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);if(this._mouseMoveDelegate){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);}},_mouseDown:function(event){if(mouseHandled){return;}
694(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var that=this,btnIsLeft=(event.which===1),elIsCancel=(typeof this.options.cancel==="string"&&event.target.nodeName?$(event.target).closest(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
695this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){that.mouseDelayMet=true;},this.options.delay);}
696if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
697if(true===$.data(event.target,this.widgetName+".preventClickEvent")){$.removeData(event.target,this.widgetName+".preventClickEvent");}
698this._mouseMoveDelegate=function(event){return that._mouseMove(event);};this._mouseUpDelegate=function(event){return that._mouseUp(event);};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);event.preventDefault();mouseHandled=true;return true;},_mouseMove:function(event){if($.ui.ie&&(!document.documentMode||document.documentMode<9)&&!event.button){return this._mouseUp(event);}
699if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
700if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
701return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(event.target===this._mouseDownEvent.target){$.data(event.target,this.widgetName+".preventClickEvent",true);}
702this._mouseStop(event);}
703return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(){return this.mouseDelayMet;},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true;}});})(jQuery);(function($,undefined){$.ui=$.ui||{};var cachedScrollbarWidth,max=Math.max,abs=Math.abs,round=Math.round,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\+\-]\d+(\.[\d]+)?%?/,rposition=/^\w+/,rpercent=/%$/,_position=$.fn.position;function getOffsets(offsets,width,height){return[parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)];}
704function parseCss(element,property){return parseInt($.css(element,property),10)||0;}
705function getDimensions(elem){var raw=elem[0];if(raw.nodeType===9){return{width:elem.width(),height:elem.height(),offset:{top:0,left:0}};}
706if($.isWindow(raw)){return{width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}};}
707if(raw.preventDefault){return{width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}};}
708return{width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()};}
709$.position={scrollbarWidth:function(){if(cachedScrollbarWidth!==undefined){return cachedScrollbarWidth;}
710var w1,w2,div=$("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),innerDiv=div.children()[0];$("body").append(div);w1=innerDiv.offsetWidth;div.css("overflow","scroll");w2=innerDiv.offsetWidth;if(w1===w2){w2=div[0].clientWidth;}
711div.remove();return(cachedScrollbarWidth=w1-w2);},getScrollInfo:function(within){var overflowX=within.isWindow?"":within.element.css("overflow-x"),overflowY=within.isWindow?"":within.element.css("overflow-y"),hasOverflowX=overflowX==="scroll"||(overflowX==="auto"&&within.width<within.element[0].scrollWidth),hasOverflowY=overflowY==="scroll"||(overflowY==="auto"&&within.height<within.element[0].scrollHeight);return{width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0};},getWithinInfo:function(element){var withinElement=$(element||window),isWindow=$.isWindow(withinElement[0]);return{element:withinElement,isWindow:isWindow,offset:withinElement.offset()||{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:isWindow?withinElement.width():withinElement.outerWidth(),height:isWindow?withinElement.height():withinElement.outerHeight()};}};$.fn.position=function(options){if(!options||!options.of){return _position.apply(this,arguments);}
712options=$.extend({},options);var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,target=$(options.of),within=$.position.getWithinInfo(options.within),scrollInfo=$.position.getScrollInfo(within),collision=(options.collision||"flip").split(" "),offsets={};dimensions=getDimensions(target);if(target[0].preventDefault){options.at="left top";}
713targetWidth=dimensions.width;targetHeight=dimensions.height;targetOffset=dimensions.offset;basePosition=$.extend({},targetOffset);$.each(["my","at"],function(){var pos=(options[this]||"").split(" "),horizontalOffset,verticalOffset;if(pos.length===1){pos=rhorizontal.test(pos[0])?pos.concat(["center"]):rvertical.test(pos[0])?["center"].concat(pos):["center","center"];}
714pos[0]=rhorizontal.test(pos[0])?pos[0]:"center";pos[1]=rvertical.test(pos[1])?pos[1]:"center";horizontalOffset=roffset.exec(pos[0]);verticalOffset=roffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]];});if(collision.length===1){collision[1]=collision[0];}
715if(options.at[0]==="right"){basePosition.left+=targetWidth;}else if(options.at[0]==="center"){basePosition.left+=targetWidth/2;}
716if(options.at[1]==="bottom"){basePosition.top+=targetHeight;}else if(options.at[1]==="center"){basePosition.top+=targetHeight/2;}
717atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){var collisionPosition,using,elem=$(this),elemWidth=elem.outerWidth(),elemHeight=elem.outerHeight(),marginLeft=parseCss(this,"marginLeft"),marginTop=parseCss(this,"marginTop"),collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+scrollInfo.width,collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+scrollInfo.height,position=$.extend({},basePosition),myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==="right"){position.left-=elemWidth;}else if(options.my[0]==="center"){position.left-=elemWidth/2;}
718if(options.my[1]==="bottom"){position.top-=elemHeight;}else if(options.my[1]==="center"){position.top-=elemHeight/2;}
719position.left+=myOffset[0];position.top+=myOffset[1];if(!$.support.offsetFractions){position.left=round(position.left);position.top=round(position.top);}
720collisionPosition={marginLeft:marginLeft,marginTop:marginTop};$.each(["left","top"],function(i,dir){if($.ui.position[collision[i]]){$.ui.position[collision[i]][dir](position,{targetWidth:targetWidth,targetHeight:targetHeight,elemWidth:elemWidth,elemHeight:elemHeight,collisionPosition:collisionPosition,collisionWidth:collisionWidth,collisionHeight:collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within:within,elem:elem});}});if(options.using){using=function(props){var left=targetOffset.left-position.left,right=left+targetWidth-elemWidth,top=targetOffset.top-position.top,bottom=top+targetHeight-elemHeight,feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?"left":left>0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};if(targetWidth<elemWidth&&abs(left+right)<targetWidth){feedback.horizontal="center";}
721if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight){feedback.vertical="middle";}
722if(max(abs(left),abs(right))>max(abs(top),abs(bottom))){feedback.important="horizontal";}else{feedback.important="vertical";}
723options.using.call(this,props,feedback);};}
724elem.offset($.extend(position,{using:using}));});};$.ui.position={fit:{left:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset,newOverRight;if(data.collisionWidth>outerWidth){if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0){position.left=withinOffset;}else{if(overLeft>overRight){position.left=withinOffset+outerWidth-data.collisionWidth;}else{position.left=withinOffset;}}}else if(overLeft>0){position.left+=overLeft;}else if(overRight>0){position.left-=overRight;}else{position.left=max(position.left-collisionPosLeft,position.left);}},top:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset,newOverBottom;if(data.collisionHeight>outerHeight){if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0){position.top=withinOffset;}else{if(overTop>overBottom){position.top=withinOffset+outerHeight-data.collisionHeight;}else{position.top=withinOffset;}}}else if(overTop>0){position.top+=overTop;}else if(overBottom>0){position.top-=overBottom;}else{position.top=max(position.top-collisionPosTop,position.top);}}},flip:{left:function(position,data){var within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset=data.my[0]==="left"?-data.elemWidth:data.my[0]==="right"?data.elemWidth:0,atOffset=data.at[0]==="left"?data.targetWidth:data.at[0]==="right"?-data.targetWidth:0,offset=-2*data.offset[0],newOverRight,newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft)){position.left+=myOffset+atOffset+offset;}}
725else if(overRight>0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight){position.left+=myOffset+atOffset+offset;}}},top:function(position,data){var within=data.within,withinOffset=within.offset.top+within.scrollTop,outerHeight=within.height,offsetTop=within.isWindow?within.scrollTop:within.offset.top,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=collisionPosTop-offsetTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop,top=data.my[1]==="top",myOffset=top?-data.elemHeight:data.my[1]==="bottom"?data.elemHeight:0,atOffset=data.at[1]==="top"?data.targetHeight:data.at[1]==="bottom"?-data.targetHeight:0,offset=-2*data.offset[1],newOverTop,newOverBottom;if(overTop<0){newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset;if((position.top+myOffset+atOffset+offset)>overTop&&(newOverBottom<0||newOverBottom<abs(overTop))){position.top+=myOffset+atOffset+offset;}}
726else if(overBottom>0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if((position.top+myOffset+atOffset+offset)>overBottom&&(newOverTop>0||abs(newOverTop)<overBottom)){position.top+=myOffset+atOffset+offset;}}}},flipfit:{left:function(){$.ui.position.flip.left.apply(this,arguments);$.ui.position.fit.left.apply(this,arguments);},top:function(){$.ui.position.flip.top.apply(this,arguments);$.ui.position.fit.top.apply(this,arguments);}}};(function(){var testElement,testElementParent,testElementStyle,offsetLeft,i,body=document.getElementsByTagName("body")[0],div=document.createElement("div");testElement=document.createElement(body?"div":"body");testElementStyle={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};if(body){$.extend(testElementStyle,{position:"absolute",left:"-1000px",top:"-1000px"});}
727for(i in testElementStyle){testElement.style[i]=testElementStyle[i];}
728testElement.appendChild(div);testElementParent=body||document.documentElement;testElementParent.insertBefore(testElement,testElementParent.firstChild);div.style.cssText="position: absolute; left: 10.7432222px;";offsetLeft=$(div).offset().left;$.support.offsetFractions=offsetLeft>10&&offsetLeft<11;testElement.innerHTML="";testElementParent.removeChild(testElement);})();}(jQuery));(function($,undefined){$.widget("ui.draggable",$.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative";}
729if(this.options.addClasses){this.element.addClass("ui-draggable");}
730if(this.options.disabled){this.element.addClass("ui-draggable-disabled");}
731this._mouseInit();},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).closest(".ui-resizable-handle").length>0){return false;}
732this.handle=this._getHandle(event);if(!this.handle){return false;}
733$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});return true;},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this;}
734this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offsetParent=this.helper.offsetParent();this.offsetParentCssPosition=this.offsetParent.css("position");this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.scroll=false;$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this._setContainment();if(this._trigger("start",event)===false){this._clear();return false;}
735this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}
736this._mouseDrag(event,true);if($.ui.ddmanager){$.ui.ddmanager.dragStart(this,event);}
737return true;},_mouseDrag:function(event,noPropagation){if(this.offsetParentCssPosition==="fixed"){this.offset.parent=this._getParentOffset();}
738this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();if(this._trigger("drag",event,ui)===false){this._mouseUp({});return false;}
739this.position=ui.position;}
740if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px";}
741if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=this.position.top+"px";}
742if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);}
743return false;},_mouseStop:function(event){var that=this,dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event);}
744if(this.dropped){dropped=this.dropped;this.dropped=false;}
745if(this.options.helper==="original"&&!$.contains(this.element[0].ownerDocument,this.element[0])){return false;}
746if((this.options.revert==="invalid"&&!dropped)||(this.options.revert==="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(that._trigger("stop",event)!==false){that._clear();}});}else{if(this._trigger("stop",event)!==false){this._clear();}}
747return false;},_mouseUp:function(event){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});if($.ui.ddmanager){$.ui.ddmanager.dragStop(this,event);}
748return $.ui.mouse.prototype._mouseUp.call(this,event);},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({});}else{this._clear();}
749return this;},_getHandle:function(event){return this.options.handle?!!$(event.target).closest(this.element.find(this.options.handle)).length:true;},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper==="clone"?this.element.clone().removeAttr("id"):this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo==="parent"?this.element[0].parentNode:o.appendTo));}
750if(helper[0]!==this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute");}
751return helper;},_adjustOffsetFromHelper:function(obj){if(typeof obj==="string"){obj=obj.split(" ");}
752if($.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0};}
753if("left"in obj){this.offset.click.left=obj.left+this.margins.left;}
754if("right"in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;}
755if("top"in obj){this.offset.click.top=obj.top+this.margins.top;}
756if("bottom"in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;}},_getParentOffset:function(){var po=this.offsetParent.offset();if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
757if((this.offsetParent[0]===document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&$.ui.ie)){po={top:0,left:0};}
758return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0),right:(parseInt(this.element.css("marginRight"),10)||0),bottom:(parseInt(this.element.css("marginBottom"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var over,c,ce,o=this.options;if(!o.containment){this.containment=null;return;}
759if(o.containment==="window"){this.containment=[$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$(window).scrollLeft()+$(window).width()-this.helperProportions.width-this.margins.left,$(window).scrollTop()+($(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return;}
760if(o.containment==="document"){this.containment=[0,0,$(document).width()-this.helperProportions.width-this.margins.left,($(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return;}
761if(o.containment.constructor===Array){this.containment=o.containment;return;}
762if(o.containment==="parent"){o.containment=this.helper[0].parentNode;}
763c=$(o.containment);ce=c[0];if(!ce){return;}
764over=c.css("overflow")!=="hidden";this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=c;},_convertPositionTo:function(d,pos){if(!pos){pos=this.position;}
765var mod=d==="absolute"?1:-1,document=this.document[0],useOffsetParent=this.cssPosition==="absolute"&&(this.scrollParent[0]===document||!$.contains(this.scrollParent[0],this.offsetParent[0])),scroll=useOffsetParent?this.offsetParent:this.scrollParent,scrollIsRootNode=useOffsetParent&&(/(html|body)/i).test(scroll[0].nodeName);if(!this.offset.scroll){this.offset.scroll={top:scroll.scrollTop(),left:scroll.scrollLeft()};}
766return{top:(pos.top+
767this.offset.relative.top*mod+
768this.offset.parent.top*mod-
769((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:this.offset.scroll.top))*mod)),left:(pos.left+
770this.offset.relative.left*mod+
771this.offset.parent.left*mod-
772((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:this.offset.scroll.left)*mod))};},_generatePosition:function(event,constrainPosition){var containment,co,top,left,o=this.options,document=this.document[0],useOffsetParent=this.cssPosition==="absolute"&&(this.scrollParent[0]===document||!$.contains(this.scrollParent[0],this.offsetParent[0])),scroll=useOffsetParent?this.offsetParent:this.scrollParent,scrollIsRootNode=useOffsetParent&&(/(html|body)/i).test(scroll[0].nodeName),pageX=event.pageX,pageY=event.pageY;if(!this.offset.scroll){this.offset.scroll={top:scroll.scrollTop(),left:scroll.scrollLeft()};}
773if(constrainPosition){if(this.containment){if(this.relative_container){co=this.relative_container.offset();containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top];}
774else{containment=this.containment;}
775if(event.pageX-this.offset.click.left<containment[0]){pageX=containment[0]+this.offset.click.left;}
776if(event.pageY-this.offset.click.top<containment[1]){pageY=containment[1]+this.offset.click.top;}
777if(event.pageX-this.offset.click.left>containment[2]){pageX=containment[2]+this.offset.click.left;}
778if(event.pageY-this.offset.click.top>containment[3]){pageY=containment[3]+this.offset.click.top;}}
779if(o.grid){top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;pageY=containment?((top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3])?top:((top-this.offset.click.top>=containment[1])?top-o.grid[1]:top+o.grid[1])):top;left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX;pageX=containment?((left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2])?left:((left-this.offset.click.left>=containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
780if(o.axis==="y"){pageX=this.originalPageX;}
781if(o.axis==="x"){pageY=this.originalPageY;}}
782return{top:(pageY-
783this.offset.click.top-
784this.offset.relative.top-
785this.offset.parent.top+
786(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:this.offset.scroll.top))),left:(pageX-
787this.offset.click.left-
788this.offset.relative.left-
789this.offset.parent.left+
790(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():(scrollIsRootNode?0:this.offset.scroll.left)))};},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove();}
791this.helper=null;this.cancelHelperRemoval=false;},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type==="drag"){this.positionAbs=this._convertPositionTo("absolute");}
792return $.Widget.prototype._trigger.call(this,type,event,ui);},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs};}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("ui-draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"ui-sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable.refreshPositions();sortable._trigger("activate",event,uiSortable);}});},stop:function(event,ui){var inst=$(this).data("ui-draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=this.shouldRevert;}
793this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper==="original"){this.instance.currentItem.css({top:"auto",left:"auto"});}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable);}});},drag:function(event,ui){var inst=$(this).data("ui-draggable"),that=this;$.each(inst.sortables,function(){var innermostIntersecting=false,thisSortable=this;this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){innermostIntersecting=true;$.each(inst.sortables,function(){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this!==thisSortable&&this.instance._intersectsWith(this.instance.containerCache)&&$.contains(thisSortable.instance.element[0],this.instance.element[0])){innermostIntersecting=false;}
794return innermostIntersecting;});}
795if(innermostIntersecting){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0];};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst;}
796if(this.instance.currentItem){this.instance._mouseDrag(event);}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove();}
797inst._trigger("fromSortable",event);inst.dropped=false;}}});}});$.ui.plugin.add("draggable","cursor",{start:function(){var t=$("body"),o=$(this).data("ui-draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor");}
798t.css("cursor",o.cursor);},stop:function(){var o=$(this).data("ui-draggable").options;if(o._cursor){$("body").css("cursor",o._cursor);}}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("ui-draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity");}
799t.css("opacity",o.opacity);},stop:function(event,ui){var o=$(this).data("ui-draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity);}}});$.ui.plugin.add("draggable","scroll",{start:function(){var i=$(this).data("ui-draggable");if(i.scrollParent[0]!==document&&i.scrollParent[0].tagName!=="HTML"){i.overflowOffset=i.scrollParent.offset();}},drag:function(event){var i=$(this).data("ui-draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!==document&&i.scrollParent[0].tagName!=="HTML"){if(!o.axis||o.axis!=="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed;}else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed;}}
800if(!o.axis||o.axis!=="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed;}else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed;}}}else{if(!o.axis||o.axis!=="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);}else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}}
801if(!o.axis||o.axis!=="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);}else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}}
802if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event);}}});$.ui.plugin.add("draggable","snap",{start:function(){var i=$(this).data("ui-draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!==String?(o.snap.items||":data(ui-draggable)"):o.snap).each(function(){var $t=$(this),$o=$t.offset();if(this!==i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});}});},drag:function(event,ui){var ts,bs,ls,rs,l,r,t,b,i,first,inst=$(this).data("ui-draggable"),o=inst.options,d=o.snapTolerance,x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(i=inst.snapElements.length-1;i>=0;i--){l=inst.snapElements[i].left;r=l+inst.snapElements[i].width;t=inst.snapElements[i].top;b=t+inst.snapElements[i].height;if(x2<l-d||x1>r+d||y2<t-d||y1>b+d||!$.contains(inst.snapElements[i].item.ownerDocument,inst.snapElements[i].item)){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));}
803inst.snapElements[i].snapping=false;continue;}
804if(o.snapMode!=="inner"){ts=Math.abs(t-y2)<=d;bs=Math.abs(b-y1)<=d;ls=Math.abs(l-x2)<=d;rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top;}
805if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top;}
806if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left;}
807if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left;}}
808first=(ts||bs||ls||rs);if(o.snapMode!=="outer"){ts=Math.abs(t-y1)<=d;bs=Math.abs(b-y2)<=d;ls=Math.abs(l-x1)<=d;rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top;}
809if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top;}
810if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left;}
811if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left;}}
812if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));}
813inst.snapElements[i].snapping=(ts||bs||ls||rs||first);}}});$.ui.plugin.add("draggable","stack",{start:function(){var min,o=this.data("ui-draggable").options,group=$.makeArray($(o.stack)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||0)-(parseInt($(b).css("zIndex"),10)||0);});if(!group.length){return;}
814min=parseInt($(group[0]).css("zIndex"),10)||0;$(group).each(function(i){$(this).css("zIndex",min+i);});this.css("zIndex",(min+group.length));}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("ui-draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex");}
815t.css("zIndex",o.zIndex);},stop:function(event,ui){var o=$(this).data("ui-draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex);}}});})(jQuery);(function($,undefined){function isOverAxis(x,reference,size){return(x>reference)&&(x<(reference+size));}
816$.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",o
816ptions:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var o=this.options,accept=o.accept;this.isover=false;this.isout=true;this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept);};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables[o.scope]=$.ui.ddmanager.droppables[o.scope]||[];$.ui.ddmanager.droppables[o.scope].push(this);(o.addClasses&&this.element.addClass("ui-droppable"));},_destroy:function(){var i=0,drop=$.ui.ddmanager.droppables[this.options.scope];for(;i<drop.length;i++){if(drop[i]===this){drop.splice(i,1);}}
817this.element.removeClass("ui-droppable ui-droppable-disabled");},_setOption:function(key,value){if(key==="accept"){this.accept=$.isFunction(value)?value:function(d){return d.is(value);};}
818$.Widget.prototype._setOption.apply(this,arguments);},_activate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass);}
819if(draggable){this._trigger("activate",event,this.ui(draggable));}},_deactivate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass);}
820if(draggable){this._trigger("deactivate",event,this.ui(draggable));}},_over:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return;}
821if(this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass);}
822this._trigger("over",event,this.ui(draggable));}},_out:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return;}
823if(this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass);}
824this._trigger("out",event,this.ui(draggable));}},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current,childrenIntersection=false;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return false;}
825this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var inst=$.data(this,"ui-droppable");if(inst.options.greedy&&!inst.options.disabled&&inst.options.scope===draggable.options.scope&&inst.accept.call(inst.element[0],(draggable.currentItem||draggable.element))&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)){childrenIntersection=true;return false;}});if(childrenIntersection){return false;}
826if(this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass);}
827if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass);}
828this._trigger("drop",event,this.ui(draggable));return this.element;}
829return false;},ui:function(c){return{draggable:(c.currentItem||c.element),helper:c.helper,position:c.position,offset:c.positionAbs};}});$.ui.intersect=function(draggable,droppable,toleranceMode){if(!droppable.offset){return false;}
830var draggableLeft,draggableTop,x1=(draggable.positionAbs||draggable.position.absolute).left,x2=x1+draggable.helperProportions.width,y1=(draggable.positionAbs||draggable.position.absolute).top,y2=y1+draggable.helperProportions.height,l=droppable.offset.left,r=l+droppable.proportions.width,t=droppable.offset.top,b=t+droppable.proportions.height;switch(toleranceMode){case"fit":return(l<=x1&&x2<=r&&t<=y1&&y2<=b);case"intersect":return(l<x1+(draggable.helperProportions.width/2)&&x2-(draggable.helperProportions.width/2)<r&&t<y1+(draggable.helperProportions.height/2)&&y2-(draggable.helperProportions.height/2)<b);case"pointer":draggableLeft=((draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left);draggableTop=((draggable.positionAbs||draggable.position.absolute).top+(draggable.clickOffset||draggable.offset.click).top);return isOverAxis(draggableTop,t,droppable.proportions.height)&&isOverAxis(draggableLeft,l,droppable.proportions.width);case"touch":return((y1>=t&&y1<=b)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));default:return false;}};$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var i,j,m=$.ui.ddmanager.droppables[t.options.scope]||[],type=event?event.type:null,list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();droppablesLoop:for(i=0;i<m.length;i++){if(m[i].options.disabled||(t&&!m[i].accept.call(m[i].element[0],(t.currentItem||t.element)))){continue;}
831for(j=0;j<list.length;j++){if(list[j]===m[i].element[0]){m[i].proportions.height=0;continue droppablesLoop;}}
832m[i].visible=m[i].element.css("display")!=="none";if(!m[i].visible){continue;}
833if(type==="mousedown"){m[i]._activate.call(m[i],event);}
834m[i].offset=m[i].element.offset();m[i].proportions={width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight};}},drop:function(draggable,event){var dropped=false;
vendor: 16,160 bytes, lines 834-890
834$.each(($.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){if(!this.options){return;}
835if(!this.options.disabled&&this.visible&&$.ui.intersect(draggable,this,this.options.tolerance)){dropped=this._drop.call(this,event)||dropped;}
836if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this.isout=true;this.isover=false;this._deactivate.call(this,event);}});return dropped;},dragStart:function(draggable,event){draggable.element.parentsUntil("body").bind("scroll.droppable",function(){if(!draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event);}});},drag:function(draggable,event){if(draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event);}
837$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return;}
838var parentInstance,scope,parent,intersects=$.ui.intersect(draggable,this,this.options.tolerance),c=!intersects&&this.isover?"isout":(intersects&&!this.isover?"isover":null);if(!c){return;}
839if(this.options.greedy){scope=this.options.scope;parent=this.element.parents(":data(ui-droppable)").filter(function(){return $.data(this,"ui-droppable").options.scope===scope;});if(parent.length){parentInstance=$.data(parent[0],"ui-droppable");parentInstance.greedyChild=(c==="isover");}}
840if(parentInstance&&c==="isover"){parentInstance.isover=false;parentInstance.isout=true;parentInstance._out.call(parentInstance,event);}
841this[c]=true;this[c==="isout"?"isover":"isout"]=false;this[c==="isover"?"_over":"_out"].call(this,event);if(parentInstance&&c==="isout"){parentInstance.isout=false;parentInstance.isover=true;parentInstance._over.call(parentInstance,event);}});},dragStop:function(draggable,event){draggable.element.parentsUntil("body").unbind("scroll.droppable");if(!draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event);}}};})(jQuery);(function($,undefined){function num(v){return parseInt(v,10)||0;}
842function isNumber(value){return!isNaN(parseInt(value,10));}
843$.widget("ui.resizable",$.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var n,i,handle,axis,hname,that=this,o=this.options;this.element.addClass("ui-resizable");$.extend(this,{_aspectRatio:!!(o.aspectRatio),aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap($("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize();}
844this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw";}
845n=this.handles.split(",");this.handles={};for(i=0;i<n.length;i++){handle=$.trim(n[i]);hname="ui-resizable-"+handle;axis=$("<div class='ui-resizable-handle "+hname+"'></div>");axis.css({zIndex:o.zIndex});if("se"===handle){axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");}
846this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis);}}
847this._renderAxis=function(target){var i,axis,padPos,padWrapper;target=target||this.element;for(i in this.handles){if(this.handles[i].constructor===String){this.handles[i]=$(this.handles[i],this.element).show();}
848if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){axis=$(this.handles[i],this.element);padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");target.css(padPos,padWrapper);this._proportionallyResize();}
849if(!$(this.handles[i]).length){continue;}}};this._renderAxis(this.element);this._handles=$(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!that.resizing){if(this.className){axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);}
850that.axis=axis&&axis[1]?axis[1]:"se";}});if(o.autoHide){this._handles.hide();$(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(o.disabled){return;}
851$(this).removeClass("ui-resizable-autohide");that._handles.show();}).mouseleave(function(){if(o.disabled){return;}
852if(!that.resizing){$(this).addClass("ui-resizable-autohide");that._handles.hide();}});}
853this._mouseInit();},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();};if(this.elementIsWrapper){_destroy(this.element);wrapper=this.element;this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper);wrapper.remove();}
854this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement);return this;},_mouseCapture:function(event){var i,handle,capture=false;for(i in this.handles){handle=$(this.handles[i])[0];if(handle===event.target||$.contains(handle,event.target)){capture=true;}}
855return!this.options.disabled&&capture;},_mouseStart:function(event){var curleft,curtop,cursor,o=this.options,iniPos=this.element.position(),el=this.element;this.resizing=true;if((/absolute/).test(el.css("position"))){el.css({position:"absolute",top:el.css("top"),left:el.css("left")});}else if(el.is(".ui-draggable")){el.css({position:"absolute",top:iniPos.top,left:iniPos.left});}
856this._renderProxy();curleft=num(this.helper.css("left"));curtop=num(this.helper.css("top"));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0;}
857this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=(typeof o.aspectRatio==="number")?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);cursor=$(".ui-resizable-"+this.axis).css("cursor");$("body").css("cursor",cursor==="auto"?this.axis+"-resize":cursor);el.addClass("ui-resizable-resizing");this._propagate("start",event);return true;},_mouseDrag:function(event){var data,el=this.helper,props={},smp=this.originalMousePosition,a=this.axis,prevTop=this.position.top,prevLeft=this.position.left,prevWidth=this.size.width,prevHeight=this.size.height,dx=(event.pageX-smp.left)||0,dy=(event.pageY-smp.top)||0,trigger=this._change[a];if(!trigger){return false;}
858data=trigger.apply(this,[event,dx,dy]);this._updateVirtualBoundaries(event.shiftKey);if(this._aspectRatio||event.shiftKey){data=this._updateRatio(data,event);}
859data=this._respectSize(data,event);this._updateCache(data);this._propagate("resize",event);if(this.position.top!==prevTop){props.top=this.position.top+"px";}
860if(this.position.left!==prevLeft){props.left=this.position.left+"px";}
861if(this.size.width!==prevWidth){props.width=this.size.width+"px";}
862if(this.size.height!==prevHeight){props.height=this.size.height+"px";}
863el.css(props);if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize();}
864if(!$.isEmptyObject(props)){this._trigger("resize",event,this.ui());}
865return false;},_mouseStop:function(event){this.resizing=false;var pr,ista,soffseth,soffsetw,s,left,top,o=this.options,that=this;if(this._helper){pr=this._proportionallyResizeElements;ista=pr.length&&(/textarea/i).test(pr[0].nodeName);soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:that.sizeDiff.height;soffsetw=ista?0:that.sizeDiff.width;s={width:(that.helper.width()-soffsetw),height:(that.helper.height()-soffseth)};left=(parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left))||null;top=(parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top))||null;if(!o.animate){this.element.css($.extend(s,{top:top,left:left}));}
866that.helper.height(that.size.height);that.helper.width(that.size.width);if(this._helper&&!o.animate){this._proportionallyResize();}}
867$("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper){this.helper.remove();}
868return false;},_updateVirtualBoundaries:function(forceAspectRatio){var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,o=this.options;b={minWidth:isNumber(o.minWidth)?o.minWidth:0,maxWidth:isNumber(o.maxWidth)?o.maxWidth:Infinity,minHeight:isNumber(o.minHeight)?o.minHeight:0,maxHeight:isNumber(o.maxHeight)?o.maxHeight:Infinity};if(this._aspectRatio||forceAspectRatio){pMinWidth=b.minHeight*this.aspectRatio;pMinHeight=b.minWidth/this.aspectRatio;pMaxWidth=b.maxHeight*this.aspectRatio;pMaxHeight=b.maxWidth/this.aspectRatio;if(pMinWidth>b.minWidth){b.minWidth=pMinWidth;}
869if(pMinHeight>b.minHeight){b.minHeight=pMinHeight;}
870if(pMaxWidth<b.maxWidth){b.maxWidth=pMaxWidth;}
871if(pMaxHeight<b.maxHeight){b.maxHeight=pMaxHeight;}}
872this._vBoundaries=b;},_updateCache:function(data){this.offset=this.helper.offset();if(isNumber(data.left)){this.position.left=data.left;}
873if(isNumber(data.top)){this.position.top=data.top;}
874if(isNumber(data.height)){this.size.height=data.height;}
875if(isNumber(data.width)){this.size.width=data.width;}},_updateRatio:function(data){var cpos=this.position,csize=this.size,a=this.axis;if(isNumber(data.height)){data.width=(data.height*this.aspectRatio);}else if(isNumber(data.width)){data.height=(data.width/this.aspectRatio);}
876if(a==="sw"){data.left=cpos.left+(csize.width-data.width);data.top=null;}
877if(a==="nw"){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width);}
878return data;},_respectSize:function(data){var o=this._vBoundaries,a=this.axis,ismaxw=isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),ismaxh=isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),isminw=isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),isminh=isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height),dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height,cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw){data.width=o.minWidth;}
879if(isminh){data.height=o.minHeight;}
880if(ismaxw){data.width=o.maxWidth;}
881if(ismaxh){data.height=o.maxHeight;}
882if(isminw&&cw){data.left=dw-o.minWidth;}
883if(ismaxw&&cw){data.left=dw-o.maxWidth;}
884if(isminh&&ch){data.top=dh-o.minHeight;}
885if(ismaxh&&ch){data.top=dh-o.maxHeight;}
886if(!data.width&&!data.height&&!data.left&&data.top){data.top=null;}else if(!data.width&&!data.height&&!data.top&&data.left){data.left=null;}
887return data;},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return;}
888var i,j,borders,paddings,prel,element=this.helper||this.element;for(i=0;i<this._proportionallyResizeElements.length;i++){prel=this._proportionallyResizeElements[i];if(!this.borderDif){this.borderDif=[];borders=[prel.css("borderTopWidth"),prel.css("borderRightWidth"),prel.css("borderBottomWidth"),prel.css("borderLeftWidth")];paddings=[prel.css("paddingTop"),prel.css("paddingRight"),prel.css("paddingBottom"),prel.css("paddingLeft")];for(j=0;j<borders.length;j++){this.borderDif[j]=(parseInt(borders[j],10)||0)+(parseInt(paddings[j],10)||0);}}
889prel.css({height:(element.height()-this.borderDif[0]-this.borderDif[2])||0,width:(element.width()-this.borderDif[1]-this.borderDif[3])||0});}},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(this._helper){this.helper=this.helper||$("<div style='overflow:hidden;'></div>");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection();}else{this.helper=this.element;}},_change:{e:function(event,dx){return{width:this.originalSize.width+dx};},w:function(event,dx){var cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx};},n:function(event,dx,dy){var cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy};},s:function(event,dx,dy){return{height:this.originalSize.height+dy};},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]));},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]));},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]));},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]));}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!=="resize"&&this._trigger(n,event,this.ui()));},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition};}});$.ui.plugin.add("resizable","animate",{stop:function(event){var that=$(this).data("ui-resizable"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:(that.size.width-soffsetw),height:(that.size.height-soffseth)},left=(parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left))||null,top=(parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top))||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(that.element.css("width"),10),height:parseInt(that.element.css("height"),10),top:parseInt(that.element.css("top"),10),left:parseInt(that.element.css("left"),10)};if(pr&&pr.length){$(pr[0]).css({width:data.width,height:data.height});}
890that._updateCache(data);that._propagate("resize",event);}});}});$.ui.plugin.add("resizable","containment",{start:function(){var element,p,co,ch,cw,width,height,that=$(this).data("ui-resizable"),o=that.options,el=that.element,oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;
890if(!ce){return;}
891that.containerElement=$(ce);if(/document/.test(oc)||oc===document){that.containerOffset={left:0,top:0};that.containerPosition={left:0,top:0};that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight};}
892else{element=$(ce);p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=num(element.css("padding"+name));});that.containerOffset=element.offset();that.containerPosition=element.position();that.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};co=that.containerOffset;ch=that.containerSize.height;cw=that.containerSize.width;width=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw);height=($.ui.hasScroll(ce)?ce.scrollHeight:ch);that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height};}},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$(this).data("ui-resizable"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement;if(ce[0]!==document&&(/static/).test(ce.css("position"))){cop=co;}
893if(cp.left<(that._helper?co.left:0)){that.size.width=that.size.width+(that._helper?(that.position.left-co.left):(that.position.left-cop.left));if(pRatio){that.size.height=that.size.width/that.aspectRatio;}
894that.position.left=o.helper?co.left:0;}
895if(cp.top<(that._helper?co.top:0)){that.size.height=that.size.height+(that._helper?(that.position.top-co.top):that.position.top);if(pRatio){that.size.width=that.size.height*that.aspectRatio;}
896that.position.top=that._helper?co.top:0;}
897that.offset.left=that.parentData.left+that.position.left;that.offset.top=that.parentData.top+that.position.top;woset=Math.abs((that._helper?that.offset.left-cop.left:(that.offset.left-cop.left))+that.sizeDiff.width);hoset=Math.abs((that._helper?that.offset.top-cop.top:(that.offset.top-co.top))+that.sizeDiff.height);isParent=that.containerElement.get(0)===that.element.parent().get(0);isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));if(isParent&&isOffsetRelative){woset-=that.parentData.left;}
898if(woset+that.size.width>=that.parentData.width){that.size.width=that.parentData.width-woset;if(pRatio){that.size.height=that.size.width/that.aspectRatio;}}
899if(hoset+that.size.height>=that.parentData.height){that.size.height=that.parentData.height-hoset;if(pRatio){that.size.width=that.size.height*that.aspectRatio;}}},stop:function(){var that=$(this).data("ui-resizable"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;if(that._helper&&!o.animate&&(/relative/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});}
900if(that._helper&&!o.animate&&(/static/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});}}});$.ui.plugin.add("resizable","alsoResize",{start:function(){var that=$(this).data("ui-resizable"),o=that.options,_store=function(exp){$(exp).each(function(){var el=$(this);el.data("ui-resizable-alsoresize",{width:parseInt(el.width(),10),height:parseInt(el.height(),10),left:parseInt(el.css("left"),10),top:parseInt(el.css("top"),10)});});};if(typeof(o.alsoResize)==="object"&&!o.alsoResize.parentNode){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize);}
901else{$.each(o.alsoResize,function(exp){_store(exp);});}}else{_store(o.alsoResize);}},resize:function(event,ui){var that=$(this).data("ui-resizable"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={height:(that.size.height-os.height)||0,width:(that.size.width-os.width)||0,top:(that.position.top-op.top)||0,left
vendor: 23,365 bytes, lines 901-972
901:(that.position.left-op.left)||0},_alsoResize=function(exp,c){$(exp).each(function(){var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},css=c&&c.length?c:el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null;}});el.css(style);});};if(typeof(o.alsoResize)==="object"&&!o.alsoResize.nodeType){$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c);});}else{_alsoResize(o.alsoResize);}},stop:function(){$(this).removeData("resizable-alsoresize");}});$.ui.plugin.add("resizable","ghost",{start:function(){var that=$(this).data("ui-resizable"),o=that.options,cs=that.size;that.ghost=that.originalElement.clone();that.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost==="string"?o.ghost:"");that.ghost.appendTo(that.helper);},resize:function(){var that=$(this).data("ui-resizable");if(that.ghost){that.ghost.css({position:"relative",height:that.size.height,width:that.size.width});}},stop:function(){var that=$(this).data("ui-resizable");if(that.ghost&&that.helper){that.helper.get(0).removeChild(that.ghost.get(0));}}});$.ui.plugin.add("resizable","grid",{resize:function(){var that=$(this).data("ui-resizable"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid=typeof o.grid==="number"?[o.grid,o.grid]:o.grid,gridX=(grid[0]||1),gridY=(grid[1]||1),ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&(o.maxWidth<newWidth),isMaxHeight=o.maxHeight&&(o.maxHeight<newHeight),isMinWidth=o.minWidth&&(o.minWidth>newWidth),isMinHeight=o.minHeight&&(o.minHeight>newHeight);o.grid=grid;if(isMinWidth){newWidth=newWidth+gridX;}
902if(isMinHeight){newHeight=newHeight+gridY;}
903if(isMaxWidth){newWidth=newWidth-gridX;}
904if(isMaxHeight){newHeight=newHeight-gridY;}
905if(/^(se|s|e)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;}else if(/^(ne)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.top=op.top-oy;}else if(/^(sw)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.left=op.left-ox;}else{that.size.width=newWidth;that.size.height=newHeight;that.position.top=op.top-oy;that.position.left=op.left-ox;}}});})(jQuery);(function($,undefined){$.widget("ui.selectable",$.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var selectees,that=this;this.element.addClass("ui-selectable");this.dragged=false;this.refresh=function(){selectees=$(that.options.filter,that.element[0]);selectees.addClass("ui-selectee");selectees.each(function(){var $this=$(this),pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")});});};this.refresh();this.selectees=selectees.addClass("ui-selectee");this._mouseInit();this.helper=$("<div class='ui-selectable-helper'></div>");},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy();},_mouseStart:function(event){var that=this,options=this.options;this.opos=[event.pageX,event.pageY];if(this.options.disabled){return;}
906this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"left":event.pageX,"top":event.pageY,"width":0,"height":0});if(options.autoRefresh){this.refresh();}
907this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey&&!event.ctrlKey){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element});}});$(event.target).parents().addBack().each(function(){var doSelect,selectee=$.data(this,"selectable-item");if(selectee){doSelect=(!event.metaKey&&!event.ctrlKey)||!selectee.$element.hasClass("ui-selected");selectee.$element.removeClass(doSelect?"ui-unselecting":"ui-selected").addClass(doSelect?"ui-selecting":"ui-unselecting");selectee.unselecting=!doSelect;selectee.selecting=doSelect;selectee.selected=doSelect;if(doSelect){that._trigger("selecting",event,{selecting:selectee.element});}else{that._trigger("unselecting",event,{unselecting:selectee.element});}
908return false;}});},_mouseDrag:function(event){this.dragged=true;if(this.options.disabled){return;}
909var tmp,that=this,options=this.options,x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){tmp=x2;x2=x1;x1=tmp;}
910if(y1>y2){tmp=y2;y2=y1;y1=tmp;}
911this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item"),hit=false;if(!selectee||selectee.element===that.element[0]){return;}
912if(options.tolerance==="touch"){hit=(!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1));}else if(options.tolerance==="fit"){hit=(selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2);}
913if(hit){if(selectee.selected){selectee.$element.removeClass("ui-selected");selectee.selected=false;}
914if(selectee.unselecting){selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false;}
915if(!selectee.selecting){selectee.$element.addClass("ui-selecting");selectee.selecting=true;that._trigger("selecting",event,{selecting:selectee.element});}}else{if(selectee.selecting){if((event.metaKey||event.ctrlKey)&&selectee.startselected){selectee.$element.removeClass("ui-selecting");selectee.selecting=false;selectee.$element.addClass("ui-selected");selectee.selected=true;}else{selectee.$element.removeClass("ui-selecting");selectee.selecting=false;if(selectee.startselected){selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;}
916that._trigger("unselecting",event,{unselecting:selectee.element});}}
917if(selectee.selected){if(!event.metaKey&&!event.ctrlKey&&!selectee.startselected){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element});}}}});return false;},_mouseStop:function(event){var that=this;this.dragged=false;$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false;selectee.startselected=false;that._trigger("unselected",event,{unselected:selectee.element});});$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-selecting").addClass("ui-selected");selectee.selecting=false;selectee.selected=true;selectee.startselected=true;that._trigger("selected",event,{selected:selectee.element});});this._trigger("stop",event);this.helper.remove();return false;}});})(jQuery);(function($,undefined){function isOverAxis(x,reference,size){return(x>reference)&&(x<(reference+size));}
918function isFloating(item){return(/left|right/).test(item.css("float"))||(/inline|table-cell/).test(item.css("display"));}
919$.widget("ui.sortable",$.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?o.axis==="x"||isFloating(this.items[0].item):false;this.offset=this.element.offset();this._mouseInit();this.ready=true;},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData(this.widgetName+"-item");}
920return this;},_setOption:function(key,value){if(key==="disabled"){this.options[key]=value;this.widget().toggleClass("ui-sortable-disabled",!!value);}else{$.Widget.prototype._setOption.apply(this,arguments);}},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=false,that=this;if(this.reverting){return false;}
921if(this.options.disabled||this.options.type==="static"){return false;}
922this._refreshItems(event);$(event.target).parents().each(function(){if($.data(this,that.widgetName+"-item")===that){currentItem=$(this);return false;}});if($.data(event.target,that.widgetName+"-item")===that){currentItem=$(event.target);}
923if(!currentItem){return false;}
924if(this.options.handle&&!overrideHandle){$(this.options.handle,currentItem).find("*").addBack().each(function(){if(this===event.target){validHandle=true;}});if(!validHandle){return false;}}
925this.currentItem=currentItem;this._removeCurrentsFromItems();return true;},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide();}
926this._createPlaceholder();if(o.containment){this._setContainment();}
927if(o.cursor&&o.cursor!=="auto"){body=this.document.find("body");this.storedCursor=body.css("cursor");body.css("cursor",o.cursor);this.storedStylesheet=$("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(body);}
928if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity");}
929this.helper.css("opacity",o.opacity);}
930if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex");}
931this.helper.css("zIndex",o.zIndex);}
932if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){this.overflowOffset=this.scrollParent.offset();}
933this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions();}
934if(!noActivation){for(i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,this._uiHash(this));}}
935if($.ui.ddmanager){$.ui.ddmanager.current=this;}
936if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}
937this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true;},_mouseDrag:function(event){var i,item,itemElement,intersection,o=this.options,scrolled=false;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;}
938if(this.options.scroll){if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;}else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;}
939if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed;}else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed;}}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);}else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}
940if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);}else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}
941if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}}
942this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px";}
943if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=this.position.top+"px";}
944for(i=this.items.length-1;i>=0;i--){item=this.items[i];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue;}
945if(item.instance!==this.currentContainer){continue;}
946if(itemElement!==this.currentItem[0]&&this.placeholder[intersection===1?"next":"prev"]()[0]!==itemElement&&!$.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$.contains(this.element[0],itemElement):true)){this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item);}else{break;}
947this._trigger("change",event,this._uiHash());break;}}
948this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);}
949this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event,noPropagation){if(!event){return;}
950if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event);}
951if(this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};if(!axis||axis==="x"){animation.left=cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft);}
952if(!axis||axis==="y"){animation.top=cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop);}
953this.reverting=true;$(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event);});}else{this._clear(event,noPropagation);}
954return false;},cancel:function(){if(this.dragging){this._mouseUp({target:null});if(this.options.helper==="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}
955for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,this._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,this._uiHash(this));this.containers[i].containerCache.over=0;}}}
956if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0]);}
957if(this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove();}
958$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem);}else{$(this.domPosition.parent).prepend(this.currentItem);}}
959return this;},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[\-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]));}});if(!str.length&&o.key){str.push(o.key+"=");}
960return str.join("&");},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"");});return ret;},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r=l+item.width,t=item.top,b=t+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElementHeight=(this.options.axis==="x")||((y1+dyClick)>t&&(y1+dyClick)<b),isOverElementWidth=(this.options.axis==="y")||((x1+dxClick)>l&&(x1+dxClick)<r),isOverElement=isOverElementHeight&&isOverElementWidth;if(this.options.tolerance==="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!=="pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"])){return isOverElement;}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b);}},_intersectsWithPointer:function(item){var isOverElementHeight=(this.options.axis==="x")||isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=(this.options.axis==="y")||isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement){return false;}
961return this.floating?(((horizontalDirection&&horizontalDirection==="right")||verticalDirection==="down")?2:1):(verticalDirection&&(verticalDirection==="down"?2:1));},_intersectsWithSides:function(item){var isOverBottomHalf=isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection==="right"&&isOverRightHalf)||(horizontalDirection==="left"&&!isOverRightHalf));}else{return verticalDirection&&((verticalDirection==="down"&&isOverBottomHalf)||(verticalDirection==="up"&&!isOverBottomHalf));}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!==0&&(delta>0?"down":"up");},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!==0&&(delta>0?"right":"left");},refresh:function(event){this._refreshItems(event);this.refreshPositions();return this;},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith;},_getItemsAsjQuery:function(connected){var i,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected){for(i=connectWith.length-1;i>=0;i--){cur=$(connectWith[i]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),inst]);}}}}
962queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this);});}
963return $(items);},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j<list.length;j++){if(list[j]===item.item[0]){return false;}}
964return true;});},_refreshItems:function(event){this.items=[];this.containers=[this];var i,j,cur,inst,targetData,_queries,item,queriesLength,items=this.items,queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]],connectWith=this._connectWith();if(connectWith&&this.ready){for(i=connectWith.length-1;i>=0;i--){cur=$(connectWith[i]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}}}}
965for(i=queries.length-1;i>=0;i--){targetData=queries[i][1];_queries=queries[i][0];for(j=0,queriesLength=_queries.length;j<queriesLength;j++){item=$(_queries[j]);item.data(this.widgetName+"-item",targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0});}}},refreshPositions:function(fast){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset();}
966var i,item,t,p;for(i=this.items.length-1;i>=0;i--){item=this.items[i];if(item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]){continue;}
967t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight();}
968p=t.offset();item.left=p.left;item.top=p.top;}
969if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this);}else{for(i=this.containers.length-1;i>=0;i--){p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();}}
970return this;},_createPlaceholder:function(that){that=that||this;var className,o=that.options;if(!o.placeholder||o.placeholder.constructor===String){className=o.placeholder;o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$("<"+nodeName+">",that.document[0]).addClass(className||that.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");if(nodeName==="tr"){that.currentItem.children().each(function(){$("<td>&#160;</td>",that.document[0]).attr("colspan",$(this).attr("colspan")||1).appendTo(element);});}else if(nodeName==="img"){element.attr("src",that.currentItem.attr("src"));}
971if(!className){element.css("visibility","hidden");}
972return element;},update:function(container,p){if(className&&!o.forcePlaceholderSize){return;}
973if(!p.height()){p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css("paddingTop")||0,10)-parseInt(that.currentItem.css("paddingBottom")||0,10));}
974if(!p.width()){p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css("paddingLeft")||0,10)-parseInt(that.currentItem.css("paddingRight")||0,10));}}};}
975that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));that.currentItem.after(that.placeholder);o.placeholder.update(that,that.placeholder);},_contactContainers:function(event){var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,base,cur,nearBottom,floating,innermostContainer=null,innermostIndex=null;for(i=this.containers.length-1;i>=0;i--){if($.contains(this.currentItem[0],this.containers[i].element[0])){continue;}
976if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0])){continue;}
977innermostContainer=this.containers[i];innermostIndex=i;}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0;}}}
978if(!innermostContainer){return;}
979if(this.containers.length===1){if(!this.containers[innermostIndex].containerCache.over){this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1;}}else{dist=10000;itemWithLeastDistance=null;floating=innermostContainer.floating||isFloating(this.currentItem);posProperty=floating?"left":"top";sizeProperty=floating?"width":"height";base=this.positionAbs[posProperty]+this.offset.click[posProperty];for(j=this.items.length-1;j>=0;j--){if(!$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])){continue;}
980if(this.items[j].item[0]===this.currentItem[0]){continue;}
981if(floating&&!isOverAxis(this.positionAbs.top+this.offset.click.top,this.items[j].top,this.items[j].height)){continue;}
982cur=this.items[j].item.offset()[posProperty];nearBottom=false;if(Math.abs(cur-base)>
vendor: 36,529 bytes, lines 982-1118
982Math.abs(cur+this.items[j][sizeProperty]-base)){nearBottom=true;cur+=this.items[j][sizeProperty];}
983if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j];this.direction=nearBottom?"up":"down";}}
984if(!itemWithLeastDistance&&!this.options.dropOnEmpty){return;}
985if(this.currentContainer===this.containers[innermostIndex]){return;}
986itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[innermostIndex].element,true);this._trigger("change",event,this._uiHash());this.containers[innermostIndex]._trigger("change",event,this._uiHash(this));this.currentContainer=this.containers[innermostIndex];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1;}},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper==="clone"?this.currentItem.clone():this.currentItem);if(!helper.parents("body").length){$(o.appendTo!=="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]);}
987if(helper[0]===this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};}
988if(!helper[0].style.width||o.forceHelperSize){helper.width(this.currentItem.width());}
989if(!helper[0].style.height||o.forceHelperSize){helper.height(this.currentItem.height());}
990return helper;},_adjustOffsetFromHelper:function(obj){if(typeof obj==="string"){obj=obj.split(" ");}
991if($.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0};}
992if("left"in obj){this.offset.click.left=obj.left+this.margins.left;}
993if("right"in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;}
994if("top"in obj){this.offset.click.top=obj.top+this.margins.top;}
995if("bottom"in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
996if(this.offsetParent[0]===document.body||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&$.ui.ie)){po={top:0,left:0};}
997return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var ce,co,over,o=this.options;if(o.containment==="parent"){o.containment=this.helper[0].parentNode;}
998if(o.containment==="document"||o.containment==="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment==="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment==="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];}
999if(!(/^(document|window|parent)$/).test(o.containment)){ce=$(o.containment)[0];co=$(o.containment).offset();over=($(ce).css("overflow")!=="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position;}
1000var mod=d==="absolute"?1:-1,document=this.document[0],useOffsetParent=this.cssPosition==="absolute"&&(this.scrollParent[0]===document||!$.contains(this.scrollParent[0],this.offsetParent[0])),scroll=useOffsetParent?this.offsetParent:this.scrollParent,scrollIsRootNode=useOffsetParent&&(/(html|body)/i).test(scroll[0].nodeName);if(!this.offset.scroll){this.offset.scroll={top:scroll.scrollTop(),left:scroll.scrollLeft()};}
1001return{top:(pos.top+
1002this.offset.relative.top*mod+
1003this.offset.parent.top*mod-
1004((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:this.offset.scroll.top))*mod)),left:(pos.left+
1005this.offset.relative.left*mod+
1006this.offset.parent.left*mod-
1007((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:this.offset.scroll.left)*mod))};},_generatePosition:function(event,constrainPosition){var containment,co,top,left,o=this.options,document=this.document[0],useOffsetParent=this.cssPosition==="absolute"&&(this.scrollParent[0]===document||!$.contains(this.scrollParent[0],this.offsetParent[0])),scroll=useOffsetParent?this.offsetParent:this.scrollParent,scrollIsRootNode=useOffsetParent&&(/(html|body)/i).test(scroll[0].nodeName),pageX=event.pageX,pageY=event.pageY;if(!this.offset.scroll){this.offset.scroll={top:scroll.scrollTop(),left:scroll.scrollLeft()};}
1008if(constrainPosition){if(this.containment){if(this.relative_container){co=this.relative_container.offset();containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top];}
1009else{containment=this.containment;}
1010if(event.pageX-this.offset.click.left<containment[0]){pageX=containment[0]+this.offset.click.left;}
1011if(event.pageY-this.offset.click.top<containment[1]){pageY=containment[1]+this.offset.click.top;}
1012if(event.pageX-this.offset.click.left>containment[2]){pageX=containment[2]+this.offset.click.left;}
1013if(event.pageY-this.offset.click.top>containment[3]){pageY=containment[3]+this.offset.click.top;}}
1014if(o.grid){top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;pageY=containment?((top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3])?top:((top-this.offset.click.top>=containment[1])?top-o.grid[1]:top+o.grid[1])):top;left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX;pageX=containment?((left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2])?left:((left-this.offset.click.left>=containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
1015if(o.axis==="y"){pageX=this.originalPageX;}
1016if(o.axis==="x"){pageY=this.originalPageY;}}
1017return{top:(pageY-
1018this.offset.click.top-
1019this.offset.relative.top-
1020this.offset.parent.top+
1021(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:this.offset.scroll.top))),left:(pageX-
1022this.offset.click.left-
1023this.offset.relative.left-
1024this.offset.parent.left+
1025(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():(scrollIsRootNode?0:this.offset.scroll.left)))};},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){if(counter===this.counter){this.refreshPositions(!hardRefresh);}});},_clear:function(event,noPropagation){this.reverting=false;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem);}
1026this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(i in this._storedCSS){if(this._storedCSS[i]==="auto"||this._storedCSS[i]==="static"){this._storedCSS[i]="";}}
1027this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}
1028if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside));});}
1029if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash());});}
1030if(this!==this.currentContainer){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash());});delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this));};}).call(this,this.currentContainer));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this));};}).call(this,this.currentContainer));}}
1031for(i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this));};}).call(this,this.containers[i]));}
1032if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this));};}).call(this,this.containers[i]));this.containers[i].containerCache.over=0;}}
1033if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove();}
1034if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity);}
1035if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex);}
1036this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);}
1037this._trigger("stop",event,this._uiHash());}
1038this.fromOutside=false;return false;}
1039if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());}
1040this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!==this.currentItem[0]){this.helper.remove();}
1041this.helper=null;if(!noPropagation){for(i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);}
1042this._trigger("stop",event,this._uiHash());}
1043this.fromOutside=false;return true;},_trigger:function(){if($.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel();}},_uiHash:function(_inst){var inst=_inst||this;return{helper:inst.helper,placeholder:inst.placeholder||$([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null};}});})(jQuery);(function($,undefined){var uid=0,hideProps={},showProps={};hideProps.height=hideProps.paddingTop=hideProps.paddingBottom=hideProps.borderTopWidth=hideProps.borderBottomWidth="hide";showProps.height=showProps.paddingTop=showProps.paddingBottom=showProps.borderTopWidth=showProps.borderBottomWidth="show";$.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:false,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var options=this.options;this.prevShow=this.prevHide=$();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");if(!options.collapsible&&(options.active===false||options.active==null)){options.active=0;}
1044this._processPanels();if(options.active<0){options.active+=this.headers.length;}
1045this._refresh();},_getCreateEventData:function(){return{header:this.active,panel:!this.active.length?$():this.active.next(),content:!this.active.length?$():this.active.next()};},_createIcons:function(){var icons=this.options.icons;if(icons){$("<span>").addClass("ui-accordion-header-icon ui-icon "+icons.header).prependTo(this.headers);this.active.children(".ui-accordion-header-icon").removeClass(icons.header).addClass(icons.activeHeader);this.headers.addClass("ui-accordion-icons");}},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove();},_destroy:function(){var contents;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){if(/^ui-accordion/.test(this.id)){this.removeAttribute("id");}});this._destroyIcons();contents=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){if(/^ui-accordion/.test(this.id)){this.removeAttribute("id");}});if(this.options.heightStyle!=="content"){contents.css("height","");}},_setOption:function(key,value){if(key==="active"){this._activate(value);return;}
1046if(key==="event"){if(this.options.event){this._off(this.headers,this.options.event);}
1047this._setupEvents(value);}
1048this._super(key,value);if(key==="collapsible"&&!value&&this.options.active===false){this._activate(0);}
1049if(key==="icons"){this._destroyIcons();if(value){this._createIcons();}}
1050if(key==="disabled"){this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!value);}},_keydown:function(event){if(event.altKey||event.ctrlKey){return;}
1051var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1];break;}
1052if(toFocus){$(event.target).attr("tabIndex",-1);$(toFocus).attr("tabIndex",0);toFocus.focus();event.preventDefault();}},_panelKeyDown:function(event){if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){$(event.currentTarget).prev().focus();}},refresh:function(){var options=this.options;this._processPanels();if((options.active===false&&options.collapsible===true)||!this.headers.length){options.active=false;this.active=$();}else if(options.active===false){this._activate(0);}else if(this.active.length&&!$.contains(this.element[0],this.active[0])){if(this.headers.length===this.headers.find(".ui-state-disabled").length){options.active=false;this.active=$();}else{this._activate(Math.max(0,options.active-1));}}else{options.active=this.headers.index(this.active);}
1053this._destroyIcons();this._refresh();},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide();},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent=this.element.parent(),accordionId=this.accordionId="ui-accordion-"+
1054(this.element.attr("id")||++uid);this.active=this._findActive(options.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(i){var header=$(this),headerId=header.attr("id"),panel=header.next(),panelId=panel.attr("id");if(!headerId){headerId=accordionId+"-header-"+i;header.attr("id",headerId);}
1055if(!panelId){panelId=accordionId+"-panel-"+i;panel.attr("id",panelId);}
1056header.attr("aria-controls",panelId);panel.attr("aria-labelledby",headerId);}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex",0);}else{this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"});}
1057this._createIcons();this._setupEvents(options.event);if(heightStyle==="fill"){maxHeight=parent.height();this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");if(position==="absolute"||position==="fixed"){return;}
1058maxHeight-=elem.outerHeight(true);});this.headers.each(function(){maxHeight-=$(this).outerHeight(true);});this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-
1059$(this).innerHeight()+$(this).height()));}).css("overflow","auto");}else if(heightStyle==="auto"){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).css("height","").height());}).height(maxHeight);}},_activate:function(index){var active=this._findActive(index)[0];if(active===this.active[0]){return;}
1060active=active||this.active[0];this._eventHandler({target:active,currentTarget:active,preventDefault:$.noop});},_findActive:function(selector){return typeof selector==="number"?this.headers.eq(selector):$();},_setupEvents:function(event){var events={keydown:"_keydown"};if(event){$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler";});}
1061this._off(this.headers.add(this.headers.next()));this._on(this.headers,events);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers);},_eventHandler:function(event){var options=this.options,active=this.active,clicked=$(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$():clicked,newPanel:toShow};event.preventDefault();if((clickedIsActive&&!options.collapsible)||(this._trigger("beforeActivate",event,eventData)===false)){return;}
1062options.active=collapsing?false:this.headers.index(clicked);this.active=clickedIsActive?$():clicked;this._toggle(eventData);active.removeClass("ui-accordion-header-active ui-state-active");if(options.icons){active.children(".ui-accordion-header-icon").removeClass(options.icons.activeHeader).addClass(options.icons.header);}
1063if(!clickedIsActive){clicked.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top");if(options.icons){clicked.children(".ui-accordion-header-icon").removeClass(options.icons.header).addClass(options.icons.activeHeader);}
1064clicked.next().addClass("ui-accordion-content-active");}},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(true,true);this.prevShow=toShow;this.prevHide=toHide;if(this.options.animate){this._animate(toShow,toHide,data);}else{toHide.hide();toShow.show();this._toggleComplete(data);}
1065toHide.attr({"aria-expanded":"false","aria-hidden":"true"});toHide.prev().attr("aria-selected","false");if(toShow.length&&toHide.length){toHide.prev().attr("tabIndex",-1);}else if(toShow.length){this.headers.filter(function(){return $(this).attr("tabIndex")===0;}).attr("tabIndex",-1);}
1066toShow.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0});},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,down=toShow.length&&(!toHide.length||(toShow.index()<toHide.index())),animate=this.options.animate||{},options=down&&animate.down||animate,complete=function(){that._toggleComplete(data);};if(typeof options==="number"){duration=options;}
1067if(typeof options==="string"){easing=options;}
1068easing=easing||options.easing||animate.easing;duration=duration||options.duration||animate.duration;if(!toHide.length){return toShow.animate(showProps,duration,easing,complete);}
1069if(!toShow.length){return toHide.animate(hideProps,duration,easing,complete);}
1070total=toShow.show().outerHeight();toHide.animate(hideProps,{duration:duration,easing:easing,step:function(now,fx){fx.now=Math.round(now);}});toShow.hide().animate(showProps,{duration:duration,easing:easing,complete:complete,step:function(now,fx){fx.now=Math.round(now);if(fx.prop!=="height"){adjust+=fx.now;}else if(that.options.heightStyle!=="content"){fx.now=Math.round(total-toHide.outerHeight()-adjust);adjust=0;}}});},_toggleComplete:function(data){var toHide=data.oldPanel;toHide.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");if(toHide.length){toHide.parent()[0].className=toHide.parent()[0].className;}
1071this._trigger("activate",null,data);}});})(jQuery);(function($,undefined){var requestIndex=0;$.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea=nodeName==="textarea",isInput=nodeName==="input";this.isMultiLine=isTextarea?true:isInput?false:this.element.prop("isContentEditable");this.valueMethod=this.element[isTextarea||isInput?"val":"text"];this.isNewMenu=true;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly")){suppressKeyPress=true;suppressInput=true;suppressKeyPressRepeat=true;return;}
1072suppressKeyPress=false;suppressInput=false;suppressKeyPressRepeat=false;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=true;this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=true;this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=true;this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=true;this._keyEvent("next",event);break;case keyCode.ENTER:case keyCode.NUMPAD_ENTER:if(this.menu.active){suppressKeyPress=true;event.preventDefault();this.menu.select(event);}
1073break;case keyCode.TAB:if(this.menu.active){this.menu.select(event);}
1074break;case keyCode.ESCAPE:if(this.menu.element.is(":visible")){this._value(this.term);this.close(event);event.preventDefault();}
1075break;default:suppressKeyPressRepeat=true;this._searchTimeout(event);break;}},keypress:function(event){if(suppressKeyPress){suppressKeyPress=false;if(!this.isMultiLine||this.menu.element.is(":visible")){event.preventDefault();}
1076return;}
1077if(suppressKeyPressRepeat){return;}
1078var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event);break;}},input:function(event){if(suppressInput){suppressInput=false;event.preventDefault();return;}
1079this._searchTimeout(event);},focus:function(){this.selectedItem=null;this.previous=this._value();},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return;}
1080clearTimeout(this.searching);this.close(event);this._change(event);}});this._initSource();this.menu=$("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu");this._on(this.menu.element,{mousedown:function(event){event.preventDefault();this.cancelBlur=true;this._delay(function(){delete this.cancelBlur;});var menuElement=this.menu.element[0];if(!$(event.target).closest(".ui-menu-item").length){this._delay(function(){var that=this;this.document.one("mousedown",function(event){if(event.target!==that.element[0]&&event.target!==menuElement&&!$.contains(menuElement,event.target)){that.close();}});});}},menufocus:function(event,ui){if(this.isNewMenu){this.isNewMenu=false;if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){this.menu.blur();this.document.one("mousemove",function(){$(event.target).trigger(event.originalEvent);});return;}}
1081var item=ui.item.data("ui-autocomplete-item");if(false!==this._trigger("focus",event,{item:item})){if(event.originalEvent&&/^key/.test(event.originalEvent.type)){this._value(item.value);}}else{this.liveRegion.text(item.value);}},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item"),previous=this.previous;if(this.element[0]!==this.document[0].activeElement){this.element.focus();this.previous=previous;this._delay(function(){this.previous=previous;this.selectedItem=item;});}
1082if(false!==this._trigger("select",event,{item:item})){this._value(item.value);}
1083this.term=this._value();this.close(event);this.selectedItem=item;}});this.liveRegion=$("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete");}});},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove();},_setOption:function(key,value){this._super(key,value);if(key==="source"){this._initSource();}
1084if(key==="appendTo"){this.menu.element.appendTo(this._appendTo());}
1085if(key==="disabled"&&value&&this.xhr){this.xhr.abort();}},_appendTo:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0);}
1086if(!element){element=this.element.closest(".ui-front");}
1087if(!element.length){element=this.document[0].body;}
1088return element;},_initSource:function(){var array,url,that=this;if($.isArray(this.options.source)){array=this.options.source;this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term));};}else if(typeof this.options.source==="string"){url=this.options.source;this.source=function(request,response){if(that.xhr){that.xhr.abort();}
1089that.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data){response(data);},error:function(){response([]);}});};}else{this.source=this.options.source;}},_searchTimeout:function(event){clearTimeout(this.searching);this.searching=this._delay(function(){if(this.term!==this._value()){this.selectedItem=null;this.search(null,event);}},this.options.delay);},search:function(value,event){value=value!=null?value:this._value();this.term=this._value();if(value.length<this.options.minLength){return this.close(event);}
1090if(this._trigger("search",event)===false){return;}
1091return this._search(value);},_search:function(value){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=false;this.source({term:value},this._response());},_response:function(){var that=this,index=++requestIndex;return function(content){if(index===requestIndex){that.__response(content);}
1092that.pending--;if(!that.pending){that.element.removeClass("ui-autocomplete-loading");}};},__response:function(content){if(content){content=this._normalize(content);}
1093this._trigger("response",null,{content:content});if(!this.options.disabled&&content&&content.length&&!this.cancelSearch){this._suggest(content);this._trigger("open");}else{this._close();}},close:function(event){this.cancelSearch=true;this._close(event);},_close:function(event){if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.blur();this.isNewMenu=true;this._trigger("close",event);}},_change:function(event){if(this.previous!==this._value()){this._trigger("change",event,{item:this.selectedItem});}},_normalize:function(items){if(items.length&&items[0].label&&items[0].value){return items;}
1094return $.map(items,function(item){if(typeof item==="string"){return{label:item,value:item};}
1095return $.extend({label:item.label||item.value,value:item.value||item.label},item);});},_suggest:function(items){var ul=this.menu.element.empty();this._renderMenu(ul,items);this.isNewMenu=true;this.menu.refresh();ul.show();this._resizeMenu();ul.position($.extend({of:this.element},this.options.position));if(this.options.autoFocus){this.menu.next();}},_resizeMenu:function(){var ul=this.menu.element;ul.outerWidth(Math.max(ul.width("").outerWidth()+1,this.element.outerWidth()));},_renderMenu:function(ul,items){var that=this;$.each(items,function(index,item){that._renderItemData(ul,item);});},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item);},_renderItem:function(ul,item){return $("<li>").append($("<a>").text(item.label)).appendTo(ul);},_move:function(direction,event){if(!this.menu.element.is(":visible")){this.search(null,event);return;}
1096if(this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)){this._value(this.term);this.menu.blur();return;}
1097this.menu[direction](event);},widget:function(){return this.menu.element;},_value:function(){return this.valueMethod.apply(this.element,arguments);},_keyEvent:function(keyEvent,event){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(keyEvent,event);event.preventDefault();}}});$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test(value.label||value.value||value);});}});$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate.";}}},__response:function(content){var message;this._superApply(arguments);if(this.options.disabled||this.cancelSearch){return;}
1098if(content&&content.length){message=this.options.messages.results(content.length);}else{message=this.options.messages.noResults;}
1099this.liveRegion.text(message);}});}(jQuery));(function($,undefined){var lastActive,startXPos,startYPos,clickDragged,baseClasses="ui-button ui-widget ui-state-default ui-corner-all",stateClasses="ui-state-hover ui-state-active ",typeClasses="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",formResetHandler=function(){var form=$(this);setTimeout(function(){form.find(":ui-button").button("refresh");},1);},radioGroup=function(radio){var name=radio.name,form=radio.form,radios=$([]);if(name){name=name.replace(/'/g,"\\'");if(form){radios=$(form).find("[name='"+name+"']");}else{radios=$("[name='"+name+"']",radio.ownerDocument).filter(function(){return!this.form;});}}
1100return radios;};$.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,formResetHandler);if(typeof this.options.disabled!=="boolean"){this.options.disabled=!!this.element.prop("disabled");}else{this.element.prop("disabled",this.options.disabled);}
1101this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var that=this,options=this.options,toggleButton=this.type==="checkbox"||this.type==="radio",activeClass=!toggleButton?"ui-state-active":"",focusClass="ui-state-focus";if(options.label===null){options.label=(this.type==="input"?this.buttonElement.val():this.buttonElement.html());}
1102this._hoverable(this.buttonElement);this.buttonElement.addClass(baseClasses).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(options.disabled){return;}
1103if(this===lastActive){$(this).addClass("ui-state-active");}}).bind("mouseleave"+this.eventNamespace,function(){if(options.disabled){return;}
1104$(this).removeClass(activeClass);}).bind("click"+this.eventNamespace,function(event){if(options.disabled){event.preventDefault();event.stopImmediatePropagation();}});this.element.bind("focus"+this.eventNamespace,function(){that.buttonElement.addClass(focusClass);}).bind("blur"+this.eventNamespace,function(){that.buttonElement.removeClass(focusClass);});if(toggleButton){this.element.bind("change"+this.eventNamespace,function(){if(clickDragged){return;}
1105that.refresh();});this.buttonElement.bind("mousedown"+this.eventNamespace,function(event){if(options.disabled){return;}
1106clickDragged=false;startXPos=event.pageX;startYPos=event.pageY;}).bind("mouseup"+this.eventNamespace,function(event){if(options.disabled){return;}
1107if(startXPos!==event.pageX||startYPos!==event.pageY){clickDragged=true;}});}
1108if(this.type==="checkbox"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(options.disabled||clickDragged){return false;}});}else if(this.type==="radio"){this.buttonElement.bind("click"+this.eventNamespace,function(){if(options.disabled||clickDragged){return false;}
1109$(this).addClass("ui-state-active");that.buttonElement.attr("aria-pressed","true");var radio=that.element[0];radioGroup(radio).not(radio).map(function(){return $(this).button("widget")[0];}).removeClass("ui-state-active").attr("aria-pressed","false");});}else{this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(options.disabled){return false;}
1110$(this).addClass("ui-state-active");lastActive=this;that.document.one("mouseup",function(){lastActive=null;});}).bind("mouseup"+this.eventNamespace,function(){if(options.disabled){return false;}
1111$(this).removeClass("ui-state-active");}).bind("keydown"+this.eventNamespace,function(event){if(options.disabled){return false;}
1112if(event.keyCode===$.ui.keyCode.SPACE||event.keyCode===$.ui.keyCode.ENTER){$(this).addClass("ui-state-active");}}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){$(this).removeClass("ui-state-active");});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(event){if(event.keyCode===$.ui.keyCode.SPACE){$(this).click();}});}}
1113this._setOption("disabled",options.disabled);this._resetButton();},_determineButtonType:function(){var ancestor,labelSelector,checked;if(this.element.is("[type=checkbox]")){this.type="checkbox";}else if(this.element.is("[type=radio]")){this.type="radio";}else if(this.element.is("input")){this.type="input";}else{this.type="button";}
1114if(this.type==="checkbox"||this.type==="radio"){ancestor=this.element.parents().last();labelSelector="label[for='"+this.element.attr("id")+"']";this.buttonElement=ancestor.find(labelSelector);if(!this.buttonElement.length){ancestor=ancestor.length?ancestor.siblings():this.element.siblings();this.buttonElement=ancestor.filter(labelSelector);if(!this.buttonElement.length){this.buttonElement=ancestor.find(labelSelector);}}
1115this.element.addClass("ui-helper-hidden-accessible");checked=this.element.is(":checked");if(checked){this.buttonElement.addClass("ui-state-active");}
1116this.buttonElement.prop("aria-pressed",checked);}else{this.buttonElement=this.element;}},widget:function(){return this.buttonElement;},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(baseClasses+" "+stateClasses+" "+typeClasses).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title");}},_setOption:function(key,value){this._super(key,value);if(key==="disabled"){if(value){this.element.prop("disabled",true);}else{this.element.prop("disabled",false);}
1117return;}
1118this._resetButton();},refresh:function(){var isDisabled=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");if(isDisabled!==this.options.disabled){this._setOption("disabled",isDisabled);}
vendor: 6,497 bytes, lines 1119-1131
1119if(this.type==="radio"){radioGroup(this.element[0]).each(function(){if($(this).is(":checked")){$(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true");}else{$(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false");}});}else if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true");}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false");}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label);}
1120return;}
1121var buttonElement=this.buttonElement.removeClass(typeClasses),buttonText=$("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(buttonElement.empty()).text(),icons=this.options.icons,multipleIcons=icons.primary&&icons.secondary,buttonClasses=[];if(icons.primary||icons.secondary){if(this.options.text){buttonClasses.push("ui-button-text-icon"+(multipleIcons?"s":(icons.primary?"-primary":"-secondary")));}
1122if(icons.primary){buttonElement.prepend("<span class='ui-button-icon-primary ui-icon "+icons.primary+"'></span>");}
1123if(icons.secondary){buttonElement.append("<span class='ui-button-icon-secondary ui-icon "+icons.secondary+"'></span>");}
1124if(!this.options.text){buttonClasses.push(multipleIcons?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle){buttonElement.attr("title",$.trim(buttonText));}}}else{buttonClasses.push("ui-button-text-only");}
1125buttonElement.addClass(buttonClasses.join(" "));}});$.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset");},_init:function(){this.refresh();},_setOption:function(key,value){if(key==="disabled"){this.buttons.button("option",key,value);}
1126this._super(key,value);},refresh:function(){var rtl=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return $(this).button("widget")[0];}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(rtl?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(rtl?"ui-corner-left":"ui-corner-right").end().end();},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return $(this).button("widget")[0];}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");}});}(jQuery));(function($,undefined){$.extend($.ui,{datepicker:{version:"1.10.3"}});var PROP_NAME="datepicker",instActive;function Datepicker(){this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=bindHover($("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));}
1127$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv;},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var nodeName,inline,inst;nodeName=target.nodeName.toLowerCase();inline=(nodeName==="div"||nodeName==="span");if(!target.id){this.uuid+=1;target.id="dp"+this.uuid;}
1128inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{});if(nodeName==="input"){this._connectDatepicker(target,inst);}else if(inline){this._inlineDatepicker(target,inst);}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:bindHover($("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return;}
1129this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp);this._autoSize(inst);$.data(target,PROP_NAME,inst);if(inst.settings.disabled){this._disableDatepicker(target);}},_attachments:function(input,inst){var showOn,buttonText,buttonImage,appendText=this._get(inst,"appendText"),isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove();}
1130if(appendText){inst.append=$("<span class='"+this._appendClass+"'>"+appendText+"</span>");input[isRTL?"before":"after"](inst.append);}
1131input.unbind("focus",this._showDatepicker);
vendor: 4,219 bytes, lines 1131-1143
1131if(inst.trigger){inst.trigger.remove();}
1132showOn=this._get(inst,"showOn");if(showOn==="focus"||showOn==="both"){input.focus(this._showDatepicker);}
1133if(showOn==="button"||showOn==="both"){buttonText=this._get(inst,"buttonText");buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button type='button'></button>").addClass(this._triggerClass).html(!buttonImage?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]){$.datepicker._hideDatepicker();}else if($.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]){$.datepicker._hideDatepicker();$.datepicker._showDatepicker(input[0]);}else{$.datepicker._showDatepicker(input[0]);}
1134return false;});}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,12-1,20),dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){findMax=function(names){max=0;maxI=0;for(i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i;}}
1135return maxI;};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay());}
1136inst.input.attr("size",this._formatDate(inst,date).length);}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return;}
1137divSpan.addClass(this.markerClassName).append(inst.dpDiv);$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled){this._disableDatepicker(target);}
1138inst.dpDiv.css("display","block");},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;if(!inst){this.uuid+=1;id="dp"+this.uuid;this._dialogInput=$("<input type='text' id='"+id+"' style='position: absolute; top: -100px; width: 0px;'/>");this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst);}
1139extendRemove(inst.settings,settings||{});date=(date&&date.constructor===Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){browserWidth=document.documentElement.clientWidth;browserHeight=document.documentElement.clientHeight;scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}
1140this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv);}
1141$.data(this._dialogInput[0],PROP_NAME,inst);return this;},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return;}
1142nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName==="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp);}else if(nodeName==="div"||nodeName==="span"){$target.removeClass(this.markerClassName).empty();}},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return;}
1143nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false;}).end().filter("img").css({opacity:"1.0",cursor:""});}
vendor: 6,201 bytes, lines 1143-1170
1143else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false);}
1144this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value);});},_disableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return;}
1145nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true;}).end().filter("img").css({opacity:"0.5",cursor:"default"});}else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true);}
1146this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value);});this._disabledInputs[this._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target){return false;}
1147for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]===target){return true;}}
1148return false;},_getInst:function(target){try{return $.data(target,PROP_NAME);}
1149catch(err){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(target,name,value){var settings,date,minDate,maxDate,inst=this._getInst(target);if(arguments.length===2&&typeof name==="string"){return(name==="defaults"?$.extend({},$.datepicker._defaults):(inst?(name==="all"?$.extend({},inst.settings):this._get(inst,name)):null));}
1150settings=name||{};if(typeof name==="string"){settings={};settings[name]=value;}
1151if(inst){if(this._curInst===inst){this._hideDatepicker();}
1152date=this._getDateDatepicker(target,true);minDate=this._getMinMaxDate(inst,"min");maxDate=this._getMinMaxDate(inst,"max");extendRemove(inst.settings,settings);if(minDate!==null&&settings.dateFormat!==undefined&&settings.minDate===undefined){inst.settings.minDate=this._formatDate(inst,minDate);}
1153if(maxDate!==null&&settings.dateFormat!==undefined&&settings.maxDate===undefined){inst.settings.maxDate=this._formatDate(inst,maxDate);}
1154if("disabled"in settings){if(settings.disabled){this._disableDatepicker(target);}else{this._enableDatepicker(target);}}
1155this._attachments($(target),inst);this._autoSize(inst);this._setDate(inst,date);this._updateAlternate(inst);this._updateDatepicker(inst);}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value);},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst);}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault);}
1156return(inst?this._getDate(inst):null);},_doKeyDown:function(event){var onSelect,dateStr,sel,inst=$.datepicker._getInst(event.target),handled=true,isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:sel=$("td."+$.datepicker._dayOverClass+":not(."+
1157$.datepicker._currentClass+")",inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]);}
1158onSelect=$.datepicker._get(inst,"onSelect");if(onSelect){dateStr=$.datepicker._formatDate(inst);onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);}else{$.datepicker._hideDatepicker();}
1159return false;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target);}
1160handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target);}
1161handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D");}
1162handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");}
1163break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D");}
1164handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D");}
1165handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");}
1166break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D");}
1167handled=event.ctrlKey||event.metaKey;break;default:handled=false;}}else if(event.keyCode===36&&event.ctrlKey){$.datepicker._showDatepicker(this);}else{handled=false;}
1168if(handled){event.preventDefault();event.stopPropagation();}},_doKeyPress:function(event){var chars,chr,inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));chr=String.fromCharCode(event.charCode==null?event.keyCode:event.charCode);return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1);}},_doKeyUp:function(event){var date,inst=$.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal){try{date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst);}}
1169catch(err){}}
1170return true;}
vendor: 12,982 bytes, lines 1170-1212
1170,_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!=="input"){input=$("input",input.parentNode)[0];}
1171if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput===input){return;}
1172var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!==inst){$.datepicker._curInst.dpDiv.stop(true,true);if(inst&&$.datepicker._datepickerShowing){$.datepicker._hideDatepicker($.datepicker._curInst.input[0]);}}
1173beforeShow=$.datepicker._get(inst,"beforeShow");beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false){return;}
1174extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value="";}
1175if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight;}
1176isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")==="fixed";return!isFixed;});offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){showAnim=$.datepicker._get(inst,"showAnim");duration=$.datepicker._get(inst,"duration");inst.dpDiv.zIndex($(input).zIndex()+1);$.datepicker._datepickerShowing=true;if($.effects&&$.effects.effect[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration);}else{inst.dpDiv[showAnim||"show"](showAnim?duration:null);}
1177if($.datepicker._shouldFocusInput(inst)){inst.input.focus();}
1178$.datepicker._curInst=inst;}},_updateDatepicker:function(inst){this.maxRows=4;instActive=inst;inst.dpDiv.empty().append(this._generateHTML(inst));this._attachHandlers(inst);inst.dpDiv.find("."+this._dayOverClass+" a").mouseover();var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],width=17;inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em");}
1179inst.dpDiv[(numMonths[0]!==1||numMonths[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)){inst.input.focus();}
1180if(inst.yearshtml){origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);}
1181origyearshtml=inst.yearshtml=null;},0);}},_shouldFocusInput:function(inst){return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&!inst.input.is(":focus");},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left===inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top===(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset;},_findPos:function(obj){var position,inst=this._getInst(obj),isRTL=this._get(inst,"isRTL");while(obj&&(obj.type==="hidden"||obj.nodeType!==1||$.expr.filters.hidden(obj))){obj=obj[isRTL?"previousSibling":"nextSibling"];}
1182position=$(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;if(!inst||(input&&inst!==$.data(input,PROP_NAME))){return;}
1183if(this._datepickerShowing){showAnim=this._get(inst,"showAnim");duration=this._get(inst,"duration");postProcess=function(){$.datepicker._tidyDialog(inst);};if($.effects&&($.effects.effect[showAnim]||$.effects[showAnim])){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);}else{inst.dpDiv[(showAnim==="slideDown"?"slideUp":(showAnim==="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess);}
1184if(!showAnim){postProcess();}
1185this._datepickerShowing=false;onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst]);}
1186this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv);}}
1187this._inDialog=false;}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");},_checkExternalClick:function(event){if(!$.datepicker._curInst){return;}
1188var $target=$(event.target),inst=$.datepicker._getInst($target[0]);if((($target[0].id!==$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length===0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)))||($target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!==inst)){$.datepicker._hideDatepicker();}},_adjustDate:function(id,offset,period){var target=$(id),inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return;}
1189this._adjustInstDate(inst,offset+
1190(period==="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst);},_gotoToday:function(id){var date,target=$(id),inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear;}else{date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();}
1191this._notifyChange(inst);this._adjustDate(target);},_selectMonthYear:function(id,select,period){var target=$(id),inst=this._getInst(target[0]);inst["selected"+(period==="M"?"Month":"Year")]=inst["draw"+(period==="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target);},_selectDay:function(id,month,year,td){var inst,target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return;}
1192inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));},_clearDate:function(id){var target=$(id);this._selectDate(target,"");},_selectDate:function(id,dateStr){var onSelect,target=$(id),inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr);}
1193this._updateAlternate(inst);onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);}else if(inst.input){inst.input.trigger("change");}
1194if(inst.inline){this._updateDatepicker(inst);}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!=="object"){inst.input.focus();}
1195this._lastInput=null;}},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,"altField");if(altField){altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr);});}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""];},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1;},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments";}
1196value=(typeof value==="object"?value.toString():value+"");if(value===""){return null;}
1197var iFormat,dim,extra,iValue=0,shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff=(typeof shortYearCutoffTemp!=="string"?shortYearCutoffTemp:new Date().getFullYear()%100+parseInt(shortYearCutoffTemp,10)),dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=false,date,lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);if(matches){iFormat++;}
1198return matches;},getNumber=function(match){var isDoubled=lookAhead(match),size=(match==="@"?14:(match==="!"?20:(match==="y"&&isDoubled?4:(match==="o"?3:2)))),digits=new RegExp("^\\d{1,"+size+"}"),num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue;}
1199iValue+=num[0].length;return parseInt(num[0],10);},getName=function(match,shortNames,longNames){var index=-1,names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]];}).sort(function(a,b){return-(a[1].length-b[1].length);});$.each(names,function(i,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()===name.toLowerCase()){index=pair[0];iValue+=name.length;return false;}});if(index!==-1){return index+1;}else{throw"Unknown name at position "+iValue;}},checkLiteral=function(){if(value.charAt(iValue)!==format.charAt(iFormat)){throw"Unexpected literal at position "+iValue;}
1200iValue++;};for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false;}else{checkLiteral();}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral();}else{literal=true;}
1201break;default:checkLiteral();}}}
1202if(iValue<value.length){extra=value.substr(iValue);if(!/^\s+/.test(extra)){throw"Extra/unparsed characters found in date: "+extra;}}
1203if(year===-1){year=new Date().getFullYear();}else if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+
1204(year<=shortYearCutoff?0:-100);}
1205if(doy>-1){month=1;day=doy;do{dim=this._getDaysInMonth(year,month-1);if(day<=dim){break;}
1206month++;day-=dim;}while(true);}
1207date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day){throw"Invalid date";}
1208return date;},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+
1209Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return"";}
1210var iFormat,dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);if(matches){iFormat++;}
1211return matches;},formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num;}}
1212return num;},formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);},output="",literal=false;
vendor: 4,928 bytes, lines 1212-1226
1212if(date){for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false;}else{output+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000),3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'";}else{literal=true;}
1213break;default:output+=format.charAt(iFormat);}}}}
1214return output;},_possibleChars:function(format){var iFormat,chars="",literal=false,lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);if(matches){iFormat++;}
1215return matches;};for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false;}else{chars+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'";}else{literal=true;}
1216break;default:chars+=format.charAt(iFormat);}}}
1217return chars;},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name];},_setDateFromField:function(inst,noDefault){if(inst.input.val()===inst.lastVal){return;}
1218var dateFormat=this._get(inst,"dateFormat"),dates=inst.lastVal=inst.input?inst.input.val():null,defaultDate=this._getDefaultDate(inst),date=defaultDate,settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate;}catch(event){dates=(noDefault?"":dates);}
1219inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst);},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()));},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date;},offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst));}
1220catch(e){}
1221var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date(),year=date.getFullYear(),month=date.getMonth(),day=date.getDate(),pattern=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;}
1222matches=pattern.exec(offset);}
1223return new Date(year,month,day);},newDate=(date==null||date===""?defaultDate:(typeof date==="string"?offsetString(date):(typeof date==="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):new Date(date.getTime()))));newDate=(newDate&&newDate.toString()==="Invalid Date"?defaultDate:newDate);if(newDate){newDate.setHours(0);newDate.setMinutes(0);newDate.setSeconds(0);newDate.setMilliseconds(0);}
1224return this._daylightSavingAdjust(newDate);},_daylightSavingAdjust:function(date){if(!date){return null;}
1225date.setHours(date.getHours()>12?date.getHours()+2:0);return date;},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!==inst.selectedMonth||origYear!==inst.selectedYear)&&!noChange){this._notifyChange(inst);}
1226this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst));}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()==="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate;},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths"),id="#"+inst.id.replace(/\\\\/g,"\\");
vendor: 4,351 bytes, lines 1226-1230
1226inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){$.datepicker._adjustDate(id,-stepMonths,"M");},next:function(){$.datepicker._adjustDate(id,+stepMonths,"M");},hide:function(){$.datepicker._hideDatepicker();},today:function(){$.datepicker._gotoToday(id);},selectDay:function(){$.datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false;},selectMonth:function(){$.datepicker._selectMonthYear(id,this,"M");return false;},selectYear:function(){$.datepicker._selectMonthYear(id,this,"Y");return false;}};$(this).bind(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")]);});},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date(),today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,"isRTL"),showButtonPanel=this._get(inst,"showButtonPanel"),hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,"showCurrentAtPos"),stepMonths=this._get(inst,"stepMonths"),isMultiMonth=(numMonths[0]!==1||numMonths[1]!==1),currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay))),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--;}
1227if(maxDate){maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}
1228inst.drawMonth=drawMonth;inst.drawYear=drawYear;prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'"+" title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>":(hideIfNoPrevNext?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>"));nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'"+" title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>":(hideIfNoPrevNext?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>"));currentText=this._get(inst,"currentText");gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));controls=(!inst.inline?"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+
1229this._get(inst,"closeText")+"</button>":"");buttonPanel=(showButtonPanel)?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(isRTL?controls:"")+
1230(this._isInRange(inst,gotoDate)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'"+">"+currentText+"</button>
vendor: 4,158 bytes, lines 1230-1253
1230":"")+(isRTL?"":controls)+"</div>":"";firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);showWeek=this._get(inst,"showWeek");dayNames=this._get(inst,"dayNames");dayNamesMin=this._get(inst,"dayNamesMin");monthNames=this._get(inst,"monthNames");monthNamesShort=this._get(inst,"monthNamesShort");beforeShowDay=this._get(inst,"beforeShowDay");showOtherMonths=this._get(inst,"showOtherMonths");selectOtherMonths=this._get(inst,"selectOtherMonths");defaultDate=this._getDefaultDate(inst);html="";dow;for(row=0;row<numMonths[0];row++){group="";this.maxRows=4;for(col=0;col<numMonths[1];col++){selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));cornerClass=" ui-corner-all";calender="";if(isMultiMonth){calender+="<div class='ui-datepicker-group";if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break;}}
1231calender+="'>";}
1232calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+
1233(/all|left/.test(cornerClass)&&row===0?(isRTL?next:prev):"")+
1234(/all|right/.test(cornerClass)&&row===0?(isRTL?prev:next):"")+
1235this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>";thead=(showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"");for(dow=0;dow<7;dow++){day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>";}
1236calender+=thead+"</tr></thead><tbody>";daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);}
1237leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;curRows=Math.ceil((leadDays+daysInMonth)/7);numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);this.maxRows=numRows;printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(dRow=0;dRow<numRows;dRow++){calender+="<tr>";tbody=(!showWeek?"":"<td class='ui-datepicker-week-col'>"+
1238this._get(inst,"calculateWeek")(printDate)+"</td>");for(dow=0;dow<7;dow++){daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);otherMonth=(printDate.getMonth()!==drawMonth);unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+="<td class='"+
1239((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+
1240(otherMonth?" ui-datepicker-other-month":"")+
1241((printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime())?" "+this._dayOverClass:"")+
1242(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+
1243(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+
1244(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+
1245(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+
1246((!otherMonth||showOtherMonths)&&daySettings[2]?" title='"+daySettings[2].replace(/'/g,"&#39;")+"'":"")+
1247(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+
1248(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+
1249(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+
1250(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+
1251(otherMonth?" ui-priority-secondary":"")+"' href='#'>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate);}
1252calender+=tbody+"</tr>";}
1253drawMonth++;if(drawMonth>
vendor: 6,911 bytes, lines 1253-1276
125311){drawMonth=0;drawYear++;}
1254calender+="</tbody></table>"+(isMultiMonth?"</div>"+
1255((numMonths[0]>0&&col===numMonths[1]-1)?"<div class='ui-datepicker-row-break'></div>":""):"");group+=calender;}
1256html+=group;}
1257html+=buttonPanel;inst._keyEvent=false;return html;},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,"changeMonth"),changeYear=this._get(inst,"changeYear"),showMonthAfterYear=this._get(inst,"showMonthAfterYear"),html="<div class='ui-datepicker-title'>",monthHtml="";if(secondary||!changeMonth){monthHtml+="<span class='ui-datepicker-month'>"+monthNames[drawMonth]+"</span>";}else{inMinYear=(minDate&&minDate.getFullYear()===drawYear);inMaxYear=(maxDate&&maxDate.getFullYear()===drawYear);monthHtml+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";for(month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+="<option value='"+month+"'"+
1258(month===drawMonth?" selected='selected'":"")+">"+monthNamesShort[month]+"</option>";}}
1259monthHtml+="</select>";}
1260if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"");}
1261if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear){html+="<span class='ui-datepicker-year'>"+drawYear+"</span>";}else{years=this._get(inst,"yearRange").split(":");thisYear=new Date().getFullYear();determineYear=function(value){var year=(value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+\-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year);};year=determineYear(years[0]);endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);inst.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";for(;year<=endYear;year++){inst.yearshtml+="<option value='"+year+"'"+
1262(year===drawYear?" selected='selected'":"")+">"+year+"</option>";}
1263inst.yearshtml+="</select>";html+=inst.yearshtml;inst.yearshtml=null;}}
1264html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml;}
1265html+="</div>";return html;},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period==="Y"?offset:0),month=inst.drawMonth+(period==="M"?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==="D"?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period==="M"||period==="Y"){this._notifyChange(inst);}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),newDate=(minDate&&date<minDate?minDate:date);return(maxDate&&newDate>maxDate?maxDate:newDate);},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst]);}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths==="number"?[1,numMonths]:numMonths));},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null);},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));}
1266return this._isInRange(inst,date);},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),minYear=null,maxYear=null,years=this._get(inst,"yearRange");if(years){yearSplit=years.split(":");currentYear=new Date().getFullYear();minYear=parseInt(yearSplit[0],10);maxYear=parseInt(yearSplit[1],10);if(yearSplit[0].match(/[+\-].*/)){minYear+=currentYear;}
1267if(yearSplit[1].match(/[+\-].*/)){maxYear+=currentYear;}}
1268return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear));},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!=="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")};},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear;}
1269var date=(day?(typeof day==="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst));}});function bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.delegate(selector,"mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).removeClass("ui-datepicker-prev-hover");}
1270if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).removeClass("ui-datepicker-next-hover");}}).delegate(selector,"mouseover",function(){if(!$.datepicker._isDisabledDatepicker(instActive.inline?dpDiv.parent()[0]:instActive.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).addClass("ui-datepicker-prev-hover");}
1271if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).addClass("ui-datepicker-next-hover");}}});}
1272function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=props[name];}}
1273return target;}
1274$.fn.datepicker=function(options){if(!this.length){return this;}
1275if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick);$.datepicker.initialized=true;}
1276if($("#"+$.datepicker._mainDivId).length===0){$("body").append($.datepicker.dpDiv);}
vendor: 100,839 bytes, lines 1277-1620
1277var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs));}
1278if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs));}
1279return this.each(function(){typeof options==="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.10.3";})(jQuery);(function($,undefined){var sizeRelatedOptions={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},resizableRelatedOptions={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};$.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:true,buttons:[],closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(pos){var topOffset=$(this).css(pos).offset().top;if(topOffset<0){$(this).css("top",pos.top-topOffset);}}},resizable:true,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();if(this.options.draggable&&$.fn.draggable){this._makeDraggable();}
1280if(this.options.resizable&&$.fn.resizable){this._makeResizable();}
1281this._isOpen=false;},_init:function(){if(this.options.autoOpen){this.open();}},_appendTo:function(){var element=this.options.appendTo;if(element&&(element.jquery||element.nodeType)){return $(element);}
1282return this.document.find(element||"body").eq(0);},_destroy:function(){var next,originalPosition=this.originalPosition;this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(true,true).remove();if(this.originalTitle){this.element.attr("title",this.originalTitle);}
1283next=originalPosition.parent.children().eq(originalPosition.index);if(next.length&&next[0]!==this.element[0]){next.before(this.element);}else{originalPosition.parent.append(this.element);}},widget:function(){return this.uiDialog;},disable:$.noop,enable:$.noop,close:function(event){var that=this;if(!this._isOpen||this._trigger("beforeClose",event)===false){return;}
1284this._isOpen=false;this._destroyOverlay();if(!this.opener.filter(":focusable").focus().length){$(this.document[0].activeElement).blur();}
1285this._hide(this.uiDialog,this.options.hide,function(){that._trigger("close",event);});},isOpen:function(){return this._isOpen;},moveToTop:function(){this._moveToTop();},_moveToTop:function(event,silent){var moved=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;if(moved&&!silent){this._trigger("focus",event);}
1286return moved;},open:function(){var that=this;if(this._isOpen){if(this._moveToTop()){this._focusTabbable();}
1287return;}
1288this._isOpen=true;this.opener=$(this.document[0].activeElement);this._size();this._position();this._createOverlay();this._moveToTop(null,true);this._show(this.uiDialog,this.options.show,function(){that._focusTabbable();that._trigger("focus");});this._trigger("open");},_focusTabbable:function(){var hasFocus=this.element.find("[autofocus]");if(!hasFocus.length){hasFocus=this.element.find(":tabbable");}
1289if(!hasFocus.length){hasFocus=this.uiDialogButtonPane.find(":tabbable");}
1290if(!hasFocus.length){hasFocus=this.uiDialogTitlebarClose.filter(":tabbable");}
1291if(!hasFocus.length){hasFocus=this.uiDialog;}
1292hasFocus.eq(0).focus();},_keepFocus:function(event){function checkFocus(){var activeElement=this.document[0].activeElement,isActive=this.uiDialog[0]===activeElement||$.contains(this.uiDialog[0],activeElement);if(!isActive){this._focusTabbable();}}
1293event.preventDefault();checkFocus.call(this);this._delay(checkFocus);},_createWrapper:function(){this.uiDialog=$("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+
1294this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE){event.preventDefault();this.close(event);return;}
1295if(event.keyCode!==$.ui.keyCode.TAB){return;}
1296var tabbables=this.uiDialog.find(":tabbable"),first=tabbables.filter(":first"),last=tabbables.filter(":last");if((event.target===last[0]||event.target===this.uiDialog[0])&&!event.shiftKey){first.focus(1);event.preventDefault();}else if((event.target===first[0]||event.target===this.uiDialog[0])&&event.shiftKey){last.focus(1);event.preventDefault();}},mousedown:function(event){if(this._moveToTop(event)){this._focusTabbable();}}});if(!this.element.find("[aria-describedby]").length){this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")});}},_createTitlebar:function(){var uiDialogTitle;this.uiDialogTitlebar=$("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(event){if(!$(event.target).closest(".ui-dialog-titlebar-close")){this.uiDialog.focus();}}});this.uiDialogTitlebarClose=$("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:false}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(event){event.preventDefault();this.close(event);}});uiDialogTitle=$("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(uiDialogTitle);this.uiDialog.attr({"aria-labelledby":uiDialogTitle.attr("id")});},_title:function(title){if(!this.options.title){title.html("&#160;");}
1297title.text(this.options.title);},_createButtonPane:function(){this.uiDialogButtonPane=$("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=$("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons();},_createButtons:function(){var that=this,buttons=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();if($.isEmptyObject(buttons)||($.isArray(buttons)&&!buttons.length)){this.uiDialog.removeClass("ui-dialog-buttons");return;}
1298$.each(buttons,function(name,props){var click,buttonOptions;props=$.isFunction(props)?{click:props,text:name}:props;props=$.extend({type:"button"},props);click=props.click;props.click=function(){click.apply(that.element[0],arguments);};buttonOptions={icons:props.icons,text:props.showText};delete props.icons;delete props.showText;$("<button></button>",props).button(buttonOptions).appendTo(that.uiButtonSet);});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog);},_makeDraggable:function(){var that=this,options=this.options;function filteredUi(ui){return{position:ui.position,offset:ui.offset};}
1299this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(event,ui){$(this).addClass("ui-dialog-dragging");that._blockFrames();that._trigger("dragStart",event,filteredUi(ui));},drag:function(event,ui){that._trigger("drag",event,filteredUi(ui));},stop:function(event,ui){options.position=[ui.position.left-that.document.scrollLeft(),ui.position.top-that.document.scrollTop()];$(this).removeClass("ui-dialog-dragging");that._unblockFrames();that._trigger("dragStop",event,filteredUi(ui));}});},_makeResizable:function(){var that=this,options=this.options,handles=options.resizable,position=this.uiDialog.css("position"),resizeHandles=typeof handles==="string"?handles:"n,e,s,w,se,sw,ne,nw";function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size};}
1300this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){$(this).addClass("ui-dialog-resizing");that._blockFrames();that._trigger("resizeStart",event,filteredUi(ui));},resize:function(event,ui){that._trigger("resize",event,filteredUi(ui));},stop:function(event,ui){options.height=$(this).height();options.width=$(this).width();$(this).removeClass("ui-dialog-resizing");that._unblockFrames();that._trigger("resizeStop",event,filteredUi(ui));}}).css("position",position);},_minHeight:function(){var options=this.options;return options.height==="auto"?options.minHeight:Math.min(options.minHeight,options.height);},_position:function(){var isVisible=this.uiDialog.is(":visible");if(!isVisible){this.uiDialog.show();}
1301this.uiDialog.position(this.options.position);if(!isVisible){this.uiDialog.hide();}},_setOptions:function(options){var that=this,resize=false,resizableOptions={};$.each(options,function(key,value){that._setOption(key,value);if(key in sizeRelatedOptions){resize=true;}
1302if(key in resizableRelatedOptions){resizableOptions[key]=value;}});if(resize){this._size();this._position();}
1303if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option",resizableOptions);}},_setOption:function(key,value){var isDraggable,isResizable,uiDialog=this.uiDialog;if(key==="dialogClass"){uiDialog.removeClass(this.options.dialogClass).addClass(value);}
1304if(key==="disabled"){return;}
1305this._super(key,value);if(key==="appendTo"){this.uiDialog.appendTo(this._appendTo());}
1306if(key==="buttons"){this._createButtons();}
1307if(key==="closeText"){this.uiDialogTitlebarClose.button({label:""+value});}
1308if(key==="draggable"){isDraggable=uiDialog.is(":data(ui-draggable)");if(isDraggable&&!value){uiDialog.draggable("destroy");}
1309if(!isDraggable&&value){this._makeDraggable();}}
1310if(key==="position"){this._position();}
1311if(key==="resizable"){isResizable=uiDialog.is(":data(ui-resizable)");if(isResizable&&!value){uiDialog.resizable("destroy");}
1312if(isResizable&&typeof value==="string"){uiDialog.resizable("option","handles",value);}
1313if(!isResizable&&value!==false){this._makeResizable();}}
1314if(key==="title"){this._title(this.uiDialogTitlebar.find(".ui-dialog-title"));}},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});if(options.minWidth>options.width){options.width=options.minWidth;}
1315nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight();minContentHeight=Math.max(0,options.minHeight-nonContentHeight);maxContentHeight=typeof options.maxHeight==="number"?Math.max(0,options.maxHeight-nonContentHeight):"none";if(options.height==="auto"){this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:"auto"});}else{this.element.height(Math.max(0,options.height-nonContentHeight));}
1316if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight());}},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var iframe=$(this);return $("<div>").css({position:"absolute",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0];});},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks;}},_allowInteraction:function(event){if($(event.target).closest(".ui-dialog").length){return true;}
1317return!!$(event.target).closest(".ui-datepicker").length;},_createOverlay:function(){if(!this.options.modal){return;}
1318var that=this,widgetFullName=this.widgetFullName;if(!$.ui.dialog.overlayInstances){this._delay(function(){if($.ui.dialog.overlayInstances){this.document.bind("focusin.dialog",function(event){if(!that._allowInteraction(event)){event.preventDefault();$(".ui-dialog:visible:last .ui-dialog-content").data(widgetFullName)._focusTabbable();}});}});}
1319this.overlay=$("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});$.ui.dialog.overlayInstances++;},_destroyOverlay:function(){if(!this.options.modal){return;}
1320if(this.overlay){$.ui.dialog.overlayInstances--;if(!$.ui.dialog.overlayInstances){this.document.unbind("focusin.dialog");}
1321this.overlay.remove();this.overlay=null;}}});$.ui.dialog.overlayInstances=0;if($.uiBackCompat!==false){$.widget("ui.dialog",$.ui.dialog,{_position:function(){var position=this.options.position,myAt=[],offset=[0,0],isVisible;if(position){if(typeof position==="string"||(typeof position==="object"&&"0"in position)){myAt=position.split?position.split(" "):[position[0],position[1]];if(myAt.length===1){myAt[1]=myAt[0];}
1322$.each(["left","top"],function(i,offsetPosition){if(+myAt[i]===myAt[i]){offset[i]=myAt[i];myAt[i]=offsetPosition;}});position={my:myAt[0]+(offset[0]<0?offset[0]:"+"+offset[0])+" "+
1323myAt[1]+(offset[1]<0?offset[1]:"+"+offset[1]),at:myAt.join(" ")};}
1324position=$.extend({},$.ui.dialog.prototype.options.position,position);}else{position=$.ui.dialog.prototype.options.position;}
1325isVisible=this.uiDialog.is(":visible");if(!isVisible){this.uiDialog.show();}
1326this.uiDialog.position(position);if(!isVisible){this.uiDialog.hide();}}});}}(jQuery));(function($,undefined){$.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=false;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,$.proxy(function(event){if(this.options.disabled){event.preventDefault();}},this));if(this.options.disabled){this.element.addClass("ui-state-disabled").attr("aria-disabled","true");}
1327this._on({"mousedown .ui-menu-item > a":function(event){event.preventDefault();},"click .ui-state-disabled > a":function(event){event.preventDefault();},"click .ui-menu-item:has(a)":function(event){var target=$(event.target).closest(".ui-menu-item");if(!this.mouseHandled&&target.not(".ui-state-disabled").length){this.mouseHandled=true;this.select(event);if(target.has(".ui-menu").length){this.expand(event);}else if(!this.element.is(":focus")){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1){clearTimeout(this.timer);}}}},"mouseenter .ui-menu-item":function(event){var target=$(event.currentTarget);target.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(event,target);},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.children(".ui-menu-item").eq(0);if(!keepActiveItem){this.focus(event,item);}},blur:function(event){this._delay(function(){if(!$.contains(this.element[0],this.document[0].activeElement)){this.collapseAll(event);}});},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(event){if(!$(event.target).closest(".ui-menu").length){this.collapseAll(event);}
1328this.mouseHandled=false;}});},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var elem=$(this);if(elem.data("ui-menu-submenu-carat")){elem.remove();}});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content");},_keydown:function(event){var match,prev,character,skip,regex,preventDefault=true;function escape(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");}
1329switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled")){this.expand(event);}
1330break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||"";character=String.fromCharCode(event.keyCode);skip=false;clearTimeout(this.filterTimer);if(character===prev){skip=true;}else{character=prev+character;}
1331regex=new RegExp("^"+escape(character),"i");match=this.activeMenu.children(".ui-menu-item").filter(function(){return regex.test($(this).children("a").text());});match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match;if(!match.length){character=String.fromCharCode(event.keyCode);regex=new RegExp("^"+escape(character),"i");match=this.activeMenu.children(".ui-menu-item").filter(function(){return regex.test($(this).children("a").text());});}
1332if(match.length){this.focus(event,match);if(match.length>1){this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter;},1000);}else{delete this.previousFilter;}}else{delete this.previousFilter;}}
1333if(preventDefault){event.preventDefault();}},_activate:function(event){if(!this.active.is(".ui-state-disabled")){if(this.active.children("a[aria-haspopup='true']").length){this.expand(event);}else{this.select(event);}}},refresh:function(){var menus,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);submenus.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this),item=menu.prev("a"),submenuCarat=$("<span>").addClass("ui-menu-icon ui-icon "+icon).data("ui-menu-submenu-carat",true);item.attr("aria-haspopup","true").prepend(submenuCarat);menu.attr("aria-labelledby",item.attr("id"));});menus=submenus.add(this.element);menus.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});menus.children(":not(.ui-menu-item)").each(function(){var item=$(this);if(!/[^\-\u2014\u2013\s]/.test(item.text())){item.addClass("ui-widget-content ui-menu-divider");}});menus.children(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!$.contains(this.element[0],this.active[0])){this.blur();}},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role];},_setOption:function(key,value){if(key==="icons"){this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(value.submenu);}
1334this._super(key,value);},focus:function(event,item){var nested,focused;this.blur(event,event&&event.type==="focus");this._scrollIntoView(item);this.active=item.first();focused=this.active.children("a").addClass("ui-state-focus");if(this.options.role){this.element.attr("aria-activedescendant",focused.attr("id"));}
1335this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");if(event&&event.type==="keydown"){this._close();}else{this.timer=this._delay(function(){this._close();},this.delay);}
1336nested=item.children(".ui-menu");if(nested.length&&(/^mouse/.test(event.type))){this._startOpening(nested);}
1337this.activeMenu=item.parent();this._trigger("focus",event,{item:item});},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;if(this._hasScroll()){borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;scroll=this.activeMenu.scrollTop();elementHeight=this.activeMenu.height();itemHeight=item.height();if(offset<0){this.activeMenu.scrollTop(scroll+offset);}else if(offset+itemHeight>elementHeight){this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight);}}},blur:function(event,fromFocus){if(!fromFocus){clearTimeout(this.timer);}
1338if(!this.active){return;}
1339this.active.children("a").removeClass("ui-state-focus");this.active=null;this._trigger("blur",event,{item:this.active});},_startOpening:function(submenu){clearTimeout(this.timer);if(submenu.attr("aria-hidden")!=="true"){return;}
1340this.timer=this._delay(function(){this._close();this._open(submenu);},this.delay);},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true");submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position);},collapseAll:function(event,all){clearTimeout(this.timer);this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));if(!currentMenu.length){currentMenu=this.element;}
1341this._close(currentMenu);this.blur(event);this.activeMenu=currentMenu;},this.delay);},_close:function(startMenu){if(!startMenu){startMenu=this.active?this.active.parent():this.element;}
1342startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active");},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(newItem&&newItem.length){this._close();this.focus(event,newItem);}},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();if(newItem&&newItem.length){this._open(newItem.parent());this._delay(function(){this.focus(event,newItem);});}},next:function(event){this._move("next","first",event);},previous:function(event){this._move("prev","last",event);},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length;},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length;},_move:function(direction,filter,event){var next;if(this.active){if(direction==="first"||direction==="last"){next=this.active
1343[direction==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1);}else{next=this.active
1344[direction+"All"](".ui-menu-item").eq(0);}}
1345if(!next||!next.length||!this.active){next=this.activeMenu.children(".ui-menu-item")[filter]();}
1346this.focus(event,next);},nextPage:function(event){var item,base,height;if(!this.active){this.next(event);return;}
1347if(this.isLastItem()){return;}
1348if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base-height<0;});this.focus(event,item);}else{this.focus(event,this.activeMenu.children(".ui-menu-item")
1349[!this.active?"first":"last"]());}},previousPage:function(event){var item,base,height;if(!this.active){this.next(event);return;}
1350if(this.isFirstItem()){return;}
1351if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base+height>0;});this.focus(event,item);}else{this.focus(event,this.activeMenu.children(".ui-menu-item").first());}},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight");},select:function(event){this.active=this.active||$(event.target).closest(".ui-menu-item");var ui={item:this.active};if(!this.active.has(".ui-menu").length){this.collapseAll(event,true);}
1352this._trigger("select",event,ui);}});}(jQuery));(function($,undefined){$.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=$("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue();},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();},value:function(newValue){if(newValue===undefined){return this.options.value;}
1353this.options.value=this._constrainedValue(newValue);this._refreshValue();},_constrainedValue:function(newValue){if(newValue===undefined){newValue=this.options.value;}
1354this.indeterminate=newValue===false;if(typeof newValue!=="number"){newValue=0;}
1355return this.indeterminate?false:Math.min(this.options.max,Math.max(this.min,newValue));},_setOptions:function(options){var value=options.value;delete options.value;this._super(options);this.options.value=this._constrainedValue(value);this._refreshValue();},_setOption:function(key,value){if(key==="max"){value=Math.max(this.min,value);}
1356this._super(key,value);},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min);},_refreshValue:function(){var value=this.options.value,percentage=this._percentage();this.valueDiv.toggle(this.indeterminate||value>this.min).toggleClass("ui-corner-right",value===this.options.max).width(percentage.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);if(this.indeterminate){this.element.removeAttr("aria-valuenow");if(!this.overlayDiv){this.overlayDiv=$("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv);}}else{this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":value});if(this.overlayDiv){this.overlayDiv.remove();this.overlayDiv=null;}}
1357if(this.oldValue!==value){this.oldValue=value;this._trigger("change");}
1358if(value===this.options.max){this._trigger("complete");}}});})(jQuery);(function($,undefined){var numPages=5;$.widget("ui.slider",$.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider"+" ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=false;},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue();},_createHandles:function(){var i,handleCount,options=this.options,existingHandles=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),handle="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",handles=[];handleCount=(options.values&&options.values.length)||1;if(existingHandles.length>handleCount){existingHandles.slice(handleCount).remove();existingHandles=existingHandles.slice(0,handleCount);}
1359for(i=existingHandles.length;i<handleCount;i++){handles.push(handle);}
1360this.handles=existingHandles.add($(handles.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.each(function(i){$(this).data("ui-slider-handle-index",i);});},_createRange:function(){var options=this.options,classes="";if(options.range){if(options.range===true){if(!options.values){options.values=[this._valueMin(),this._valueMin()];}else if(options.values.length&&options.values.length!==2){options.values=[options.values[0],options.values[0]];}else if($.isArray(options.values)){options.values=options.values.slice(0);}}
1361if(!this.range||!this.range.length){this.range=$("<div></div>").appendTo(this.element);classes="ui-slider-range"+" ui-widget-header ui-corner-all";}else{this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({"left":"","bottom":""});}
1362this.range.addClass(classes+
1363((options.range==="min"||options.range==="max")?" ui-slider-range-"+options.range:""));}else{this.range=$([]);}},_setupEvents:function(){var elements=this.handles.add(this.range).filter("a");this._off(elements);this._on(elements,this._handleEvents);this._hoverable(elements);this._focusable(elements);},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider"+" ui-slider-horizontal"+" ui-slider-vertical"+" ui-widget"+" ui-widget-content"+" ui-corner-all");this._mouseDestroy();},_mouseCapture:function(event){var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,that=this,o=this.options;if(o.disabled){return false;}
1364this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();position={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position);distance=this._valueMax()-this._valueMin()+1;this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));if((distance>thisDistance)||(distance===thisDistance&&(i===that._lastChangedValue||that.values(i)===o.min))){distance=thisDistance;closestHandle=$(this);index=i;}});allowed=this._start(event,index);if(allowed===false){return false;}
1365this._mouseSliding=true;this._handleIndex=index;closestHandle.addClass("ui-state-active").focus();offset=closestHandle.offset();mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-
1366(closestHandle.height()/2)-
1367(parseInt(closestHandle.css("borderTopWidth"),10)||0)-
1368(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+
1369(parseInt(closestHandle.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(event,index,normValue);}
1370this._animateOff=true;return true;},_mouseStart:function(){return true;},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false;},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false;},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal";},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;if(this.orientation==="horizontal"){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0);}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);}
1371percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1;}
1372if(percentMouse<0){percentMouse=0;}
1373if(this.orientation==="vertical"){percentMouse=1-percentMouse;}
1374valueTotal=this._valueMax()-this._valueMin();valueMouse=this._valueMin()+percentMouse*valueTotal;return this._trimAlignValue(valueMouse);},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}
1375return this._trigger("start",event,uiHash);},_slide:function(event,index,newVal){var otherVal,newValues,allowed;if(this.options.values&&this.options.values.length){otherVal=this.values(index?0:1);if((this.options.values.length===2&&this.options.range===true)&&((index===0&&newVal>otherVal)||(index===1&&newVal<otherVal))){newVal=otherVal;}
1376if(newVal!==this.values(index)){newValues=this.values();newValues[index]=newVal;allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,true);}}}else{if(newVal!==this.value()){allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false){this.value(newVal);}}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}
1377this._trigger("stop",event,uiHash);},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}
1378this._lastChangedValue=index;this._trigger("change",event,uiHash);}},value:function(newValue){if(arguments.length){this.options.value=this._trimAlignValue(newValue);this._refreshValue();this._change(null,0);return;}
1379return this._value();},values:function(index,newValue){var vals,newValues,i;if(arguments.length>1){this.options.values[index]=this._trimAlignValue(newValue);this._refreshValue();this._change(null,index);return;}
1380if(arguments.length){if($.isArray(arguments[0])){vals=this.options.values;newValues=arguments[0];for(i=0;i<vals.length;i+=1){vals[i]=this._trimAlignValue(newValues[i]);this._change(null,i);}
1381this._refreshValue();}else{if(this.options.values&&this.options.values.length){return this._values(index);}else{return this.value();}}}else{return this._values();}},_setOption:function(key,value){var i,valsLength=0;if(key==="range"&&this.options.range===true){if(value==="min"){this.options.value=this._values(0);this.options.values=null;}else if(value==="max"){this.options.value=this._values(this.options.values.length-1);this.options.values=null;}}
1382if($.isArray(this.options.values)){valsLength=this.options.values.length;}
1383$.Widget.prototype._setOption.apply(this,arguments);switch(key){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(i=0;i<valsLength;i+=1){this._change(null,i);}
1384this._animateOff=false;break;case"min":case"max":this._animateOff=true;this._refreshValue();this._animateOff=false;break;case"range":this._animateOff=true;this._refresh();this._animateOff=false;break;}},_value:function(){var val=this.options.value;val=this._trimAlignValue(val);return val;},_values:function(index){var val,vals,i;if(arguments.length){val=this.options.values[index];val=this._trimAlignValue(val);return val;}else if(this.options.values&&this.options.values.length){vals=this.options.values.slice();for(i=0;i<vals.length;i+=1){vals[i]=this._trimAlignValue(vals[i]);}
1385return vals;}else{return[];}},_trimAlignValue:function(val){if(val<=this._valueMin()){return this._valueMin();}
1386if(val>=this._valueMax()){return this._valueMax();}
1387var step=(this.options.step>0)?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;if(Math.abs(valModStep)*2>=step){alignValue+=(valModStep>0)?step:(-step);}
1388return parseFloat(alignValue.toFixed(5));},_valueMin:function(){return this.options.min;},_valueMax:function(){return this.options.max;},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=(!this._animateOff)?o.animate:false,_set={};if(this.options.values&&this.options.values.length){this.handles.each(function(i){valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-that._valueMin())*100;_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(that.options.range===true){if(that.orientation==="horizontal"){if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);}
1389if(i===1){that.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate});}}else{if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);}
1390if(i===1){that.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate});}}}
1391lastValPercent=valPercent;});}else{value=this.value();valueMin=this._valueMin();valueMax=this._valueMax();valPercent=(valueMax!==valueMin)?(value-valueMin)/(valueMax-valueMin)*100:0;_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);if(oRange==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);}
1392if(oRange==="max"&&this.orientation==="horizontal"){this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});}
1393if(oRange==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);}
1394if(oRange==="max"&&this.orientation==="vertical"){this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate});}}},_handleEvents:{keydown:function(event){var allowed,curVal,newVal,step,index=$(event.target).data("ui-slider-handle-index");switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:event.preventDefault();if(!this._keySliding){this._keySliding=true;$(event.target).addClass("ui-state-active");allowed=this._start(event,index);if(allowed===false){return;}}
1395break;}
1396step=this.options.step;if(this.options.values&&this.options.values.length){curVal=newVal=this.values(index);}else{curVal=newVal=this.value();}
1397switch(event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+((this._valueMax()-this._valueMin())/numPages));break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-((this._valueMax()-this._valueMin())/numPages));break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax()){return;}
1398newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin()){return;}
1399newVal=this._trimAlignValue(curVal-step);break;}
1400this._slide(event,index,newVal);},click:function(event){event.preventDefault();},keyup:function(event){var index=$(event.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(event,index);this._change(event,index);$(event.target).removeClass("ui-state-active");}}}});}(jQuery));(function($){function modifier(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger("change");}};}
1401$.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:true,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);this._value(this.element.val(),true);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete");}});},_getCreateOptions:function(){var options={},element=this.element;$.each(["min","max","step"],function(i,option){var value=element.attr(option);if(value!==undefined&&value.length){options[option]=value;}});return options;},_events:{keydown:function(event){if(this._start(event)&&this._keydown(event)){event.preventDefault();}},keyup:"_stop",focus:function(){this.previous=this.element.val();},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return;}
1402this._stop();this._refresh();if(this.previous!==this.element.val()){this._trigger("change",event);}},mousewheel:function(event,delta){if(!delta){return;}
1403if(!this.spinning&&!this._start(event)){return false;}
1404this._spin((delta>0?1:-1)*this.options.step,event);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){if(this.spinning){this._stop(event);}},100);event.preventDefault();},"mousedown .ui-spinner-button":function(event){var previous;previous=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();function checkFocus(){var isActive=this.element[0]===this.document[0].activeElement;if(!isActive){this.element.focus();this.previous=previous;this._delay(function(){this.previous=previous;});}}
1405event.preventDefault();checkFocus.call(this);this.cancelBlur=true;this._delay(function(){delete this.cancelBlur;checkFocus.call(this);});if(this._start(event)===false){return;}
1406this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event);},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(event){if(!$(event.currentTarget).hasClass("ui-state-active")){return;}
1407if(this._start(event)===false){return false;}
1408this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event);},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var uiSpinner=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=uiSpinner.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");if(this.buttons.height()>Math.ceil(uiSpinner.height()*0.5)&&uiSpinner.height()>0){uiSpinner.height(uiSpinner.height());}
1409if(this.options.disabled){this.disable();}},_keydown:function(event){var options=this.options,keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.UP:this._repeat(null,1,event);return true;case keyCode.DOWN:this._repeat(null,-1,event);return true;case keyCode.PAGE_UP:this._repeat(null,options.page,event);return true;case keyCode.PAGE_DOWN:this._repeat(null,-options.page,event);return true;}
1410return false;},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";},_buttonHtml:function(){return""+"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>"+"<span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>";},_start:function(event){if(!this.spinning&&this._trigger("start",event)===false){return false;}
1411if(!this.counter){this.counter=1;}
1412this.spinning=true;return true;},_repeat:function(i,steps,event){i=i||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,steps,event);},i);this._spin(steps*this.options.step,event);},_spin:function(step,event){var value=this.value()||0;if(!this.counter){this.counter=1;}
1413value=this._adjustValue(value+step*this._increment(this.counter));if(!this.spinning||this._trigger("spin",event,{value:value})!==false){this._value(value);this.counter++;}},_increment:function(i){var incremental=this.options.incremental;if(incremental){return $.isFunction(incremental)?incremental(i):Math.floor(i*i*i/50000-i*i/500+17*i/200+1);}
1414return 1;},_precision:function(){var precision=this._precisionOf(this.options.step);if(this.options.min!==null){precision=Math.max(precision,this._precisionOf(this.options.min));}
1415return precision;},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1;},_adjustValue:function(value){var base,aboveMin,options=this.options;base=options.min!==null?options.min:0;aboveMin=value-base;aboveMin=Math.round(aboveMin/options.step)*options.step;value=base+aboveMin;value=parseFloat(value.toFixed(this._precision()));if(options.max!==null&&value>options.max){return options.max;}
1416if(options.min!==null&&value<options.min){return options.min;}
1417return value;},_stop:function(event){if(!this.spinning){return;}
1418clearTimeout(this.timer);clearTimeout(this.mousewheelTimer);this.counter=0;this.spinning=false;this._trigger("stop",event);},_setOption:function(key,value){if(key==="culture"||key==="numberFormat"){var prevValue=this._parse(this.element.val());this.options[key]=value;this.element.val(this._format(prevValue));return;}
1419if(key==="max"||key==="min"||key==="step"){if(typeof value==="string"){value=this._parse(value);}}
1420if(key==="icons"){this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(value.up);this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(value.down);}
1421this._super(key,value);if(key==="disabled"){if(value){this.element.prop("disabled",true);this.buttons.button("disable");}else{this.element.prop("disabled",false);this.buttons.button("enable");}}},_setOptions:modifier(function(options){this._super(options);this._value(this.element.val());}),_parse:function(val){if(typeof val==="string"&&val!==""){val=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(val,10,this.options.culture):+val;}
1422return val===""||isNaN(val)?null:val;},_format:function(value){if(value===""){return"";}
1423return window.Globalize&&this.options.numberFormat?Globalize.format(value,this.options.numberFormat,this.options.culture):value;},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())});},_value:function(value,allowAny){var parsed;if(value!==""){parsed=this._parse(value);if(parsed!==null){if(!allowAny){parsed=this._adjustValue(parsed);}
1424value=this._format(parsed);}}
1425this.element.val(value);this._refresh();},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",false).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element);},stepUp:modifier(function(steps){this._stepUp(steps);}),_stepUp:function(steps){if(this._start()){this._spin((steps||1)*this.options.step);this._stop();}},stepDown:modifier(function(steps){this._stepDown(steps);}),_stepDown:function(steps){if(this._start()){this._spin((steps||1)*-this.options.step);this._stop();}},pageUp:modifier(function(pages){this._stepUp((pages||1)*this.options.page);}),pageDown:modifier(function(pages){this._stepDown((pages||1)*this.options.page);}),value:function(newVal){if(!arguments.length){return this._parse(this.element.val());}
1426modifier(this._value).call(this,newVal);},widget:function(){return this.uiSpinner;}});}(jQuery));(function($,undefined){var tabId=0,rhash=/#.*$/;function getNextTabId(){return++tabId;}
1427function isLocal(anchor){return anchor.hash.length>1&&decodeURIComponent(anchor.href.replace(rhash,""))===decodeURIComponent(location.href.replace(rhash,""));}
1428$.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:false,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var that=this,options=this.options;this.running=false;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",options.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(event){if($(this).is(".ui-state-disabled")){event.preventDefault();}}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){if($(this).closest("li").is(".ui-state-disabled")){this.blur();}});this._processTabs();options.active=this._initialActive();if($.isArray(options.disabled)){options.disabled=$.unique(options.disabled.concat($.map(this.tabs.filter(".ui-state-disabled"),function(li){return that.tabs.index(li);}))).sort();}
1429if(this.options.active!==false&&this.anchors.length){this.active=this._findActive(options.active);}else{this.active=$();}
1430this._refresh();if(this.active.length){this.load(options.active);}},_initialActive:function(){var active=this.options.active,collapsible=this.options.collapsible,locationHash=location.hash.substring(1);if(active===null){if(locationHash){this.tabs.each(function(i,tab){if($(tab).attr("aria-controls")===locationHash){active=i;return false;}});}
1431if(active===null){active=this.tabs.index(this.tabs.filter(".ui-tabs-active"));}
1432if(active===null||active===-1){active=this.tabs.length?0:false;}}
1433if(active!==false){active=this.tabs.index(this.tabs.eq(active));if(active===-1){active=collapsible?false:0;}}
1434if(!collapsible&&active===false&&this.anchors.length){active=0;}
1435return active;},_getCreateEventData:function(){return{tab:this.active,panel:!this.active.length?$():this._getPanelForTab(this.active)};},_tabKeydown:function(event){var focusedTab=$(this.document[0].activeElement).closest("li"),selectedIndex=this.tabs.index(focusedTab),goingForward=true;if(this._handlePageNav(event)){return;}
1436switch(event.keyCode){case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:selectedIndex++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:goingForward=false;selectedIndex--;break;case $.ui.keyCode.END:selectedIndex=this.anchors.length-1;break;case $.ui.keyCode.HOME:selectedIndex=0;break;case $.ui.keyCode.SPACE:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex);return;case $.ui.keyCode.ENTER:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex===this.options.active?false:selectedIndex);return;default:return;}
1437event.preventDefault();clearTimeout(this.activating);selectedIndex=this._focusNextTab(selectedIndex,goingForward);if(!event.ctrlKey){focusedTab.attr("aria-selected","false");this.tabs.eq(selectedIndex).attr("aria-selected","true");this.activating=this._delay(function(){this.option("active",selectedIndex);},this.delay);}},_panelKeydown:function(event){if(this._handlePageNav(event)){return;}
1438if(event.ctrlKey&&event.keyCode===$.ui.keyCode.UP){event.preventDefault();this.active.focus();}},_handlePageNav:function(event){if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP){this._activate(this._focusNextTab(this.options.active-1,false));return true;}
1439if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN){this._activate(this._focusNextTab(this.options.active+1,true));return true;}},_findNextTab:function(index,goingForward){var lastTabIndex=this.tabs.length-1;function constrain(){if(index>lastTabIndex){index=0;}
1440if(index<0){index=lastTabIndex;}
1441return index;}
1442while($.inArray(constrain(),this.options.disabled)!==-1){index=goingForward?index+1:index-1;}
1443return index;},_focusNextTab:function(index,goingForward){index=this._findNextTab(index,goingForward);this.tabs.eq(index).focus();return index;},_setOption:function(key,value){if(key==="active"){this._activate(value);return;}
1444if(key==="disabled"){this._setupDisabled(value);return;}
1445this._super(key,value);if(key==="collapsible"){this.element.toggleClass("ui-tabs-collapsible",value);if(!value&&this.options.active===false){this._activate(0);}}
1446if(key==="event"){this._setupEvents(value);}
1447if(key==="heightStyle"){this._setupHeightStyle(value);}},_tabId:function(tab){return tab.attr("aria-controls")||"ui-tabs-"+getNextTabId();},_sanitizeSelector:function(hash){return hash?hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):"";},refresh:function(){var options=this.options,lis=this.tablist.children(":has(a[href])");options.disabled=$.map(lis.filter(".ui-state-disabled"),function(tab){return lis.index(tab);});this._processTabs();if(options.active===false||!this.anchors.length){options.active=false;this.active=$();}else if(this.active.length&&!$.contains(this.tablist[0],this.active[0])){if(this.tabs.length===options.disabled.length){options.active=false;this.active=$();}else{this._activate(this._findNextTab(Math.max(0,options.active-1),false));}}else{options.active=this.tabs.index(this.active);}
1448this._refresh();},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});if(!this.active.length){this.tabs.eq(0).attr("tabIndex",0);}else{this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0});this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"});}},_processTabs:function(){var that=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return $("a",this)[0];}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=$();this.anchors.each(function(i,anchor){var selector,panel,panelId,anchorId=$(anchor).uniqueId().attr("id"),tab=$(anchor).closest("li"),originalAriaControls=tab.attr("aria-controls");if(isLocal(anchor)){selector=anchor.hash;panel=that.element.find(that._sanitizeSelector(selector));}else{panelId=that._tabId(tab);selector="#"+panelId;panel=that.element.find(selector);if(!panel.length){panel=that._createPanel(panelId);panel.insertAfter(that.panels[i-1]||that.tablist);}
1449panel.attr("aria-live","polite");}
1450if(panel.length){that.panels=that.panels.add(panel);}
1451if(originalAriaControls){tab.data("ui-tabs-aria-controls",originalAriaControls);}
1452tab.attr({"aria-controls":selector.substring(1),"aria-labelledby":anchorId});panel.attr("aria-labelledby",anchorId);});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel");},_getList:function(){return this.element.find("ol,ul").eq(0);},_createPanel:function(id){return $("<div>").attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",true);},_setupDisabled:function(disabled){if($.isArray(disabled)){if(!disabled.length){disabled=false;}else if(disabled.length===this.anchors.length){disabled=true;}}
1453for(var i=0,li;(li=this.tabs[i]);i++){if(disabled===true||$.inArray(i,disabled)!==-1){$(li).addClass("ui-state-disabled").attr("aria-disabled","true");}else{$(li).removeClass("ui-state-disabled").removeAttr("aria-disabled");}}
1454this.options.disabled=disabled;},_setupEvents:function(event){var events={click:function(event){event.preventDefault();}};if(event){$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler";});}
1455this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,events);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs);},_setupHeightStyle:function(heightStyle){var maxHeight,parent=this.element.parent();if(heightStyle==="fill"){maxHeight=parent.height();maxHeight-=this.element.outerHeight()-this.element.height();this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");if(position==="absolute"||position==="fixed"){return;}
1456maxHeight-=elem.outerHeight(true);});this.element.children().not(this.panels).each(function(){maxHeight-=$(this).outerHeight(true);});this.panels.each(function(){$(this).height(Math.max(0,maxHeight-
1457$(this).innerHeight()+$(this).height()));}).css("overflow","auto");}else if(heightStyle==="auto"){maxHeight=0;this.panels.each(function(){maxHeight=Math.max(maxHeight,$(this).height("").height());}).height(maxHeight);}},_eventHandler:function(event){var options=this.options,active=this.active,anchor=$(event.currentTarget),tab=anchor.closest("li"),clickedIsActive=tab[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():this._getPanelForTab(tab),toHide=!active.length?$():this._getPanelForTab(active),eventData={oldTab:active,oldPanel:toHide,newTab:collapsing?$():tab,newPanel:toShow};event.preventDefault();if(tab.hasClass("ui-state-disabled")||tab.hasClass("ui-tabs-loading")||this.running||(clickedIsActive&&!options.collapsible)||(this._trigger("beforeActivate",event,eventData)===false)){return;}
1458options.active=collapsing?false:this.tabs.index(tab);this.active=clickedIsActive?$():tab;if(this.xhr){this.xhr.abort();}
1459if(!toHide.length&&!toShow.length){$.error("jQuery UI Tabs: Mismatching fragment identifier.");}
1460if(toShow.length){this.load(this.tabs.index(tab),event);}
1461this._toggle(event,eventData);},_toggle:function(event,eventData){var that=this,toShow=eventData.newPanel,toHide=eventData.oldPanel;this.running=true;function complete(){that.running=false;that._trigger("activate",event,eventData);}
1462function show(){eventData.newTab.closest("li").addClass("ui-tabs-active ui-state-active");if(toShow.length&&that.options.show){that._show(toShow,that.options.show,complete);}else{toShow.show();complete();}}
1463if(toHide.length&&this.options.hide){this._hide(toHide,this.options.hide,function(){eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");show();});}else{eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");toHide.hide();show();}
1464toHide.attr({"aria-expanded":"false","aria-hidden":"true"});eventData.oldTab.attr("aria-selected","false");if(toShow.length&&toHide.length){eventData.oldTab.attr("tabIndex",-1);}else if(toShow.length){this.tabs.filter(function(){return $(this).attr("tabIndex")===0;}).attr("tabIndex",-1);}
1465toShow.attr({"aria-expanded":"true","aria-hidden":"false"});eventData.newTab.attr({"aria-selected":"true",tabIndex:0});},_activate:function(index){var anchor,active=this._findActive(index);if(active[0]===this.active[0]){return;}
1466if(!active.length){active=this.active;}
1467anchor=active.find(".ui-tabs-anchor")[0];this._eventHandler({target:anchor,currentTarget:anchor,preventDefault:$.noop});},_findActive:function(index){return index===false?$():this.tabs.eq(index);},_getIndex:function(index){if(typeof index==="string"){index=this.anchors.index(this.anchors.filter("[href$='"+index+"']"));}
1468return index;},_destroy:function(){if(this.xhr){this.xhr.abort();}
1469this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){if($.data(this,"ui-tabs-destroy")){$(this).remove();}else{$(this).removeClass("ui-state-default ui-state-active ui-state-disabled "+"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role");}});this.tabs.each(function(){var li=$(this),prev=li.data("ui-tabs-aria-controls");if(prev){li.attr("aria-controls",prev).removeData("ui-tabs-aria-controls");}else{li.removeAttr("aria-controls");}});this.panels.show();if(this.options.heightStyle!=="content"){this.panels.css("height","");}},enable:function(index){var disabled=this.options.disabled;if(disabled===false){return;}
1470if(index===undefined){disabled=false;}else{index=this._getIndex(index);if($.isArray(disabled)){disabled=$.map(disabled,function(num){return num!==index?num:null;});}else{disabled=$.map(this.tabs,function(li,num){return num!==index?num:null;});}}
1471this._setupDisabled(disabled);},disable:function(index){var disabled=this.options.disabled;if(disabled===true){return;}
1472if(index===undefined){disabled=true;}else{index=this._getIndex(index);if($.inArray(index,disabled)!==-1){return;}
1473if($.isArray(disabled)){disabled=$.merge([index],disabled).sort();}else{disabled=[index];}}
1474this._setupDisabled(disabled);},load:function(index,event){index=this._getIndex(index);var that=this,tab=this.tabs.eq(index),anchor=tab.find(".ui-tabs-anchor"),panel=this._getPanelForTab(tab),eventData={tab:tab,panel:panel};if(isLocal(anchor[0])){return;}
1475this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData));if(this.xhr&&this.xhr.statusText!=="canceled"){tab.addClass("ui-tabs-loading");panel.attr("aria-busy","true");this.xhr.success(function(response){setTimeout(function(){panel.html(response);that._trigger("load",event,eventData);},1);}).complete(function(jqXHR,status){setTimeout(function(){if(status==="abort"){that.panels.stop(false,true);}
1476tab.removeClass("ui-tabs-loading");panel.removeAttr("aria-busy");if(jqXHR===that.xhr){delete that.xhr;}},1);});}},_ajaxSettings:function(anchor,event,eventData){var that=this;return{url:anchor.attr("href"),beforeSend:function(jqXHR,settings){return that._trigger("beforeLoad",event,$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData));}};},_getPanelForTab:function(tab){var id=$(tab).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+id));}});})(jQuery);(function($){var increments=0;function addDescribedBy(elem,id){var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);describedby.push(id);elem.data("ui-tooltip-id",id).attr("aria-describedby",$.trim(describedby.join(" ")));}
1477function removeDescribedBy(elem){var id=elem.data("ui-tooltip-id"),describedby=(elem.attr("aria-describedby")||"").split(/\s+/),index=$.inArray(id,describedby);if(index!==-1){describedby.splice(index,1);}
1478elem.removeData("ui-tooltip-id");describedby=$.trim(describedby.join(" "));if(describedby){elem.attr("aria-describedby",describedby);}else{elem.removeAttr("aria-describedby");}}
1479$.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var title=$(this).attr("title")||"";return $("<a>").text(title).html();},hide:true,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:true,tooltipClass:null,track:false,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};if(this.options.disabled){this._disable();}},_setOption:function(key,value){var that=this;if(key==="disabled"){this[value?"_disable":"_enable"]();this.options[key]=value;return;}
1480this._super(key,value);if(key==="content"){$.each(this.tooltips,function(id,element){that._updateContent(element);});}},_disable:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0];that.close(event,true);});this.element.find(this.options.items).addBack().each(function(){var element=$(this);if(element.is("[title]")){element.data("ui-tooltip-title",element.attr("title")).attr("title","");}});},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var element=$(this);if(element.data("ui-tooltip-title")){element.attr("title",element.data("ui-tooltip-title"));}});},open:function(event){var that=this,target=$(event?event.target:this.element).closest(this.options.items);if(!target.length||target.data("ui-tooltip-id")){return;}
1481if(target.attr("title")){target.data("ui-tooltip-title",target.attr("title"));}
1482target.data("ui-tooltip-open",true);if(event&&event.type==="mouseover"){target.parents().each(function(){var parent=$(this),blurEvent;if(parent.data("ui-tooltip-open")){blurEvent=$.Event("blur");blurEvent.target=blurEvent.currentTarget=this;that.close(blurEvent,true);}
1483if(parent.attr("title")){parent.uniqueId();that.parents[this.id]={element:this,title:parent.attr("title")};parent.attr("title","");}});}
1484this._updateContent(target,event);},_updateContent:function(target,event){var content,contentOption=this.options.content,that=this,eventType=event?event.type:null;if(typeof contentOption==="string"){return this._open(event,target,contentOption);}
1485content=contentOption.call(target[0],function(response){if(!target.data("ui-tooltip-open")){return;}
1486that._delay(function(){if(event){event.type=eventType;}
1487this._open(event,target,response);});});if(content){this._open(event,target,content);}},_open:function(event,target,content){var tooltip,events,delayedShow,positionOption=$.extend({},this.options.position);if(!content){return;}
1488tooltip=this._find(target);if(tooltip.length){tooltip.find(".ui-tooltip-content").html(content);return;}
1489if(target.is("[title]")){if(event&&event.type==="mouseover"){target.attr("title","");}else{target.removeAttr("title");}}
1490tooltip=this._tooltip(target);addDescribedBy(target,tooltip.attr("id"));tooltip.find(".ui-tooltip-content").html(content);function position(event){positionOption.of=event;if(tooltip.is(":hidden")){return;}
1491tooltip.position(positionOption);}
1492if(this.options.track&&event&&/^mouse/.test(event.type)){this._on(this.document,{mousemove:position});position(event);}else{tooltip.position($.extend({of:target},this.options.position));}
1493tooltip.hide();this._show(tooltip,this.options.show);if(this.options.show&&this.options.show.delay){delayedShow=this.delayedShow=setInterval(function(){if(tooltip.is(":visible")){position(positionOption.of);clearInterval(delayedShow);}},$.fx.interval);}
1494this._trigger("open",event,{tooltip:tooltip});events={keyup:function(event){if(event.keyCode===$.ui.keyCode.ESCAPE){var fakeEvent=$.Event(event);fakeEvent.currentTarget=target[0];this.close(fakeEvent,true);}},remove:function(){this._removeTooltip(tooltip);}};if(!event||event.type==="mouseover"){events.mouseleave="close";}
1495if(!event||event.type==="focusin"){events.focusout="close";}
1496this._on(true,target,events);},close:function(event){var that=this,target=$(event?event.currentTarget:this.element),tooltip=this._find(target);if(this.closing){return;}
1497clearInterval(this.delayedShow);if(target.data("ui-tooltip-title")){target.attr("title",target.data("ui-tooltip-title"));}
1498removeDescribedBy(target);tooltip.stop(true);this._hide(tooltip,this.options.hide,function(){that._removeTooltip($(this));});target.removeData("ui-tooltip-open");this._off(target,"mouseleave focusout keyup");if(target[0]!==this.element[0]){this._off(target,"remove");}
1499this._off(this.document,"mousemove");if(event&&event.type==="mouseleave"){$.each(this.parents,function(id,parent){$(parent.element).attr("title",parent.title);delete that.parents[id];});}
1500this.closing=true;this._trigger("close",event,{tooltip:tooltip});this.closing=false;},_tooltip:function(element){var id="ui-tooltip-"+increments++,tooltip=$("<div>").attr({id:id,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+
1501(this.options.tooltipClass||""));$("<div>").addClass("ui-tooltip-content").appendTo(tooltip);tooltip.appendTo(this.document[0].body);this.tooltips[id]=element;return tooltip;},_find:function(target){var id=target.data("ui-tooltip-id");return id?$("#"+id):$();},_removeTooltip:function(tooltip){tooltip.remove();delete this.tooltips[tooltip.attr("id")];},_destroy:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0];that.close(event,true);$("#"+id).remove();if(element.data("ui-tooltip-title")){element.attr("title",element.data("ui-tooltip-title"));element.removeData("ui-tooltip-title");}});}});}(jQuery));(function($,undefined){var dataSpace="ui-effects-";$.effects={effect:{}};(function(jQuery,undefined){var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]];}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1]*2.55,execResult[2]*2.55,execResult[3]*2.55,execResult[4]];}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)];}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)];}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]];}}],color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha);},spaces={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},propTypes={"byte":{floor:true,max:255},"percent":{max:1},"degrees":{mod:360,floor:true}},support=color.support={},supportElem=jQuery("<p>")[0],colors,each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)";support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1;each(spaces,function(spaceName,space){space.cache="_"+spaceName;space.props.alpha={idx:3,type:"percent",def:1};});function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};if(value==null){return(allowEmpty||!prop.def)?null:prop.def;}
1502value=type.floor?~~value:parseFloat(value);if(isNaN(value)){return prop.def;}
1503if(type.mod){return(value+type.mod)%type.mod;}
1504return 0>value?0:type.max<value?type.max:value;}
1505function stringParse(string){var inst=color(),rgba=inst._rgba=[];string=string.toLowerCase();each(stringParsers,function(i,parser){var parsed,match=parser.re.exec(string),values=match&&parser.parse(match),spaceName=parser.space||"rgba";if(values){parsed=inst[spaceName](values);inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache];rgba=inst._rgba=parsed._rgba;return false;}});if(rgba.length){if(rgba.join()==="0,0,0,0"){jQuery.extend(rgba,colors.transparent);}
1506return inst;}
1507return colors[string];}
1508color.fn=jQuery.extend(color.prototype,{parse:function(red,green,blue,alpha){if(red===undefined){this._rgba=[null,null,null,null];return this;}
1509if(red.jquery||red.nodeType){red=jQuery(red).css(green);green=undefined;}
1510var inst=this,type=jQuery.type(red),rgba=this._rgba=[];if(green!==undefined){red=[red,green,blue,alpha];type="array";}
1511if(type==="string"){return this.parse(stringParse(red)||colors._default);}
1512if(type==="array"){each(spaces.rgba.props,function(key,prop){rgba[prop.idx]=clamp(red[prop.idx],prop);});return this;}
1513if(type==="object"){if(red instanceof color){each(spaces,function(spaceName,space){if(red[space.cache]){inst[space.cache]=red[space.cache].slice();}});}else{each(spaces,function(spaceName,space){var cache=space.cache;each(space.props,function(key,prop){if(!inst[cache]&&space.to){if(key==="alpha"||red[key]==null){return;}
1514inst[cache]=space.to(inst._rgba);}
1515inst[cache][prop.idx]=clamp(red[key],prop,true);});if(inst[cache]&&jQuery.inArray(null,inst[cache].slice(0,3))<0){inst[cache][3]=1;if(space.from){inst._rgba=space.from(inst[cache]);}}});}
1516return this;}},is:function(compare){var is=color(compare),same=true,inst=this;each(spaces,function(_,space){var localCache,isCache=is[space.cache];if(isCache){localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[];each(space.props,function(_,prop){if(isCache[prop.idx]!=null){same=(isCache[prop.idx]===localCache[prop.idx]);return same;}});}
1517return same;});return same;},_space:function(){var used=[],inst=this;each(spaces,function(spaceName,space){if(inst[space.cache]){used.push(spaceName);}});return used.pop();},transition:function(other,distance){var end=color(other),spaceName=end._space(),space=spaces[spaceName],startColor=this.alpha()===0?color("transparent"):this,start=startColor[space.cache]||space.to(startColor._rgba),result=start.slice();end=end[space.cache];each(space.props,function(key,prop){var index=prop.idx,startValue=start[index],endValue=end[index],type=propTypes[prop.type]||{};if(endValue===null){return;}
1518if(startValue===null){result[index]=endValue;}else{if(type.mod){if(endValue-startValue>type.mod/2){startValue+=type.mod;}else if(startValue-endValue>type.mod/2){startValue-=type.mod;}}
1519result[index]=clamp((endValue-startValue)*distance+startValue,prop);}});return this[spaceName](result);},blend:function(opaque){if(this._rgba[3]===1){return this;}
1520var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v;}));},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return v==null?(i>2?1:0):v;});if(rgba[3]===1){rgba.pop();prefix="rgb(";}
1521return prefix+rgba.join()+")";},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){if(v==null){v=i>2?1:0;}
1522if(i&&i<3){v=Math.round(v*100)+"%";}
1523return v;});if(hsla[3]===1){hsla.pop();prefix="hsl(";}
1524return prefix+hsla.join()+")";},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();if(includeAlpha){rgba.push(~~(alpha*255));}
1525return"#"+jQuery.map(rgba,function(v){v=(v||0).toString(16);return v.length===1?"0"+v:v;}).join("");},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString();}});color.fn.parse.prototype=color.fn;function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6;}
1526if(h*2<1){return q;}
1527if(h*3<2){return p+(q-p)*((2/3)-h)*6;}
1528return p;}
1529spaces.hsla.to=function(rgba){if(rgba[0]==null||rgba[1]==null||rgba[2]==null){return[null,null,null,rgba[3]];}
1530var r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=add*0.5,h,s;if(min===max){h=0;}else if(r===max){h=(60*(g-b)/diff)+360;}else if(g===max){h=(60*(b-r)/diff)+120;}else{h=(60*(r-g)/diff)+240;}
1531if(diff===0){s=0;}else if(l<=0.5){s=diff/add;}else{s=diff/(2-add);}
1532return[Math.round(h)%360,s,l,a==null?1:a];};spaces.hsla.from=function(hsla){if(hsla[0]==null||hsla[1]==null||hsla[2]==null){return[null,null,null,hsla[3]];}
1533var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=0.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(hue2rgb(p,q,h+(1/3))*255),Math.round(hue2rgb(p,q,h)*255),Math.round(hue2rgb(p,q,h-(1/3))*255),a];};each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]){this[cache]=to(this._rgba);}
1534if(value===undefined){return this[cache].slice();}
1535var ret,type=jQuery.type(value),arr=(type==="array"||type==="object")?value:arguments,local=this[cache].slice();each(props,function(key,prop){var val=arr[type==="object"?key:prop.idx];if(val==null){val=local[prop.idx];}
1536local[prop.idx]=clamp(val,prop);});if(from){ret=color(from(local));ret[cache]=local;return ret;}else{return color(local);}};each(props,function(key,prop){if(color.fn[key]){return;}
1537color.fn[key]=function(value){var vtype=jQuery.type(value),fn=(key==="alpha"?(this._hsla?"hsla":"rgba"):spaceName),local=this[fn](),cur=local[prop.idx],match;if(vtype==="undefined"){return cur;}
1538if(vtype==="function"){value=value.call(this,cur);vtype=jQuery.type(value);}
1539if(value==null&&prop.empty){return this;}
1540if(vtype==="string"){match=rplusequals.exec(value);if(match){value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1);}}
1541local[prop.idx]=value;return this[fn](local);};});});color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if(value!=="transparent"&&(jQuery.type(value)!=="string"||(parsed=stringParse(value)))){value=color(parsed||value);if(!support.rgba&&value._rgba[3]!==1){curElem=hook==="backgroundColor"?elem.parentNode:elem;while((backgroundColor===""||backgroundColor==="transparent")&&curElem&&curElem.style){try{backgroundColor=jQuery.css(curElem,"backgroundColor");curElem=curElem.parentNode;}catch(e){}}
1542value=value.blend(backgroundColor&&backgroundColor!=="transparent"?backgroundColor:"_default");}
1543value=value.toRgbaString();}
1544try{elem.style[hook]=value;}catch(e){}}};jQuery.fx.step[hook]=function(fx){if(!fx.colorInit){fx.start=color(fx.elem,hook);fx.end=color(fx.end);fx.colorInit=true;}
1545jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos));};});};color.hook(stepHooks);jQuery.cssHooks.borderColor={expand:function(value){var expanded={};each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value;});return expanded;}};colors=jQuery.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"};})(jQuery);(function(){var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){jQuery.style(fx.elem,prop,fx.end);fx.setAttr=true;}};});function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]]){len=style.length;while(len--){key=style[len];if(typeof style[key]==="string"){styles[$.camelCase(key)]=style[key];}}}else{for(key in style){if(typeof style[key]==="string"){styles[key]=style[key];}}}
1546return styles;}
1547function styleDifference(oldStyle,newStyle){var diff={},name,value;for(name in newStyle){value=newStyle[name];if(oldStyle[name]!==value){if(!shorthandStyles[name]){if($.fx.step[name]||!isNaN(parseFloat(value))){diff[name]=value;}}}}
1548return diff;}
1549if(!$.fn.addBack){$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));};}
1550$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var animated=$(this),baseClass=animated.attr("class")||"",applyClassChange,allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles(this)};});applyClassChange=function(){$.each(classAnimationActions,function(i,action){if(value[action]){animated[action+"Class"](value[action]);}});};applyClassChange();allAnimations=allAnimations.map(function(){this.end=getElementStyles(this.el[0]);this.diff=styleDifference(this.start,this.end);return this;});animated.attr("class",baseClass);allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:false,complete:function(){dfd.resolve(styleInfo);}});this.el.animate(this.diff,opts);return dfd.promise();});$.when.apply($,allAnimations.get()).done(function(){applyClassChange();$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"");});});o.complete.call(animated[0]);});});};$.fn.extend({addClass:(function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments);};})($.fn.addClass),removeClass:(function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments);};})($.fn.removeClass),toggleClass:(function(orig){return function(classNames,force,speed,easing,callback){if(typeof force==="boolean"||force===undefined){if(!speed){return orig.apply(this,arguments);}else{return $.effects.animateClass.call(this,(force?{add:classNames}:{remove:classNames}),speed,easing,callback);}}else{return $.effects.animateClass.call(this,{toggle:classNames},force,speed,easing);}};})($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback);}});})();(function(){$.extend($.effects,{version:"1.10.3",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.data(dataSpace+set[i],element[0].style[set[i]]);}}},restore:function(element,set){var val,i;for(i=0;i<set.length;i++){if(set[i]!==null){val=element.data(dataSpace+set[i]);if(val===undefined){val="";}
1551element.css(set[i],val);}}},setMode:function(el,mode){if(mode==="toggle"){mode=el.is(":hidden")?"show":"hide";}
1552return mode;},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height;}
1553switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width;}
1554return{x:x,y:y};},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent();}
1555var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")},wrapper=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id;}catch(e){active=document.body;}
1556element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active)){$(active).focus();}
1557wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"});}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto";}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"});}
1558element.css(size);return wrapper.css(props).show();},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active)){$(active).focus();}}
1559return element;},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){var unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1];}});return value;}});function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){options=effect;effect=effect.effect;}
1560effect={effect:effect};if(options==null){options={};}
1561if($.isFunction(options)){callback=options;speed=null;options={};}
1562if(typeof options==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={};}
1563if($.isFunction(speed)){callback=speed;speed=null;}
1564if(options){$.extend(effect,options);}
1565speed=speed||options.duration;effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect;}
1566function standardAnimationOption(option){if(!option||typeof option==="number"||$.fx.speeds[option]){return true;}
1567if(typeof option==="string"&&!$.effects.effect[option]){return true;}
1568if($.isFunction(option)){return true;}
1569if(typeof option==="object"&&!option.effect){return true;}
1570return false;}
1571$.fn.extend({effect:function(){var args=_normalizeArguments.apply(this,arguments),mode=args.mode,queue=args.queue,effectMethod=$.effects.effect[args.effect];if($.fx.off||!effectMethod){if(mode){return this[mode](args.duration,args.complete);}else{return this.each(function(){if(args.complete){args.complete.call(this);}});}}
1572function run(next){var elem=$(this),complete=args.complete,mode=args.mode;function done(){if($.isFunction(complete)){complete.call(elem[0]);}
1573if($.isFunction(next)){next();}}
1574if(elem.is(":hidden")?mode==="hide":mode==="show"){elem[mode]();done();}else{effectMethod.call(elem[0],args,done);}}
1575return queue===false?this.each(run):this.queue(queue||"fx",run);},show:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="show";return this.effect.call(this,args);}};})($.fn.show),hide:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="hide";return this.effect.call(this,args);}};})($.fn.hide),toggle:(function(orig){return function(option){if(standardAnimationOption(option)||typeof option==="boolean"){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="toggle";return this.effect.call(this,args);}};})($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit];}});return val;}});})();(function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2);};});$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2);},Circ:function(p){return 1-Math.sqrt(1-p*p);},Elastic:function(p){return p===0||p===1?p:-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15);},Back:function(p){return p*p*(3*p-2);},Bounce:function(p){var pow2,bounce=4;while(p<((pow2=Math.pow(2,--bounce))-1)/11){}
1576return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2);}});$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn;$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p);};$.easing["easeInOut"+name]=function(p){return p<0.5?easeIn(p*2)/2:1-easeIn(p*-2+2)/2;};});})();})(jQuery);(function($,undefined){var rvertical=/up|down|vertical/,rpositivemotion=/up|left|vertical|horizontal/;$.effects.effect.blind=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),direction=o.direction||"up",vertical=rvertical.test(direction),ref=vertical?"height":"width",ref2=vertical?"top":"left",motion=rpositivemotion.test(direction),animation={},show=mode==="show",wrapper,distance,margin;if(el.parent().is(".ui-effects-wrapper")){$.effects.save(el.parent(),props);}else{$.effects.save(el,props);}
1577el.show();wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});distance=wrapper[ref]();margin=parseFloat(wrapper.css(ref2))||0;animation[ref]=show?distance:0;if(!motion){el.css(vertical?"bottom":"right",0).css(vertical?"top":"left","auto").css({position:"absolute"});animation[ref2]=show?margin:distance+margin;}
1578if(show){wrapper.css(ref,0);if(!motion){wrapper.css(ref2,margin+distance);}}
1579wrapper.animate(animation,{duration:o.duration,easing:o.easing,queue:false,complete:function(){if(mode==="hide"){el.hide();}
1580$.effects.restore(el,props);$.effects.removeWrapper(el);done();}});};})(jQuery);(function($,undefined){$.effects.effect.bounce=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"effect"),hide=mode==="hide",show=mode==="show",direction=o.direction||"up",distance=o.distance,times=o.times||5,anims=times*2+(show||hide?1:0),speed=o.duration/anims,easing=o.easing,ref=(direction==="up"||direction==="down")?"top":"left",motion=(direction==="up"||direction==="left"),i,upAnim,downAnim,queue=el.queue(),queuelen=queue.length;if(show||hide){props.push("opacity");}
1581$.effects.save(el,props);el.show();$.effects.createWrapper(el);if(!distance){distance=el[ref==="top"?"outerHeight":"outerWidth"]()/3;}
1582if(show){downAnim={opacity:1};downAnim[ref]=0;el.css("opacity",0).css(ref,motion?-distance*2:distance*2).animate(downAnim,speed,easing);}
1583if(hide){distance=distance/Math.pow(2,times-1);}
1584downAnim={};downAnim[ref]=0;for(i=0;i<times;i++){upAnim={};upAnim[ref]=(motion?"-=":"+=")+distance;el.animate(upAnim,speed,easing).animate(downAnim,speed,easing);distance=hide?distance*2:distance/2;}
1585if(hide){upAnim={opacity:0};upAnim[ref]=(motion?"-=":"+=")+distance;el.animate(upAnim,speed,easing);}
1586el.queue(function(){if(hide){el.hide();}
1587$.effects.restore(el,props);$.effects.removeWrapper(el);done();});if(queuelen>1){queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1)));}
1588el.dequeue();};})(jQuery);(function($,undefined){$.effects.effect.clip=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",direction=o.direction||"vertical",vert=direction==="vertical",size=vert?"height":"width",position=vert?"top":"left",animation={},wrapper,animate,distance;$.effects.save(el,props);el.show();wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});animate=(el[0].tagName==="IMG")?wrapper:el;distance=animate[size]();if(show){animate.css(size,0);animate.css(position,distance/2);}
1589animation[size]=show?distance:0;animation[position]=show?0:distance/2;animate.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(!show){el.hide();}
1590$.effects.restore(el,props);$.effects.removeWrapper(el);done();}});};})(jQuery);(function($,undefined){$.effects.effect.drop=function(o,done){var el=$(this),props=["position","top","bottom","left","right","opacity","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",direction=o.direction||"left",ref=(direction==="up"||direction==="down")?"top":"left",motion=(direction==="up"||direction==="left")?"pos":"neg",animation={opacity:show?1:0},distance;$.effects.save(el,props);el.show();$.effects.createWrapper(el);distance=o.distance||el[ref==="top"?"outerHeight":"outerWidth"](true)/2;if(show){el.css("opacity",0).css(ref,motion==="pos"?-distance:distance);}
1591animation[ref]=(show?(motion==="pos"?"+=":"-="):(motion==="pos"?"-=":"+="))+
1592distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide"){el.hide();}
1593$.effects.restore(el,props);$.effects.removeWrapper(el);done();}});};})(jQuery);(function($,undefined){$.effects.effect.explode=function(o,done){var rows=o.pieces?Math.round(Math.sqrt(o.pieces)):3,cells=rows,el=$(this),mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",offset=el.show().css("visibility","hidden").offset(),width=Math.ceil(el.outerWidth()/cells),height=Math.ceil(el.outerHeight()/rows),pieces=[],i,j,left,top,mx,my;function childComplete(){pieces.push(this);if(pieces.length===rows*cells){animComplete();}}
1594for(i=0;i<rows;i++){top=offset.top+i*height;my=i-(rows-1)/2;for(j=0;j<cells;j++){left=offset.left+j*width;mx=j-(cells-1)/2;el.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*width,top:-i*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},o.duration||500,o.easing,childComplete);}}
1595function animComplete(){el.css({visibility:"visible"});$(pieces).remove();if(!show){el.hide();}
1596done();}};})(jQuery);(function($,undefined){$.effects.effect.fade=function(o,done){var el=$(this),mode=$.effects.setMode(el,o.mode||"toggle");el.animate({opacity:mode},{queue:false,duration:o.duration,easing:o.easing,complete:done});};})(jQuery);(function($,undefined){$.effects.effect.fold=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",hide=mode==="hide",size=o.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!o.horizFirst,widthFirst=show!==horizFirst,ref=widthFirst?["width","height"]:["height","width"],duration=o.duration/2,wrapper,distance,animation1={},animation2={};$.effects.save(el,props);el.show();wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()];if(percent){size=parseInt(percent[1],10)/100*distance[hide?0:1];}
1597if(show){wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0});}
1598animation1[ref[0]]=show?distance[0]:size;animation2[ref[1]]=show?distance[1]:0;wrapper.animate(animation1,duration,o.easing).animate(animation2,duration,o.easing,function(){if(hide){el.hide();}
1599$.effects.restore(el,props);$.effects.removeWrapper(el);done();});};})(jQuery);(function($,undefined){$.effects.effect.highlight=function(o,done){var elem=$(this),props=["backgroundImage","backgroundColor","opacity"],mode=$.effects.setMode(elem,o.mode||"show"),animation={backgroundColor:elem.css("backgroundColor")};if(mode==="hide"){animation.opacity=0;}
1600$.effects.save(elem,props);elem.show().css({backgroundImage:"none",backgroundColor:o.color||"#ffff99"}).animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide"){elem.hide();}
1601$.effects.restore(elem,props);done();}});};})(jQuery);(function($,undefined){$.effects.effect.pulsate=function(o,done){var elem=$(this),mode=$.effects.setMode(elem,o.mode||"show"),show=mode==="show",hide=mode==="hide",showhide=(show||mode==="hide"),anims=((o.times||5)*2)+(showhide?1:0),duration=o.duration/anims,animateTo=0,queue=elem.queue(),queuelen=queue.length,i;if(show||!elem.is(":visible")){elem.css("opacity",0).show();animateTo=1;}
1602for(i=1;i<anims;i++){elem.animate({opacity:animateTo},duration,o.easing);animateTo=1-animateTo;}
1603elem.animate({opacity:animateTo},duration,o.easing);elem.queue(function(){if(hide){elem.hide();}
1604done();});if(queuelen>1){queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1)));}
1605elem.dequeue();};})(jQuery);(function($,undefined){$.effects.effect.puff=function(o,done){var elem=$(this),mode=$.effects.setMode(elem,o.mode||"hide"),hide=mode==="hide",percent=parseInt(o.percent,10)||150,factor=percent/100,original={height:elem.height(),width:elem.width(),outerHeight:elem.outerHeight(),outerWidth:elem.outerWidth()};$.extend(o,{effect:"scale",queue:false,fade:true,mode:mode,complete:done,percent:hide?percent:100,from:hide?original:{height:original.height*factor,width:original.width*factor,outerHeight:original.outerHeight*factor,outerWidth:original.outerWidth*factor}});elem.effect(o);};$.effects.effect.scale=function(o,done){var el=$(this),options=$.extend(true,{},o),mode=$.effects.setMode(el,o.mode||"effect"),percent=parseInt(o.percent,10)||(parseInt(o.percent,10)===0?0:(mode==="hide"?0:100)),direction=o.direction||"both",origin=o.origin,original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()},factor={y:direction!=="horizontal"?(percent/100):1,x:direction!=="vertical"?(percent/100):1};options.effect="size";options.queue=false;options.complete=done;if(mode!=="effect"){options.origin=origin||["middle","center"];options.restore=true;}
1606options.from=o.from||(mode==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:original);options.to={height:original.height*factor.y,width:original.width*factor.x,outerHeight:original.outerHeight*factor.y,outerWidth:original.outerWidth*factor.x};if(options.fade){if(mode==="show"){options.from.opacity=0;options.to.opacity=1;}
1607if(mode==="hide"){options.from.opacity=1;options.to.opacity=0;}}
1608el.effect(options);};$.effects.effect.size=function(o,done){var original,baseline,factor,el=$(this),props0=["position","top","bottom","left","right","width","height","overflow","opacity"],props1=["position","top","bottom","left","right","overflow","opacity"],props2=["width","height","overflow"],cProps=["fontSize"],vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],mode=$.effects.setMode(el,o.mode||"effect"),restore=o.restore||mode!=="effect",scale=o.scale||"both",origin=o.origin||["middle","center"],position=el.css("position"),props=restore?props0:props1,zero={height:0,width:0,outerHeight:0,outerWidth:0};if(mode==="show"){el.show();}
1609original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()};if(o.mode==="toggle"&&mode==="show"){el.from=o.to||zero;el.to=o.from||original;}else{el.from=o.from||(mode==="show"?zero:original);el.to=o.to||(mode==="hide"?zero:original);}
1610factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale==="box"||scale==="both"){if(factor.from.y!==factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to);}
1611if(factor.from.x!==factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to);}}
1612if(scale==="content"||scale==="both"){if(factor.from.y!==factor.to.y){props=props.concat(cProps).concat(props2);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to);}}
1613$.effects.save(el,props);el.show();$.effects.createWrapper(el);el.css("overflow","hidden").css(el.from);if(origin){baseline=$.effects.getBaseline(origin,original);el.from.top=(original.outerHeight-el.outerHeight())*baseline.y;el.from.left=(original.outerWidth-el.outerWidth())*baseline.x;el.to.top=(original.outerHeight-el.to.outerHeight)*baseline.y;el.to.left=(original.outerWidth-el.to.outerWidth)*baseline.x;}
1614el.css(el.from);if(scale==="content"||scale==="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);props2=props0.concat(vProps).concat(hProps);el.find("*[width]").each(function(){var child=$(this),c_original={height:child.height(),width:child.width(),outerHeight:child.outerHeight(),outerWidth:child.outerWidth()};if(restore){$.effects.save(child,props2);}
1615child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x,outerHeight:c_original.outerHeight*factor.from.y,outerWidth:c_original.outerWidth*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x,outerHeight:c_original.height*factor.to.y,outerWidth:c_original.width*factor.to.x};if(factor.from.y!==factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to);}
1616if(factor.from.x!==factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to);}
1617child.css(child.from);child.animate(child.to,o.duration,o.easing,function(){if(restore){$.effects.restore(child,props2);}});});}
1618el.animate(el.to,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(el.to.opacity===0){el.css("opacity",el.from.opacity);}
1619if(mode==="hide"){el.hide();}
1620$.effects.restore(el,props);if(!restore){if(position==="static"){el.css({position:"relative",top:el.to.top,left
1620:el.to.left});}else{$.each(["top","left"],function(idx,pos){el.css(pos,function(_,str){var val=parseInt(str,10),toRef=idx?el.to.left:el.to.top;if(str==="auto"){return toRef+"px";}
1621return val+toRef+"px";});});}}
1622$.effects.removeWrapper(el);done();}});};})(jQuery);(function($,undefined){$.effects.effect.shake=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"effect"),direction=o.direction||"left",distance=o.distance||20,times=o.times||3,anims=times*2+1,speed=Math.round(o.duration/anims),ref=(direction==="up"||direction==="down")?"top":"left",positiveMotion=(direction==="up"||direction==="left"),animation={},animation1={},animation2={},i,queue=el.queue(),queuelen=queue.length;$.effects.save(el,props);el.show();$.effects.createWrapper(el);animation[ref]=(positiveMotion?"-=":"+=")+distance;animation1[ref]=(positiveMotion?"+=":"-=")+distance*2;animation2[ref]=(positiveMotion?"-=":"+=")+distance*2;el.animate(animation,speed,o.easing);for(i=1;i<times;i++){el.animate(animation1,speed,o.easing).animate(animation2,speed,o.easing);}
1623el.animate(animation1,speed,o.easing).animate(animation,speed/2,o.easing).queue(function(){if(mode==="hide"){el.hide();}
1624$.effects.restore(el,props);$.effects.removeWrapper(el);done();});if(queuelen>1){queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1)));}
1625el.dequeue();};})(jQuery);(function($,undefined){$.effects.effect.slide=function(o,done){var el=$(this),props=["position","top","bottom","left","right","width","height"],mode=$.effects.setMode(el,o.mode||"show"),show=mode==="show",direction=o.direction||"left",ref=(direction==="up"||direction==="down")?"top":"left",positiveMotion=(direction==="up"||direction==="left"),distance,animation={};$.effects.save(el,props);el.show();distance=o.distance||el[ref==="top"?"outerHeight":"outerWidth"](true);$.effects.createWrapper(el).css({overflow:"hidden"});if(show){el.css(ref,positiveMotion?(isNaN(distance)?"-"+distance:-distance):distance);}
1626animation[ref]=(show?(positiveMotion?"+=":"-="):(positiveMotion?"-=":"+="))+
1627distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide"){el.hide();}
1628$.effects.restore(el,props);$.effects.removeWrapper(el);done();}});};})(jQuery);(function($,undefined){$.effects.effect.transfer=function(o,done){var elem=$(this),target=$(o.to),targetFixed=target.css("position")==="fixed",body=$("body"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(o.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:elem.innerHeight(),width:elem.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,o.duration,o.easing,function(){transfer.remove();done();});};})(jQuery);Array.prototype.removeByValue=function(val){for(var i=0;i<this.length;i++){if(this[i]==val){this.splice(i,1);break;}}};if(!window.location.origin){window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?':'+window.location.port:'');}
1629var entityMap={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;','/':'&#x2F;','`':'&#x60;','=':'&#x3D;'};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s];});}
1630(function($){var _old=$.unique;$.unique=function(arr){if(arr&&$.isArray(arr)&&arr.length>0){if(!!arr[0].nodeType){return _old.apply(this,arguments);}else{return $.grep(arr,function(v,k){return $.inArray(v,arr)===k;});}}else{return[];}};$.parseInteger=function(value){return parseInt(value,10)||0;};$.protectString=function(str){return(str+'').replace(/[\\"']/g,'\\$&').replace(/\u0000/g,'\\0');};$.cleanArray=function(array){var newArray=[],whiteSpace=/^\s$/i;for(var i=0;i<array.length;
1630i++){if(array[i]&&!whiteSpace.test(array[i])){newArray.push(array[i]);}}
1631return newArray;};$.parametizeString=function(string,parameters){var regExp=new RegExp("\{[0-9]+\}","gi"),stringParams=$.unique(string.match(regExp)),parametizedString=string;for(var i=0;i<stringParams.length;i++){var replaceExp=new RegExp(stringParams[i].replace('{','\\{').replace('}','\\}'),'g');parametizedString=parametizedString.replace(replaceExp,parameters[i]?parameters[i]:'');}
1632return parametizedString;};$.isInt=function(value){return!isNaN(value)&&parseInt(Number(value))==value&&!isNaN(parseInt(value,10));}
1633$.isFunction=function(functionToCheck){return functionToCheck&&{}.toString.call(functionToCheck)==='[object Function]';}
1634$.fn.getStyles=function(only,except){var product={};var style;var name;if(only&&only instanceof Array){for(var i=0,l=only.length;i<l;i++){name=only[i];product[name]=this.css(name);}}else{var dom=this.get(0);if(window.getComputedStyle){var pattern=/\-([a-z])/g;var uc=function(a,b){return b.toUpperCase();};var camelize=function(string){return string.replace(pattern,uc);};if(style=window.getComputedStyle(dom,null)){var camel,value;if(style.length){for(var i=0,l=style.length;i<l;i++){name=style[i];camel=camelize(name);value=style.getPropertyValue(name);product[camel]=value;}}else{for(name in style){camel=camelize(name);value=style.getPropertyValue(name)||style[name];product[camel]=value;}}}}
1635else if(style=dom.currentStyle){for(name in style){product[name]=style[name];}}
1636else if(style=dom.style){for(name in style){if(typeof style[name]!='function'){product[name]=style[name];}}}}
1637if(except&&except instanceof Array){for(var i=0,l=except.length;i<l;i++){name=except[i];delete product[name];}}
1638return product;};var matcher=/\s*(?:((?:(?:\\\.|[^.,])+\.?)+)\s*([!~><=]=|[><])\s*("|')?((?:\\\3|.)*?)\3|(.+?))\s*(?:,|$)/g;function _resolve(element,data){data=data.match(/(?:\\\.|[^.])+(?=\.|$)/g);var cur=jQuery.data(element)[data.shift()];while(cur&&data[0]){cur=cur[data.shift()];}
1639return cur||undefined;}
1640$.expr[':'].data=function(el,i,match){matcher.lastIndex=0;var expr=match[3],m,check,val,allMatch=null,foundMatch=false;while(m=matcher.exec(expr)){check=m[4];val=_resolve(el,m[1]||m[5]);switch(m[2]){case'==':foundMatch=val===check;break;case'!=':foundMatch=val!==check;break;case'<=':foundMatch=val<=check;break;case'>=':foundMatch=val>=check;break;case'~=':foundMatch=new RegExp(check).test(val);break;case'>':foundMatch=val>check;break;case'<':foundMatch=val<check;break;default:if(m[5]){foundMatch=!!val;}}
1641allMatch=allMatch===null?foundMatch:allMatch&&foundMatch;}
1642return allMatch;};function s4(){return(((1+Math.random())*0x10000)|0).toString(16).substring(1);}
1643$.generateGuid=function(){return(s4()+s4()+'-'+s4()+'-'+s4()+'-'+s4()+'-'+s4()+s4()+s4());};})(jQuery);function eventPush(obj,event,handler){if(obj.addEventListener){obj.addEventListener(event,handler,false);}else if(obj.attachEvent){obj.attachEvent('on'+event,handler);}else{obj.onload=handler;}}
1644function detectIE(){var ua=window.navigator.userAgent;var msie=ua.indexOf('MSIE ');var trident=ua.indexOf('Trident/');if(msie>0){return parseInt(ua.substring(msie+5,ua.indexOf('.',msie)),10);}
1645if(trident>0){var rv=ua.indexOf('rv:');return parseInt(ua.substring(rv+3,ua.indexOf('.',rv)),10);}
1646return false;}
1647(function($){var msie=detectIE();$.iframePopin=function(params){this.defaultParams={autoOpen:false,modal:true,resizable:true,width:520,height:250};this.container=$("<div>").attr("id","iframePopin").css({'overflow':'hidden'});this.iFrame=$('<iframe>').appendTo(this.container);$("<div>").addClass("actions").appendTo(this.container);this.action=$("<input>").attr("type","button");var wrapper=this,$backButton=null,iFrameHistory=[];var instance={options:$.extend(wrapper.defaultParams,params||{}),dialog:null,iFrame:null,open:function(){this.dialog.dialog('open');return this;},close:function(){this.dialog.dialog("destroy");},destroy:function(){this.dialog.dialog("destroy");},init:function(){var actionButton=wrapper.action.clone(),containerTemplate=wrapper.container.clone(),$actions=containerTemplate.find(".actions"),self=this;containerTemplate.attr("title",this.options.title);containerTemplate.find("iframe").attr("src",this.options.url).css({width:'100%',height:150,'overflow-x':'hidden'});$actions.html("");var iframe=containerTemplate.find("iframe")[0];if(iframe){if(iframe.onreadystatechange){iframe.onreadystatechange=function(){stateChanged(iFrame);};}else{eventPush(iframe,'load',_iFrameLoaded);}}
1648if(!$.isEmptyObject(this.options.buttons)){$.each(this.options.buttons,function(k,v){var button=actionButton.clone();button.attr("name",k).attr("value",v.title).click(function(e){v.callback.call(self,containerTemplate.find("iframe").contents(),e,containerTemplate.find("iframe"));});$actions.append(button);$('<span>').html('&nbsp;').appendTo($actions);});}else{$actions.remove();}
1649this.iFrame=containerTemplate.find('iframe');this.dialog=containerTemplate.dialog({autoOpen:this.options.autoOpen,modal:this.options.modal,resizable:this.options.resizable,minWidth:this.options.width,minHeight:this.options.height,width:this.options.width,height:this.options.height,closeOnEscape:false});this.dialog.closest('div.ui-dialog').find(".ui-dialog-titlebar-close").click(function(event,ui){if(!!self.options.onClose){self.options.onClose.call(self,containerTemplate.find("iframe").contents(),event,ui);}});}};function stateChanged(iFrame){if(((msie)&&(iFrame.readyState=="complete"))||(!msie)){_iFrameLoaded();}}
1650function _iFrameLoaded(){var $this=$(this);if($this.contents().find('body').is('.login')){window.location=window.location.origin+"/adminsite";}else{$this.contents().find('body').css({'background':'#fff'});setTimeout(function(){_optimizeSize();},100);}}
1651function _optimizeSize(){var $popin=$('#iframePopin'),$iFrame=$popin.find("iframe"),$dialog=$popin.closest('.ui-dialog'),titleBarHeight=$popin.closest('.ui-dialog').find('.ui-dialog-titlebar').outerHeight(true),actionBarHeight=$popin.find('.actions').outerHeight(true),popinPaddingHeight=$.parseInteger($popin.css('padding-top'))+$.parseInteger($popin.css('padding-bottom')),dialogPaddingHeight=$.parseInteger($dialog.css('padding-top'))+$.parseInteger($dialog.css('padding-bottom')),clientHeight=$(window).height()-50,maxiFrameHeight=clientHeight-(titleBarHeight+actionBarHeight),contentHeight=$iFrame.contents().find('html').outerHeight(true);if(msie){contentHeight+=$iFrame.contents().find('body').outerHeight(true);}
1652contentHeight=contentHeight<maxiFrameHeight?contentHeight:maxiFrameHeight;var dialogFinalHeight=contentHeight+popinPaddingHeight+titleBarHeight+dialogPaddingHeight;dialogFinalHeight=dialogFinalHeight>maxiFrameHeight?maxiFrameHeight:dialogFinalHeight;var optimizeTop=((clientHeight/2)-(dialogFinalHeight/2))+$(window).scrollTop();$dialog.transition({top:optimizeTop});$popin.transition({height:contentHeight+actionBarHeight+popinPaddingHeight});$iFrame.transition({height:contentHeight});}
1653instance.init();return instance;};})(jQuery);(function(t,e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e(require("jquery"))}else{e(t.jQuery)}})(this,function(t){t.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var e=document.createElement("div");var n={};function i(t){if(t in e.style)return t;var n=["Moz","Webkit","O","ms"];var i=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r<n.length;++r){var s=n[r]+i;if(s in e.style){return s}}}function r(){e.style[n.transform]="";e.style[n.transform]="rotateY(90deg)";return e.style[n.transform]!==""}var s=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;n.transition=i("transition");n.transitionDelay=i("transitionDelay");n.transform=i("transform");n.transformOrigin=i("transformOrigin");n.filter=i("Filter");n.transform3d=r();var a={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]==="undefined"){t.support[u]=n[u]}}e=null;t.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1
1653)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform==="WebkitTransform"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data("transform",r)}};t.cssHooks.transform={set:t.cssHooks["transit:transform"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<"1.8"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p("scale");p("scaleX");p("scaleY");p("translate");p("rotate");p("rotateX");p("rotateY");p("rotate3d");p("perspective");p("skewX");p("skewY");p("x",true);p("y",true);function f(t){if(typeof t==="string"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e==="string"?e.split(","):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(",")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=b(t,"deg")},rotateX:function(t){this.rotateX=b(t,"deg")},rotateY:function(t){this.rotateY=b(t,"deg")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+","+e},skewX:function(t){this.skewX=b(t,"deg")},skewY:function(t){this.skewY=b(t,"deg")},perspective:function(t){this.perspective=b(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=b(t,"px")}if(e!==null&&e!==undefined){this._translateY=b(e,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=b(t[3],"deg")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin")){continue}if(i[0]!=="_"){if(t&&i==="scale"){e.push(i+"3d("+this[i]+",1)")}else if(t&&i==="translate"){e.push(i+"3d("+this[i]+",0)")}else{e.push(i+"("+this[i]+")")}}}}return e.join(" ")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=""+y(n)+" "+i;if(parseInt(r,10)>0){a+=" "+y(r)}var o=[];
1653t.each(s,function(t,e){o.push(e+" "+a)});return o.join(", ")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=t.extend(true,{},e);if(typeof i==="function"){s=i;i=undefined}if(typeof i==="object"){r=i.easing;u=i.delay||0;f=typeof i.queue==="undefined"?true:i.queue;s=i.complete;i=i.duration}if(typeof r==="function"){s=r;r=undefined}if(typeof l.easing!=="undefined"){r=l.easing;delete l.easing}if(typeof l.duration!=="undefined"){i=l.duration;delete l.duration}if(typeof l.complete!=="undefined"){s=l.complete;delete l.complete}if(typeof l.queue!=="undefined"){f=l.queue;delete l.queue}if(typeof l.delay!=="undefined"){u=l.delay;delete l.delay}if(typeof i==="undefined"){i=t.fx.speeds._default}if(typeof r==="undefined"){r=t.cssEase._default}i=y(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var b=h?parseInt(i,10)+parseInt(u,10):0;if(b===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(e){var i=false;var r=function(){if(i){a.unbind(o,r)}if(b>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s==="function"){s.apply(a)}if(typeof e==="function"){e()}};if(b>0&&o&&t.transit.useTransitionEnd){i=true;a.bind(o,r)}else{window.setTimeout(r,b)}a.each(function(){if(b>0){this.style[n.transition]=p}t(this).css(l)})};var z=function(t){this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css("transit:transform");return i.get(e)},set:function(n,i){var r=t(n).css("transit:transform");r.setFromString(e,i);t(n).css({"transit:transform":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function b(t,e){if(typeof t==="string"&&!t.match(/^[\-0-9\.]+$/)){return t}else{return""+t+e}}function y(e){var n=e;if(typeof n==="string"&&!n.match(/^[\-0-9\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return b(n,"ms")}t.transit.getTransitionValue=d;return t});(function($){'use strict';$.fn.sortFunctions={};$.fn.sortFunctions.alphaNumSort=function(m,n){var cnt=0,tem;var a=jQuery(m).text().toLowerCase();var b=jQuery(n).text().toLowerCase();if(a===b){return 0;}
1654var x=/^(\.)?\d/;var L=Math.min(a.length,b.length)+1;while(cnt<L&&a.charAt(cnt)===b.charAt(cnt)&&x.test(b.substring(cnt))===false&&x.test(a.substring(cnt))===false){cnt++;}
1655a=a.substring(cnt);b=b.substring(cnt);if(x.test(a)||x.test(b)){if(x.test(a)===false){return(a)?1:-1;}else if(x.test(b)===false){return(b)?-1:1;}else{tem=parseFloat(a)-parseFloat(b);if(tem!==0){return tem;}else{tem=a.search(/[^\.\d]/);}
1656if(tem===-1){tem=b.search(/[^\.\d]/);}
1657a=a.substring(tem);b=b.substring(tem);}}
1658if(a===b){return 0;}else{return(a>b)?1:-1;}};})(jQuery);(function($){$.kMultiSelect=function(root,options){var $kMultiSelect=$(root),settings,$parent,$parentList,$composition,$compositionList,$toolbox,toolbox={$addButton:null,$editButton:null,$removeButton:null},$oldEditToolbox,$oldSortToolbox,ua=navigator.userAgent;function init(){var defaults={instance:false,listMode:"LtL",parentLabel:LOCALE_BO.kselect.multi.parentLabel,compositionLabel:LOCALE_BO.kselect.multi.compositionLabel,ignore:'.ignore',addAction:function(){},onBeforeItemAdd:function(){},onAfterItemAdd:function(){},editable:false,editAction:function(){},onBeforeItemEdit:function(){},onAfterItemEdit:function(){},removable:true,onBeforeItemRemove:function(){},onAfterItemRemove:function(){},sortable:true,sortFunction:$.fn.sortFunctions.alphaNumSort,onItemSort:function(){},multiSelect:true,toolbox:{add:true,edit:false,remove:true},oldMode:false,sourceListSelector:null,compositionListSelector:null};settings=$.extend({},defaults,options);$.data(root,"kMultiSelect",$kMultiSelect);}
1659function createToolbox(){if(settings.toolbox&&(settings.toolbox.add||settings.toolbox.edit||settings.toolbox.remove)){$toolbox=$toolbox?$toolbox.empty():$("<div>").addClass("ui-widget-header ktoolbox").prependTo($kMultiSelect);if(settings.toolbox.add){toolbox.$addButton=$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-plus"}}).appendTo($toolbox);if(settings.addAction){toolbox.$addButton.click(function(){executeAction(settings.addAction,$kMultiSelect);return false;});}}
1660if(settings.toolbox.edit){toolbox.$editButton=$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-pencil"}}).appendTo($toolbox);if(settings.editAction){toolbox.$editButton.click(function(e){e.preventDefault();var $selectedRow=$compositionList.find("li.ui-state-highlight");settings.onBeforeItemEdit($compositionList,$selectedRow);executeAction(settings.editAction,$selectedRow);settings.onAfterItemEdit($compositionList,$selectedRow);return false;});}}
1661if(settings.toolbox.remove){toolbox.$removeButton=$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-minus"}}).appendTo($toolbox);toolbox.$removeButton.click(function(e){e.preventDefault();removeAction();return false;});}}}
1662function createParentList(){$parent=$('<div>').addClass('k-multiselect-parent').appendTo($kMultiSelect);if(settings.parentLabel){$('<span>').addClass('k-multiselect-label').html(settings.parentLabel).appendTo($parent);}
1663if(settings.sourceListSelector){$parentList=$(settings.sourceListSelector);$parentList.removeClass().addClass("ui-sortable kmultiselect-list kmultiselect-parent-list").disableSelection().appendTo($kMultiSelect);$parentList.find("li").each(function(index,item){var $item=$(item),ignore=$item.is(settings.ignore);$item.removeClass().addClass("ui-state-default kmultiselect-parent-list-row kconnected-sortable"+(ignore?' ignore':''));});}else if($kMultiSelect.find('.kscrollable .kmultiselect-parent-list').length==1){$parentList=$kMultiSelect.find('.kscrollable .kmultiselect-parent-list');$parentList.find("li").each(function(index,item){var $item=$(item),ignore=$item.is(settings.ignore);$item.removeClass().addClass("ui-state-default kmultiselect-parent-list-row kconnected-sortable"+(ignore?' ignore':''));});$parentList.closest('.kscrollable').appendTo($parent);}else{var $scrollable=$('<div>').addClass('kscrollable').appendTo($parent);$parentList=$parentList?$parentList.empty():$("<ul>").addClass("ui-sortable kmultiselect-list kmultiselect-parent-list").disableSelection().appendTo($scrollable);}}
1664function createCompositionList(){$composition=$('<div>').addClass('k-multiselect-composition').appendTo($kMultiSelect);if(settings.listMode=="LtL"&&settings.compositionLabel){$('<span>').addClass('k-multiselect-label').html(settings.compositionLabel).appendTo($composition);}
1665if(settings.compositionListSelector){$compositionList=$(settings.compositionListSelector);$compositionList.removeClass().addClass("ui-sortable kmultiselect-list kmultiselect-composition-list").disableSelection().appendTo($kMultiSelect);$compositionList.find("li").removeClass().addClass("ui-state-default kmultiselect-composition-list-row kconnected-sortable");}else if($kMultiSelect.find('.kscrollable .kmultiselect-composition-list').length==1){$compositionList=$kMultiSelect.find('.kscrollable .kmultiselect-composition-list');$compositionList.closest('.kscrollable').appendTo($composition);}else{var $scrollable=$('<div>').addClass('kscrollable').appendTo($composition);$compositionList=$compositionList?$compositionList.empty():$("<ul>").addClass("ui-sortable kmultiselect-list kmultiselect-composition-list").disableSelection().appendTo($scrollable);}
1666if(settings.sortable){if($parentList){var wrapperSelector="#"+$kMultiSelect.attr("id");$kMultiSelect.find(".kmultiselect-parent-list, .kmultiselect-composition-list").sortable({connectWith:wrapperSelector+" .kmultiselect-list",items:'li:not('+settings.ignore+')',over:onOver,out:onOut,stop:onDrop,delay:300,revert:0,helper:createHelper,placeholder:'ksortable-placeholder',forcePlaceholderSize:true,opacity:0.9,smooth:false}).disableSelection();}else{$compositionList.sortable({items:'li:not('+settings.ignore+')',over:onOver,out:onOut,stop:onDrop,delay:300,revert:0,helper:createHelper,placeholder:'ksortable-placeholder',forcePlaceholderSize:true,opacity:0.9,smooth:false});}
1667if($parentList)$parentList.children().addClass("draggable");$compositionList.children().addClass("draggable");handleStates();}}
1668function createOldModeToolbox(){var $target;if(settings.listMode=="LtL"&&$parentList){$target=settings.sourceListSelector?$parentList:$parentList.parent();$oldEditToolbox=$oldEditToolbox?$oldEditToolbox.empty():$("<div>").addClass("kold-edit-toolbox").insertAfter($target);$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-triangle-1-e"}}).addClass("kold-edit-button kold-edit-add").click(oldAddAction).appendTo($oldEditToolbox);$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-triangle-1-w"}}).addClass("kold-edit-button kold-edit-remove").click(removeAction).appendTo($oldEditToolbox);}
1669$target=settings.compositionListSelector?$compositionList:$compositionList.parent();$oldSortToolbox=$oldSortToolbox?$oldSortToolbox.empty():$("<div>").addClass("kold-edit-toolbox").insertAfter($target);$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-triangle-1-n"}}).click(oldSortUpAction).addClass("kold-edit-button kold-edit-sort-up").appendTo($oldSortToolbox);$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-triangle-1-s"}}).click(oldSortDownAction).addClass("kold-edit-button kold-edit-sort-down").appendTo($oldSortToolbox);}
1670function executeAction(action,params){if(action){if(typeof(action)=="function"){action(params);}}}
1671function createHelper(e,item){var helper=$('<li/>').attr('data-value',item.data('value')).addClass("kmultiselect-composition-list-row kconnected-sortable ui-state-highlight ");if(!item.hasClass('ui-state-highlight')){item.addClass('ui-state-highlight').siblings().removeClass('ui-state-highlight');}
1672var elements=item.parent().children('.ui-state-highlight').clone(true,true);item.data('multidrag',elements);item.siblings('.ui-state-highlight').remove();return helper.append(elements);}
1673function handleStates(){$kMultiSelect.find("li.kconnected-sortable").unbind('click mouseenter mouseleave');$kMultiSelect.find("li.kconnected-sortable").hover(function(e){$(this).addClass('ui-state-hover');},function(){$(this).removeClass('ui-state-hover');});$kMultiSelect.find("li.kconnected-sortable").click(function(e){var $this=$(this);if(settings.listMode=="LtL"){var $otherLists=$(e.currentTarget).closest('.k-multiselect-parent').length>0?$composition:$parent;if($otherLists.length!=0){$otherLists.find('.kconnected-sortable').removeClass('ui-state-highlight ui-state-hover');}}
1674if(e.ctrlKey==true&&settings.multiSelect){$this.toggleClass('ui-state-highlight');}else if(e.shiftKey==true&&settings.multiSelect){var $pivotItem=$this.siblings('.ui-state-highlight').first(),$start=$this.index()>$pivotItem.index()?$pivotItem.index():$this.index(),$end=$this.index()>$pivotItem.index()?$this.index():$pivotItem.index();$pivotItem.siblings('.kconnected-sortable').removeClass('ui-state-highlight ui-state-hover');$this.siblings('.kconnected-sortable').slice($start,$end).addClass('ui-state-highlight');$this.addClass('ui-state-highlight');}else{$this.addClass('ui-state-highlight').siblings('.kconnected-sortable').removeClass('ui-state-highlight ui-state-hover');}
1675updateOldToolbox();updateToolbox();return false;});}
1676function updateCompositionItems(){$compositionList.find('li').each(function(){var $this=$(this),$label=$this.find('span.composition-list-label'),ignore=$this.is(settings.ignore),error=$this.is('.error');$this.find('div, button').remove();$this.find('span.klist-icon').remove();if($label.length==0){var text=$this.text();$this.empty();$label=$('<span>').addClass('composition-list-label').text(text).appendTo($this);}
1677if(error){$this.addClass('ui-state-error kmultiselect-composition-list-row');}else{$this.removeClass().addClass('ui-state-default kmultiselect-composition-list-row kconnected-sortable'+(ignore?' ignore':''));}
1678if(settings.sortable){if(!ignore){if(!error){$this.addClass('draggable');$('<span>').addClass('ui-icon ui-icon-arrowthick-2-n-s klist-icon').prependTo($this);}else{$('<span>').addClass('ui-icon ui-icon-alert klist-icon').prependTo($this);}}else{$('<span>').addClass('ui-icon ui-icon-locked klist-icon').prependTo($this);}}
1679if(settings.removable&&!ignore){$('<button type=\"button\">').button({text:false,icons:{primary:'ui-icon-minus'}}).click(function(){settings.onBeforeItemRemove($compositionList,$this);if($parentList){settings.onBeforeItemAdd($parentList,$this);if($this.is('.error')){$this.detach();}else{$this.appendTo($parentList);}
1680settings.onAfterItemAdd($parentList,$this);}else{$this.detach();}
1681settings.onAfterItemRemove($compositionList,$this);updateCompositionItems();updateParentItems();return false;}).addClass('klist-button').appendTo($this);$label.css({'max-width':'80%'});}
1682if(settings.editable&&!ignore&&!error){$('<button type=\"button\">').button({text:false,icons:{primary:'ui-icon-pencil'}}).click(function(e){e.preventDefault();settings.onBeforeItemEdit($compositionList,$(this).closest('li'));executeAction(settings.editAction,$(this).closest('li'));settings.onAfterItemEdit($compositionList,$(this).closest('li'));return false;}).addClass('klist-button').appendTo($this);$label.css({'max-width':'70%'});}
1683if(!$this.attr('title')){$this.attr('title',$label.text());}});}
1684function updateParentItems(){if($parentList){$parentList.find("li").each(function(){var $this=$(this),$label=$this.find('span.parent-list-label');$this.find("div, button").remove();$this.find("span.klist-icon").remove();$this.removeClass('kmultiselect-composition-list-row').addClass('kmultiselect-parent-list-row');if($label.length===0){var text=$this.html();$this.empty();$('<span>').addClass('parent-list-label').html(text).appendTo($this);}
1685$("<button type=\"button\">").button({text:false,icons:{primary:"ui-icon-plusthick"}}).addClass("klist-button").click({row:$this},oldAddAction).appendTo($this);});}}
1686function updateToolbox(){if($toolbox){var $selectedRows=$compositionList.find("li.ui-state-highlight:not("+settings.ignore+")"),hasIgnorableRows=$selectedRows.find(settings.ignore).length>0;if($selectedRows.length==0||hasIgnorableRows){if(toolbox.$editButton)toolbox.$editButton.button("option","disabled",true);if(toolbox.$removeButton)toolbox.$removeButton.button("option","disabled",true);}else if($selectedRows.length==1){if(toolbox.$editButton)toolbox.$editButton.button("option","disabled",fal
1686se);if(toolbox.$removeButton)toolbox.$removeButton.button("option","disabled",false);}else if($selectedRows.length>1){if(toolbox.$editButton)toolbox.$editButton.button("option","disabled",true);if(toolbox.$removeButton)toolbox.$removeButton.button("option","disabled",false);}else{if(toolbox.$editButton)toolbox.$editButton.button("option","disabled",false);if(toolbox.$removeButton)toolbox.$removeButton.button("option","disabled",false);}}}
1687function updateOldToolbox(){var $selectedCompositionRows=$compositionList.find(".ui-state-highlight"),ignorableCompositionRows=$selectedCompositionRows.is(settings.ignore);if($oldEditToolbox&&settings.listMode=="LtL"){var $selectedParentRows=$parentList.find(".ui-state-highlight"),ignorableParentRows=$selectedParentRows.is(settings.ignore);if($parentList&&($parentList.children().length<=0||$selectedParentRows.length<=0||ignorableParentRows)){$oldEditToolbox.find(".kold-edit-add").button("option","disabled",true);}else{$oldEditToolbox.find(".kold-edit-add").button("option","disabled",false);}
1688if($compositionList.children().length<=0||$selectedCompositionRows.length<=0||ignorableCompositionRows){$oldEditToolbox.find(".kold-edit-remove").button("option","disabled",true);}else{$oldEditToolbox.find(".kold-edit-remove").button("option","disabled",false);}}
1689if($oldSortToolbox){if($compositionList.children().length<=0||$selectedCompositionRows.length>1||$selectedCompositionRows.length==0||$selectedCompositionRows.index()==0||ignorableCompositionRows){$oldSortToolbox.find(".kold-edit-sort-up").button("option","disabled",true);}else{$oldSortToolbox.find(".kold-edit-sort-up").button("option","disabled",false);}
1690if($compositionList.children().length<=0||$selectedCompositionRows.length>1||$selectedCompositionRows.length==0||$selectedCompositionRows.index()==($compositionList.children().length-1)||ignorableCompositionRows){$oldSortToolbox.find(".kold-edit-sort-down").button("option","disabled",true);}else{$oldSortToolbox.find(".kold-edit-sort-down").button("option","disabled",false);}}}
1691function onDrop(event,info){var $removedList=$(event.target),$addedList;if(settings.listMode=="LtL"){if($removedList.hasClass("kmultiselect-composition-list")){$addedList=$parentList;}else{$addedList=$compositionList;}}
1692if($.contains($removedList[0],info.item[0])){$kMultiSelect.find('.kscrollable').removeClass('droppable');var test=info.item.data('multidrag');info.item.after(info.item.data('multidrag'));info.item.remove();settings.onItemSort($removedList);}else{settings.onBeforeItemAdd($addedList,info.item.data('multidrag'));if($removedList)settings.onBeforeItemRemove($removedList,info.item.data('multidrag'));$kMultiSelect.find('.kscrollable').removeClass('droppable');info.item.after(info.item.data('multidrag'));settings.onAfterItemAdd($addedList,info.item.data('multidrag'));if($removedList)settings.onAfterItemRemove($removedList,info.item.data('multidrag'));info.item.remove();}
1693updateCompositionItems();updateParentItems();updateToolbox();updateOldToolbox();handleStates();}
1694function onStart(e,info){if(userAgent.match(/firefox/)){info.item.css('margin-top',$(window).scrollTop());}}
1695function onBeforeStop(e,info){if(userAgent.match(/firefox/)){info.item.css('margin-top',0);}}
1695
1696function onOver(e,info){$kMultiSelect.find('.kscrollable').removeClass('droppable');$(e.target).closest('.kscrollable').addClass('droppable');}
1697function onOut(e,info){$kMultiSelect.find('.kscrollable').removeClass('droppable');$(e.target).closest('.kscrollable').addClass('droppable');}
1698function removeAction(selector){var $rows=selector&&(typeof selector=='string')?$compositionList.find(selector):$compositionList.find("li.ui-state-highlight"),result=settings.onBeforeItemRemove($compositionList,$rows),proceed=result?result:true;$rows=$rows.filter(':not('+settings.ignore+')');if(proceed){if($parentList){$rows.appendTo($parentList);}else{$rows.detach();}
1699updateCompositionItems();updateParentItems();updateToolbox();updateOldToolbox();settings.onAfterItemRemove($compositionList,$rows);}}
1700function oldAddAction(event){event.preventDefault();var $rows;if(event.data&&event.data.row){$rows=event.data.row;}else{$rows=$parentList.find("li.ui-state-highlight");}
1701settings.onBeforeItemAdd($compositionList,$rows);$rows.appendTo($compositionList);updateCompositionItems();updateParentItems();updateToolbox();updateOldToolbox();settings.onAfterItemAdd($compositionList,$rows);return false;}
1702function oldSortUpAction(){$compositionList.find("li.ui-state-highlight").each(function(){$(this).insertBefore($(this).prev());});updateOldToolbox();settings.onItemSort($compositionList);return false;}
1703function oldSortDownAction(){$compositionList.find("li.ui-state-highlight").each(function(){$(this).insertAfter($(this).next());});updateOldToolbox();settings.onItemSort($compositionList);return false;}
1704$kMultiSelect.add=function($item,prepend){settings.onBeforeItemAdd($compositionList,$item);if(prepend){$item.prependTo($compositionList);}else{$item.appendTo($compositionList);}
1705this.update();settings.onAfterItemAdd($compositionList,$item);};$kMultiSelect.remove=function(selector){removeAction(selector);};$kMultiSelect.update=function(){updateCompositionItems();updateParentItems();updateToolbox();updateOldToolbox();handleStates();}
1706var msie=(/msie ([\w.]+)/i.exec(ua)||[])[1],opera=/opera/i.test(ua),safari=/webkit/i.test(ua)&&!/chrome/i.test(ua);init();if(settings.listMode!=="LtL"){createToolbox();}else{createParentList();updateParentItems();}
1707createCompositionList();updateCompositionItems();if(options.oldMode){createOldModeToolbox();updateOldToolbox();}
1708updateToolbox();};$.fn.kMultiSelect=function(options,params){if(options){options=options||{};if(typeof options==="object"){this.each(function(){if($(this).data('kMultiSelect')){if(options.remove){$(this).data('kMultiSelect').remove();$(this).removeData('kMultiSelect');}}
1709else if(!options.remove){if(options.enable===undefined&&options.disable===undefined)
1710options.enable=true;new $.kMultiSelect(this,options);}});if(options.instance)
1711return $(this).data('kMultiSelect');return this;}}else{return $(this).data('kMultiSelect');};};})(jQuery);(function($){$.kMonoSelect=function(root,options){var $kMonoSelect=$(root),$fieldButton,$placeHolder,settings,toolbox={$editButton:null,$clearButton:null},ua=navigator.userAgent;function _init(){var defaults={instance:false,isLabelOnButtonsVisible:false,isClearable:true,disabled:false,value:'',title:'',editAction:function(){},defaultCulture:'fr',selectedCulture:null,cultures:{'fr':{'editAction':LOCALE_BO.kselect.mono.select,'clearAction':LOCALE_BO.kselect.mono.clear,'placeholder':''},'en':{'editAction':'Select','clearAction':'Clear','placeholder':''}},onFieldChanged:function(value){},onFieldCleared:function(oldValue){}};settings=$.extend(true,{},defaults,options);$.data(root,"kMonoSelect",$kMonoSelect);$kMonoSelect.addClass('kmonoselect');}
1712function _createComponent(){if(settings.isClearable){toolbox.$clearButton=$('<button type=\"button\">').addClass('kmonoselect-button kmonoselect-clear-button').prependTo($kMonoSelect).button({text:settings.isLabelO
1712nButtonsVisible,icons:{primary:"ui-icon-closethick"}});}
1713toolbox.$editButton=$('<button type=\"button\">').addClass('kmonoselect-button kmonoselect-edit-button').prependTo($kMonoSelect);$fieldButton=$('<div>').addClass('kmonoselect-field').prependTo($kMonoSelect);$('<span>').addClass('ui-button-text').appendTo($fieldButton);toolbox.$editButton.button({text:settings.isLabelOnButtonsVisible,icons:{primary:"ui-icon-folder-open"}});$kMonoSelect.buttonset();_culture();_value(settings.value,settings.title);_updateLayout();}
1714function _value(value,title){if(value){var tip=title?title:value;$fieldButton.removeClass('placeholder').attr('title',tip).find('span').text(value);settings.value=value;settings.onFieldChanged(value);}else{var placeholder=_getCultureKey(settings.selectedCulture,'placeholder');$fieldButton.addClass('placeholder').attr('title',placeholder).find('span').html(placeholder);}
1715_updateLayout();}
1716function _clearAction(){var currentValue=$fieldButton.attr('title');if(currentValue!=''){var placeholder=_getCultureKey(settings.selectedCulture,'placeholder');$fieldButton.addClass('placeholder').attr('title',placeholder).find('span').html(placeholder);settings.value='';settings.onFieldCleared(currentValue);}
1717_updateLayout();}
1718function _culture(culture){var currentCulture=culture?culture:settings.selectedCulture?settings.selectedCulture:settings.defaultCulture;var currentLabel=_getCultureKey(currentCulture,'editAction');
1718toolbox.$editButton.button('option','label',settings.isLabelOnButtonsVisible?currentLabel:'').attr('title',currentLabel);if(settings.isClearable){currentLabel=_getCultureKey(currentCulture,'clearAction');toolbox.$clearButton.button('option','label',settings.isLabelOnButtonsVisible?currentLabel:'').attr('title',currentLabel);}
1719if($fieldButton.hasClass('placeholder')){var placeholder=_getCultureKey(currentCulture,'placeholder');$fieldButton.addClass('placeholder').attr('title',placeholder).find('span').html(placeholder);}
1720_updateLayout();}
1721function _getCultureKey(culture,key){if(settings.cultures[culture]&&settings.cultures[culture][key]){return settings.cultures[culture][key];}else{return settings.cultures[settings.defaultCulture][key];}}
1722function _updateLayout(){if(settings.disabled){$kMonoSelect.disable();}else{if(settings.isClearable){if(settings.value&&settings.value!='')toolbox.$clearButton.button('option','disabled',false);else toolbox.$clearButton.button('option','disabled',true);}}}
1723function _handleInteractions(){$fieldButton.click(function(e){e.preventDefault();settings.editAction();return false;});toolbox.$editButton.click(function(e){e.preventDefault();settings.editAction();return false;});if(settings.isClearable){toolbox.$clearButton.click(function(e){e.preventDefault();_clearAction();return false;});}}
1724$kMonoSelect.value=function(value,title){if(value){if(!settings.disabled){_value(value,title);}
1725return $kMonoSelect;}};$kMonoSelect.clear=function(){if(settings.isClearable){_clearAction();}
1726return $kMonoSelect;};$kMonoSelect.culture=function(culture){if(culture){_culture(culture);return $kMonoSelect;}else{return settings.selectedCulture?settings.selectedCulture:settings.defaultCulture;}};$kMonoSelect.disable=function(){toolbox.$editButton.button('option','disabled',true);toolbox.$clearButton.button('option','disabled',true);settings.disabled=true;};$kMonoSelect.enable=function(){toolbox.$editButton.button('option','disabled',false);toolbox.$clearButton.button('option','disabled',false);settings.disabled=false;};_init();_createComponent();_handleInteractions();};$.fn.kMonoSelect=function(options,params){if(options){options=options||{};if(typeof options==="object"){this.each(function(){if($(this).data('kMonoSelect')){if(options.remove){$(this).data('kMonoSelect').remove();$(this).removeData('kMonoSelect');}}
1727else if(!options.remove){if(options.enable===undefined&&options.disable===undefined)
1728options.enable=true;new $.kMonoSelect(this,options);}});if(options.instance)
1729return $(this).data('kMonoSelect');return this;}}else{return $(this).data('kMonoSelect');};};})(jQuery);(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else{factory(jQuery);}}(function($){$.extend($.fn,{validate:function(options){if(!this.length){if(options&&options.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.");}
1730return;}
1731var validator=$.data(this[0],"validator");if(validator){return validator;}
1732this.attr("novalidate","novalidate");validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.validateDelegate(":submit","click",function(event){if(validator.settings.submitHandler){validator.submitButton=event.target;}
1733if($(event.target).hasClass("cancel")){validator.cancelSubmit=true;}
1734if($(event.target).attr("formnovalidate")!==undefined){validator.cancelSubmit=true;}});this.submit(function(event){if(validator.settings.debug){event.preventDefault();}
1735function handle(){var hidden,result;if(validator.settings.submitHandler){if(validator.submitButton){hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm);}
1736result=validator.settings.submitHandler.call(validator,validator.currentForm,event);if(validator.submitButton){hidden.remove();}
1737if(result!==undefined){return result;}
1738return false;}
1739return true;}
1740if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}
1741if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}
1742return handle();}
1742else{validator.focusInvalid();return false;}});}
1743return validator;},valid:function(){var valid,validator;if($(this[0]).is("form")){valid=this.validate().form();}else{valid=true;validator=$(this[0].form).validate();this.each(function(){valid=validator.element(this)&&valid;});}
1744return valid;},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0],settings,staticRules,existingRules,data,param,filtered;if(command){settings=$.data(element.form,"validator").settings;staticRules=settings.rules;existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));delete existingRules.messages;staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);}
1745break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}
1746filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];if(method==="required"){$(element).removeAttr("aria-required");}});return filtered;}}
1747data=$.validator.normalizeRules($.extend({},$.validator.classRules(element),$.validator.attributeRules(element),$.validator.dataRules(element),$.validator.staticRules(element)),element);if(data.required){param=data.required;delete data.required;data=$.extend({required:param},data);$(element).attr("aria-required","true");}
1748if(data.remote){param=data.remote;delete data.remote;data=$.extend(data,{remote:param});}
1749return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+$(a).val());},filled:function(a){return!!$.trim(""+$(a).val());},unchecked:function(a){return!$(a).prop("checked");}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length===1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};}
1750if(arguments.length>2&&params.constructor!==Array){params=$.makeArray(arguments).slice(1);}
1751if(params.constructor!==Array){params=[params];}
1752$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),function(){return n;});});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:false,focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);}
1753this.hideThese(this.errorsFor(element));}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element,event){if(event.which===9&&this.elementValue(element)===""){return;}else if(element.name in this.submitted||element===this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted){this.element(element);}else if(element.parentNode.name in this.submitted){this.element(element.parentNode);}},highlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).addClass(errorClass).removeClass(validClass);}else{$(element).addClass(errorClass).removeClass(validClass);}},unhighlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).removeClass(errorClass).addClass(validClass);}else{$(element).removeClass(errorClass).addClass(validClass);}}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={}),rules;$.each(this.settings.groups,function(key,value){if(typeof value==="string"){value=value.split(/\s/);}
1754$.each(value,function(index,name){groups[name]=key;});});rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,""),settings=validator.settings;if(settings[eventType]&&!this.is(settings.ignore)){settings[eventType].call(validator,this[0],event);}}
1755$(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, "+"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+"[type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], "+"[type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",delegate).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);}
1756$(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true");},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this]);}
1757this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}
1758return this.valid();},element:function(element){var cleanElement=this.clean(element),checkElement=this.validationTargetFor(cleanElement),result=true;this.lastElement=checkElement;if(checkElement===undefined){delete this.invalid[cleanElement.name];}else{this.prepareElement(checkElement);this.currentElements=$(checkElement);result=this.check(checkElement)!==false;if(result){delete this.invalid[checkElement.name];}else{this.invalid[checkElement.name]=true;}}
1759$(element).attr("aria-invalid",!result);if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers
1759);}
1760this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}
1761this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}
1762if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList);}else{this.defaultShowErrors();}},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm();}
1763this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid");},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0,i;for(i in obj){count++;}
1764return count;},hideErrors:function(){this.hideThese(this.toHide);},hideThese:function(errors){errors.not(this.containers).text("");this.addWrapper(errors).hide();},valid:function(){return this.size()===0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{window.scrollTo(0,0);$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name===lastActive.name;}).length===1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){if(!this.name&&validator.settings.debug&&window.console){console.error("%o has no name assigned",this);}
1765if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false;}
1766rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){var errorClass=this.settings.errorClass.split(" ").join(".");return $(this.settings.errorElement+"."+errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},elementValue:function(element){var val,$element=$(element),type=element.type;if(type==="radio"||type==="checkbox"){return $("input[name='"+element.name+"']:checked").val();}else if(type==="number"&&typeof element.validity!=="undefined"){return element.validity.badInput?false:$element.val();}
1767val=$element.val();if(typeof val==="string"){return val.replace(/\r/g,"");}
1768return val;},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules(),rulesCount=$.map(rules,function(n,i){return i;}).length,dependencyMismatch=false,val=this.elementValue(element),result,method,rule;for(method in rules){rule={method:method,parameters:rules[method]};try{result=$.validator.methods[method].call(this,val,element,rule.parameters);if(result==="dependency-mismatch"&&rulesCount===1){dependencyMismatch=true;continue;}
1769dependencyMismatch=false;if(result==="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}
1770if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+element.id+", check the '"+rule.method+"' method.",e);}
1771throw e;}}
1772if(dependencyMismatch){return;}
1773if(this.objectLength(rules)){this.successList.push(element);}
1774return true;},customDataMessage:function(element,method){return $(element).data("msg"+method.charAt(0).toUpperCase()+
1775method.substring(1).toLowerCase())||$(element).data("msg");},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor===String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined){return arguments[i];}}
1776return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customDataMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message==="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=$.validator.format(message.replace(theregex,"{$1}"),rule.parameters);}
1777this.errorList.push({message:message,element:element,method:rule.method});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));}
1778return toToggle;},defaultShowErrors:function(){var i,elements,error;for(i=0;this.errorList[i];i++){error=this.errorList[i];if(this.settings.highlight){this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.val
1778idClass);}
1779this.showLabel(error.element,error.message);}
1780if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}
1781if(this.settings.success){for(i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}
1782if(this.settings.unhighlight){for(i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}}
1783this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var place,group,errorID,error=this.errorsFor(element),elementID=this.idOrName(element),describedBy=$(element).attr("aria-describedby");if(error.length){error.removeClass(this.settings.validClass).addClass(this.settings.errorClass);error.html(message);}else{error=$("<"+this.settings.errorElement+">").attr("id",elementID+"-error").addClass(this.settings.errorClass).html(message||"");place=error;if(this.settings.wrapper){place=error.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}
1784if(this.labelContainer.length){this.labelContainer.append(place);}else if(this.settings.errorPlacement){this.settings.errorPlacement(place,$(element));}else{place.insertAfter(element);}
1785if(error.is("label")){error.attr("for",elementID);}else if(error.parents("label[for='"+elementID+"']").length===0){errorID=error.attr("id").replace(/(:|\.|\[|\])/g,"\\$1");if(!describedBy){describedBy=errorID;}else if(!describedBy.match(new RegExp("\\b"+errorID+"\\b"))){describedBy+=" "+errorID;}
1786$(element).attr("aria-describedby",describedBy);group=this.groups[element.name];if(group){$.each(this.groups,function(name,testgroup){if(testgroup===group){$("[name='"+name+"']",this.currentForm).attr("aria-describedby",error.attr("id"));}});}}}
1787if(!message&&this.settings.success){error.text("");if(typeof this.settings.success==="string"){error.addClass(this.settings.success);}else{this.settings.success(error,element);}}
1788this.toShow=this.toShow.add(error);},errorsFor:function(element){var name=this.idOrName(element),describer=$(element).attr("aria-describedby"),selector="label[for='"+name+"'], label[for='"+name+"'] *";if(describer){selector=selector+", #"+describer.replace(/\s+/g,", #");}
1789return this.errors().filter(selector);},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},validationTargetFor:function(element){if(this.checkable(element)){element=this.findByName(element.name);}
1790return $(element).not(this.settings.ignore)[0];},checkable:function(element){return(/radio|checkbox/i).test(element.type);},findByName:function(name){return $(this.currentForm).find("[name='"+name+"']");},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length;}}
1791return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){var val=this.elementValue(element);return!$.validator.methods.required.call(this,val,element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0;}
1792delete this.pending[element.name];if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest===0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){if(className.constructor===String){this.classRuleSettings[className]=rules;}else{$.extend(this.classRuleSettings,className);}},classRules:function(element){var rules={},classes=$(element).attr("class");if(classes){$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});}
1793return rules;},attributeRules:function(element){var rules={},$element=$(element),type=element.getAttribute("type"),method,value;for(method in $.validator.methods){if(method==="required"){value=element.getAttribute(method);if(value===""){value=true;}
1794value=!!value;}else{value=$element.attr(method);}
1795if(/min|max/.test(method)&&(type===null||/number|range|text/.test(type))){value=Number(value);}
1796if(value||value===0){rules[method]=value;}else if(type===method&&type!=="range"){rules[method]=true;}}
1797if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}
1798return rules;},dataRules:function(element){var method,value,rules={},$element=$(element);for(method in $.validator.methods){value=$element.data("rule"+method.charAt(0).toUpperCase()+method.substring(1).toLowerCase());if(value!==undefined){rules[method]=value;}}
1799return rules;},staticRules:function(element){var rules={},validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}
1800return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}
1801if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}
1802if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(["minlength","maxlength"],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(["rangelength","range"],function(){var parts;if(rules[this]){if($.isArray(rules[this])){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}
1802else if(typeof rules[this]==="string"){parts=rules[this].replace(/[\[\]]/g,"").split(/[\s,]+/);rules[this]=[Number(parts[0]),Number(parts[1])];}}});if($.validator.autoCreateRanges){if(rules.min!=null&&rules.max!=null){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}
1803if(rules.minlength!=null&&rules.maxlength!=null){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}
1804return rules;},normalizeRule:function(data){if(typeof data==="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}
1805return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch";}
1806if(element.nodeName.toLowerCase()==="select"){var val=$(element).val();return val&&val.length>0;}
1807if(this.checkable(element)){return this.getLength(value,element)>0;}
1808return $.trim(value).length>0;},email:function(value,element){return this.optional(element)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(value);},url:function(value,element){return this.optional(element)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([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])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value).toString());},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch";}
1809if(/[^0-9 \-]+/.test(value)){return false;}
1810var nCheck=0,nDigit=0,bEven=false,n,cDigit;value=value.replace(/\D/g,"");if(value.length<13||value.length>19){return false;}
1811for(n=value.length-1;n>=0;n--){cDigit=value.charAt(n);nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9;}}
1812nCheck+=nDigit;bEven=!bEven;}
1813return(nCheck%10)===0;},minlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length>=param;},maxlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length<=param;},rangelength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},equalTo:function(value,element,param){var target=$(param);if(this.settings.onfocusout){target.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});}
1814return value===target.val();},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch";}
1815var previous=this.previousValue(element),validator,data;if(!this.settings.messages[element.name]){this.settings.messages[element.name]={};}
1816previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param==="string"&&{url:param}||param;if(previous.old===value){return previous.valid;}
1817previous.old=value;validator=this;
1817this.startRequest(element);data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,context:validator.currentForm,success:function(response){var valid=response===true||response==="true",errors,message,submitted;validator.settings.messages[element.name].remote=previous.originalMessage;if(valid){submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);delete validator.invalid[element.name];validator.showErrors();}else{errors={};message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;validator.invalid[element.name]=true;validator.showErrors(errors);}
1818previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}}});$.format=function deprecated(){throw"$.format has been deprecated. Please use $.validator.format instead.";};var pendingRequests={},ajax;if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
1819pendingRequests[port]=xhr;}});}else{ajax=$.ajax;$.ajax=function(settings){var mode=("mode"in settings?settings:$.ajaxSettings).mode,port=("port"in settings?settings:$.ajaxSettings).port;if(mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
1820pendingRequests[port]=ajax.apply(this,arguments);return pendingRequests[port];}
1821return ajax.apply(this,arguments);};}
1822$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});}});}));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","./jquery.validate"],factory);}else{factory(jQuery);}}(function($){(function(){function stripHtml(value){return value.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"");}
1823$.validator.addMethod("maxWords",function(value,element,params){return this.optional(element)||stripHtml(value).match(/\b\w+\b/g).length<=params;},$.validator.format("Please enter {0} words or less."));$.validator.addMethod("minWords",function(value,element,params){return this.optional(element)||stripHtml(value).match(/\b\w+\b/g).length>=params;},$.validator.format("Please enter at least {0} words."));$.validator.addMethod("rangeWords",function(value,element,params){var valueStripped=stripHtml(value),regex=/\b\w+\b/g;return this.optional(element)||valueStripped.match(regex).length>=params[0]&&valueStripped.match(regex).length<=params[1];},$.validator.format("Please enter between {0} and {1} words."));}());$.validator.addMethod("accept",function(value,element,param){var typeParam=typeof param==="string"?param.replace(/\s/g,"").replace(/,/g,"|"):"image/*",optionalValue=this.optional(element),i,file;if(optionalValue){return optionalValue;}
1824if($(element).attr("type")==="file"){typeParam=typeParam.replace(/\*/g,".*");if(element.files&&element.files.length){for(i=0;i<element.files.length;i++){file=element.files[i];if(!file.type.match(new RegExp(".?("+typeParam+")$","i"))){return false;}}}}
1825return true;},$.validator.format("Please enter a value with a valid mimetype."));$.validator.addMethod("alphanumeric",function(value,element){return this.optional(element)||/^\w+$/i.test(value);},"Letters, numbers, and underscores only please");$.validator.addMethod("bankaccountNL",function(value,element){if(this.optional(element)){return true;}
1826if(!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))){return false;}
1827var account=value.replace(/ /g,""),sum=0,len=account.length,pos,factor,digit;for(pos=0;pos<len;pos++){factor=len-pos;digit=account.substring(pos,pos+1);sum=sum+factor*digit;}
1828return sum%11===0;},"Please specify a valid bank account number");$.validator.addMethod("bankorgiroaccountNL",function(value,element){return this.optional(element)||($.validator.methods.bankaccountNL.call(this,value,element))||($.validator.methods.giroaccountNL.call(this,value,element));},"Please specify a valid bank or giro account number");$.validator.addMethod("bic",function(value,element){return this.optional(element)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(value);},"Please specify a valid BIC code");$.validator.addMethod("cifES",function(value){"use strict";var num=[],controlDigit,sum,i,count,tmp,secondDigit;value=value.toUpperCase();if(!value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")){return false;}
1829for(i=0;i<9;i++){num[i]=parseInt(value.charAt(i),10);}
1830sum=num[2]+num[4]+num[6];for(count=1;count<8;count+=2){tmp=(2*num[count]).toString();secondDigit=tmp.charAt(1);
1830sum+=parseInt(tmp.charAt(0),10)+(secondDigit===""?0:parseInt(secondDigit,10));}
1831if(/^[ABCDEFGHJNPQRSUVW]{1}/.test(value)){sum+="";controlDigit=10-parseInt(sum.charAt(sum.length-1),10);value+=controlDigit;return(num[8].toString()===String.fromCharCode(64+controlDigit)||num[8].toString()===value.charAt(value.length-1));}
1832return false;},"Please specify a valid CIF number.");$.validator.addMethod("creditcardtypes",function(value,element,param){if(/[^0-9\-]+/.test(value)){return false;}
1833value=value.replace(/\D/g,"");var validTypes=0x0000;if(param.mastercard){validTypes|=0x0001;}
1834if(param.visa){validTypes|=0x0002;}
1835if(param.amex){validTypes|=0x0004;}
1836if(param.dinersclub){validTypes|=0x0008;}
1837if(param.enroute){validTypes|=0x0010;}
1838if(param.discover){validTypes|=0x0020;}
1839if(param.jcb){validTypes|=0x0040;}
1840if(param.unknown){validTypes|=0x0080;}
1841if(param.all){validTypes=0x0001|0x0002|0x0004|0x0008|0x0010|0x0020|0x0040|0x0080;}
1842if(validTypes&0x0001&&/^(5[12345])/.test(value)){return value.length===16;}
1843if(validTypes&0x0002&&/^(4)/.test(value)){return value.length===16;}
1844if(validTypes&0x0004&&/^(3[47])/.test(value)){return value.length===15;}
1845if(validTypes&0x0008&&/^(3(0[012345]|[68]))/.test(value)){return value.length===14;}
1846if(validTypes&0x0010&&/^(2(014|149))/.test(value)){return value.length===15;}
1847if(validTypes&0x0020&&/^(6011)/.test(value)){return value.length===16;}
1848if(validTypes&0x0040&&/^(3)/.test(value)){return value.length===16;}
1849if(validTypes&0x0040&&/^(2131|1800)/.test(value)){return value.length===15;}
1850if(validTypes&0x0080){return true;}
1851return false;},"Please enter a valid credit card number.");$.validator.addMethod("currency",function(value,element,param){var isParamString=typeof param==="string",symbol=isParamString?param:param[0],soft=isParamString?true:param[1],regex;symbol=symbol.replace(/,/g,"");symbol=soft?symbol+"]":symbol+"]?";regex="^["+symbol+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";regex=new RegExp(regex);return this.optional(element)||regex.test(value);},"Please specify a valid currency");$.validator.addMethod("dateFA",function(value,element){return this.optional(element)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);},"Please enter a correct date");$.validator.addMethod("dateITA",function(value,element){var check=false,re=/^\d{1,2}\/\d{1,2}\/\d{4}$/,adata,gg,mm,aaaa,xdata;if(re.test(value)){adata=value.split("/");gg=parseInt(adata[0],10);mm=parseInt(adata[1],10);aaaa=parseInt(adata[2],10);xdata=new Date(aaaa,mm-1,gg,12,0,0,0);if((xdata.getUTCFullYear()===aaaa)&&(xdata.getUTCMonth()===mm-1)&&(xdata.getUTCDate()===gg)){check=true;}else{check=false;}}else{check=false;}
1852return this.optional(element)||check;},"Please enter a correct date");$.validator.addMethod("dateNL",function(value,element){return this.optional(element)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);},"Please enter a correct date");$.validator.addMethod("extension",function(value,element,param){param=typeof param==="string"?param.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},$.validator.format("Please enter a value with a valid extension."));$.validator.addMethod("giroaccountNL",function(value,element){return this.optional(element)||/^[0-9]{1,7}$/.test(value);},"Please specify a valid giro account number");$.validator.addMethod("iban",function(value,element){if(this.optional(element)){return true;}
1853var iban=value.replace(/ /g,"").toUpperCase(),ibancheckdigits="",leadingZeroes=true,cRest="",cOperator="",countrycode,ibancheck,charAt,cChar,bbanpattern,bbancountrypatterns,ibanregexp,i,p;if(!(/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(iban))){return false;}
1854countrycode=iban.substring(0,2);bbancountrypatterns={"AL":"\\d{8}[\\dA-Z]{16}","AD":"\\d{8}[\\dA-Z]{12}","AT":"\\d{16}","AZ":"[\\dA-Z]{4}\\d{20}","BE":"\\d{12}","BH":"[A-Z]{4}[\\dA-Z]{14}","BA":"\\d{16}","BR":"\\d{23}[A-Z][\\dA-Z]","BG":"[A-Z]{4}\\d{6}[\\dA-Z]{8}","CR":"\\d{17}","HR":"\\d{17}","CY":"\\d{8}[\\dA-Z]{16}","CZ":"\\d{20}","DK":"\\d{14}","DO":"[A-Z]{4}\\d{20}","EE":"\\d{16}","FO":"\\d{14}","FI":"\\d{14}","FR":"\\d{10}[\\dA-Z]{11}\\d{2}
1854","GE":"[\\dA-Z]{2}\\d{16}","DE":"\\d{18}","GI":"[A-Z]{4}[\\dA-Z]{15}","GR":"\\d{7}[\\dA-Z]{16}","GL":"\\d{14}","GT":"[\\dA-Z]{4}[\\dA-Z]{20}","HU":"\\d{24}","IS":"\\d{22}","IE":"[\\dA-Z]{4}\\d{14}","IL":"\\d{19}","IT":"[A-Z]\\d{10}[\\dA-Z]{12}","KZ":"\\d{3}[\\dA-Z]{13}","KW":"[A-Z]{4}[\\dA-Z]{22}","LV":"[A-Z]{4}[\\dA-Z]{13}","LB":"\\d{4}[\\dA-Z]{20}","LI":"\\d{5}[\\dA-Z]{12}","LT":"\\d{16}","LU":"\\d{3}[\\dA-Z]{13}","MK":"\\d{3}[\\dA-Z]{10}\\d{2}","MT":"[A-Z]{4}\\d{5}[\\dA-Z]{18}","MR":"\\d{23}","MU":"[A-Z]{4}\\d{19}[A-Z]{3}","MC":"\\d{10}[\\dA-Z]{11}\\d{2}","MD":"[\\dA-Z]{2}\\d{18}","ME":"\\d{18}","NL":"[A-Z]{4}\\d{10}","NO":"\\d{11}","PK":"[\\dA-Z]{4}\\d{16}","PS":"[\\dA-Z]{4}\\d{21}","PL":"\\d{24}","PT":"\\d{21}","RO":"[A-Z]{4}[\\dA-Z]{16}","SM":"[A-Z]\\d{10}[\\dA-Z]{12}","SA":"\\d{2}[\\dA-Z]{18}","RS":"\\d{18}","SK":"\\d{20}","SI":"\\d{15}","ES":"\\d{20}","SE":"\\d{20}","CH":"\\d{5}[\\dA-Z]{12}","TN":"\\d{20}","TR":"\\d{5}[\\dA-Z]{17}","AE":"\\d{3}\\d{16}","GB":"[A-Z]{4}\\d{14}","VG":"[\\dA-Z]{4}\\d{16}"};bbanpattern=bbancountrypatterns[countrycode];if(typeof bbanpattern!=="undefined"){ibanregexp=new RegExp("^[A-Z]{2}\\d{2}"+bbanpattern+"$","");if(!(ibanregexp.test(iban))){return false;}}
1855ibancheck=iban.substring(4,iban.length)+iban.substring(0,4);for(i=0;i<ibancheck.length;i++){charAt=ibancheck.charAt(i);if(charAt!=="0"){leadingZeroes=false;}
1856if(!leadingZeroes){ibancheckdigits+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);}}
1857for(p=0;p<ibancheckdigits.length;p++){cChar=ibancheckdigits.charAt(p);cOperator=""+cRest+""+cChar;cRest=cOperator%97;}
1858return cRest===1;},"Please specify a valid IBAN");$.validator.addMethod("integer",function(value,element){return this.optional(element)||/^-?\d+$/.test(value);},"A positive or negative non-decimal number please");$.validator.addMethod("ipv4",function(value,element){return this.optional(element)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);},"Please enter a valid IP v4 address.");$.validator.addMethod("ipv6",function(value,element){return this.optional(element)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);},"Please enter a valid IP v6 address.");$.validator.addMethod("lettersonly",function(value,element){return this.optional(element)||/^[a-z]+$/i.test(value);},"Letters only please");$.validator.addMethod("letterswithbasicpunc",function(value,element){return this.optional(element)||/^[a-z\-.,()'"\s]+$/i.test(value);},"Letters or punctuation only please");$.validator.addMethod("mobileNL",function(value,element){return this.optional(element)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);},"Please specify a valid mobile number");$.validator.addMethod("mobileUK",function(phone_number,element){phone_number=phone_number.replace(/\(|\)|\s+|-/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);},"Please specify a valid mobile number");$.validator.addMethod("nieES",function(value){"use strict";value=value.toUpperCase();if(!value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")){return false;}
1859if(/^[T]{1}/.test(value)){return(value[8]===/^[T]{1}[A-Z0-9]{8}$/.test(value));}
1860if(/^[XYZ]{1}/.test(value)){return(value[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(value.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23));}
1861return false;},"Please specify a valid NIE number.");$.validator.addMethod("nifES",function(value){"use strict";value=value.toUpperCase();if(!value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")){return false;}
1862if(/^[0-9]{8}[A-Z]{1}$/.test(value)){return("TRWAGMYFPDXBNJZSQVHLCKE".charAt(value.substring(8,0)%23)===value.charAt(8));}
1863if(/^[KLM]{1}/.test(value)){return(value[8]===String.fromCharCode(64));}
1864return false;},"Please specify a valid NIF number.");$.validator.addMethod("nowhitespace",function(value,element){return this.optional(element)||/^\S+$/i.test(value);},"No white space please");$.validator.addMethod("pattern",function(value,element,param){if(this.optional(element)){return true;}
1865if(typeof param==="string"){param=new RegExp("^(?:"+param+")$");}
1866return param.test(value);},"Invalid format.");$.validator.addMethod("phoneNL",function(value,element){return this.optional(element)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);},"Please specify a valid phone number.");$.validator.addMethod("phoneUK",function(phone_number,element){phone_number=phone_number.replace(/\(|\)|\s+|-/g,"");return this.optional(element)||phone_number.length>
vendor: 4,449 bytes, lines 1866-1869
18669&&phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);},"Please specify a valid phone number");$.validator.addMethod("phoneUS",function(phone_number,element){phone_number=phone_number.replace(/\s+/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);},"Please specify a valid phone number");$.validator.addMethod("phonesUK",function(phone_number,element){phone_number=phone_number.replace(/\(|\)|\s+|-/g,"");return this.optional(element)||phone_number.length>9&&phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);},"Please specify a valid uk phone number");$.validator.addMethod("postalCodeCA",function(value,element){return this.optional(element)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(value);},"Please specify a valid postal code");$.validator.addMethod("postalcodeBR",function(cep_value,element){return this.optional(element)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(cep_value);},"Informe um CEP válido.");$.validator.addMethod("postalcodeIT",function(value,element){return this.optional(element)||/^\d{5}$/.test(value);},"Please specify a valid postal code");$.validator.addMethod("postalcodeNL",function(value,element){return this.optional(element)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);},"Please specify a valid postal code");$.validator.addMethod("postcodeUK",function(value,element){return this.optional(element)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);},"Please specify a valid UK postcode");$.validator.addMethod("require_from_group",function(value,element,options){var $fields=$(options[1],element.form),$fieldsFirst=$fields.eq(0),validator=$fieldsFirst.data("valid_req_grp")?$fieldsFirst.data("valid_req_grp"):$.extend({},this),isValid=$fields.filter(function(){return validator.elementValue(this);}).length>=options[0];$fieldsFirst.data("valid_req_grp",validator);if(!$(element).data("being_validated")){$fields.data("being_validated",true);$fields.each(function(){validator.element(this);});$fields.data("being_validated",false);}
1867return isValid;},$.validator.format("Please fill at least {0} of these fields."));$.validator.addMethod("skip_or_fill_minimum",function(value,element,options){var $fields=$(options[1],element.form),$fieldsFirst=$fields.eq(0),validator=$fieldsFirst.data("valid_skip")?$fieldsFirst.data("valid_skip"):$.extend({},this),numberFilled=$fields.filter(function(){return validator.elementValue(this);}).length,isValid=numberFilled===0||numberFilled>=options[0];$fieldsFirst.data("valid_skip",validator);if(!$(element).data("being_validated")){$fields.data("being_validated",true);$fields.each(function(){validator.element(this);});$fields.data("being_validated",false);}
1868return isValid;},$.validator.format("Please either skip these fields or fill at least {0} of them."));jQuery.validator.addMethod("stateUS",function(value,element,options){var isDefault=typeof options==="undefined",caseSensitive=(isDefault||typeof options.caseSensitive==="undefined")?false:options.caseSensitive,includeTerritories=(isDefault||typeof options.includeTerritories==="undefined")?false:options.includeTerritories,includeMilitary=(isDefault||typeof options.includeMilitary==="undefined")?false:options.includeMilitary,regex;if(!includeTerritories&&!includeMilitary){regex="^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";}else if(includeTerritories&&includeMilitary){regex="^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";}else if(includeTerritories){regex="^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";}else{regex="^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";}
1869regex=caseSensitive?new RegExp(regex):new RegExp(regex,"i");return this.optional(element)||regex.test(value);},"Please specify a valid state");
1869$.validator.addMethod("strippedminlength",function(value,element,param){return $(value).text().length>=param;},$.validator.format("Please enter at least {0} characters"));$.validator.addMethod("time",function(value,element){return this.optional(element)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(value);},"Please enter a valid time, between 00:00 and 23:59");$.validator.addMethod("time12h",function(value,element){return this.optional(element)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);},"Please enter a valid time in 12-hour am/pm format");$.validator.addMethod("url2",function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([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])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},$.validator.messages.url);$.validator.addMethod("vinUS",function(v){if(v.length!==17){return false;}
1870var LL=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],VL=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],FL=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],rs=0,i,n,d,f,cd,cdv;for(i=0;i<17;i++){f=FL[i];d=v.slice(i,i+1);if(i===8){cdv=d;}
1871if(!isNaN(d)){d*=f;}else{for(n=0;n<LL.length;n++){if(d.toUpperCase()===LL[n]){d=VL[n];d*=f;if(isNaN(cdv)&&n===8){cdv=LL[n];}
1872break;}}}
1873rs+=d;}
1874cd=rs%11;if(cd===10){cd="X";}
1875if(cd===cdv){return true;}
1876return false;}
1876,"The specified vehicle identification number (VIN) is invalid.");$.validator.addMethod("zipcodeUS",function(value,element){return this.optional(element)||/^\d{5}(-\d{4})?$/.test(value);},"The specified US ZIP Code is invalid");$.validator.addMethod("ziprange",function(value,element){return this.optional(element)||/^90[2-5]\d\{2\}-\d{4}$/.test(value);},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");}));"use strict";(function(){if(jQuery&&jQuery.jstree){return;}
1877var is_ie6=false,is_ie7=false,is_ff2=false;(function($){$.vakata={};$.vakata.css={get_css:function(rule_name,delete_flag,sheet){rule_name=rule_name.toLowerCase();var css_rules=sheet.cssRules||sheet.rules,j=0;do{if(css_rules.length&&j>css_rules.length+5){return false;}
1878if(css_rules[j].selectorText&&css_rules[j].selectorText.toLowerCase()==rule_name){if(delete_flag===true){if(sheet.removeRule){sheet.removeRule(j);}
1879if(sheet.deleteRule){sheet.deleteRule(j);}
1880return true;}
1881else{return css_rules[j];}}}
1882while(css_rules[++j]);return false;},add_css:function(rule_name,sheet){if($.jstree.css.get_css(rule_name,false,sheet)){return false;}
1883if(sheet.insertRule){sheet.insertRule(rule_name+' { }',0);}else{sheet.addRule(rule_name,null,0);}
1884return $.vakata.css.get_css(rule_name);},remove_css:function(rule_name,sheet){return $.vakata.css.get_css(rule_name,true,sheet);},add_sheet:function(opts){var tmp=false,is_new=true;if(opts.str){if(opts.title){tmp=$("style[id='"+opts.title+"-stylesheet']")[0];}
1885if(tmp){is_new=false;}
1886else{tmp=document.createElement("style");tmp.setAttribute('type',"text/css");if(opts.title){tmp.setAttribute("id",opts.title+"-stylesheet");}}
1887if(tmp.styleSheet){if(is_new){document.getElementsByTagName("head")[0].appendChild(tmp);tmp.styleSheet.cssText=opts.str;}
1888else{tmp.styleSheet.cssText=tmp.styleSheet.cssText+" "+opts.str;}}
1889else{tmp.appendChild(document.createTextNode(opts.str));document.getElementsByTagName("head")[0].appendChild(tmp);}
1890return tmp.sheet||tmp.styleSheet;}
1891if(opts.url){if(document.createStyleSheet){try{tmp=document.createStyleSheet(opts.url);}catch(e){}}
1892else{tmp=document.createElement('link');tmp.rel='stylesheet';tmp.type='text/css';tmp.media="all";tmp.href=opts.url;document.getElementsByTagName("head")[0].appendChild(tmp);return tmp.styleSheet;}}}};var instances=[],focused_instance=-1,plugins={},prepared_move={};$.fn.jstree=function(settings){var isMethodCall=(typeof settings=='string'),args=Array.prototype.slice.call(arguments,1),returnValue=this;if(isMethodCall){if(settings.substring(0,1)=='_'){return returnValue;}
1893this.each(function(){var instance=instances[$.data(this,"jstree_instance_id")],methodValue=(instance&&$.isFunction(instance[settings]))?instance[settings].apply(instance,args):instance;if(typeof methodValue!=="undefined"&&(settings.indexOf("is_")===0||(methodValue!==true&&methodValue!==false))){returnValue=methodValue;return false;}});}
1894else{this.each(function(){var instance_id=$.data(this,"jstree_instance_id"),a=[],b=settings?$.extend({},true,settings):{},c=$(this),s=false,t=[];a=a.concat(args);if(c.data("jstree")){a.push(c.data("jstree"));}
1895b=a.length?$.extend.apply(null,[true,b].concat(a)):b;if(typeof instance_id!=="undefined"&&instances[instance_id]){instances[instance_id].destroy();}
1896instance_id=parseInt(instances.push({}),10)-1;$.data(this,"jstree_instance_id",instance_id);b.plugins=$.isArray(b.plugins)?b.plugins:$.jstree.defaults.plugins.slice();b.plugins.unshift("core");b.plugins=b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");s=$.extend(true,{},$.jstree.defaults,b);s.plugins=b.plugins;$.each(plugins,function(i,val){if($.inArray(i,s.plugins)===-1){s[i]=null;delete s[i];}
1897else{t.push(i);}});s.plugins=t;instances[instance_id]=new $.jstree._instance(instance_id,$(this).addClass("jstree jstree-"+instance_id),s);$.each(instances[instance_id]._get_settings().plugins,function(i,val){instances[instance_id].data[val]={};});$.each(instances[instance_id]._get_settings().plugins,function(i,val){if(plugins[val]){plugins[val].__init.apply(instances[instance_id]);}});setTimeout(function(){if(instances[instance_id]){instances[instance_id].init();}},0);});}
1898return returnValue;};$.jstree={defaults:{plugins:[]},_focused:function(){return instances[focused_instance]||null;},_reference:function(needle){if(instances[needle]){return instances[needle];}
1899var o=$(needle);if(!o.length&&typeof needle==="string"){o=$("#"+needle);}
1900if(!o.length){return null;}
1901return instances[o.closest(".jstree").data("jstree_instance_id")]||null;},_instance:function(index,container,settings){this.data={core:{}};this.get_settings=function(){return $.extend(true,{},settings);};this._get_settings=function(){return settings;};this.get_index=function(){return index;};this.get_container=function(){return container;};this.get_container_ul=function(){return container.children("ul:eq(0)");};this._set_settings=function(s){settings=$.extend(true,{},settings,s);};},_fn:{},plugin:function(pname,pdata){pdata=$.extend({},{__init:$.noop,__destroy:$.noop,_fn:{},defaults:false},pdata);plugins[pname]=pdata;$.jstree.defaults[pname]=pdata.defaults;$.each(pdata._fn,function(i,val){val.plugin=pname;val.old=$.jstree._fn[i];$.jstree._fn[i]=function(){var rslt,func=val,args=Array.prototype.slice.call(arguments),evnt=new $.Event("before.jstree"),rlbk=false;if(this.data.core.locked===true&&i!=="unlock"&&i!=="is_locked"){return;}
1902do{if(func&&func.plugin&&$.inArray(func.plugin,this._get_settings().plugins)!==-1){break;}
1903func=func.old;}while(func);if(!func){return;}
1904if(i.indexOf("_")===0){rslt=func.apply(this,args);}
1905else{rslt=this.get_container().triggerHandler(evnt,{"func":i,"inst":this,"args":args,"plugin":func.plugin});if(rslt===false){return;}
1906if(typeof rslt!=="undefined"){args=rslt;}
1907rslt=func.apply($.extend({},this,{__callback:function(data){this.get_container().triggerHandler(i+'.jstree',{"inst":this,"args":args,"rslt":data,"rlbk":rlbk});},__rollback:function(){rlbk=this.get_rollback();return rlbk;},__call_old:function(replace_arguments){return func.old.apply(this,(replace_arguments?Array.prototype.slice.call(arguments,1):args));}}),args);}
1908return rslt;};$.jstree._fn[i].old=val.old;$.jstree._fn[i].plugin=pname;});},rollback:function(rb){if(rb){if(!$.isArray(rb)){rb=[rb];}
1909$.each(rb,function(i,val){instances[val.i].set_rollback(val.h,val.d);});}}};$.jstree._fn=$.jstree._instance.prototype={};$(function(){var u=navigator.userAgent.toLowerCase(),v=(u.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],css_string=''+'.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } '+'.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } '+'.jstree-rtl li { margin-left:0; margin-right:18px; } '+'.jstree > ul > li { margin-left:0px; } '+'.jstree-rtl > ul > li { margin-right:0px; } '+'.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } '+'.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } '+'.jstree a:focus { outline: none; } '+'.jstree a > ins { height:16px; width:16px; } '+'.jstree a > .jstree-icon { margin-right:3px; } '+'.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } '+'li.jstree-open > ul { display:block; } '+'li.jstree-closed > ul { display:none; } ';if(/msie/.test(u)&&parseInt(v,10)==6){is_ie6=true;try{document.execCommand("BackgroundImageCache",false,true);}catch(err){}
1910css_string+=''+'.jstree li { height:18px; margin-left:0; margin-right:0; } '+'.jstree li li { margin-left:18px; } '+'.jstree-rtl li li { margin-left:0px; margin-right:18px; } '+'li.jstree-open ul { display:block; } '+'li.jstree-closed ul { display:none !important; } '+'.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } '+'.jstree li a ins { height:16px; width:16px; margin-right:3px; } '+'.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } ';}
1911if(/msie/.test(u)&&parseInt(v,10)==7){is_ie7=true;css_string+='.jstree li a { border-width:0 !important; padding:0px 2px !important; } ';}
1912if(!/compatible/.test(u)&&/mozilla/.test(u)&&parseFloat(v,10)<1.9){is_ff2=true;css_string+=''+'.jstree ins { display:-moz-inline-box; } '+'.jstree li { line-height:12px; } '+'.jstree a { display:-moz-inline-box; } '+'.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } ';}
1913$.vakata.css.add_sheet({str:css_string,title:"jstree"});});$.jstree.plugin("core",{__init:function(){this.data.core.locked=false;this.data.core.to_open=this.get_settings().core.initially_open;this.data.core.to_load=this.get_settings().core.initially_load;},defaults:{html_titles:false,animation:500,initially_open:[],initially_load:[],open_parents:true,notify_plugins:true,rtl:false,load_open:false,strings:{loading:"Loading ...",new_node:"New node",multiple_selection:"Multiple selection"}},_fn:{init:function(){this.set_focus();if(this._get_settings().core.rtl){this.get_container().addClass("jstree-rtl").css("direction","rtl");}
1914this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins>&#160;</ins><a class='jstree-loading' href='#'><ins class='jstree-icon'>&#160;</ins>"+this._get_string("loading")+"</a></li></ul>");this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18;this.get_container().delegate("li > ins","click.jstree",$.proxy(function(event){var trgt=$(event.target);this.toggle_node(trgt);},this)).bind("mousedown.jstree",$.proxy(function(){this.set_focus();},this)).bind("dblclick.jstree",function(event){var sel;if(document.selection&&document.selection.empty){document.selection.empty();}
1915else{if(window.getSelection){sel=window.getSelection();try{sel.removeAllRanges();sel.collapse();}catch(err){}}}});if(this._get_settings().core.notify_plugins){this.get_container().bind("load_node.jstree",$.proxy(function(e,data){var o=this._get_node(data.rslt.obj),t=this;if(o===-1){o=this.get_container_ul();}
1916if(!o.length){return;}
1917o.find("li").each(function(){var th=$(this);if(th.data("jstree")){$.each(th.data("jstree"),function(plugin,values){if(t.data[plugin]&&$.isFunction(t["_"+plugin+"_notify"])){t["_"+plugin+"_notify"].
1917call(t,th,values);}});}});},this));}
1918if(this._get_settings().core.load_open){this.get_container().bind("load_node.jstree",$.proxy(function(e,data){var o=this._get_node(data.rslt.obj),t=this;if(o===-1){o=this.get_container_ul();}
1919if(!o.length){return;}
1920o.find("li.jstree-open:not(:has(ul))").each(function(){t.load_node(this,$.noop,$.noop);});},this));}
1921this.__callback();this.load_node(-1,function(){this.loaded();this.reload_nodes();});},destroy:function(){var i,n=this.get_index(),s=this._get_settings(),_this=this;$.each(s.plugins,function(i,val){try{plugins[val].__destroy.apply(_this);}catch(err){}});this.__callback();if(this.is_focused()){for(i in instances){if(instances.hasOwnProperty(i)&&i!=n){instances[i].set_focus();break;}}}
1922if(n===focused_instance){focused_instance=-1;}
1923this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree_instance_id").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,'');});$(document).unbind(".jstree-"+n).undelegate(".jstree-"+n);instances[n]=null;delete instances[n];},_core_notify:function(n,data){if(data.opened){this.open_node(n,false,true);}},lock:function(){this.data.core.locked=true;this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7");this.__callback({});},unlock:function(){this.data.core.locked=false;this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");this.__callback({});},is_locked:function(){return this.data.core.locked;},save_opened:function(){var _this=this;this.data.core.to_open=[];this.get_container_ul().find("li.jstree-open").each(function(){if(this.id){_this.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"));}});this.__callback(_this.data.core.to_open);},save_loaded:function(){},reload_nodes:function(is_callback){var _this=this,done=true,current=[],remaining=[];if(!is_callback){this.data.core.reopen=false;this.data.core.refreshing=true;this.data.core.to_open=$.map($.makeArray(this.data.core.to_open),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.data.core.to_load=$.map($.makeArray(this.data.core.to_load),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});if(this.data.core.to_open.length){this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open);}}
1924if(this.data.core.to_load.length){$.each(this.data.core.to_load,function(i,val){if(val=="#"){return true;}
1925if($(val).length){current.push(val);}
1926else{remaining.push(val);}});if(current.length){this.data.core.to_load=remaining;$.each(current,function(i,val){if(!_this._is_loaded(val)){_this.load_node(val,function(){_this.reload_nodes(true);},function(){_this.reload_nodes(true);});done=false;}});}}
1927if(this.data.core.to_open.length){$.each(this.data.core.to_open,function(i,val){_this.open_node(val,false,true);});}
1928if(done){if(this.data.core.reopen){clearTimeout(this.data.core.reopen);}
1929this.data.core.reopen=setTimeout(function(){_this.__callback({},_this);},50);this.data.core.refreshing=false;this.reopen();}},reopen:function(){var _this=this;if(this.data.core.to_open.length){$.each(this.data.core.to_open,function(i,val){_this.open_node(val,false,true);});}
1930this.__callback({});},refresh:function(obj){var _this=this;this.save_opened();if(!obj){obj=-1;}
1931obj=this._get_node(obj);if(!obj){obj=-1;}
1932if(obj!==-1){obj.children("UL").remove();}
1933else{this.get_container_ul().empty();}
1934this.load_node(obj,function(){_this.__callback({"obj":obj});_this.reload_nodes();});},loaded:function(){this.__callback();},set_focus:function(){if(this.is_focused()){return;}
1935var f=$.jstree._focused();if(f){f.unset_focus();}
1936this.get_container().addClass("jstree-focused");focused_instance=this.get_index();this.__callback();},is_focused:function(){return focused_instance==this.get_index();},unset_focus:function(){if(this.is_focused()){this.get_container().removeClass("jstree-focused");focused_instance=-1;}
1937this.__callback();},_get_node:function(obj){var $obj=$(obj,this.get_container());if($obj.is(".jstree")||obj==-1){return-1;}
1938$obj=$obj.closest("li",this.get_container());return $obj.length?$obj:false;}
1938,_get_next:function(obj,strict){obj=this._get_node(obj);if(obj===-1){return this.get_container().find("> ul > li:first-child");}
1939if(!obj.length){return false;}
1940if(strict){return(obj.nextAll("li").size()>0)?obj.nextAll("li:eq(0)"):false;}
1941if(obj.hasClass("jstree-open")){return obj.find("li:eq(0)");}
1942else if(obj.nextAll("li").size()>0){return obj.nextAll("li:eq(0)");}
1943else{return obj.parentsUntil(".jstree","li").next("li").eq(0);}},_get_prev:function(obj,strict){obj=this._get_node(obj);if(obj===-1){return this.get_container().find("> ul > li:last-child");}
1944if(!obj.length){return false;}
1945if(strict){return(obj.prevAll("li").length>0)?obj.prevAll("li:eq(0)"):false;}
1946if(obj.prev("li").length){obj=obj.prev("li").eq(0);while(obj.hasClass("jstree-open")){obj=obj.children("ul:eq(0)").children("li:last");}
1947return obj;}
1948else{var o=obj.parentsUntil(".jstree","li:eq(0)");return o.length?o:false;}},_get_parent:function(obj){obj=this._get_node(obj);if(obj==-1||!obj.length){return false;}
1949var o=obj.parentsUntil(".jstree","li:eq(0)");return o.length?o:-1;},_get_children:function(obj){obj=this._get_node(obj);if(obj===-1){return this.get_container().children("ul:eq(0)").children("li");}
1950if(!obj.length){return false;}
1951return obj.children("ul:eq(0)").children("li");},get_path:function(obj,id_mode){var p=[],_this=this;obj=this._get_node(obj);if(obj===-1||!obj||!obj.length){return false;}
1952obj.parentsUntil(".jstree","li").each(function(){p.push(id_mode?this.id:_this.get_text(this));});p.reverse();p.push(id_mode?obj.attr("id"):this.get_text(obj));return p;},_get_string:function(key){return this._get_settings().core.strings[key]||key;},is_open:function(obj){obj=this._get_node(obj);return obj&&obj!==-1&&obj.hasClass("jstree-open");},is_closed:function(obj){obj=this._get_node(obj);return obj&&obj!==-1&&obj.hasClass("jstree-closed");},is_leaf:function(obj){obj=this._get_node(obj);return obj&&obj!==-1&&obj.hasClass("jstree-leaf");},correct_state:function(obj){obj=this._get_node(obj);if(!obj||obj===-1){return false;}
1953obj.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove();this.__callback({"obj":obj});},open_node:function(obj,callback,skip_animation){obj=this._get_node(obj);if(!obj.length){return false;}
1954if(!obj.hasClass("jstree-closed")){if(callback){callback.call();}
1955return false;}
1956var s=skip_animation||is_ie6?0:this._get_settings().core.animation,t=this;if(!this._is_loaded(obj)){obj.children("a").addClass("jstree-loading");this.load_node(obj,function(){t.open_node(obj,callback,skip_animation);},callback);}
1957else{if(this._get_settings().core.open_parents){obj.parentsUntil(".jstree",".jstree-closed").each(function(){t.open_node(this,false,true);});}
1958if(s){obj.children("ul").css("display","none");}
1959obj.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");if(s){obj.children("ul").stop(true,true).slideDown(s,function(){this.style.display="";t.after_open(obj);});}
1960else{t.after_open(obj);}
1961this.__callback({"obj":obj});if(callback){callback.call();}}},after_open:function(obj){this.__callback({"obj":obj});},close_node:function(obj,skip_animation){obj=this._get_node(obj);var s=skip_animation||is_ie6?0:this._get_settings().core.animation,t=this;if(!obj.length||!obj.hasClass("jstree-open")){return false;}
1962if(s){obj.children("ul").attr("style","display:block !important");}
1963obj.removeClass("jstree-open").addClass("jstree-closed");if(s){obj.children("ul").stop(true,true).slideUp(s,function(){this.style.display="";t.after_close(obj);});}
1964else{t.after_close(obj);}
1965this.__callback({"obj":obj});},after_close:function(obj){this.__callback({"obj":obj});},toggle_node:function(obj){obj=this._get_node(obj);if(obj.hasClass("jstree-closed")){return this.open_node(obj);}
1966if(obj.hasClass("jstree-open")){return this.close_node(obj);}},open_all:function(obj,do_animation,original_obj){obj=obj?this._get_node(obj):-1;if(!obj||obj===-1){obj=this.get_container_ul();}
1967if(original_obj){obj=obj.find("li.jstree-closed");}
1968else{original_obj=obj;if(obj.is(".jstree-closed")){obj=obj.find("li.jstree-closed").addBack();}
1969else{obj=obj.find("li.jstree-closed");}}
1970var _this=this;obj.each(function(){var __this=this;if(!_this._is_loaded(this)){_this.open_node(this,function(){_this.open_all(__this,do_animation,original_obj);}
1970,!do_animation);}
1971else{_this.open_node(this,false,!do_animation);}});if(original_obj.find('li.jstree-closed').length===0){this.__callback({"obj":original_obj});}},close_all:function(obj,do_animation){var _this=this;obj=obj?this._get_node(obj):this.get_container();if(!obj||obj===-1){obj=this.get_container_ul();}
1972obj.find("li.jstree-open").addBack().each(function(){_this.close_node(this,!do_animation);});this.__callback({"obj":obj});},clean_node:function(obj){obj=obj&&obj!=-1?$(obj):this.get_container_ul();obj=obj.is("li")?obj.find("li").addBack():obj.find("li");obj.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");obj.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();this.__callback({"obj":obj});},get_rollback:function(){this.__callback();return{i:this.get_index(),h:this.get_container().children("ul").clone(true),d:this.data};},set_rollback:function(html,data){this.get_container().empty().append(html);this.data=data;this.__callback();},load_node:function(obj,s_call,e_call){this.__callback({"obj":obj});},_is_loaded:function(obj){return true;},create_node:function(obj,position,js,callback,is_loaded){obj=this._get_node(obj);position=typeof position==="undefined"?"last":position;var d=$("<li />"),s=this._get_settings().core,tmp;if(obj!==-1&&!obj.length){return false;}
1973if(!is_loaded&&!this._is_loaded(obj)){this.load_node(obj,function(){this.create_node(obj,position,js,callback,true);});return false;}
1974this.__rollback();if(typeof js==="string"){js={"data":js};}
1975if(!js){js={};}
1976if(js.attr){d.attr(js.attr);}
1977if(js.metadata){d.data(js.metadata);}
1978if(js.state){d.addClass("jstree-"+js.state);}
1979if(!js.data){js.data=this._get_string("new_node");}
1980if(!$.isArray(js.data)){tmp=js.data;js.data=[];js.data.push(tmp);}
1981$.each(js.data,function(i,m){tmp=$("<a />");if($.isFunction(m)){m=m.call(this,js);}
1982if(typeof m=="string"){tmp.attr('href','#')[s.html_titles?"html":"text"](m);}
1983else{if(!m.attr){m.attr={};}
1984if(!m.attr.href){m.attr.href='#';}
1985tmp.attr(m.attr)[s.html_titles?"html":"text"](m.title);if(m.language){tmp.addClass(m.language);}}
1986tmp.prepend("<ins class='jstree-icon'>&#160;</ins>");if(!m.icon&&js.icon){m.icon=js.icon;}
1987if(m.icon){if(m.icon.indexOf("/")===-1){tmp.children("ins").addClass(m.icon);}
1988else{tmp.children("ins").css("background","url('"+m.icon+"') center center no-repeat");}}
1989d.append(tmp);});d.prepend("<ins class='jstree-icon'>&#160;</ins>");if(obj===-1){obj=this.get_container();if(position==="before"){position="first";}
1990if(position==="after"){position="last";}}
1991switch(position){case"before":obj.before(d);tmp=this._get_parent(obj);break;case"after":obj.after(d);tmp=this._get_parent(obj);break;case"inside":case"first":if(!obj.children("ul").length){obj.append("<ul />");}
1992obj.children("ul").prepend(d);tmp=obj;break;case"last":if(!obj.children("ul").length){obj.append("<ul />");}
1993obj.children("ul").append(d);tmp=obj;break;default:if(!obj.children("ul").length){obj.append("<ul />");}
1994if(!position){position=0;}
1995tmp=obj.children("ul").children("li").eq(position);if(tmp.length){tmp.before(d);}
1996else{obj.children("ul").append(d);}
1997tmp=obj;break;}
1998if(tmp===-1||tmp.get(0)===this.get_container().get(0)){tmp=-1;}
1999this.clean_node(tmp);this.__callback({"obj":d,"parent":tmp});if(callback){callback.call(this,d);}
2000return d;},get_text:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
2001var s=this._get_settings().core.html_titles;obj=obj.children("a:eq(0)");if(s){obj=obj.clone();obj.children("INS").remove();return obj.html();}
2002else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];return obj.nodeValue;}},set_text:function(obj,val){obj=this._get_node(obj);if(!obj.length){return false;}
2003obj=obj.children("a:eq(0)");if(this._get_settings().core.html_titles){var tmp=obj.children("INS").clone();obj.html(val).prepend(tmp);this.__callback({"obj":obj,"name":val});return true;}
2004else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];this.__callback({"obj":obj,"name":val});return(obj.nodeValue=val);}},rename_node:function(obj,val){obj=this._get_node(obj);this.__rollback();if(obj&&obj.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))){this.__callback({"obj":obj,"name":val});}},delete_node:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
2005this.__rollback();var p=this._get_parent(obj),prev=$([]),t=this;obj.each(function(){prev=prev.add(t._get_prev(this));});obj=obj.detach();if(p!==-1&&p.find("> ul > li").length===0){p.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");}
2006this.clean_node(p);this.__callback({"obj":obj,"prev":prev,"parent":p});return obj;},prepare_move:function(o,r,pos,cb,is_cb){var p={};p.ot=$.jstree._reference(o)||this;p.o=p.ot._get_node(o);p.r=r===-1?-1:this._get_node(r);p.p=(typeof pos==="undefined"||pos===false)?"last":pos;if(!is_cb&&prepared_move.o&&prepared_move.o[0]===p.o[0]&&prepared_move.r[0]===p.r[0]&&prepared_move.p===p.p){this.__callback(prepared_move);if(cb){cb.call(this,prepared_move);}
2007return;}
2008p.ot=$.jstree._reference(p.o)||this;p.rt=$.jstree._reference(p.r)||this;if(p.r===-1||!p.r){p.cr=-1;switch(p.p){case"first":case"before":case"inside":p.cp=0;break;case"after":case"last":p.cp=p.rt.get_container().find(" > ul > li").length;break;default:p.cp=p.p;break;}}
2009else{if(!/^(before|after)$/.test(p.p)&&!this._is_loaded(p.r)){return this.load_node(p.r,function(){this.prepare_move(o,r,pos,cb,true);});}
2010switch(p.p){case"before":p.cp=p.r.index();p.cr=p.rt._get_parent(p.r);break;case"after":p.cp=p.r.index()+1;p.cr=p.rt._get_parent(p.r);break;case"inside":case"first":p.cp=0;p.cr=p.r;break;case"last":p.cp=p.r.find(" > ul > li").length;p.cr=p.r;break;default:p.cp=p.p;p.cr=p.r;break;}}
2011p.np=p.cr==-1?p.rt.get_container():p.cr;p.op=p.ot._get_parent(p.o);p.cop=p.o.index();if(p.op===-1){p.op=p.ot?p.ot.get_container():this.get_container();}
2012if(!/^(before|after)$/.test(p.p)&&p.op&&p.np&&p.op[0]===p.np[0]&&p.o.index()<p.cp){p.cp++;}
2013p.or=p.np.find(" > ul > li:nth-child("+(p.cp+1)+")");prepared_move=p;this.__callback(prepared_move);if(cb){cb.call(this,prepared_move);}},check_move:function(){var obj=prepared_move,ret=true,r=obj.r===-1?this.get_container():obj.r;if(!obj||!obj.o||obj.or[0]===obj.o[0]){return false;}
2014if(!obj.cy){if(obj.op&&obj.np&&obj.op[0]===obj.np[0]&&obj.cp-1===obj.o.index()){return false;}
2015obj.o.each(function(){if(r.parentsUntil(".jstree","li").addBack().index(this)!==-1){ret=false;return false;}});}
2016return ret;},move_node:function(obj,ref,position,is_copy,is_prepared,skip_check){if(!is_prepared){return this.prepare_move(obj,ref,position,function(p){this.move_node(p,false,false,is_copy,true,skip_check);});}
2017if(is_copy){prepared_move.cy=true;}
2018if(!skip_check&&!this.check_move()){return false;}
2019this.__rollback();var o=false;if(is_copy){o=obj.o.clone(true);
2019o.find("*[id]").addBack().each(function(){if(this.id){this.id="copy_"+this.id;}});}
2020else{o=obj.o;}
2021if(obj.or.length){obj.or.before(o);}
2022else{if(!obj.np.children("ul").length){$("<ul />").appendTo(obj.np);}
2023obj.np.children("ul:eq(0)").append(o);}
2024try{obj.ot.clean_node(obj.op);obj.rt.clean_node(obj.np);if(!obj.op.find("> ul > li").length){obj.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove();}}catch(e){}
2025if(is_copy){prepared_move.cy=true;prepared_move.oc=o;}
2026this.__callback(prepared_move);return prepared_move;},_get_move:function(){return prepared_move;}}});})(jQuery);(function($){var scrollbar_width,e1,e2;$(function(){if(/msie/.test(navigator.userAgent.toLowerCase())){e1=$('<textarea cols="10" rows="2"></textarea>').css({position:'absolute',top:-1000,left:0}).appendTo('body');e2=$('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:'absolute',top:-1000,left:0}).appendTo('body');scrollbar_width=e1.width()-e2.width();e1.add(e2).remove();}
2027else{e1=$('<div />').css({width:100,height:100,overflow:'auto',position:'absolute',top:-1000,left:0}).prependTo('body').append('<div />').find('div').css({width:'100%',height:200});scrollbar_width=100-e1.width();e1.parent().remove();}});$.jstree.plugin("ui",{__init:function(){this.data.ui.selected=$();this.data.ui.last_selected=false;this.data.ui.hovered=null;this.data.ui.to_select=this.get_settings().ui.initially_select;this.get_container().delegate("a","click.jstree",$.proxy(function(event){event.preventDefault();event.currentTarget.blur();if(!$(event.currentTarget).hasClass("jstree-loading")){this.select_node(event.currentTarget,true,event);}},this)).delegate("a","mouseenter.jstree",$.proxy(function(event){if(!$(event.currentTarget).hasClass("jstree-loading")){this.hover_node(event.target);}},this)).delegate("a","mouseleave.jstree",$.proxy(function(event){if(!$(event.currentTarget).hasClass("jstree-loading")){this.dehover_node(event.target);}},this)).bind("reopen.jstree",$.proxy(function(){this.reselect();},this)).bind("get_rollback.jstree",$.proxy(function(){this.dehover_node();this.save_selected();},this)).bind("set_rollback.jstree",$.proxy(function(){this.reselect();},this)).bind("close_node.jstree",$.proxy(function(event,data){var s=this._get_settings().ui,obj=this._get_node(data.rslt.obj),clk=(obj&&obj.length)?obj.children("ul").find("a.jstree-clicked"):$(),_this=this;if(s.selected_parent_close===false||!clk.length){return;}
2028clk.each(function(){_this.deselect_node(this);if(s.selected_parent_close==="select_parent"){_this.select_node(obj);}});},this)).bind("delete_node.jstree",$.proxy(function(event,data){var s=this._get_settings().ui.select_prev_on_delete,obj=this._get_node(data.rslt.obj),clk=(obj&&obj.length)?obj.find("a.jstree-clicked"):[],_this=this;clk.each(function(){_this.deselect_node(this);});if(s&&clk.length){data.rslt.prev.each(function(){if(this.parentNode){_this.select_node(this);return false;}});}},this)).bind("move_node.jstree",$.proxy(function(event,data){if(data.rslt.cy){data.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked");}},this));},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:true,select_prev_on_delete:true,disable_selecting_children:false,initially_select:[]},_fn:{_get_node:function(obj,allow_multiple){if(typeof obj==="undefined"||obj===null){return allow_multiple?this.data.ui.selected:this.data.ui.last_selected;}
2029var $obj=$(obj,this.get_container());if($obj.is(".jstree")||obj==-1){return-1;}
2030$obj=$obj.closest("li",this.get_container());return $obj.length?$obj:false;},_ui_notify:function(n,data){if(data.selected){this.select_node(n,false);}},save_selected:function(){var _this=this;this.data.ui.to_select=[];this.data.ui.selected.each(function(){if(this.id){_this.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"));}});this.__callback(this.data.ui.to_select);},reselect:function(){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});$.each(s,function(i,val){if(val&&val!=="#"){_this.select_node(val);}});this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode;});this.__callback();},refresh:function(obj){this.save_selected();return this.__call_old();},hover_node:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
2031if(!obj.hasClass("jstree-hovered")){this.dehover_node();}
2032this.data.ui.hovered=obj.children("a").addClass("jstree-hovered").parent();this._fix_scroll(obj);this.__callback({"obj":obj});},dehover_node:function(){var obj=this.data.ui.hovered,p;
2032if(!obj||!obj.length){return false;}
2033p=obj.children("a").removeClass("jstree-hovered").parent();if(this.data.ui.hovered[0]===p[0]){this.data.ui.hovered=null;}
2034this.__callback({"obj":obj});},select_node:function(obj,check,e){obj=this._get_node(obj);if(obj==-1||!obj||!obj.length){return false;}
2035var s=this._get_settings().ui,is_multiple=(s.select_multiple_modifier=="on"||(s.select_multiple_modifier!==false&&e&&e[s.select_multiple_modifier+"Key"])),is_range=(s.select_range_modifier!==false&&e&&e[s.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==obj[0]&&this.data.ui.last_selected.parent()[0]===obj.parent()[0]),is_selected=this.is_selected(obj),proceed=true,t=this;if(check){if(s.disable_selecting_children&&is_multiple&&((obj.parentsUntil(".jstree","li").children("a.jstree-clicked").length)||(obj.children("ul").find("a.jstree-clicked:eq(0)").length))){return false;}
2036proceed=false;switch(!0){case(is_range):this.data.ui.last_selected.addClass("jstree-last-selected");obj=obj[obj.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").addBack();if(s.select_limit==-1||obj.length<s.select_limit){this.data.ui.last_selected.removeClass("jstree-last-selected");this.data.ui.selected.each(function(){if(this!==t.data.ui.last_selected[0]){t.deselect_node(this);}});is_selected=false;proceed=true;}
2037else{proceed=false;}
2038break;case(is_selected&&!is_multiple):this.deselect_all();is_selected=false;proceed=true;break;case(!is_selected&&!is_multiple):if(s.select_limit==-1||s.select_limit>0){this.deselect_all();proceed=true;}
2039break;case(is_selected&&is_multiple):this.deselect_node(obj);break;case(!is_selected&&is_multiple):if(s.select_limit==-1||this.data.ui.selected.length+1<=s.select_limit){proceed=true;}
2040break;}}
2041if(proceed&&!is_selected){if(!is_range){this.data.ui.last_selected=obj;}
2042obj.children("a").addClass("jstree-clicked");if(s.selected_parent_open){obj.parents(".jstree-closed").each(function(){t.open_node(this,false,true);});}
2043this.data.ui.selected=this.data.ui.selected.add(obj);this._fix_scroll(obj.eq(0));this.__callback({"obj":obj,"e":e});}},_fix_scroll:function(obj){var c=this.get_container()[0],t;if(c.scrollHeight>c.offsetHeight){obj=this._get_node(obj);if(!obj||obj===-1||!obj.length||!obj.is(":visible")){return;}
2044t=obj.offset().top-this.get_container().offset().top;if(t<0){c.scrollTop=c.scrollTop+t-1;}
2045if(t+this.data.core.li_height+(c.scrollWidth>c.offsetWidth?scrollbar_width:0)>c.offsetHeight){c.scrollTop=c.scrollTop+(t-c.offsetHeight+this.data.core.li_height+1+(c.scrollWidth>c.offsetWidth?scrollbar_width:0));}}},deselect_node:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
2046if(this.is_selected(obj)){obj.children("a").removeClass("jstree-clicked");this.data.ui.selected=this.data.ui.selected.not(obj);if(this.data.ui.last_selected.get(0)===obj.get(0)){this.data.ui.last_selected=this.data.ui.selected.eq(0);}
2047this.__callback({"obj":obj});}},toggle_select:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
2048if(this.is_selected(obj)){this.deselect_node(obj);}
2049else{this.select_node(obj);}},is_selected:function(obj){return this.data.ui.selected.index(this._get_node(obj))>=0;},get_selected:function(context){return context?$(context).find("a.jstree-clicked").parent():this.data.ui.selected;},deselect_all:function(context){var ret=context?$(context).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();ret.children("a.jstree-clicked").removeClass("jstree-clicked");this.data.ui.selected=$([]);this.data.ui.last_selected=false;this.__callback({"obj":ret});}}});$.jstree.defaults.plugins.push("ui");})(jQuery);(function($){$.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",$.proxy(function(e,data){if(this._get_settings().crrm.move.open_onmove){var t=this;data.rslt.np.parentsUntil(".jstree").addBack().filter(".jstree-closed").each(function(){t.open_node(this,false,true);});}},this));},defaults:{input_width_limit:200,move:{always_copy:false,open_onmove:true,default_position:"last",check_move:function(m){return true;}}},_fn:{_show_input:function(obj,callback){obj=this._get_node(obj);var rtl=this._get_settings().core.rtl,w=this._get_settings().crrm.input_width_limit,w1=obj.children("ins").width(),w2=obj.find("> a:visible > ins").width()*obj.find("> a:visible >
2049 ins").length,t=this.get_text(obj),h1=$("<div />",{css:{"position":"absolute","top":"-200px","left":(rtl?"0px":"-1000px"),"visibility":"hidden"}}).appendTo("body"),h2=obj.css("position","relative").append($("<input />",{"value":t,"class":"jstree-rename-input","css":{"padding":"0","border":"1px solid silver","position":"absolute","left":(rtl?"auto":(w1+w2+4)+"px"),"right":(rtl?(w1+w2+4)+"px":"auto"),"top":"0px","height":(this.data.core.li_height-2)+"px","lineHeight":(this.data.core.li_height-2)+"px","width":"150px"},"blur":$.proxy(function(){var i=obj.children(".jstree-rename-input"),v=i.val();if(v===""){v=t;}
2050h1.remove();i.remove();this.set_text(obj,t);this.rename_node(obj,v);callback.call(this,obj,v,t);obj.css("position","");},this),"keyup":function(event){var key=event.keyCode||event.which;if(key==27){this.value=t;this.blur();return;}
2051else if(key==13){this.blur();return;}
2052else{h2.width(Math.min(h1.text("pW"+this.value).width(),w));}},"keypress":function(event){var key=event.keyCode||event.which;if(key==13){return false;}}})).children(".jstree-rename-input");this.set_text(obj,"");h1.css({fontFamily:h2.css('fontFamily')||'',fontSize:h2.css('fontSize')||'',fontWeight:h2.css('fontWeight')||'',fontStyle:h2.css('fontStyle')||'',fontStretch:h2.css('fontStretch')||'',fontVariant:h2.css('fontVariant')||'',letterSpacing:h2.css('letterSpacing')||'',wordSpacing:h2.css('wordSpacing')||''});h2.width(Math.min(h1.text("pW"+h2[0].value).width(),w))[0].select();},rename:function(obj){obj=this._get_node(obj);this.__rollback();var f=this.__callback;this._show_input(obj,function(obj,new_name,old_name){f.call(this,{"obj":obj,"new_name":new_name,"old_name":old_name});});},create:function(obj,position,js,callback,skip_rename){var t,_this=this;obj=this._get_node(obj);if(!obj){obj=-1;}
2053this.__rollback();t=this.create_node(obj,position,js,function(t){var p=this._get_parent(t),pos=$(t).index();if(callback){callback.call(this,t);}
2054if(p.length&&p.hasClass("jstree-closed")){this.open_node(p,false,true);}
2055if(!skip_rename){this._show_input(t,function(obj,new_name,old_name){_this.__callback({"obj":obj,"name":new_name,"parent":p,"position":pos});});}
2056else{_this.__callback({"obj":t,"name":this.get_text(t),"parent":p,"position":pos});}});return t;},remove:function(obj){obj=this._get_node(obj,true);var p=this._get_parent(obj),prev=this._get_prev(obj);this.__rollback();obj=this.delete_node(obj);if(obj!==false){this.__callback({"obj":obj,"prev":prev,"parent":p});}},check_move:function(){if(!this.__call_old()){return false;}
2057var s=this._get_settings().crrm.move;if(!s.check_move.call(this,this._get_move())){return false;}
2058return true;},move_node:function(obj,ref,position,is_copy,is_prepared,skip_check){var s=this._get_settings().crrm.move;if(!is_prepared){if(typeof position==="undefined"){position=s.default_position;}
2059if(position==="inside"&&!s.default_position.match(/^(before|after)$/)){position=s.default_position;}
2060return this.__call_old(true,obj,ref,position,is_copy,false,skip_check);}
2061if(s.always_copy===true||(s.always_copy==="multitree"&&obj.rt.get_index()!==obj.ot.get_index())){is_copy=true;}
2062this.__call_old(true,obj,ref,position,is_copy,true,skip_check);},cut:function(obj){obj=this._get_node(obj,true);if(!obj||!obj.length){return false;}
2063this.data.crrm.cp_nodes=false;this.data.crrm.ct_nodes=obj;this.__callback({"obj":obj});},copy:function(obj){obj=this._get_node(obj,true);if(!obj||!obj.length){return false;}
2064this.data.crrm.ct_nodes=false;this.data.crrm.cp_nodes=obj;this.__callback({"obj":obj});},paste:function(obj){obj=this._get_node(obj);if(!obj||!obj.length){return false;}
2065var nodes=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;if(!this.data.crrm.ct_nodes&&!this.data.crrm.cp_nodes){return false;}
2066if(this.data.crrm.ct_nodes){this.move_node(this.data.crrm.ct_nodes,obj);this.data.crrm.ct_nodes=false;}
2067if(this.data.crrm.cp_nodes){this.move_node(this.data.crrm.cp_nodes,obj,false,true);}
2068this.__callback({"obj":obj,"nodes":nodes});}}});})(jQuery);(function($){var themes_loaded=[];$.jstree._themes=false;$.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",$.proxy(function(){var s=this._get_settings().themes;this.data.themes.dots=s.dots;this.data.themes.icons=s.icons;this.set_theme(s.theme,s.url);},this)).bind("loaded.jstree",$.proxy(function(){if(!this.data.themes.dots){this.hide_dots();}
2069else{this.show_dots();}
2070if(!this.data.themes.icons){this.hide_icons();}
2071else{this.show_icons();}},this));},defaults:{theme:"default",url:false,dots:true,icons:true},_fn:{set_theme:function(theme_name,theme_url){if(!theme_name){return false;}
2072if(!theme_url){theme_url=$.jstree._themes+theme_name+'/style.css';}
2073if($.inArray(theme_url,themes_loaded)==-1){$.vakata.css.add_sheet({"url":theme_url});themes_loaded.push(theme_url);}
2074if(this.data.themes.theme!=theme_name){this.get_container().removeClass('jstree-'+this.data.themes.theme);this.data.themes.theme=theme_name;}
2075this.get_container().addClass('jstree-'+theme_name);if(!this.data.themes.dots){this.hide_dots();}
2076else{this.show_dots();}
2077if(!this.data.themes.icons){this.hide_icons();}
2078else{this.show_icons();}
2079this.__callback();},get_theme:function(){return this.data.themes.theme;},show_dots:function(){this.data.themes.dots=true;this.get_container().children("ul").removeClass("jstree-no-dots");},hide_dots:function(){this.data.themes.dots=false;this.get_container().children("ul").addClass("jstree-no-dots");},toggle_dots:function(){if(this.data.themes.dots){this.hide_dots();}else{this.show_dots();}},show_icons:function(){this.data.themes.icons=true;this.get_container().children("ul").removeClass("jstree-no-icons");},hide_icons:function(){this.data.themes.icons=false;this.get_container().children("ul").addClass("jstree-no-icons");},toggle_icons:function(){if(this.data.themes.icons){this.hide_icons();}else{this.show_icons();}}}});$(function(){if($.jstree._themes===false){$("script").each(function(){if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)){$.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+'themes/';return false;}});}
2080if($.jstree._themes===false){$.jstree._themes="themes/";}});$.jstree.defaults.plugins.push("themes");})(jQuery);(function($){var bound=[];function exec(i,event){var f=$.jstree._focused(),tmp;if(f&&f.data&&f.data.hotkeys&&f.data.hotkeys.enabled){tmp=f._get_settings().hotkeys[i];if(tmp){return tmp.call(f,event);}}}
2081$.jstree.plugin("hotkeys",{__init:function(){if(typeof $.hotkeys==="undefined"){throw"jsTree hotkeys: jQuery hotkeys plugin not included.";}
2082if(!this.data.ui){throw"jsTree hotkeys: jsTree UI plugin not included.";}
2083$.each(this._get_settings().hotkeys,function(i,v){if(v!==false&&$.inArray(i,bound)==-1){$(document).bind("keydown",i,function(event){return exec(i,event);});bound.push(i);}});this.get_container().bind("lock.jstree",$.proxy(function(){if(this.data.hotkeys.enabled){this.data.hotkeys.enabled=false;this.data.hotkeys.revert=true;}},this)).bind("unlock.jstree",$.proxy(function(){if(this.data.hotkeys.revert){this.data.hotkeys.enabled=true;}},this));this.enable_hotkeys();},defaults:{"up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(o));return false;},"ctrl+up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(o));return false;},"shift+up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(o));return false;},"down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(o));return false;},"ctrl+down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(o));return false;},"shift+down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(o));return false;}
2083,"left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o){if(o.hasClass("jstree-open")){this.close_node(o);}
2084else{this.hover_node(this._get_prev(o));}}
2085return false;},"ctrl+left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o){if(o.hasClass("jstree-open")){this.close_node(o);}
2086else{this.hover_node(this._get_prev(o));}}
2087return false;},"shift+left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o){if(o.hasClass("jstree-open")){this.close_node(o);}
2088else{this.hover_node(this._get_prev(o));}}
2089return false;},"right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o&&o.length){if(o.hasClass("jstree-closed")){this.open_node(o);}
2090else{this.hover_node(this._get_next(o));}}
2091return false;},"ctrl+right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o&&o.length){if(o.hasClass("jstree-closed")){this.open_node(o);}
2092else{this.hover_node(this._get_next(o));}}
2093return false;},"shift+right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o&&o.length){if(o.hasClass("jstree-closed")){this.open_node(o);}
2094else{this.hover_node(this._get_next(o));}}
2095return false;},"space":function(){if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").click();}
2096return false;},"ctrl+space":function(event){event.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(event);}
2097return false;},"shift+space":function(event){event.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(event);}
2098return false;},"f2":function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected);},"del":function(){this.remove(this.data.ui.hovered||this._get_node(null));}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=true;},disable_hotkeys:function(){this.data.hotkeys.enabled=false;}}});})(jQuery);(function($){$.jstree.plugin("json_data",{__init:function(){var s=this._get_settings().json_data;if(s.progressive_unload){this.get_container().bind("after_close.jstree",function(e,data){data.rslt.obj.children("ul").remove();});}},defaults:{data:false,ajax:false,correct_state:true,progressive_render:false,progressive_unload:false},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_json(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().json_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!s.progressive_render&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").length>0;},refresh:function(obj){obj=this._get_node(obj);var s=this._get_settings().json_data;if(obj&&obj!==-1&&s.progressive_unload&&($.isFunction(s.data)||!!s.ajax)){obj.removeData("jstree-children");}
2099return this.__call_old();},load_node_json:function(obj,s_call,e_call){var s=this.get_settings().json_data,d,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1&&(s.progressive_render||s.progressive_unload)&&!obj.is(".jstree-open, .jstree-leaf")&&obj.children("ul").children("li").length===0&&obj.data("jstree-children")){d=this._parse_json(obj.data("jstree-children"),obj);if(d){obj.append(d);if(!s.progressive_unload){obj.removeData("jstree-children");}}
2100this.clean_node(obj);if(s_call){s_call.call(this);}
2101return;}
2102if(obj&&obj!==-1){if(obj.data("jstree-is-loading")){return;}
2103else{obj.data("jstree-is-loading",true);}}
2104switch(!0){case(!s.data&&!s.ajax):throw"Neither data nor ajax settings supplied.";case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){d=this._parse_json(d,obj);if(!d){if(obj===-1||!obj){if(s.correct_state){this.get_container().children("ul").empty();}}
2105else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);}}
2106if(e_call){e_call.call(this);}}
2107else{if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
2108else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");}
2109this.clean_node(obj);if(s_call){s_call.call(this);}}},this));break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){d=this._parse_json(s.data,obj);if(d){this.get_container().children("ul").empty().append(d.children());this.clean_node();}
2110else{if(s.correct_state){this.get_container().children("ul").empty();}}}
2111if(s_call){s_call.call(this);}
2112break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):error_func=function(x,t,e){var ef=this.get_settings().json_data.ajax.error;if(ef){ef.call(this,x,t,e);}
2113if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");
2113if(t==="success"&&s.correct_state){this.correct_state(obj);}}
2114else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}}
2115if(e_call){e_call.call(this);}};success_func=function(d,t,x){var sf=this.get_settings().json_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
2116if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")||(!$.isArray(d)&&!$.isPlainObject(d))){return error_func.call(this,x,t,"");}
2117d=this._parse_json(d,obj);if(d){if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
2118else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");}
2119this.clean_node(obj);if(s_call){s_call.call(this);}}
2120else{if(obj===-1||!obj){if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}
2121else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree-is-loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}}};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="json";}
2122if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);}
2123if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);}
2124$.ajax(s.ajax);break;}},_parse_json:function(js,obj,is_callback){var d=false,p=this._get_settings(),s=p.json_data,t=p.core.html_titles,tmp,i,j,ul1,ul2;if(!js){return d;}
2125if(s.progressive_unload&&obj&&obj!==-1){obj.data("jstree-children",d);}
2126if($.isArray(js)){d=$();if(!js.length){return false;}
2127for(i=0,j=js.length;i<j;i++){tmp=this._parse_json(js[i],obj,true);if(tmp.length){d=d.add(tmp);}}}
2128else{if(typeof js=="string"){js={data:js};}
2129if(!js.data&&js.data!==""){return d;}
2130d=$("<li />");if(js.attr){d.attr(js.attr);}
2131if(js.metadata){d.data(js.metadata);}
2132if(js.state){d.addClass("jstree-"+js.state);}
2133if(!$.isArray(js.data)){tmp=js.data;js.data=[];js.data.push(tmp);}
2134$.each(js.data,function(i,m){tmp=$("<a />");if($.isFunction(m)){m=m.call(this,js);}
2135if(typeof m=="string"){tmp.attr('href','#');$('<span>').addClass('jstree-node-title').html(m).appendTo(tmp);}else{if(!m.attr){m.attr={};}
2136if(!m.attr.href){m.attr.href='#';}
2137tmp.attr(m.attr);$('<span>').addClass('jstree-node-title').html(m.title).appendTo(tmp);if(m.language){tmp.addClass(m.language);}}
2138tmp.prepend("<ins class='jstree-icon'>&#160;</ins>");if(!m.icon&&js.icon){m.icon=js.icon;}
2139if(m.icon){if(m.icon.indexOf("/")===-1){tmp.children("ins").addClass(m.icon);}
2140else{tmp.children("ins").css("background","url('"+m.icon+"') center center no-repeat");}}
2141d.append(tmp);});d.prepend("<ins class='jstree-icon'>&#160;</ins>");if(js.children){if(s.progressive_render&&js.state!=="open"){d.addClass("jstree-closed").data("jstree-children",js.children);}
2142else{if(s.progressive_unload){d.data("jstree-children",js.children);}
2143if($.isArray(js.children)&&js.children.length){tmp=this._parse_json(js.children,obj,true);if(tmp.length){ul2=$("<ul />");ul2.append(tmp);d.append(ul2);}}}}}
2144if(!is_callback){ul1=$("<ul />");ul1.append(d);d=ul1;}
2145return d;},get_json:function(obj,li_attr,a_attr,is_callback){var result=[],s=this._get_settings(),_this=this,tmp1,tmp2,li,a,t,lang;obj=this._get_node(obj);if(!obj||obj===-1){obj=this.get_container().find("> ul > li");}
2146li_attr=$.isArray(li_attr)?li_attr:["id","class"];if(!is_callback&&this.data.types){li_attr.push(s.types.type_attr);}
2147a_attr=$.isArray(a_attr)?a_attr:[];obj.each(function(){li=$(this);tmp1={data:[]};if(li_attr.length){tmp1.attr={};}
2148$.each(li_attr,function(i,v){tmp2=li.attr(v);if(tmp2&&tmp2.length&&tmp2.replace(/jstree[^ ]*/ig,'').length){tmp1.attr[v]=(" "+tmp2).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");}});if(li.hasClass("jstree-open")){tmp1.state="open";}
2149if(li.hasClass("jstree-closed")){tmp1.state="closed";}
2150if(li.data()){tmp1.metadata=li.data();}
2151a=li.children("a");a.each(function(){t=$(this);if(a_attr.length||$.inArray("languages",s.plugins)!==-1||t.children("ins").get(0).style.backgroundImage.length||(t.children("ins").get(0).className&&t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').length)){lang=false;if($.inArray("languages",s.plugins)!==-1&&$.isArray(s.languages)&&s.languages.length){$.each(s.languages,function(l,lv){if(t.hasClass(lv)){lang=lv;return false;}});}
2152tmp2={attr:{},title:_this.get_text(t,lang)};$.each(a_attr,function(k,z){tmp2.attr[z]=(" "+(t.attr(z)||"")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");});if($.inArray("languages",s.plugins)!==-1&&$.isArray(s.languages)&&s.languages.length){$.each(s.languages,function(k,z){if(t.hasClass(z)){tmp2.language=z;return true;}}
2152);}
2153if(t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length){tmp2.icon=t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");}
2154if(t.children("ins").get(0).style.backgroundImage.length){tmp2.icon=t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","");}}
2155else{tmp2=_this.get_text(t);}
2156if(a.length>1){tmp1.data.push(tmp2);}
2157else{tmp1.data=tmp2;}});li=li.find("> ul > li");if(li.length){tmp1.children=_this.get_json(li,li_attr,a_attr,true);}
2158result.push(tmp1);});return result;}}});})(jQuery);(function($){var sh=false;$.jstree.plugin("languages",{__init:function(){this._load_css();},defaults:[],_fn:{set_lang:function(i){var langs=this._get_settings().languages,st=false,selector=".jstree-"+this.get_index()+' a';if(!$.isArray(langs)||langs.length===0){return false;}
2159if($.inArray(i,langs)==-1){if(!!langs[i]){i=langs[i];}
2160else{return false;}}
2161if(i==this.data.languages.current_language){return true;}
2162st=$.vakata.css.get_css(selector+"."+this.data.languages.current_language,false,sh);if(st!==false){st.style.display="none";}
2163st=$.vakata.css.get_css(selector+"."+i,false,sh);if(st!==false){st.style.display="";}
2164this.data.languages.current_language=i;this.__callback(i);return true;},get_lang:function(){return this.data.languages.current_language;},_get_string:function(key,lang){var langs=this._get_settings().languages,s=this._get_settings().core.strings;if($.isArray(langs)&&langs.length){lang=(lang&&$.inArray(lang,langs)!=-1)?lang:this.data.languages.current_language;}
2165if(s[lang]&&s[lang][key]){return s[lang][key];}
2166if(s[key]){return s[key];}
2167return key;},get_text:function(obj,lang){obj=this._get_node(obj)||this.data.ui.last_selected;if(!obj.size()){return false;}
2168var langs=this._get_settings().languages,s=this._get_settings().core.html_titles;if($.isArray(langs)&&langs.length){lang=(lang&&$.inArray(lang,langs)!=-1)?lang:this.data.languages.current_language;obj=obj.children("a."+lang);}
2169else{obj=obj.children("a:eq(0)");}
2170if(s){obj=obj.clone();obj.children("INS").remove();return obj.html();}
2171else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];return obj.nodeValue;}},set_text:function(obj,val,lang){obj=this._get_node(obj)||this.data.ui.last_selected;if(!obj.size()){return false;}
2172var langs=this._get_settings().languages,s=this._get_settings().core.html_titles,tmp;if($.isArray(langs)&&langs.length){lang=(lang&&$.inArray(lang,langs)!=-1)?lang:this.data.languages.current_language;obj=obj.children("a."+lang);}
2173else{obj=obj.children("a:eq(0)");}
2174if(s){tmp=obj.children("INS").clone();obj.html(val).prepend(tmp);this.__callback({"obj":obj,"name":val,"lang":lang});return true;}
2175else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];this.__callback({"obj":obj,"name":val,"lang":lang});return(obj.nodeValue=val);}},_load_css:function(){var langs=this._get_settings().languages,str="/* languages css */",selector=".jstree-"+this.get_index()+' a',ln;if($.isArray(langs)&&langs.length){this.data.languages.current_language=langs[0];for(ln=0;ln<langs.length;ln++){str+=selector+"."+langs[ln]+" {";if(langs[ln]!=this.data.languages.current_language){str+=" display:none; ";}
2176str+=" } ";}
2177sh=$.vakata.css.add_sheet({'str':str,'title':"jstree-languages"});}},create_node:function(obj,position,js,callback){var t=this.__call_old(true,obj,position,js,function(t){var langs=this._get_settings().languages,a=t.children("a"),ln;if($.isArray(langs)&&langs.length){for(ln=0;ln<langs.length;ln++){if(!a.is("."+langs[ln])){t.append(a.eq(0).clone().removeClass(langs.join(" ")).addClass(langs[ln]));}}
2178a.not("."+langs.join(", .")).remove();}
2179if(callback){callback.call(this,t);}});return t;}}});})(jQuery);(function($){$.jstree.plugin("cookies",{__init:function(){if(typeof $.cookie==="undefined"){throw"jsTree cookie: jQuery cookie plugin not included.";}
2180var s=this._get_settings().cookies,tmp;if(!!s.save_loaded){tmp=$.cookie(s.save_loaded);if(tmp&&tmp.length){this.data.core.to_load=tmp.split(",");}}
2181if(!!s.save_opened){tmp=$.cookie(s.save_opened);if(tmp&&tmp.length){this.data.core.to_open=tmp.split(",");}}
2182if(!!s.save_selected){tmp=$.cookie(s.save_selected);if(tmp&&tmp.length&&this.data.ui){this.data.ui.to_select=tmp.split(",");}}
2183this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",$.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",$.proxy(function(e){if(this._get_settings().cookies.auto_
2183save){this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""));}},this));},this));},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:true,cookie_options:{}},_fn:{save_cookie:function(c){if(this.data.core.refreshing){return;}
2184var s=this._get_settings().cookies;if(!c){if(s.save_loaded){this.save_loaded();$.cookie(s.save_loaded,this.data.core.to_load.join(","),s.cookie_options);}
2185if(s.save_opened){this.save_opened();$.cookie(s.save_opened,this.data.core.to_open.join(","),s.cookie_options);}
2186if(s.save_selected&&this.data.ui){this.save_selected();$.cookie(s.save_selected,this.data.ui.to_select.join(","),s.cookie_options);}
2187return;}
2188switch(c){case"open_node":case"close_node":if(!!s.save_opened){this.save_opened();$.cookie(s.save_opened,this.data.core.to_open.join(","),s.cookie_options);}
2189if(!!s.save_loaded){this.save_loaded();$.cookie(s.save_loaded,this.data.core.to_load.join(","),s.cookie_options);}
2190break;case"select_node":case"deselect_node":if(!!s.save_selected&&this.data.ui){this.save_selected();$.cookie(s.save_selected,this.data.ui.to_select.join(","),s.cookie_options);}
2191break;}}}});})(jQuery);(function($){$.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",$.proxy(function(e,data){var obj=this._get_node(data.rslt.obj);obj=obj===-1?this.get_container().children("ul"):obj.children("ul");this.sort(obj);},this)).bind("rename_node.jstree create_node.jstree create.jstree",$.proxy(function(e,data){this.sort(data.rslt.obj.parent());},this)).bind("move_node.jstree",$.proxy(function(e,data){var m=data.rslt.np==-1?this.get_container():data.rslt.np;this.sort(m.children("ul"));},this));},defaults:function(a,b){return this.get_text(a)>this.get_text(b)?1:-1;},_fn:{sort:function(obj){var s=this._get_settings().sort,t=this;obj.append($.makeArray(obj.children("li")).sort($.proxy(s,t)));obj.find("> li > ul").each(function(){t.sort($(this));});this.clean_node(obj);}}});})(jQuery);(function($){var o=false,r=false,m=false,ml=false,sli=false,sti=false,dir1=false,dir2=false,last_pos=false;$.vakata.dnd={is_down:false,is_drag:false,helper:false,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(e,data,html){if($.vakata.dnd.is_drag){$.vakata.drag_stop({});}
2192try{e.currentTarget.unselectable="on";e.currentTarget.onselectstart=function(){return false;};if(e.currentTarget.style){e.currentTarget.style.MozUserSelect="none";}}catch(err){}
2193$.vakata.dnd.init_x=e.pageX;$.vakata.dnd.init_y=e.pageY;$.vakata.dnd.user_data=data;$.vakata.dnd.is_down=true;$.vakata.dnd.helper=$("<div id='vakata-dragged' />").html(html);$(document).bind("mousemove",$.vakata.dnd.drag);$(document).bind("mouseup",$.vakata.dnd.drag_stop);return false;},drag:function(e){if(!$.vakata.dnd.is_down){return;}
2194if(!$.vakata.dnd.is_drag){if(Math.abs(e.pageX-$.vakata.dnd.init_x)>5||Math.abs(e.pageY-$.vakata.dnd.init_y)>5){$.vakata.dnd.helper.appendTo("body");$.vakata.dnd.is_drag=true;$(document).triggerHandler("drag_start.vakata",{"event":e,"data":$.vakata.dnd.user_data});}
2195else{return;}}
2196if(e.type==="mousemove"){var d=$(document),t=d.scrollTop(),l=d.scrollLeft();if(e.pageY-t<20){if(sti&&dir1==="down"){clearInterval(sti);sti=false;}
2197if(!sti){dir1="up";sti=setInterval(function(){$(document).scrollTop($(document).scrollTop()-$.vakata.dnd.scroll_spd);},150);}}
2198else{if(sti&&dir1==="up"){clearInterval(sti);sti=false;}}
2199if($(window).height()-(e.pageY-t)<20){if(sti&&dir1==="up"){clearInterval(sti);sti=false;}
2200if(!sti){dir1="down";sti=setInterval(function(){$(document).scrollTop($(document).scrollTop()+$.vakata.dnd.scroll_spd);},150);}}
2201else{if(sti&&dir1==="down"){clearInterval(sti);sti=false;}}
2202if(e.pageX-l<20){if(sli&&dir2==="right"){clearInterval(sli);sli=false;}
2203if(!sli){dir2="left";sli=setInterval(function(){$(document).scrollLeft($(document).scrollLeft()-$.vakata.dnd.scroll_spd);},150);}}
2204else{if(sli&&dir2==="left"){clearInterval(sli);sli=false;}}
2205if($(window).width()-(e.pageX-l)<20){if(sli&&dir2==="left"){clearInterval(sli);sli=false;}
2206if(!sli){dir2="right";sli=setInterval(function(){$(document).scrollLeft($(document).scrollLeft()+$.vakata.dnd.scroll_spd);},150);}}
2207else{if(sli&&dir2==="right"){clearInterval(sli);sli=false;}}}
2208$.vakata.dnd.helper.css({left:(e.pageX+$.vakata.dnd.helper_left)+"px",top:(e.pageY+$.vakata.dnd.helper_top)+"px"});$(document).triggerHandler("drag.vakata",{"event":e,"data":$.vakata.dnd.user_data});},drag_stop:function(e){if(sli){clearInterval(sli);}
2209if(sti){clearInterval(sti);}
2210$(document).unbind("mousemove",$.vakata.dnd.drag);$(document).unbind("mouseup",$.vakata.dnd.drag_stop);$(document).triggerHandler("drag_stop.vakata",{"event":e,"data":$.vakata.dnd.user_data});$.vakata.dnd.helper.remove();$.vakata.dnd.init_x=0;$.vakata.dnd.init_y=0;$.vakata.dnd.user_data={};$.vakata.dnd.is_down=false;$.vakata.dnd.is_drag=false;}};$(function(){var css_string='#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ';$.vakata.css.add_sheet({str:css_string,title:"vakata"});});$.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:false,after:false,inside:false,before:false,off:false,prepared:false,w:0,to1:false,to2:false,cof:false,cw:false,ch:false,i1:false,i2:false,mto:false};this.get_container().bind("mouseenter.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(this.data.themes){m.attr("class","jstree-"+this.data.themes.theme);if(ml){ml.attr("class","jstree-"+this.data.themes.theme);}
2211$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme);}
2212if(e.currentTarget===e.target&&$.vakata.dnd.user_data.obj&&$($.vakata.dnd.user_data.obj).length&&$($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==e.target){var tr=$.jstree._reference(e.target),dc;if(tr.data.dnd.foreign){dc=tr._get_settings().dnd.drag_check.call(this,{"o":o,"r":tr.get_container(),is_root:true});if(dc===true||dc.inside===true||dc.before===true||dc.after===true){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");}}
2213else{tr.prepare_move(o,tr.get_container(),"last");if(tr.check_move()){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");}}}}},this)).bind("mouseup.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&e.currentTarget===e.target&&$.vakata.dnd.user_data.obj&&$($.vakata.dnd.user_data.obj).length&&$($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==e.target){var tr=$.jstree._reference(e.currentTarget),dc;if(tr.data.dnd.foreign){dc=tr._get_settings().dnd.drag_check.call(this,{"o":o,"r":tr.get_container(),is_root:true});if(dc===true||dc.inside===true||dc.before===true||dc.after===true){tr._get_settings().dnd.drag_finish.call(this,{"o":o,"r":tr.get_container(),is_root:true});}}
2214else{tr.move_node(o,tr.get_container(),"last",e[tr._get_settings().dnd.copy_modifier+"Key"]);}}},this)).bind("mouseleave.jstree",$.proxy(function(e){if(e.relatedTarget&&e.relatedTarget.id&&e.relatedTarget.id==="jstree-marker-line"){return false;}
2215if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
2216if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
2217if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);}
2218if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);}
2219if($.vakata.dnd.helper.children("ins").hasClass("jstree-ok")){$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");}}},this)).bind("mousemove.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){var cnt=this.get_container()[0];if(e.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
2220this.data.dnd.i1=setInterval($.proxy(function(){this.scrollLeft+=$.vakata.dnd.scroll_spd;},cnt),100);}
2221else if(e.pageX-24<this.data.dnd.cof.left){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
2222this.data.dnd.i1=setInterval($.proxy(function(){this.scrollLeft-=$.vakata.dnd.scroll_spd;},cnt),100);}
2223else{if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}}
2224if(e.pageY+24>
2224this.data.dnd.cof.top+this.data.dnd.ch){if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
2225this.data.dnd.i2=setInterval($.proxy(function(){this.scrollTop+=$.vakata.dnd.scroll_spd;},cnt),100);}
2226else if(e.pageY-24<this.data.dnd.cof.top){if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
2227this.data.dnd.i2=setInterval($.proxy(function(){this.scrollTop-=$.vakata.dnd.scroll_spd;},cnt),100);}
2228else{if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}}}},this)).bind("scroll.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&m&&ml){m.hide();ml.hide();}},this)).delegate("a","mousedown.jstree",$.proxy(function(e){if(e.which===1){this.start_drag(e.currentTarget,e);return false;}},this)).delegate("a","mouseenter.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){this.dnd_enter(e.currentTarget);}},this)).delegate("a","mousemove.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(!r||!r.length||r.children("a")[0]!==e.currentTarget){this.dnd_enter(e.currentTarget);}
2229if(typeof this.data.dnd.off.top==="undefined"){this.data.dnd.off=$(e.target).offset();}
2230this.data.dnd.w=(e.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height;if(this.data.dnd.w<0){this.data.dnd.w+=this.data.core.li_height;}
2231this.dnd_show();}},this)).delegate("a","mouseleave.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(e.relatedTarget&&e.relatedTarget.id&&e.relatedTarget.id==="jstree-marker-line"){return false;}
2232if(m){m.hide();}
2233if(ml){ml.hide();}
2234this.data.dnd.mto=setTimeout((function(t){return function(){t.dnd_leave(e);};})(this),0);}},this)).delegate("a","mouseup.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){this.dnd_finish(e);}},this));$(document).bind("drag_stop.vakata",$.proxy(function(){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);}
2235if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);}
2236if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
2237if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
2238this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;this.data.dnd.off=false;this.data.dnd.prepared=false;this.data.dnd.w=false;this.data.dnd.to1=false;this.data.dnd.to2=false;this.data.dnd.i1=false;this.data.dnd.i2=false;this.data.dnd.active=false;this.data.dnd.foreign=false;if(m){m.css({"top":"-2000px"});}
2239if(ml){ml.css({"top":"-2000px"});}},this)).bind("drag_start.vakata",$.proxy(function(e,data){if(data.data.jstree){var et=$(data.event.target);if(et.closest(".jstree").hasClass("jstree-"+this.get_index())){this.dnd_enter(et);}}},this));var s=this._get_settings().dnd;if(s.drag_target){$(document).delegate(s.drag_target,"mousedown.jstree-"+this.get_index(),$.proxy(function(e){o=e.target;$.vakata.dnd.drag_start(e,{jstree:true,obj:e.target},"<ins class='jstree-icon'></ins>"+$(e.target).text());if(this.data.themes){if(m){m.attr("class","jstree-"+this.data.themes.theme);}
2240if(ml){ml.attr("class","jstree-"+this.data.themes.theme);}
2241$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme);}
2242$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var cnt=this.get_container();this.data.dnd.cof=cnt.offset();this.data.dnd.cw=parseInt(cnt.width(),10);this.data.dnd.ch=parseInt(cnt.height(),10);this.data.dnd.foreign=true;e.preventDefault();},this));}
2243if(s.drop_target){$(document).delegate(s.drop_target,"mouseenter.jstree-"+this.get_index(),$.proxy(function(e){if(this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{"o":o,"r":$(e.target),"e":e})){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");}},this)).delegate(s.drop_target,"mouseleave.jstree-"+this.get_index(),$.proxy(function(e){if(this.data.dnd.active){$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");}},this)).delegate(s.drop_target,"mouseup.jstree-"+this.get_index(),$.proxy(function(e){if(this.data.dnd.active&&$.vakata.dnd.helper.children("ins").hasClass("jstree-ok")){this._get_settings().dnd.drop_finish.call(this,{"o":o,"r":$(e.target),"e":e});}},this));}},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(data){return true;},drop_finish:$.noop,drag_target:".jstree-draggable",drag_finish:$.noop,drag_check:function(data){return{after:false,before:false,inside:true};}},_fn:{dnd_prepare:function(){if(!r||!r.length){return;}
2244this.data.dnd.off=r.offset();if(this._get_settings().core.rtl){this.data.dnd.off.right=this.data.dnd.off.left+r.
2244width();}
2245if(this.data.dnd.foreign){var a=this._get_settings().dnd.drag_check.call(this,{"o":o,"r":r});this.data.dnd.after=a.after;this.data.dnd.before=a.before;this.data.dnd.inside=a.inside;this.data.dnd.prepared=true;return this.dnd_show();}
2246this.prepare_move(o,r,"before");this.data.dnd.before=this.check_move();this.prepare_move(o,r,"after");this.data.dnd.after=this.check_move();if(this._is_loaded(r)){this.prepare_move(o,r,"inside");this.data.dnd.inside=this.check_move();}
2247else{this.data.dnd.inside=false;}
2248this.data.dnd.prepared=true;return this.dnd_show();},dnd_show:function(){if(!this.data.dnd.prepared){return;}
2249var o=["before","inside","after"],r=false,rtl=this._get_settings().core.rtl,pos;if(this.data.dnd.w<this.data.core.li_height/3){o=["before","inside","after"];}
2250else if(this.data.dnd.w<=this.data.core.li_height*2/3){o=this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"];}
2251else{o=["after","inside","before"];}
2252$.each(o,$.proxy(function(i,val){if(this.data.dnd[val]){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");r=val;return false;}},this));if(r===false){$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");}
2253pos=rtl?(this.data.dnd.off.right-18):(this.data.dnd.off.left+10);switch(r){case"before":m.css({"left":pos+"px","top":(this.data.dnd.off.top-6)+"px"}).show();if(ml){ml.css({"left":(pos+8)+"px","top":(this.data.dnd.off.top-1)+"px"}).show();}
2254break;case"after":m.css({"left":pos+"px","top":(this.data.dnd.off.top+this.data.core.li_height-6)+"px"}).show();if(ml){ml.css({"left":(pos+8)+"px","top":(this.data.dnd.off.top+this.data.core.li_height-1)+"px"}).show();}
2255break;case"inside":m.css({"left":pos+(rtl?-4:4)+"px","top":(this.data.dnd.off.top+this.data.core.li_height/2-5)+"px"}).show();if(ml){ml.hide();}
2256break;default:m.hide();if(ml){ml.hide();}
2257break;}
2258last_pos=r;return r;},dnd_open:function(){this.data.dnd.to2=false;this.open_node(r,$.proxy(this.dnd_prepare,this),true);},dnd_finish:function(e){if(this.data.dnd.foreign){if(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside){this._get_settings().dnd.drag_finish.call(this,{"o":o,"r":r,"p":last_pos});}}
2259else{this.dnd_prepare();this.move_node(o,r,last_pos,e[this._get_settings().dnd.copy_modifier+"Key"]);}
2260o=false;r=false;m.hide();if(ml){ml.hide();}},dnd_enter:function(obj){if(this.data.dnd.mto){clearTimeout(this.data.dnd.mto);this.data.dnd.mto=false;}
2261var s=this._get_settings().dnd;this.data.dnd.prepared=false;r=this._get_node(obj);if(s.check_timeout){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);}
2262this.data.dnd.to1=setTimeout($.proxy(this.dnd_prepare,this),s.check_timeout);}
2263else{this.dnd_prepare();}
2264if(s.open_timeout){if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);}
2265if(r&&r.length&&r.hasClass("jstree-closed")){this.data.dnd.to2=setTimeout($.proxy(this.dnd_open,this),s.open_timeout);}}
2266else{if(r&&r.length&&r.hasClass("jstree-closed")){this.dnd_open();}}},dnd_leave:function(e){this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");m.hide();if(ml){ml.hide();}
2267if(r&&r[0]===e.target.parentNode){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);this.data.dnd.to1=false;}
2268if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);this.data.dnd.to2=false;}}},start_drag:function(obj,e){o=this._get_node(obj);if(this.data.ui&&this.is_selected(o)){o=this._get_node(null,true);}
2269var dt=o.length>1?this._get_string("multiple_selection"):this.get_text(o),cnt=this.get_container();if(!this._get_settings().core.html_titles){dt=dt.replace(/</ig,"&lt;").replace(/>/ig,"&gt;");}
2270$.vakata.dnd.drag_start(e,{jstree:true,obj:o},"<ins class='jstree-icon'></ins>"+dt);if(this.data.themes){if(m){m.attr("class","jstree-"+this.data.themes.theme);}
2271if(ml){ml.attr("class","jstree-"+this.data.themes.theme);}
2272$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme);}
2273this.data.dnd.cof=cnt.offset();this.data.dnd.cw=parseInt(cnt.width(),10);this.data.dnd.ch=parseInt(cnt.height(),10);this.data.dnd.active=true;}}});$(function(){var css_string=''+'#vakata-dragged ins { display:block; text-decoration:none; width:24px; height:24px; margin:0 0 0 0; padding:0; position:absolute; top:0px; left:0px;'+' -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; '+'} '+'#vakata-dragged .jstree-ok { background:green; } '+'#vakata-dragged .jstree-invalid { background:red; } '+'#jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } '+'#jstree-marker-line { padding:0; margin:-2px 0px 0px -2px; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#0091B5; '+' cursor:pointer; border:1px solid #ffffff; border-left:0;'+'}'+'';$.vakata.css.add_sheet({str:css_string,title:"jstree"});m=$("<div />").attr({id:"jstree-marker"}).hide().html("&raquo;").bind("mouseleave mouseenter",function(e){m.hide();ml.hide();e.preventDefault();e.stopImmediatePropagation();return false;}).appendTo("body");ml=$("<div />").attr({id:"jstree-marker-line"}).hide().bind("mouseup",function(e){if(r&&r.length){r.children("a").trigger(e);e.preventDefault();e.stopImmediatePropagation();return false;}}).bind("mouseleave",function(e){var rt=$(e.relatedTarget);
2273if(rt.is(".jstree")||rt.closest(".jstree").length===0){if(r&&r.length){r.children("a").trigger(e);m.hide();ml.hide();e.preventDefault();e.stopImmediatePropagation();return false;}}}).appendTo("body");$(document).bind("drag_start.vakata",function(e,data){if(data.data.jstree){m.show();if(ml){ml.show();}}});$(document).bind("drag_stop.vakata",function(e,data){if(data.data.jstree){m.hide();if(ml){ml.hide();}}});});})(jQuery);(function($){$.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui;if(this.data.ui&&this.data.checkbox.noui){this.select_node=this.deselect_node=this.deselect_all=$.noop;this.get_selected=this.get_checked;}
2274this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",$.proxy(function(e,data){this._prepare_checkboxes(data.rslt.obj);},this)).bind("loaded.jstree",$.proxy(function(e){this._prepare_checkboxes();},this)).delegate((this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox"),"click.jstree",$.proxy(function(e){e.preventDefault();if(this._get_node(e.target).hasClass("jstree-checked")){this.uncheck_node(e.target);}
2275else{this.check_node(e.target);}
2276if(this.data.ui&&this.data.checkbox.noui){this.save_selected();if(this.data.cookies){this.save_cookie("select_node");}}
2277else{e.stopImmediatePropagation();return false;}},this));},defaults:{override_ui:false,two_state:false,real_checkboxes:false,checked_parent_open:true,real_checkboxes_names:function(n){return[("check_"+(n[0].id||Math.ceil(Math.random()*10000))),1];}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove();},_fn:{_checkbox_notify:function(n,data){if(data.checked){this.check_node(n,false);}},_prepare_checkboxes:function(obj){obj=!obj||obj==-1?this.get_container().find("> ul > li"):this._get_node(obj);if(obj===false){return;}
2278var c,_this=this,t,ts=this._get_settings().checkbox.two_state,rc=this._get_settings().checkbox.real_checkboxes,rcn=this._get_settings().checkbox.real_checkboxes_names;obj.each(function(){t=$(this);c=t.is("li")&&(t.hasClass("jstree-checked")||(rc&&t.children(":checked").length))?"jstree-checked":"jstree-unchecked";t.find("li").addBack().each(function(){var $t=$(this),nm;$t.children("a"+(_this.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(ts?"jstree-unchecked":c);if(rc){if(!$t.children(":checkbox").length){nm=rcn.call(_this,$t);$t.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+nm[0]+"' name='"+nm[0]+"' value='"+nm[1]+"' />");}
2279else{$t.children(":checkbox").addClass("jstree-real-checkbox");}}
2280if(!ts){if(c==="jstree-checked"||$t.hasClass("jstree-checked")||$t.children(':checked').length){$t.find("li").addBack().addClass("jstree-checked").children(":checkbox").prop("checked",true);}}
2281else{if($t.hasClass("jstree-checked")||$t.children(':checked').length){$t.addClass("jstree-checked").children(":checkbox").prop("checked",true);}}});});if(!ts){obj.find(".jstree-checked").parent().parent().each(function(){_this._repair_state(this);});}},change_state:function(obj,state){obj=this._get_node(obj);var coll=false,rc=this._get_settings().checkbox.real_checkboxes;if(!obj||obj===-1){return false;}
2282state=(state===false||state===true)?state:obj.hasClass("jstree-checked");if(this._get_settings().checkbox.two_state){if(state){obj.removeClass("jstree-checked").addClass("jstree-unchecked");if(rc){obj.children(":checkbox").prop("checked",false);}}
2283else{obj.removeClass("jstree-unchecked").addClass("jstree-checked");if(rc){obj.children(":checkbox").prop("checked",true);}}}
2284else{if(state){coll=obj.find("li").addBack();if(!coll.filter(".jstree-checked, .jstree-undetermined").length){return false;}
2285coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){coll.children(":checkbox").prop("checked",false);}}
2286else{coll=obj.find("li").addBack();if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length){return false;}
2287coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){coll.children(":checkbox").prop("checked",true);}
2288if(this.data.ui){this.data.ui.last_selected=obj;}
2289this.data.checkbox.last_selected=obj;}
2290obj.parentsUntil(".jstree","li").each(function(){var $this=$(this);if(state){if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}
2291return false;}
2292else{$this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){$this.children(":checkbox").prop("checked",false);}}}
2293else{if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}
2294return false;}
2295else{$this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){$this.children(":checkbox").prop("checked",true);}}}});}
2296if(this.data.ui&&this.data.checkbox.noui){this.data.ui.selected=this.get_checked();}
2297this.__callback(obj);return true;}
2297,check_node:function(obj){if(this.change_state(obj,false)){obj=this._get_node(obj);if(this._get_settings().checkbox.checked_parent_open){var t=this;obj.parents(".jstree-closed").each(function(){t.open_node(this,false,true);});}
2298this.__callback({"obj":obj});}},uncheck_node:function(obj){if(this.change_state(obj,true)){this.__callback({"obj":this._get_node(obj)});}},check_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,false);});this.__callback();},uncheck_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,true);});this.__callback();},is_checked:function(obj){obj=this._get_node(obj);return obj.length?obj.is(".jstree-checked"):false;},get_checked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-checked"):obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");},get_unchecked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-unchecked"):obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes");},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes");},_repair_state:function(obj){obj=this._get_node(obj);if(!obj.length){return;}
2299if(this._get_settings().checkbox.two_state){obj.find('li').addBack().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked',true);return;}
2300var rc=this._get_settings().checkbox.real_checkboxes,a=obj.find("> ul > .jstree-checked").length,b=obj.find("> ul > .jstree-undetermined").length,c=obj.find("> ul > li").length;if(c===0){if(obj.hasClass("jstree-undetermined")){this.change_state(obj,false);}}
2301else if(a===0&&b===0){this.change_state(obj,true);}
2302else if(a===c){this.change_state(obj,false);}
2303else{obj.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){obj.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.deselect_all();$.each(s,function(i,val){_this.check_node(val);});this.__callback();}
2304else{this.__call_old();}},save_loaded:function(){var _this=this;this.data.core.to_load=[];this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){if(this.id){_this.data.core.to_load.push("#"+this.id);}});}}});$(function(){var css_string='.jstree .jstree-real-checkbox { display:none; } ';$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){$.vakata.xslt=function(xml,xsl,callback){var r=false,p,q,s;if(r===false&&window.ActiveXObject){try{r=new ActiveXObject("Msxml2.XSLTemplate");q=new ActiveXObject("Msxml2.DOMDocument");q.loadXML(xml);s=new ActiveXObject("Msxml2.FreeThreadedDOMDocument");s.loadXML(xsl);r.stylesheet=s;p=r.createProcessor();p.input=q;p.transform();r=p.output;}
2305catch(e){}}
2306xml=$.parseXML(xml);xsl=$.parseXML(xsl);if(r===false&&typeof(XSLTProcessor)!=="undefined"){p=new XSLTProcessor();p.importStylesheet(xsl);r=p.transformToFragment(xml,document);r=$('<div />').append(r).html();}
2307if(r===false&&typeof(xml.transformNode)!=="undefined"){r=xml.transformNode(xsl);}
2308callback.call(null,r);};var xsl={'nest':'<'+'?xml version="1.0" encoding="utf-8" ?>'+'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >'+'<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" />'+'<xsl:template match="/">'+' <xsl:call-template name="nodes">'+'  <xsl:with-param name="node" select="/root" />'+' </xsl:call-template>'+'</xsl:template>'+'<xsl:template name="nodes">'+' <xsl:param name="node" />'+' <ul>'+' <xsl:for-each select="$node/item">'+'  <xsl:variable name="children" select="count(./item) &gt; 0" />'+'  <li>'+'   <xsl:attribute name="class">'+'    <xsl:if test="position() = last()">jstree-last </xsl:if>'+'    <xsl:choose>'+'     <xsl:when test="@state = \'open\'">jstree-open </xsl:when>'+'     <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>'+'     <xsl:otherwise>jstree-leaf </xsl:otherwise>'+'    </xsl:choose>'+'    <xsl:value-of select="@class" />'+'   </xsl:attribute>'+'   <xsl:for-each select="@*">'+'    <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'">'+'     <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+'    </xsl:if>'+'   </xsl:for-each>'+' <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>'+'   <xsl:for-each select="content/name">'+'    <a>'+'    <xsl:attribute name="href">'+'     <xsl:choose>'+'     <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>'+'     <xsl:otherwise>#</xsl:otherwise>'+'     </xsl:choose>'+'    </xsl:attribute>'+'    <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>'+'    <xsl:attribute name="style"><xsl:value-of select="@style" />
2308</xsl:attribute>'+'    <xsl:for-each select="@*">'+'     <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">'+'      <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+'     </xsl:if>'+'    </xsl:for-each>'+'     <ins>'+'      <xsl:attribute name="class">jstree-icon '+'       <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>'+'      </xsl:attribute>'+'      <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>'+'      <xsl:text>&#xa0;</xsl:text>'+'     </ins>'+'     <xsl:copy-of select="./child::node()" />'+'    </a>'+'   </xsl:for-each>'+'   <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>'+'  </li>'+' </xsl:for-each>'+' </ul>'+'</xsl:template>'+'</xsl:stylesheet>','flat':'<'+'?xml version="1.0" encoding="utf-8" ?>'+'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >'+'<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" />'+'<xsl:template match="/">'+' <ul>'+' <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">'+'  <xsl:call-template name="nodes">'+'   <xsl:with-param name="node" select="." />'+'   <xsl:with-param name="is_last" select="number(position() = last())" />'+'  </xsl:call-template>'+' </xsl:for-each>'+' </ul>'+'</xsl:template>'+'<xsl:template name="nodes">'+' <xsl:param name="node" />'+' <xsl:param name="is_last" />'+' <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" />'+' <li>'+' <xsl:attribute name="class">'+'  <xsl:if test="$is_last = true()">jstree-last </xsl:if>'+'  <xsl:choose>'+'   <xsl:when test="@state = \'open\'">jstree-open </xsl:when>'+'   <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>'+'   <xsl:otherwise>jstree-leaf </xsl:otherwise>'+'  </xsl:choose>'+'  <xsl:value-of select="@class" />'+' </xsl:attribute>'+' <xsl:for-each select="@*">'+'  <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'">'+'  <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+'  </xsl:if>'+' </xsl:for-each>'+' <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>'+' <xsl:for-each select="content/name">'+'  <a>'+'  <xsl:attribute name="href">'+'   <xsl:choose>'+'   <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>'+'   <xsl:otherwise>#</xsl:otherwise>'+'   </xsl:choose>'+'  </xsl:attribute>'+'  <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>'+'  <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>'+'  <xsl:for-each select="@*">'+'   <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">'+'    <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+'   </xsl:if>'+'  </xsl:for-each>'+'   <ins>'+'    <xsl:attribute name="class">jstree-icon '+'     <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>'+'    </xsl:attribute>'+'    <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>'+'    <xsl:text>&#xa0;</xsl:text>'+'   </ins>'+'   <xsl:copy-of select="./child::node()" />'+'  </a>'+' </xsl:for-each>'+' <xsl:if test="$children">'+'  <ul>'+'  <xsl:for-each select="//item[@parent_id=$node/attribute::id]">'+'   <xsl:call-template name="nodes">'+'    <xsl:with-param name="node" select="." />'+'    <xsl:with-param name="is_last" select="number(position() = last())" />'+'   </xsl:call-template>'+'  </xsl:for-each>'+'  </ul>'+' </xsl:if>'+' </li>'+'</xsl:template>'+'</xsl:stylesheet>'},escape_xml=function(string){return string.toString().replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&apos;');};$.jstree.plugin("xml_data",{defaults:{data:false,ajax:false,xsl:"flat",clean_node:false,correct_state:true,get_skip_empty:false,get_include_preamble:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_xml(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().xml_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_xml:function(obj,s_call,e_call){var s=this.get_settings().xml_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;}
2309else{obj.data("jstree_is_loading",true);}}
2310switch(!0){case(!s.data&&!s.ajax):throw"Neither data nor ajax settings supplied.";case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){this.parse_xml
2310(d,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
2311else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree_is_loading");}
2312if(s.clean_node){this.clean_node(obj);}
2313if(s_call){s_call.call(this);}}
2314else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
2315else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}}},this));},this));break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){this.parse_xml(s.data,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);this.get_container().children("ul").empty().append(d.children());if(s.clean_node){this.clean_node(obj);}
2316if(s_call){s_call.call(this);}}}
2317else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}},this));}
2318break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):error_func=function(x,t,e){var ef=this.get_settings().xml_data.ajax.error;if(ef){ef.call(this,x,t,e);}
2319if(obj!==-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}}
2320else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}}
2321if(e_call){e_call.call(this);}};success_func=function(d,t,x){d=x.responseText;var sf=this.get_settings().xml_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
2322if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")){return error_func.call(this,x,t,"");}
2323this.parse_xml(d,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
2324else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree_is_loading");}
2325if(s.clean_node){this.clean_node(obj);}
2326if(s_call){s_call.call(this);}}
2327else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
2328else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}}},this));};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="xml";}
2329if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);}
2330if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);}
2331$.ajax(s.ajax);break;}},parse_xml:function(xml,callback){var s=this._get_settings().xml_data;$.vakata.xslt(xml,xsl[s.xsl],callback);},get_xml:function(tp,obj,li_attr,a_attr,is_callback){var result="",s=this._get_settings(),_this=this,tmp1,tmp2,li,a,lang;if(!tp){tp="flat";}
2332if(!is_callback){is_callback=0;}
2333obj=this._get_node(obj);if(!obj||obj===-1){obj=this.get_container().find("> ul > li");}
2334li_attr=$.isArray(li_attr)?li_attr:["id","class"];if(!is_callback&&this.data.types&&$.inArray(s.types.type_attr,li_attr)===-1){li_attr.push(s.types.type_attr);}
2335a_attr=$.isArray(a_attr)?a_attr:[];if(!is_callback){if(s.xml_data.get_include_preamble){result+='<'+'?xml version="1.0" encoding="UTF-8"?'+'>';}
2336result+="<root>";}
2337obj.each(function(){result+="<item";li=$(this);$.each(li_attr,function(i,v){var t=li.attr(v);if(!s.xml_data.get_skip_empty||typeof t!=="undefined"){result+=" "+v+"=\""+escape_xml((" "+(t||"")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+"\"";}});if(li.hasClass("jstree-open")){result+=" state=\"open\"";}
2338if(li.hasClass("jstree-closed")){result+=" state=\"closed\"";}
2339if(tp==="flat"){result+=" parent_id=\""+escape_xml(is_callback)+"\"";}
2340result+=">";result+="<content>";a=li.children("a");a.each(function(){tmp1=$(this);lang=false;result+="<name";if($.inArray("languages",s.plugins)!==-1){$.each(s.languages,function(k,z){if(tmp1.hasClass(z)){result+=" lang=\""+escape_xml
2340(z)+"\"";lang=z;return false;}});}
2341if(a_attr.length){$.each(a_attr,function(k,z){var t=tmp1.attr(z);if(!s.xml_data.get_skip_empty||typeof t!=="undefined"){result+=" "+z+"=\""+escape_xml((" "+t||"").replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+"\"";}});}
2342if(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length){result+=' icon="'+escape_xml(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+'"';}
2343if(tmp1.children("ins").get(0).style.backgroundImage.length){result+=' icon="'+escape_xml(tmp1.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/ig,"").replace(/"/ig,""))+'"';}
2344result+=">";result+="<![CDATA["+_this.get_text(tmp1,lang)+"]]>";result+="</name>";});result+="</content>";tmp2=li[0].id||true;li=li.find("> ul > li");if(li.length){tmp2=_this.get_xml(tp,li,li_attr,a_attr,tmp2);}
2345else{tmp2="";}
2346if(tp=="nest"){result+=tmp2;}
2347result+="</item>";if(tp=="flat"){result+=tmp2;}});if(!is_callback){result+="</root>";}
2348return result;}}});})(jQuery);(function($){if($().jquery.split('.')[1]>=8){$.expr[':'].jstree_contains=$.expr.createPseudo(function(search){return function(a){return(a.textContent||a.innerText||"").toLowerCase().indexOf(search.toLowerCase())>=0;};});$.expr[':'].jstree_title_contains=$.expr.createPseudo(function(search){return function(a){return(a.getAttribute("title")||"").toLowerCase().indexOf(search.toLowerCase())>=0;};});}
2349else{$.expr[':'].jstree_contains=function(a,i,m){return(a.textContent||a.innerText||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};$.expr[':'].jstree_title_contains=function(a,i,m){return(a.getAttribute("title")||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};}
2350$.jstree.plugin("search",{__init:function(){this.data.search.str="";this.data.search.result=$();if(this._get_settings().search.show_only_matches){this.get_container().bind("search.jstree",function(e,data){$(this).children("ul").find("li").hide().removeClass("jstree-last");data.rslt.nodes.parentsUntil(".jstree").addBack().show().filter("ul").each(function(){$(this).children("li:visible").eq(-1).addClass("jstree-last");});}).bind("clear_search.jstree",function(){$(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1);});}},defaults:{ajax:false,search_method:"jstree_contains",show_only_matches:false},_fn:{search:function(str,skip_async){if($.trim(str)===""){this.clear_search();return;}
2351var s=this.get_settings().search,t=this,error_func=function(){},success_func=function(){};this.data.search.str=str;if(!skip_async&&s.ajax!==false&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0){this.search.supress_callback=true;error_func=function(){};success_func=function(d,t,x){var sf=this.get_settings().search.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
2352this.data.search.to_open=d;this._search_open();};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,str);}
2353if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,str);}
2354if(!s.ajax.data){s.ajax.data={"search_string":str};}
2355if(!s.ajax.dataType||/^json/.exec(s.ajax.dataType)){s.ajax.dataType="json";}
2356$.ajax(s.ajax);return;}
2357if(this.data.search.result.length){this.clear_search();}
2358this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+(s.search_method)+"("+this.data.search.str+")");this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){t.open_node(this,false,true);});this.__callback({nodes:this.data.search.result,str:str});},clear_search:function(str){this.data.search.result.removeClass("jstree-search");this.__callback(this.data.search.result);this.data.search.result=$();},_search_open:function(is_callback){var _this=this,done=true,current=[],remaining=[];if(this.data.search.to_open.length){$.each(this.data.search.to_open,function(i,val){if(val=="#"){return true;}
2359if($(val).length&&$(val).is(".jstree-closed")){current.push(val);}
2360else{remaining.push(val);}});if(current.length){this.data.search.to_open=remaining;$.each(current,function(i,val){_this.open_node(val,function(){_this._search_open(true);});});done=false;}}
2361if(done){this.search(this.data.search.str,true);}}}});})(jQuery);(function($){$.vakata.context={hide_on_mouseleave:false,cnt:$("<div id='vakata-contextmenu' />"),vis:false,tgt:false,par:false,func:false,data:false,rtl:false,show:function(s,t,x,y,d,p,rtl){$.vakata.context.rtl=!!rtl;var html=$.vakata.context.parse(s),h,w;if(!html){return;}
2362$.vakata.context.vis=true;$.vakata.context.tgt=t;$.vakata.context.par=p||t||null;$.vakata.context.data=d||null;$.vakata.context.cnt.html(html).css({"visibility":"hidden","display":"block","left":0,"top":0});if($.vakata.context.hide_on_mouseleave){$.vakata.context.cnt.one("mouseleave",function(e){$.vakata.context.hide();});}
2363h=$.vakata.context.cnt.height();w=$.vakata.context.cnt.width();if(x+w>$(document).width()){x=$(document).width()-(w+5);$.vakata.context.cnt.find("li > ul").addClass("right");}
2364if(y+h>$(document).height()){y=y-(h+t[0].offsetHeight);$.vakata.context.cnt.find("li > ul").addClass("bottom");}
2365$.vakata.context.cnt.css({"left":x,"top":y}).find("li:has(ul)").bind("mouseenter",function(e){var w=$(document).width(),h=$(document).height(),ul=$(this).children("ul").show();if(w!==$(document).width()){ul.toggleClass("right");}
2366if(h!==$(document).height()){ul.toggleClass("bottom");}}).bind("mouseleave",function(e){$(this).children("ul").hide();}).end().css({"visibility":"visible"}).show();$(document).triggerHandler("context_show.vakata");},hide:function(){$.vakata.context.vis=false;$.vakata.context.cnt.attr("class","").css({"visibility":"hidden"});$(document).triggerHandler("context_hide.vakata");},parse:function(s,is_callback){if(!s){return false;}
2367var str="",tmp=false,was_sep=true;if(!is_callback){$.vakata.context.func={};}
2368str+="<ul>";$.each(s,function(i,val){if(!val){return true;}
2369$.vakata.context.func[i]=val.action;if(!was_sep&&val.separator_before){str+="<li class='vakata-separator vakata-separator-before'></li>";}
2370was_sep=false;str+="<li class='"+(val._class||"")+(val._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ";if(val.icon&&val.icon.indexOf("/")===-1){str+=" class='"+val.icon+"' ";}
2371if(val.icon&&val.icon.indexOf("/")!==-1){str+=" style='background:url("+val.icon+") center center no-repeat;' ";}
2372str+=">&#160;</ins><a href='#' rel='"+i+"'>";if(val.submenu){str+="<span style='float:"+($.vakata.context.rtl?"left":"right")+";'>&raquo;</span>";}
2373str+=val.label+"</a>";if(val.submenu){tmp=$.vakata.context.parse(val.submenu,true);if(tmp){str+=tmp;}}
2374str+="</li>";if(val.separator_after){str+="<li class='vakata-separator vakata-separator-after'></li>";was_sep=true;}});str=str.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,"");str+="</ul>";$(document).triggerHandler("context_parse.vakata");return str.length>10?str:false;},exec:function(i){if($.isFunction($.vakata.context.func[i])){$.vakata.context.func[i].call($.vakata.context.data,$.vakata.context.par);return true;}
2375else{return false;}}};$(function(){var css_string=''+'#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } '+'#vakata-contextmenu ul { min-width:180px; *width:180px; } '+'#vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } '+'#vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } '+'#vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } '+'#vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } '+'#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } '+'#vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } '+'#vakata-contextmenu .right { right:100%; left:auto; } '+'#vakata-contextmenu .bottom { bottom:-1px; top:auto; } '+'#vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ';$.vakata.css.add_sheet({str:css_string,title:"vakata"});$.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault();}).delegate("a","mouseup",function(e){if(!$(this).parent().hasClass("jstree-contextmenu-disabled")&&$.vakata.context.exec($(this).attr("rel"))){$.vakata.context.hide();}
2376else{$(this).blur();}}
2376).delegate("a","mouseover",function(){$.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover");}).appendTo("body");$(document).bind("mousedown",function(e){if($.vakata.context.vis&&!$.contains($.vakata.context.cnt[0],e.target)){$.vakata.context.hide();}});if(typeof $.hotkeys!=="undefined"){$(document).bind("keydown","up",function(e){if($.vakata.context.vis){var o=$.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();if(!o.length){o=$.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last();}
2377o.addClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}}).bind("keydown","down",function(e){if($.vakata.context.vis){var o=$.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();if(!o.length){o=$.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first();}
2378o.addClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}}).bind("keydown","right",function(e){if($.vakata.context.vis){$.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}}).bind("keydown","left",function(e){if($.vakata.context.vis){$.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}}).bind("keydown","esc",function(e){$.vakata.context.hide();e.preventDefault();}).bind("keydown","space",function(e){$.vakata.context.cnt.find(".vakata-hover").last().children("a").click();e.preventDefault();});}});$.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",$.proxy(function(e){e.preventDefault();if(!$(e.currentTarget).hasClass("jstree-loading")){this.show_contextmenu(e.currentTarget,e.pageX,e.pageY);}},this)).delegate("a","click.jstree",$.proxy(function(e){if(this.data.contextmenu){$.vakata.context.hide();}},this)).bind("destroy.jstree",$.proxy(function(){if(this.data.contextmenu){$.vakata.context.hide();}},this));$(document).bind("context_hide.vakata",$.proxy(function(){this.data.contextmenu=false;},this));},defaults:{select_node:false,show_at_node:true,items:{"create":{"separator_before":false,"separator_after":true,"label":"Create","action":function(obj){this.create(obj);}},"rename":{"separator_before":false,"separator_after":false,"label":"Rename","action":function(obj){this.rename(obj);}},"remove":{"separator_before":false,"icon":false,"separator_after":false,"label":"Delete","action":function(obj){if(this.is_selected(obj)){this.remove();}else{this.remove(obj);}}},"ccp":{"separator_before":true,"icon":false,"separator_after":false,"label":"Edit","action":false,"submenu":{"cut":{"separator_before":false,"separator_after":false,"label":"Cut","action":function(obj){this.cut(obj);}},"copy":{"separator_before":false,"icon":false,"separator_after":false,"label":"Copy","action":function(obj){this.copy(obj);}},"paste":{"separator_before":false,"icon":false,"separator_after":false,"label":"Paste","action":function(obj){this.paste(obj);}}}}}},_fn:{show_contextmenu:function(obj,x,y){obj=this._get_node(obj);var s=this.get_settings().contextmenu,a=obj.children("a:visible:eq(0)"),o=false,i=false;if(s.select_node&&this.data.ui&&!this.is_selected(obj)){this.deselect_all();this.select_node(obj,true);}
2379if(s.show_at_node||typeof x==="undefined"||typeof y==="undefined"){o=a.offset();x=o.left;y=o.top+this.data.core.li_height;}
2380i=obj.data("jstree")&&obj.data("jstree").contextmenu?obj.data("jstree").contextmenu:s.items;if($.isFunction(i)){i=i.call(this,obj);}
2381this.data.contextmenu=true;$.vakata.context.show(i,a,x,y,this,obj,this._get_settings().core.rtl);if(this.data.themes){$.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context");}}}});})(jQuery);(function($){$.jstree.plugin("types",{__init:function(){var s=this._get_settings().types;this.data.types.attach_to=[];this.get_container().bind("init.jstree",$.proxy(function(){var types=s.types,attr=s.type_attr,icons_css="",_this=this;$.each(types,function(i,tp){$.each(tp,function(k,v){if(!/^(max_depth|max_children|icon|valid_children)$/.test(k)){_this.data.types.attach_to.push(k);}});if(!tp.icon){return true;}
2382if(tp.icon.image||tp.icon.position){if(i=="default"){icons_css+='.jstree-'+_this.get_index()+' a > .jstree-icon { ';}
2383else{icons_css+='.jstree-'+_this.get_index()+' li['+attr+'="'+i+'"] > a > .jstree-icon { ';}
2384if(tp.icon.image){icons_css+=' background-image:url('+tp.icon.image+'); ';}
2385if(tp.icon.position){icons_css+=' background-position:'+tp.icon.position+'; ';}
2386else{icons_css+=' background-position:0 0; ';}
2387icons_css+='} ';}});if(icons_css!==""){$.vakata.css.add_sheet({'str':icons_css,title:"jstree-types"});}},this)).bind("before.jstree",$.proxy(function(e,data){var s,t,o=this._get_settings().types.use_data?this._get_node(data.args[0]):false,d=o&&o!==-1&&o.length?o.data("jstree"):false;
2387if(d&&d.types&&d.types[data.func]===false){e.stopImmediatePropagation();return false;}
2388if($.inArray(data.func,this.data.types.attach_to)!==-1){if(!data.args[0]||(!data.args[0].tagName&&!data.args[0].jquery)){return;}
2389s=this._get_settings().types.types;t=this._get_type(data.args[0]);if(((s[t]&&typeof s[t][data.func]!=="undefined")||(s["default"]&&typeof s["default"][data.func]!=="undefined"))&&this._check(data.func,data.args[0])===false){e.stopImmediatePropagation();return false;}}},this));if(is_ie6){this.get_container().bind("load_node.jstree set_type.jstree",$.proxy(function(e,data){var r=data&&data.rslt&&data.rslt.obj&&data.rslt.obj!==-1?this._get_node(data.rslt.obj).parent():this.get_container_ul(),c=false,s=this._get_settings().types;$.each(s.types,function(i,tp){if(tp.icon&&(tp.icon.image||tp.icon.position)){c=i==="default"?r.find("li > a > .jstree-icon"):r.find("li["+s.type_attr+"='"+i+"'] > a > .jstree-icon");if(tp.icon.image){c.css("backgroundImage","url("+tp.icon.image+")");}
2390c.css("backgroundPosition",tp.icon.position||"0 0");}});},this));}},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:false,type_attr:"rel",types:{"default":{"max_children":-1,"max_depth":-1,"valid_children":"all"}}},_fn:{_types_notify:function(n,data){if(data.type&&this._get_settings().types.use_data){this.set_type(data.type,n);}},_get_type:function(obj){obj=this._get_node(obj);return(!obj||!obj.length)?false:obj.attr(this._get_settings().types.type_attr)||"default";},set_type:function(str,obj){obj=this._get_node(obj);var ret=(!obj.length||!str)?false:obj.attr(this._get_settings().types.type_attr,str);if(ret){this.__callback({obj:obj,type:str});}
2391return ret;},_check:function(rule,obj,opts){obj=this._get_node(obj);var v=false,t=this._get_type(obj),d=0,_this=this,s=this._get_settings().types,data=false;if(obj===-1){if(!!s[rule]){v=s[rule];}
2392else{return;}}
2393else{if(t===false){return;}
2394data=s.use_data?obj.data("jstree"):false;if(data&&data.types&&typeof data.types[rule]!=="undefined"){v=data.types[rule];}
2395else if(!!s.types[t]&&typeof s.types[t][rule]!=="undefined"){v=s.types[t][rule];}
2396else if(!!s.types["default"]&&typeof s.types["default"][rule]!=="undefined"){v=s.types["default"][rule];}}
2397if($.isFunction(v)){v=v.call(this,obj);}
2398if(rule==="max_depth"&&obj!==-1&&opts!==false&&s.max_depth!==-2&&v!==0){obj.children("a:eq(0)").parentsUntil(".jstree","li").each(function(i){if(s.max_depth!==-1&&s.max_depth-(i+1)<=0){v=0;return false;}
2399d=(i===0)?v:_this._check(rule,this,false);
2399if(d!==-1&&d-(i+1)<=0){v=0;return false;}
2400if(d>=0&&(d-(i+1)<v||v<0)){v=d-(i+1);}
2401if(s.max_depth>=0&&(s.max_depth-(i+1)<v||v<0)){v=s.max_depth-(i+1);}});}
2402return v;},check_move:function(){if(!this.__call_old()){return false;}
2403var m=this._get_move(),s=m.rt._get_settings().types,mc=m.rt._check("max_children",m.cr),md=m.rt._check("max_depth",m.cr),vc=m.rt._check("valid_children",m.cr),ch=0,d=1,t;if(vc==="none"){return false;}
2404if($.isArray(vc)&&m.ot&&m.ot._get_type){m.o.each(function(){if($.inArray(m.ot._get_type(this),vc)===-1){d=false;return false;}});if(d===false){return false;}}
2405if(s.max_children!==-2&&mc!==-1){ch=m.cr===-1?this.get_container().find("> ul > li").not(m.o).length:m.cr.find("> ul > li").not(m.o).length;if(ch+m.o.length>mc){return false;}}
2406if(s.max_depth!==-2&&md!==-1){d=0;if(md===0){return false;}
2407if(typeof m.o.d==="undefined"){t=m.o;while(t.length>0){t=t.find("> ul > li");d++;}
2408m.o.d=d;}
2409if(md-m.o.d<0){return false;}}
2410return true;},create_node:function(obj,position,js,callback,is_loaded,skip_check){if(!skip_check&&(is_loaded||this._is_loaded(obj))){var p=(typeof position=="str
2410ing"&&position.match(/^before|after$/i)&&obj!==-1)?this._get_parent(obj):this._get_node(obj),s=this._get_settings().types,mc=this._check("max_children",p),md=this._check("max_depth",p),vc=this._check("valid_children",p),ch;if(typeof js==="string"){js={data:js};}
2411if(!js){js={};}
2412if(vc==="none"){return false;}
2413if($.isArray(vc)){if(!js.attr||!js.attr[s.type_attr]){if(!js.attr){js.attr={};}
2414js.attr[s.type_attr]=vc[0];}
2415else{if($.inArray(js.attr[s.type_attr],vc)===-1){return false;}}}
2416if(s.max_children!==-2&&mc!==-1){ch=p===-1?this.get_container().find("> ul > li").length:p.find("> ul > li").length;if(ch+1>mc){return false;}}
2417if(s.max_depth!==-2&&md!==-1&&(md-1)<0){return false;}}
2418return this.__call_old(true,obj,position,js,callback,is_loaded,skip_check);}}});})(jQuery);(function($){$.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(true);this.data.html_data.original_container_html.find("li").addBack().contents().filter(function(){return this.nodeType==3;}).remove();},defaults:{data:false,ajax:false,correct_state:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_html(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){obj=this._get_node(obj);return obj==-1||!obj||(!this._get_settings().html_data.ajax&&!$.isFunction(this._get_settings().html_data.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_html:function(obj,s_call,e_call){var d,s=this.get_settings().html_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;}
2419else{obj.data("jstree_is_loading",true);}}
2420switch(!0){case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){if(d&&d!==""&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")!==""){d=$(d);if(!d.is("ul")){d=$("<ul />").append(d);}
2421if(obj==-1||!obj){this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");}
2422else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree_is_loading");}
2423this.clean_node(obj);if(s_call){s_call.call(this);}}
2424else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
2425else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}},this));break;case(!s.data&&!s.ajax):if(!obj||obj==-1){this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();}
2426if(s_call){s_call.call(this);}
2427break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){d=$(s.data);if(!d.is("ul")){d=$("<ul />").append(d);}
2428this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();}
2429if(s_call){s_call.call(this);}
2430break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):obj=this._get_node(obj);error_func=function(x,t,e){var ef=this.get_settings().html_data.ajax.error;if(ef){ef.call(this,x,t,e);}
2431if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");
2431if(t==="success"&&s.correct_state){this.correct_state(obj);}}
2432else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}}
2433if(e_call){e_call.call(this);}};success_func=function(d,t,x){var sf=this.get_settings().html_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
2434if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")){return error_func.call(this,x,t,"");}
2435if(d){d=$(d);if(!d.is("ul")){d=$("<ul />").append(d);}
2436if(obj==-1||!obj){this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");}
2437else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree_is_loading");}
2438this.clean_node(obj);if(s_call){s_call.call(this);}}
2439else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
2440else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="html";}
2441if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);}
2442if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);}
2443$.ajax(s.ajax);break;}}}});$.jstree.defaults.plugins.push("html_data");})(jQuery);(function($){$.jstree.plugin("themeroller",{__init:function(){var s=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(e){if(!$(e.currentTarget).hasClass("jstree-loading")){$(this).addClass(s.item_h);}}).delegate("a","mouseleave.jstree",function(){$(this).removeClass(s.item_h);}).bind("init.jstree",$.proxy(function(e,data){data.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh");this._themeroller(data.inst.get_container().find("> ul > li"));},this)).bind("open_node.jstree create_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.obj);},this)).bind("loaded.jstree refresh.jstree",$.proxy(function(e){this._themeroller();},this)).bind("close_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.obj);},this)).bind("delete_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.parent);},this)).bind("correct_state.jstree",$.proxy(function(e,data){data.rslt.obj.children("ins.jstree-icon").removeClass(s.opened+" "+s.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")===-1;}).removeClass(s.item_open+" "+s.item_clsd).addClass(s.item_leaf||"jstree-no-icon");},this)).bind("select_node.jstree",$.proxy(function(e,data){data.rslt.obj.children("a").addClass(s.item_a);},this)).bind("deselect_node.jstree deselect_all.jstree",$.proxy(function(e,data){this.get_container().find("a."+s.item_a).removeClass(s.item_a).end().find("a.jstree-clicked").addClass(s.item_a);},this)).bind("dehover_node.jstree",$.proxy(function(e,data){data.rslt.obj.children("a").removeClass(s.item_h);},this)).bind("hover_node.jstree",$.proxy(function(e,data){this.get_container().find("a."+s.item_h).not(data.rslt.obj).removeClass(s.item_h);data.rslt.obj.children("a").addClass(s.item_h);},this)).bind("move_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.o);this._themeroller(data.rslt.op);},this));},__destroy:function(){var s=this._get_settings().themeroller,c=["ui-icon"];$.each(s,function(i,v){v=v.split(" ");if(v.length){c=c.concat(v);}});this.get_container().removeClass("ui-widget-content").find("."+c.join(", .")).removeClass(c.join(" "));},_fn:{_themeroller:function(obj){var s=this._get_settings().themeroller;obj=(!obj||obj==-1)?this.get_container_ul():this._get_node(obj);obj=(!obj||obj==-1)?this.get_container_ul():obj.parent();obj.find("li.jstree-closed").children("ins.jstree-icon").removeClass(s.opened).addClass("ui-icon "+s.closed).end().children("a").addClass(s.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")===-1;}).removeClass(s.item_leaf+" "+s.item_open).addClass(s.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(s.closed).addClass("ui-icon "+s.opened).end().children("a").addClass(s.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")===-1;}).removeClass(s.item_leaf+" "+s.item_clsd).addClass(s.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(s.closed+" ui-icon "+s.opened).end().children("a").addClass(s.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return this.className.toString().replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"").indexOf("ui-icon-")===-1;}).removeClass(s.item_clsd+" "+s.item_open).addClass(s.item_leaf||"jstree-no-icon");}},defaults:{"opened":"ui-icon-triangle-1-se","closed":"ui-icon-triangle-1-e","item":"ui-state-default","item_h":"ui-state-hover","item_a":"ui-state-active","item_open":"ui-icon-folder-open","item_clsd":"ui-icon-folder-collapsed","item_leaf":"ui-icon-document"}});$(function(){var css_string=''+'.jstree-themeroller .ui-icon { overflow:visible; } '+'.jstree-themeroller a { padding:0 2px; }
2443 '+'.jstree-themeroller .jstree-no-icon { display:none; }';$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){$.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",$.proxy(function(e,data){var nms=[],res=true,p,t;if(data.func=="move_node"){if(data.args[4]===true){if(data.args[0].o&&data.args[0].o.length){data.args[0].o.children("a").each(function(){nms.push($(this).text().replace(/^\s+/g,""));});res=this._check_unique(nms,data.args[0].np.find("> ul > li").not(data.args[0].o),"move_node");}}}
2444if(data.func=="create_node"){if(data.args[4]||this._is_loaded(data.args[0])){p=this._get_node(data.args[0]);if(data.args[1]&&(data.args[1]==="before"||data.args[1]==="after")){p=this._get_parent(data.args[0]);if(!p||p===-1){p=this.get_container();}}
2445if(typeof data.args[2]==="string"){nms.push(data.args[2]);}
2446else if(!data.args[2]||!data.args[2].data){nms.push(this._get_string("new_node"));}
2447else{nms.push(data.args[2].data);}
2448res=this._check_unique(nms,p.find("> ul > li"),"create_node");}}
2449if(data.func=="rename_node"){nms.push(data.args[1]);t=this._get_node(data.args[0]);p=this._get_parent(t);if(!p||p===-1){p=this.get_container();}
2450res=this._check_unique(nms,p.find("> ul > li").not(t),"rename_node");}
2451if(!res){e.stopPropagation();return false;}},this));},defaults:{error_callback:$.noop},_fn:{_check_unique:function(nms,p,func){var cnms=[],ok=true;p.children("a").each(function(){cnms.push($(this).text().replace(/^\s+/g,""));});if(!cnms.length||!nms.length){return true;}
2452$.each(nms,function(i,v){if($.inArray(v,cnms)!==-1){ok=false;return false;}});if(!ok){this._get_settings().unique.error_callback.call(null,nms,p,func);}
2453return ok;},check_move:function(){if(!this.__call_old()){return false;}
2454var p=this._get_move(),nms=[];if(p.o&&p.o.length){p.o.children("a").each(function(){nms.push($(this).text().replace(/^\s+/g,""));});return this._check_unique(nms,p.np.find("> ul > li").not(p.o),"check_move");}
2455return true;}}});})(jQuery);(function($){$.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui){throw"jsTree wholerow: jsTree UI plugin not included.";}
2456this.data.wholerow.html=false;this.data.wholerow.to=false;this.get_container().bind("init.jstree",$.proxy(function(e,data){this._get_settings().core.animation=0;},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",$.proxy(function(e,data){this._prepare_wholerow_span(data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1);},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",$.proxy(function(e,data){if(this.data.to){clearTimeout(this.data.to);}
2457this.data.to=setTimeout((function(t,o){return function(){t._prepare_wholerow_ul(o);};})(this,data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1),0);},this)).bind("deselect_all.jstree",$.proxy(function(e,data){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""));},this)).bind("select_node.jstree deselect_node.jstree ",$.proxy(function(e,data){data.rslt.obj.each(function(){var ref=data.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+(parseInt((($(this).offset().top-data.inst.get_container().offset().top+data.inst.get_container()[0].scrollTop)/data.inst.data.core.li_height),10))+")");ref.children("a").attr("class",data.rslt.obj.children("a").attr("class"));});},this)).bind("hover_node.jstree dehover_node.jstree",$.proxy(function(e,data){this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:""));if(e.type==="hover_node"){var ref=this.get_container().find(" > .jstree-wholerow li:visible:eq("+(parseInt(((data.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height),10))+")");ref.children("a").attr("class",data.rslt.obj.children(".jstree-hovered").attr("class"));}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var n=$(e.currentTarget);if(e.target.tagName==="A"||(e.target.tagName==="INS"&&n.closest("li").is(".jstree-open, .jstree-closed"))){return;}
2458n.closest("li").children("a:visible:eq(0)").click();e.stopImmediatePropagation();}).delegate("li","mouseover.jstree",$.proxy(function(e){e.stopImmediatePropagation();if($(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length){return false;}
2459this.hover_node(e.currentTarget);return false;},this)).delegate("li","mouseleave.jstree",$.proxy(function(e){if($(e.currentTarget).children("a").hasClass("jstree-hovered").length){return;}
2460this.dehover_node(e.currentTarget);},this));
2460if(is_ie7||is_ie6){$.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"});}},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove();this.get_container().find(".jstree-wholerow-span").remove();},_fn:{_prepare_wholerow_span:function(obj){obj=!obj||obj==-1?this.get_container().find("> ul > li"):this._get_node(obj);if(obj===false){return;}
2461obj.each(function(){$(this).find("li").addBack().each(function(){var $t=$(this);if($t.children(".jstree-wholerow-span").length){return true;}
2462$t.prepend("<span class='jstree-wholerow-span' style='width:"+($t.parentsUntil(".jstree","li").length*18)+"px;'>&#160;</span>");});});},_prepare_wholerow_ul:function(){var o=this.get_container().children("ul").eq(0),h=o.html();o.addClass("jstree-wholerow-real");if(this.data.wholerow.last_html!==h){this.data.wholerow.last_html=h;this.get_container().children(".jstree-wholerow").remove();this.get_container().append(o.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(o.parent()[0].scrollWidth).css("top",(o.height()+(is_ie7?5:0))*-1).find("li[id]").each(function(){this.removeAttribute("id");}).end());}}}});$(function(){var css_string=''+'.jstree .jstree-wholerow-real { position:relative; z-index:1; } '+'.jstree .jstree-wholerow-real li { cursor:pointer; } '+'.jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } '+'.jstree .jstree-wholerow { position:relative; z-index:0; height:0; } '+'.jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } '+'.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } '+'.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }'+'.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }'+'.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } '+'.jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }';if(is_ff2){css_string+=''+'.jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } '+'.jstree .jstree-wholerow-real a { border-color:transparent !important; } ';}
2463if(is_ie7||is_ie6){css_string+=''+'.jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } '+'.jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } ';}
2464$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){var nodeInterface=["getChildren","getChildrenCount","getAttr","getName","getProps"],validateInterface=function(obj,inter){var valid=true;obj=obj||{};inter=[].concat(inter);$.each(inter,function(i,v){if(!$.isFunction(obj[v])){valid=false;return false;}});return valid;};$.jstree.plugin("model",{__init:function(){if(!this.data.json_data){throw"jsTree model: jsTree json_data plugin not included.";}
2465this._get_settings().json_data.data=function(n,b){var obj=(n==-1)?this._get_settings().model.object:n.data("jstree_model");if(!validateInterface(obj,nodeInterface)){return b.call(null,false);}
2466if(this._get_settings().model.async){obj.getChildren($.proxy(function(data){this.model_done(data,b);},this));}
2467else{this.model_done(obj.getChildren(),b);}};},defaults:{object:false,id_prefix:false,async:false},_fn:{model_done:function(data,callback){var ret=[],s=this._get_settings(),_this=this;if(!$.isArray(data)){data=[data];}
2468$.each(data,function(i,nd){var r=nd.getProps()||{};r.attr=nd.getAttr()||{};if(nd.getChildrenCount()){r.state="closed";}
2469r.data=nd.getName();if(!$.isArray(r.data)){r.data=[r.data];}
2470if(_this.data.types&&$.isFunction(nd.getType)){r.attr[s.types.type_attr]=nd.getType();}
2471if(r.attr.id&&s.model.id_prefix){r.attr.id=s.model.id_prefix+r.attr.id;}
2472if(!r.metadata){r.metadata={};}
2473r.metadata.jstree_model=nd;ret.push(r);});callback.call(null,ret);}}});})(jQuery);})();(function($){'use strict';$.jstree.plugin('actions',{__init:function(){var that=this;that.get_container().bind('init.jstree loaded.jstree refresh.jstree clean_node.jstree rename_node.jstree create_node.jstree',$.proxy(function(e,data){var $li=that.get_container().find('.jstree-open, .jstree-closed, .jstree-leaf').filter(that._get_settings().actions.filter);that.__buildActions($li);},this));that.get_container().bind("after_open.jstree",$.proxy(function(e,data){var $li=data.rslt.obj.children("ul").find('li');that.__buildActions($li);},this));that.get_container().bind("hover_node.jstree",function(event,data){var $li=data.rslt.obj;$li.find("> a > div.jstree-actions").css({opacity:"1",display:"inline-block"});});that.get_container().bind("dehover_node.jstree",function(event,data){that.get_container().find('.jstree-actions').filter(function(){return $(this).css('opacity')!="0";}).css({opacity:"0",display:"none"});});},defaults:{buttons:{},filter:function(index){var $this=$(this);return $(this).attr('rel')!='root';}},__destroy:function(){this.get_container().find('.jstree-actions').remove();},_fn:{__buildActions:function(root){var that=this;root.each(function(){var $actions=$(this).find('.jstree-actions');if($actions.length===0){var $link=$(this).find('> a'),$actions=$('<div>').addClass('jstree-actions').appendTo($link),actions=$.extend({},that._get_settings().actions.buttons["default"],that._get_settings().actions.buttons[$(this).attr('rel')]);if(actions){$.each(actions,function(index,button){var $parent=$actions.closest('li');if(!button.filter||(button.filter&&$.isFunction(button.filter)&&button.filter($parent))){if
2473(button.binding){var $button=$('<button>').addClass('jstree-button'+(button.className?' '+button.className:'')).appendTo($actions);$.each(button.binding,function(eventType,process){$button.bind(eventType,process);});}}});}}});},get_text:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
2474var s=this._get_settings().core.html_titles;obj=obj.children("a:eq(0)");if(s){obj=obj.clone();obj.children("INS").remove();obj.children(".jstree-actions").remove();return obj.html();}
2475else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];return obj.nodeValue;}}},});})(jQuery);(function($){$.jstree.plugin("kcheckbox",{__init:function(){this.data.kcheckbox.noui=this._get_settings().kcheckbox.override_ui;if(this.data.ui&&this.data.kcheckbox.noui){this.select_node=this.deselect_node=this.deselect_all=$.noop;this.get_selected=this.get_checked;}
2476this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",$.proxy(function(e,data){this._prepare_checkboxes(data.rslt.obj);},this)).bind("loaded.jstree",$.proxy(function(e){this._prepare_checkboxes();},this)).delegate((this.data.ui&&this.data.kcheckbox.noui?"a":"ins.jstree-checkbox"),"click.jstree",$.proxy(function(e){e.preventDefault();if(this._get_node(e.target).hasClass("jstree-checked")){this.uncheck_node(e.target);}
2477else{this.check_node(e.target);}
2478if(this.data.ui&&this.data.kcheckbox.noui){this.save_selected();if(this.data.cookies){this.save_cookie("select_node");}}
2479else{e.stopImmediatePropagation();return false;}},this));},defaults:{override_ui:false,two_state:false,real_checkboxes:false,checked_parent_open:true,real_checkboxes_names:function(n){return[("check_"+(n[0].id||Math.ceil(Math.random()*10000))),1];}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove();},_fn:{_checkbox_notify:function(n,data){if(data.checked){this.check_node(n,false);}},_prepare_checkboxes:function(obj){obj=!obj||obj==-1?this.get_container().find("> ul > li"):this._get_node(obj);if(obj===false){return;}
2480var c,_this=this,t,ts=this._get_settings().kcheckbox.two_state,rc=this._get_settings().kcheckbox.real_checkboxes,rcn=this._get_settings().kcheckbox.real_checkboxes_names;obj.each(function(){t=$(this);c=t.is("li")&&(t.hasClass("jstree-checked")||(rc&&t.children(":checked").length))?"jstree-checked":"jstree-unchecked";t.find("li").addBack().each(function(){var $t=$(this),nm;$t.children("a"+(_this.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(ts?"jstree-unchecked":c);if(rc){if(!$t.children(":checkbox").length){nm=rcn.call(_this,$t);$t.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+nm[0]+"' name='"+nm[0]+"' value='"+nm[1]+"' />");}
2481else{$t.children(":checkbox").addClass("jstree-real-checkbox");}}
2482if(!ts){if(c==="jstree-checked"||$t.hasClass("jstree-checked")||$t.children(':checked').length){$t.find("li").addBack().addClass("jstree-checked").children(":checkbox").prop("checked",true);}}
2483else{if($t.hasClass("jstree-checked")||$t.children(':checked').length){$t.addClass("jstree-checked").children(":checkbox").prop("checked",true);}}});});if(!ts){obj.find(".jstree-checked").parent().parent().each(function(){_this._repair_state(this);});}},change_state:function(obj,state){obj=this._get_node(obj);var coll=false,rc=this._get_settings().kcheckbox.real_checkboxes;if(!obj||obj===-1){return false;}
2484state=(state===false||state===true)?state:obj.hasClass("jstree-checked");if(this._get_settings().kcheckbox.two_state){if(state){obj.removeClass("jstree-checked").addClass("jstree-unchecked");if(rc){obj.children(":checkbox").prop("checked",false);}}
2485else{obj.removeClass("jstree-unchecked").addClass("jstree-checked");if(rc){obj.children(":checkbox").prop("checked",true);}}}
2486else{if(state){coll=obj.find("li").addBack();if(!coll.filter(".jstree-checked, .jstree-undetermined").length){return false;}
2487coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){coll.children(":checkbox").prop("checked",false);}}
2488else{coll=obj.find("li").addBack();if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length){return false;}
2489coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){coll.children(":checkbox").prop("checked",true);}
2490if(this.data.ui){this.data.ui.last_selected=obj;}
2491this.data.kcheckbox.last_selected=obj;}
2492obj.parentsUntil(".jstree","li").each(function(){var $this=$(this);if(state){if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}
2493return false;}
2494else{$this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){$this.children(":checkbox").prop("checked",false);}}}
2495else{if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length||$this.data('numchildren')!=$this.children("ul").children("li").length){$this.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}
2496return false;}
2497else{$this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){$this.children(":checkbox").prop("checked",true);}}}});}
2498if(this.data.ui&&this.data.kcheckbox.noui){this.data.ui.selected=this.get_checked();}
2499this.__callback(obj);return true;}
2499,check_node:function(obj){if(this.change_state(obj,false)){obj=this._get_node(obj);if(this._get_settings().kcheckbox.checked_parent_open){var t=this;obj.parents(".jstree-closed").each(function(){t.open_node(this,false,true);});}
2500this.__callback({"obj":obj});}},uncheck_node:function(obj){if(this.change_state(obj,true)){this.__callback({"obj":this._get_node(obj)});}},check_all:function(){var _this=this,coll=this._get_settings().kcheckbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,false);});this.__callback();},uncheck_all:function(){var _this=this,coll=this._get_settings().kcheckbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,true);});this.__callback();},is_checked:function(obj){obj=this._get_node(obj);return obj.length?obj.is(".jstree-checked"):false;},get_checked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().kcheckbox.two_state?obj.find(".jstree-checked"):obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");},get_unchecked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().kcheckbox.two_state?obj.find(".jstree-unchecked"):obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes");},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes");},_repair_state:function(obj){obj=this._get_node(obj);if(!obj.length){return;}
2501if(this._get_settings().kcheckbox.two_state){obj.find('li').addBack().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked',true);return;}
2502var rc=this._get_settings().kcheckbox.real_checkboxes,a=obj.find("> ul > .jstree-checked").length,b=obj.find("> ul > .jstree-undetermined").length,c=obj.find("> ul > li").length;if(c===0){if(obj.hasClass("jstree-undetermined")){this.change_state(obj,false);}}
2503else if(a===0&&b===0){this.change_state(obj,true);}
2504else if(a===c){this.change_state(obj,false);}
2505else{obj.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){obj.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}}},reselect:function(){if(this.data.ui&&this.data.kcheckbox.noui){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.deselect_all();$.each(s,function(i,val){_this.check_node(val);});this.__callback();}
2506else{this.__call_old();}},save_loaded:function(){var _this=this;this.data.core.to_load=[];this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){if(this.id){_this.data.core.to_load.push("#"+this.id);}});}}});$(function(){var css_string='.jstree .jstree-real-checkbox { display:none; } ';$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){if($().jquery.split('.')[1]>=8){$.expr[':'].jstree_highlight=$.expr.createPseudo(function(search){return function(a){return(a.textContent||a.innerText||"").toLowerCase().indexOf(search.toLowerCase())>=0;};});$.expr[':'].jstree_title_highlight=$.expr.createPseudo(function(search){return function(a){return(a.getAttribute("title")||"").toLowerCase().indexOf(search.toLowerCase())>=0;};});}
2507else{$.expr[':'].jstree_highlight=function(a,i,m){return(a.textContent||a.innerText||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};$.expr[':'].jstree_title_highlight=function(a,i,m){return(a.getAttribute("title")||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};}
2508$.jstree.plugin("kfilter",{__init:function(){var _this=this;this.data.kfilter.defaultAjax=_this.get_settings().json_data.ajax;},defaults:{ajax:false,highlight_method:"jstree_highlight"},_fn:{kfilter:function(str,skip_async){var _this=this;if(!this.data.kfilter.initial_state)this.data.kfilter.initial_state=this.get_rollback();if($.trim(str)===""){this.clear_kfilter();return;}
2509var s=this.get_settings().kfilter,t=this;this.get_container().addClass('jstree-filtered');var newSettings=_this.get_settings();newSettings.json_data.ajax=s.ajax;this._set_settings(newSettings);this.load_node_json(-1,false,false);},clear_kfilter:function(str){var _this=this;var newSettings=_this.get_settings();newSettings.json_data.ajax=_this.data.kfilter.defaultAjax;this._set_settings(newSettings);this.load_node_json(-1,function(){this.get_container().removeClass('jstree-filtered');_this.__rollback(_this.data.kfilter.initial_state);_this.data.kfilter.initial_state=null;},false);}}});})(jQuery);;!function($){"use strict";function transitionEnd(){var el=document.createElement('bootstrap')
2510var transEndEventNames={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','OTransition':'oTransitionEnd otransitionend','transition':'transitionend'}
2511for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}}
2512$.fn.emulateTransitionEnd=function(duration){var called=false,$el=this
2513$(this).one($.support.transition.end,function(){called=true})
2514var callback=function(){if(!called)$($el).trigger($.support.transition.end)}
2515setTimeout(callback,duration)
2516return this}
2517$(function(){$.support.transition=transitionEnd()})
2518var toggle='[data-toggle=dropdown]',Dropdown=function(element){var $el=$(element).on('click.dropdown.data-api',this.toggle)
2519$('html').on('click.dropdown.data-api',function(){$el.parent().removeClass('open')})}
2520Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),$parent,isActive
2521if($this.is('.disabled, :disabled'))return
2522$parent=getParent($this)
2523isActive=$parent.hasClass('open')
2524clearMenus()
2525if(!isActive){if('ontouchstart'in document.documentElement){$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click',clearMenus)}
2526$parent.toggleClass('open')}
2527$this.focus()
2528return false},keydown:function(e){var $this,$items,$active,$parent,isActive,index
2529if(!/(38|40|27)/.test(e.keyCode))return
2530$this=$(this)
2531e.preventDefault()
2532e.stopPropagation()
2533if($this.is('.disabled, :disabled'))return
2534$parent=getParent($this)
2535isActive=$parent.hasClass('open')
2536if(!isActive||(isActive&&e.keyCode==27)){if(e.which==27)$parent.find(toggle).focus()
2537return $this.click()}
2538$items=$('[role=menu] li:not(.divider):visible a',$parent)
2539if(!$items.length)return
2540index=$items.index($items.filter(':focus'))
2541if(e.keyCode==38&&index>0)index--
2542if(e.keyCode==40&&index<$items.length-1)index++
2543if(!~index)index=0
2544$items.eq(index).focus()}}
2545function clearMenus(){$('.dropdown-backdrop').remove()
2546$(toggle).each(function(){getParent($(this)).removeClass('open')})}
2547function getParent($this){var selector=$this.attr('data-target'),$parent
2548if(!selector){selector=$this.attr('href')
2549selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}
2550$parent=selector&&$(selector)
2551if(!$parent||!$parent.length)$parent=$this.parent()
2552return $parent}
2553var old=$.fn.dropdown
2554$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data('dropdown')
2555if(!data)$this.data('dropdown',(data=new Dropdown(this)))
2556if(typeof option=='string')data[option].call($this)})}
2557$.fn.dropdown.Constructor=Dropdown
2558$.fn.dropdown.noConflict=function(){$.fn.dropdown=old
2559return this}
2560$(document).on('click.dropdown.data-api',clearMenus).on('click.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.dropdown.data-api',toggle+', [role=menu]',Dropdown.prototype.keydown)}(window.jQuery);!function($){"use strict";var Tooltip=function(element,options){this.init('tooltip',element,options)}
2561Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut,triggers,trigger,i
2562this.type=type
2563this.$element=$(element)
2564this.options=this.getOptions(options)
2565this.enabled=true
2566triggers=this.options.trigger.split(' ')
2567for(i=triggers.length;i--;){trigger=triggers[i]
2568if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){eventIn=trigger=='hover'?'mouseenter':'focus'
2569eventOut=trigger=='hover'?'mouseleave':'blur'
2570this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this))
2571this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}}
2572this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()},getOptions:function(options){options=$.extend({},$.fn[this.type].defaults,this.$element.data(),options)
2573if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}
2574return options},enter:function(e){var defaults=$.fn[this.type].defaults,options={},self
2575this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value},this)
2576self=$(e.currentTarget)[this.type](options).data(this.type)
2577if(!self.options.delay||!self.options.delay.show)return self.show()
2578clearTimeout(this.timeout)
2579self.hoverState='in'
2580this.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type)
2581if(this.timeout)clearTimeout(this.timeout)
2582if(!self.options.delay||!self.options.delay.hide)return self.hide()
2583self.hoverState='out'
2584this.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)},show:function(){var $tip,pos,actualWidth,actualHeight,placement,tp,e=$.Event('show')
2585if(this.hasContent()&&this.enabled){this.$element.trigger(e)
2586if(e.isDefaultPrevented())return
2587$tip=this.tip()
2588this.setContent()
2589if(this.options.animation){$tip.addClass('fade')}
2590placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement
2591$tip.detach().css({top:0,left:0,display:'block'})
2592this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element)
2593pos=this.getPosition()
2594actualWidth=$tip[0].offsetWidth
2595actualHeight=$tip[0].offsetHeight
2596switch(placement){case'bottom':tp={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}
2597break
2598case'top':tp={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}
2599break
2600case'left':tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}
2601break
2602case'right':tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}
2603break}
2604this.applyPlacement(tp,placement)
2605this.$element.trigger('shown')}},applyPlacement:function(offset,placement){var $tip=this.tip(),width=$tip[0].offsetWidth,height=$tip[0].offsetHeight,actualWidth,actualHeight,delta,replace
2606$tip.offset(offset).addClass(placement).addClass('in')
2607actualWidth=$tip[0].offsetWidth
2608actualHeight=$tip[0].offsetHeight
2609if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight
2610replace=true}
2611if(placement=='bottom'||placement=='top'){delta=0
2612if(offset.left<0){delta=offset.left*-2
2613offset.left=0
2614$tip.offset(offset)
2615actualWidth=$tip[0].offsetWidth
2616actualHeight=$tip[0].offsetHeight}
2617this.replaceArrow(delta-width+actualWidth,actualWidth,'left')}else{this.replaceArrow(actualHeight-height,actualHeight,'top')}
2618if(replace)$tip.offset(offset)},replaceArrow:function(delta,dimension,position){this.arrow().css(position,delta?(50*(1-delta/dimension)+"%"):'')},setContent:function(){var $tip=this.tip(),title=this.getTitle()
2619$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title)
2620$tip.removeClass('fade in top bottom left right')},hide:function(){var that=this,$tip=this.tip()
2621$tip.removeClass('in')
2622function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.
2622support.transition.end).detach()},500)
2623$tip.one($.support.transition.end,function(){clearTimeout(timeout)
2624$tip.detach()})}
2625$.support.transition&&this.$tip.hasClass('fade')?removeWithAnimation():$tip.detach()
2626this.$element.trigger('hidden')
2627return this},fixTitle:function(){var $e=this.$element
2628if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}},hasContent:function(){return this.getTitle()},getPosition:function(){var el=this.$element[0]
2629return $.extend({},(typeof el.getBoundingClientRect=='function')?el.getBoundingClientRect():{width:el.offsetWidth,height:el.offsetHeight},this.$element.offset())},getTitle:function(){var title,$e=this.$element,o=this.options
2630title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title)
2631return title},tip:function(){return this.$tip=this.$tip||$(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){if(!this.$element[0].parentNode){this.hide()
2632this.$element=null
2633this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var self=e?$(e.currentTarget)[this.type](this._options).data(this.type):this
2634self.tip().hasClass('in')?self.hide():self.show()},destroy:function(){this.hide().$element.off('.'+this.type).removeData(this.type)}}
2635var old=$.fn.tooltip
2636$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data('tooltip'),options=typeof option=='object'&&option
2637if(!data)$this.data('tooltip',(data=new Tooltip(this,options)))
2638if(typeof option=='string')data[option]()})}
2639$.fn.tooltip.Constructor=Tooltip
2640$.fn.tooltip.defaults={animation:true,placement:'top',selector:false,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false}
2641$.fn.tooltip.noConflict=function(){$.fn.tooltip=old
2642return this}
2643var dismiss='[data-dismiss="alert"]'
2644var Alert=function(el){$(el).on('click',dismiss,this.close)}
2645Alert.prototype.close=function(e){var $this=$(this)
2646var selector=$this.attr('data-target')
2647if(!selector){selector=$this.attr('href')
2648selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
2649var $parent=$(selector)
2650if(e)e.preventDefault()
2651if(!$parent.length){$parent=$this.hasClass('alert')?$this:$this.parent()}
2652$parent.trigger(e=$.Event('close.bs.alert'))
2653if(e.isDefaultPrevented())return
2654$parent.removeClass('in')
2655function removeElement(){$parent.trigger('closed.bs.alert').remove()}
2656$.support.transition&&$parent.hasClass('fade')?$parent.one($.support.transition.end,removeElement).emulateTransitionEnd(150):removeElement()}
2657var old=$.fn.alert
2658$.fn.alert=function(option){return this.each(function(){var $this=$(this)
2659var data=$this.data('bs.alert')
2660if(!data)$this.data('bs.alert',(data=new Alert(this)))
2661if(typeof option=='string')data[option].call($this)})}
2662$.fn.alert.Constructor=Alert
2663$.fn.alert.noConflict=function(){$.fn.alert=old
2664return this}
2665$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(window.jQuery);(function(jQuery){var rulesEngine={};try{if(!jQuery&&module&&module.exports){var jQuery=require("jquery");}}catch(ignore){}
2666(function($,rulesEngine){"use strict";var validation={};rulesEngine.forbiddenSequences=["0123456789","9876543210","abcdefghijklmnopqrstuvxywz","qwertyuiop","asdfghjkl","zxcvbnm"];validation.wordNotEmail=function(options,word,score){if(word.match(/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i)){options.instances.errors.push(options.ui.spanError(options,"email_as_password"));return score;}};validation.wordLength=function(options,word,score){var wordlen=word.length,lenScore=Math.pow(wordlen,options.rules.raisePower);if(wordlen<options.common.minChar){lenScore=(lenScore+score);options.instances.errors.push(options.ui.spanError(options,"password_too_short"));}
2667return lenScore;};validation.wordSimilarToUsername=function(options,word,score){var username=$(options.common.usernameField).val();if(username&&word.toLowerCase().match(username.toLowerCase())){options.instances.errors.push(options.ui.spanError(options,"same_as_username"));return score;}
2668return false;};validation.wordTwoCharacterClasses=function(options,word,score){if(word.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)||(word.match(/([a-zA-Z])/)&&word.match(/([0-9])/))||(word.match(/(.[!,@,#,$,%,\^,&,*,?,_,~])/)&&word.match(/[a-zA-Z0-9_]/))){return score;}
2669options.instances.errors.push(options.ui.spanError(options,"two_character_classes"));return false;};validation.wordRepetitions=function(options,word,score){if(word.match(/(.)\1\1/)){options.instances.errors.push(options.ui.spanError(options,"repeated_character"));return score;}
2670return false;};validation.wordSequences=function(options,word,score){var found=false,j;if(word.length>2){$.each(rulesEngine.forbiddenSequences,function(idx,sequence){for(j=0;j<(word.length-3);j+=1){if(sequence.indexOf(word.toLowerCase().substring(j,j+3))>-1){found=true;}}});if(found){options.instances.errors.push(options.ui.spanError(options,"sequence_found"));return score;}}
2671return false;};validation.wordLowercase=function(options,word,score){return word.match(/[a-z]/)&&score;};validation.wordUppercase=function(options,word,score){return word.match(/[A-Z]/)&&score;};validation.wordOneNumber=function(options,word,score){return word.match(/\d+/)&&score;};validation.wordThreeNumbers=function(options,word,score){return word.match(/(.*[0-9].*[0-9].*[0-9])/)&&score;};validation.wordOneSpecialChar=function(options,word,score){return word.match(/.[!,@,#,$,%,\^,&,*,?,_,~]/)&&score;};validation.wordTwoSpecialChar=function(options,word,score){return word.match(/(.*[!,@,#,$,%,\^,&,*,?,_,~].*[!,@,#,$,%,\^,&,*,?,_,~])/)&&score;};validation.wordUpperLowerCombo=function(options,word,score){return word.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&score;};validation.wordLetterNumberCombo=function(options,word,score){return word.match(/([a-zA-Z])/)&&word.match(/([0-9])/)&&score;};validation.wordLetterNumberCharCombo=function(options,word,score){return word.match(/([a-zA-Z0-9].*[!,@,#,$,%,\^,&,*,?,_,~])|([!,@,#,$,%,\^,&,*,?,_,~].*[a-zA-Z0-9])/)&&score;};rulesEngine.validation=validation;rulesEngine.executeRules=function(options,word){var totalScore=0;$.each(options.rules.activated,function(rule,active){if(active){var score=options.rules.scores[rule],funct=rulesEngine.validation[rule],result;if(!$.isFunction(funct)){funct=options.rules.extra[rule];}
2672if($.isFunction(funct)){result=funct(options,word,score);if(result){totalScore+=result;}}}});return totalScore;};}(jQuery,rulesEngine));try{if(module&&module.exports){module.exports=rulesEngine;}}catch(ignore){}
2673var defaultOptions={};defaultOptions.common={};defaultOptions.common.minChar=6;defaultOptions.common.usernameField="#username";defaultOptions.common.onLoad=undefined;defaultOptions.common.onKeyUp=undefined;defaultOptions.rules={};defaultOptions.rules.extra={};defaultOptions.rules.scores={wordNotEmail:-100,wordLength:-50,wordSimilarToUsername:-100,wordSequences:-50,wordTwoCharacterClasses:2,wordRepetitions:-25,wordLowercase:1,wordUppercase:3,wordOneNumber:3,wordThreeNumbers:5,wordOneSpecialChar:3,wordTwoSpecialChar:5,wordUpperLowerCombo:2,wordLetterNumberCombo:2,wordLetterNumberCharCombo:2};defaultOptions.rules.activated={wordNotEmail:true,wordLength:true,wordSimilarToUsername:true,wordSequences:true,wordTwoCharacterClasses:false,wordRepetitions:false,wordLowercase:true,wordUppercase:true,wordOneNumber:true,wordThreeNumbers:true,wordOneSpecialChar:true,wordTwoSpecialChar:true,wordUpperLowerCombo:true,wordLetterNumberCombo:true,wordLetterNumberCharCombo:true};defaultOptions.rules.raisePower=1.4;defaultOptions.ui={};defaultOptions.ui.bootstrap2=false;defaultOptions.ui.showPopover=false;defaultOptions.ui.spanError=function(options,key){"use strict";var text=options.ui.errorMessages[key];return'<span style="color: #d52929">'+text+'</span>';};defaultOptions.ui.errorMessages={password_too_short:"The Password is too short",email_as_password:"Do not use your email as your password",same_as_username:"Your password cannot contain your username",two_character_classes:"Use different character classes",repeated_character:"Too many repetitions",sequence_found:"Your password contains sequences"};defaultOptions.ui.verdicts=["Weak","Normal","Medium","Strong","Very Strong"];defaultOptions.ui.showVerdicts=true;defaultOptions.ui.showErrors=false;defaultOptions.ui.container=undefined;defaultOptions.ui.viewports={progress:undefined,verdict:undefined,errors:undefined};defaultOptions.ui.scores=[14,26,38,50];var ui={};(function($,ui){"use strict";ui.getContainer=function(options,$el){var $container;$container=$(options.ui.container);if(!($container&&$container.length===1)){$container=$el.parent();}
2674return $container;};ui.findElement=function($container,viewport,cssSelector){if(viewport){return $container.find(viewport).find(cssSelector);}
2675return $container.find(cssSelector);};ui.getUIElements=function(options,$el){var $container,result;if(options.instances.viewports){return options.instances.viewports;}
2676result={};$container=ui.getContainer(options,$el);result.$progressbar=ui.findElement($container,options.ui.viewports.progress,"div.progress");if(!options.ui.showPopover){result.$verdict=ui.findElement($container,options.ui.viewports.verdict,"span.password-verdict");result.$errors=ui.findElement($container,options.ui.viewports.errors,"ul.error-list");}
2677options.instances.viewports=result;return result;};ui.initProgressBar=function(options,$el){var $container=ui.getContainer(options,$el),progressbar="<div class='progress'><div class='";if(!options.ui.bootstrap2){progressbar+="progress-";}
2678progressbar+="bar'></div></div>";if(options.ui.viewports.progress){$container.find(options.ui.viewports.progress).append(progressbar);}else{$(progressbar).insertAfter($el);}};ui.initHelper=function(options,$el,html,viewport){var $container=ui.getContainer(options,$el);if(viewport){$container.find(viewport).append(html);}else{$(html).insertAfter($el);}};ui.initVerdict=function(options,$el){ui.initHelper(options,$el,"<span class='password-verdict'></span>
2678",options.ui.viewports.verdict);};ui.initErrorList=function(options,$el){ui.initHelper(options,$el,"<ul class='error-list'></ul>",options.ui.viewports.errors);};ui.initPopover=function(options,$el,verdictText){var placement="auto top",html="";if(options.ui.bootstrap2){placement="top";}
2679if(options.ui.showVerdicts&&verdictText.length>0){html="<h5><span class='password-verdict'>"+verdictText+"</span></h5>";}
2680if(options.ui.showErrors){html+="<div><ul class='error-list'>";$.each(options.instances.errors,function(idx,err){html+="<li>"+err+"</li>";});html+="</ul></div>";}
2681$el.popover("destroy");$el.popover({html:true,placement:placement,trigger:"manual",content:html});$el.popover("show");};ui.initUI=function(options,$el){if(!options.ui.showPopover){ui.initErrorList(options,$el);ui.initVerdict(options,$el);}
2682ui.initProgressBar(options,$el);};ui.possibleProgressBarClasses=["danger","warning","success"];ui.updateProgressBar=function(options,$el,cssClass,percentage){var $progressbar=ui.getUIElements(options,$el).$progressbar,$bar=$progressbar.find(".progress-bar"),cssPrefix="progress-";if(options.ui.bootstrap2){$bar=$progressbar.find(".bar");cssPrefix="";}
2683$.each(ui.possibleProgressBarClasses,function(idx,value){$bar.removeClass(cssPrefix+"bar-"+value);});$bar.addClass(cssPrefix+"bar-"+cssClass);$bar.css("width",percentage+'%');};ui.updateVerdict=function(options,$el,text){var $verdict=ui.getUIElements(options,$el).$verdict;$verdict.text(text);};ui.updateErrors=function(options,$el){var $errors=ui.getUIElements(options,$el).$errors,html="";$.each(options.instances.errors,function(idx,err){html+="<li>"+err+"</li>";});$errors.html(html);};ui.percentage=function(score,maximun){var result=Math.floor(100*score/maximun);result=result<0?0:result;result=result>100?100:result;return result;};ui.updateUI=function(options,$el,score){var barCss,barPercentage,verdictText;barPercentage=ui.percentage(score,options.ui.scores[3]);if(score<=0){barCss="danger";verdictText="";}else if(score<options.ui.scores[0]){barCss="danger";verdictText=options.ui.verdicts[0];}else if(score<options.ui.scores[1]){barCss="danger";verdictText=options.ui.verdicts[1];}else if(score<options.ui.scores[2]){barCss="warning";verdictText=options.ui.verdicts[2];}else if(score<options.ui.scores[3]){barCss="warning";verdictText=options.ui.verdicts[3];}else{barCss="success";verdictText=options.ui.verdicts[4];}
2684ui.updateProgressBar(options,$el,barCss,barPercentage);if(options.ui.showPopover){ui.initPopover(options,$el,verdictText);}else{if(options.ui.showVerdicts){ui.updateVerdict(options,$el,verdictText);}
2685if(options.ui.showErrors){ui.updateErrors(options,$el);}}};}(jQuery,ui));var methods={};(function($,methods){"use strict";var onKeyUp,applyToAll;onKeyUp=function(event){var $el=$(event.target),options=$el.data("pwstrength-bootstrap"),word=$el.val(),score;options.instances.errors=[];score=rulesEngine.executeRules(options,word);ui.updateUI(options,$el,score);if($.isFunction(options.common.onKeyUp)){options.common.onKeyUp(event);}};methods.init=function(settings){this.each(function(idx,el){var clonedDefaults=$.extend(true,{},defaultOptions),localOptions=$.extend(true,clonedDefaults,settings),$el=$(el);localOptions.instances={};$el.data("pwstrength-bootstrap",localOptions);$el.on("keyup",onKeyUp);ui.initUI(localOptions,$el);if($.isFunction(localOptions.common.onLoad)){localOptions.common.onLoad();}});return this;};methods.destroy=function(){this.each(function(idx,el){var $el=$(el),options=$el.data("pwstrength-bootstrap"),elements=ui.getUIElements(options,$el);elements.$progressbar.remove();elements.$verdict.remove();elements.$errors.remove();$el.removeData("pwstrength-bootstrap");});};methods.forceUpdate=function(){this.each(function(idx,el){var event={target:el};onKeyUp(event);});};methods.addRule=function(name,method,score,active){this.each(function(idx,el){var options=$(el).data("pwstrength-bootstrap");options.rules.activated[name]=active;options.rules.scores[name]=score;options.rules.extra[name]=method;});};applyToAll=function(rule,prop,value){this.each(function(idx,el){$(el).data("pwstrength-bootstrap").rules[prop][rule]=value;});};methods.changeScore=function(rule,score){applyToAll.call(this,rule,"scores",score);};methods.ruleActive=function(rule,active){applyToAll.call(this,rule,"activated",active);};$.fn.pwstrength=function(method){var result;if(methods[method]){result=methods[method].apply(this,Array.prototype.slice.call(arguments,1
2685));}else if(typeof method==="object"||!method){result=methods.init.apply(this,arguments);}else{$.error("Method "+method+" does not exist on jQuery.pwstrength-bootstrap");}
2686return result;};}(jQuery,methods));}(jQuery));var mejs=mejs||{};mejs.version='2.18.1';mejs.meIndex=0;mejs.plugins={silverlight:[{version:[3,0],types:['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}],flash:[{version:[9,0,124],types:['video/mp4','video/m4v','video/mov','video/flv','video/rtmp','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg','video/youtube','video/x-youtube','video/dailymotion','video/x-dailymotion','application/x-mpegURL']}],youtube:[{version:null,types:['video/youtube','video/x-youtube','audio/youtube','audio/x-youtube']}],vimeo:[{version:null,types:['video/vimeo','video/x-vimeo']}]};mejs.Utility={encodeUrl:function(url){return encodeURIComponent(url);},escapeHTML:function(s){return s.toString().split('&').join('&amp;').split('<').join('&lt;').split('"').join('&quot;');},absolutizeUrl:function(url){var el=document.createElement('div');el.innerHTML='<a href="'+this.escapeHTML(url)+'">x</a>';return el.firstChild.href;},getScriptPath:function(scriptNames){var
2687i=0,j,codePath='',testname='',slashPos,filenamePos,scriptUrl,scriptPath,scriptFilename,scripts=document.getElementsByTagName('script'),il=scripts.length,jl=scriptNames.length;for(;i<il;i++){scriptUrl=scripts[i].src;slashPos=scriptUrl.lastIndexOf('/');if(slashPos>-1){scriptFilename=scriptUrl.substring(slashPos+1);scriptPath=scriptUrl.substring(0,slashPos+1);}else{scriptFilename=scriptUrl;scriptPath='';}
2688for(j=0;j<jl;j++){testname=scriptNames[j];filenamePos=scriptFilename.indexOf(testname);if(filenamePos>-1){codePath=scriptPath;break;}}
2689if(codePath!==''){break;}}
2690return codePath;},calculateTimeFormat:function(time,options,fps){if(time<0){time=0;}
2691if(typeof fps=='undefined'){fps=25;}
2692var format=options.timeFormat,firstChar=format[0],firstTwoPlaces=(format[1]==format[0]),separatorIndex=firstTwoPlaces?2:1,separator=':',hours=Math.floor(time/3600)%24,minutes=Math.floor(time/60)%60,seconds=Math.floor(time%60),frames=Math.floor(((time%1)*fps).toFixed(3)),lis=[[frames,'f'],[seconds,'s'],[minutes,'m'],[hours,'h']];if(format.length<separatorIndex){separator=format[separatorIndex];}
2693var required=false;for(var i=0,len=lis.length;i<len;i++){if(format.indexOf(lis[i][1])!==-1){required=true;}
2694else if(required){var hasNextValue=false;for(var j=i;j<len;j++){if(lis[j][0]>0){hasNextValue=true;break;}}
2695if(!hasNextValue){break;}
2696if(!firstTwoPlaces){format=firstChar+format;}
2697format=lis[i][1]+separator+format;if(firstTwoPlaces){format=lis[i][1]+format;}
2698firstChar=lis[i][1];}}
2699options.currentTimeFormat=format;},twoDigitsString:function(n){if(n<10){return'0'+n;}
2700return String(n);},secondsToTimeCode:function(time,options){if(time<0){time=0;}
2701var fps=options.framesPerSecond;if(typeof fps==='undefined'){fps=25;}
2702var format=options.currentTimeFormat,hours=Math.floor(time/3600)%24,minutes=Math.floor(time/60)%60,seconds=Math.floor(time%60),frames=Math.floor(((time%1)*fps).toFixed(3));lis=[[frames,'f'],[seconds,'s'],[minutes,'m'],[hours,'h']];var res=format;for(i=0,len=lis.length;i<len;i++){res=res.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0]));res=res.replace(lis[i][1],lis[i][0]);}
2703return res;},timeCodeToSeconds:function(hh_mm_ss_ff,forceHours,showFrameCount,fps){if(typeof showFrameCount=='undefined'){showFrameCount=false;}else if(typeof fps=='undefined'){fps=25;}
2704var tc_array=hh_mm_ss_ff.split(":"),tc_hh=parseInt(tc_array[0],10),tc_mm=parseInt(tc_array[1],10),tc_ss=parseInt(tc_array[2],10),tc_ff=0,tc_in_seconds=0;if(showFrameCount){tc_ff=parseInt(tc_array[3])/fps;}
2705tc_in_seconds=(tc_hh*3600)+(tc_mm*60)+tc_ss+tc_ff;return tc_in_seconds;},convertSMPTEtoSeconds:function(SMPTE){if(typeof SMPTE!='string')
2706return false;SMPTE=SMPTE.replace(',','.');var secs=0,decimalLen=(SMPTE.indexOf('.')!=-1)?SMPTE.split('.')[1].length:0,multiplier=1;SMPTE=SMPTE.split(':').reverse();for(var i=0;i<SMPTE.length;i++){multiplier=1;if(i>0){multiplier=Math.pow(60,i);}
2707secs+=Number(SMPTE[i])*multiplier;}
2708return Number(secs.toFixed(decimalLen));},removeSwf:function(id){var obj=document.getElementById(id);if(obj&&/object|embed/i.test(obj.nodeName)){if(mejs.MediaFeatures.isIE){obj.style.display="none";(function(){if(obj.readyState==4){mejs.Utility.removeObjectInIE(id);}else{setTimeout(arguments.callee,10);}})();}else{obj.parentNode.removeChild(obj);}}},removeObjectInIE:function(id){var obj=document.getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null;}}
2709obj.parentNode.removeChild(obj);}}};mejs.PluginDetector={hasPluginVersion:function(plugin,v){var pv=this.plugins[plugin];v[1]=v[1]||0;v[2]=v[2]||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(p,pluginName,mimeType,activeX,axDetect){this.plugins[p]=this.detectPlugin(pluginName,mimeType,activeX,axDetect);},detectPlugin:function(pluginName,mimeType,activeX,axDetect){var version=[0,0,0],description,i,ax;if(typeof(this.nav.plugins)!='undefined'&&typeof this.nav.plugins[pluginName]=='object'){description=this.nav.plugins[pluginName].description;if(description&&!(typeof this.nav.mimeTypes!='undefined'&&this.nav.mimeTypes[mimeType]&&!this.nav.mimeTypes[mimeType].enabledPlugin)){version=description.replace(pluginName,'').replace(/^\s+/,'').replace(/\sr/gi,'.').split('.');for(i=0;i<version.length;i++){version[i]=parseInt(version[i].match(/\d+/),10);}}}else if(typeof(window.ActiveXObject)!='undefined'){try{ax=new ActiveXObject(activeX);if(ax){version=axDetect(ax);}}
2710catch(e){}}
2711return version;}};mejs.PluginDetector.addPlugin('flash','Shockwave Flash','application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash',function(ax){var version=[],d=ax.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");version=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}
2712return version;});mejs.PluginDetector.addPlugin('silverlight','Silverlight Plug-In','application/x-silverlight-2','AgControl.AgControl',function(ax){var v=[0,0,0,0],loopMatch=function(ax,v,i,n){while(ax.isVersionSupported(v[0]+"."+v[1]+"."+v[2]+"."+v[3])){v[i]+=n;}
2713v[i]-=n;};loopMatch(ax,v,0,1);loopMatch(ax,v,1,1);loopMatch(ax,v,2,10000);loopMatch(ax,v,2,1000);loopMatch(ax,v,2,100);loopMatch(ax,v,2,10);loopMatch(ax,v,2,1);loopMatch(ax,v,3,1);return v;});mejs.MediaFeatures={init:function(){var
2714t=this,d=document,nav=mejs.PluginDetector.nav,ua=mejs.PluginDetector.ua.toLowerCase(),i,v,html5Elements=['source','track','audio','video'];t.isiPad=(ua.match(/ipad/i)!==null);t.isiPhone=(ua.match(/iphone/i)!==null);t.isiOS=t.isiPhone||t.isiPad;t.isAndroid=(ua.match(/android/i)!==null);t.isBustedAndroid=(ua.match(/android 2\.[12]/)!==null);t.isBustedNativeHTTPS=(location.protocol==='https:'&&(ua.match(/android [12]\./)!==null||ua.match(/macintosh.* version.* safari/)!==null));t.isIE=(nav.appName.toLowerCase().indexOf("microsoft")!=-1||nav.appName.toLowerCase().match(/trident/gi)!==null);t.isChrome=(ua.match(/chrome/gi)!==null);t.isChromium=(ua.match(/chromium/gi)!==null);t.isFirefox=(ua.match(/firefox/gi)!==null);t.isWebkit=(ua.match(/webkit/gi)!==null);t.isGecko=(ua.match(/gecko/gi)!==null)&&!t.isWebkit&&!t.isIE;t.isOpera=(ua.match(/opera/gi)!==null);t.hasTouch=('ontouchstart'in window);t.svg=!!document.createElementNS&&!!document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect;for(i=0;i<html5Elements.length;i++){v=document.createElement(html5Elements[i]);}
2715t.supportsMediaTag=(typeof v.canPlayType!=='undefined'||t.isBustedAndroid);try{v.canPlayType("video/mp4");}catch(e){t.supportsMediaTag=false;}
2716t.hasSemiNativeFullScreen=(typeof v.webkitEnterFullscreen!=='undefined');t.hasNativeFullscreen=(typeof v.requestFullscreen!=='undefined');t.hasWebkitNativeFullScreen=(typeof v.webkitRequestFullScreen!=='undefined');t.hasMozNativeFullScreen=(typeof v.mozRequestFullScreen!=='undefined');t.hasMsNativeFullScreen=(typeof v.msRequestFullscreen!=='undefined');t.hasTrueNativeFullScreen=(t.hasWebkitNativeFullScreen||t.hasMozNativeFullScreen||t.hasMsNativeFullScreen);t.nativeFullScreenEnabled=t.hasTrueNativeFullScreen;if(t.hasMozNativeFullScreen){t.nativeFullScreenEnabled=document.mozFullScreenEnabled;}else if(t.hasMsNativeFullScreen){t.nativeFullScreenEnabled=document.msFullscreenEnabled;}
2717if(t.isChrome){t.hasSemiNativeFullScreen=false;}
2718if(t.hasTrueNativeFullScreen){t.fullScreenEventName='';if(t.hasWebkitNativeFullScreen){t.fullScreenEventName='webkitfullscreenchange';}else if(t.hasMozNativeFullScreen){t.fullScreenEventName='mozfullscreenchange';}else if(t.hasMsNativeFullScreen){t.fullScreenEventName='MSFullscreenChange';}
2719t.isFullScreen=function(){if(t.hasMozNativeFullScreen){return d.mozFullScreen;}else if(t.hasWebkitNativeFullScreen){return d.webkitIsFullScreen;}else if(t.hasMsNativeFullScreen){return d.msFullscreenElement!==null;}}
2720t.requestFullScreen=function(el){if(t.hasWebkitNativeFullScreen){el.webkitRequestFullScreen();}else if(t.hasMozNativeFullScreen){el.mozRequestFullScreen();}else if(t.hasMsNativeFullScreen){el.msRequestFullscreen();}}
2721t.cancelFullScreen=function(){if(t.hasWebkitNativeFullScreen){document.webkitCancelFullScreen();}else if(t.hasMozNativeFullScreen){document.mozCancelFullScreen();}else if(t.hasMsNativeFullScreen){document.msExitFullscreen();}}}
2722if(t.hasSemiNativeFullScreen&&ua.match(/mac os x 10_5/i)){t.hasNativeFullScreen=false;t.hasSemiNativeFullScreen=false;}}};mejs.MediaFeatures.init();mejs.HtmlMediaElement={pluginType:'native',isFullScreen:false,setCurrentTime:function(time){this.currentTime=time;},setMuted:function(muted){this.muted=muted;},setVolume:function(volume){this.volume=volume;},stop:function(){this.pause();},setSrc:function(url){var
2723existingSources=this.getElementsByTagName('source');while(existingSources.length>0){this.removeChild(existingSources[0]);}
2724if(typeof url=='string'){this.src=url;}else{var i,media;for(i=0;i<url.length;i++){media=url[i];if(this.canPlayType(media.type)){this.src=media.src;break;}}}},setVideoSize:function(width,height){this.width=width;this.height=height;}};mejs.PluginMediaElement=function(pluginid,pluginType,mediaUrl){this.id=pluginid;this.pluginType=pluginType;this.src=mediaUrl;this.events={};this.attributes={};};mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:'',isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:'',muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){if(this.pluginType=='youtube'||this.pluginType=='vimeo'){this.pluginApi.playVideo();}else{this.pluginApi.playMedia();}
2725this.paused=false;}},load:function(){if(this.pluginApi!=null){if(this.pluginType=='youtube'||this.pluginType=='vimeo'){}else{this.pluginApi.loadMedia();}
2726this.paused=false;}},pause:function(){if(this.pluginApi!=null){if(this.pluginType=='youtube'||this.pluginType=='vimeo'){this.pluginApi.pauseVideo();}else{this.pluginApi.pauseMedia();}
2727this.paused=true;}},stop:function(){if(this.pluginApi!=null){if(this.pluginType=='youtube'||this.pluginType=='vimeo'){this.pluginApi.stopVideo();}else{this.pluginApi.stopMedia();}
2728this.paused=true;}},canPlayType:function(type){var i,j,pluginInfo,pluginVersions=mejs.plugins[this.pluginType];for(i=0;i<pluginVersions.length;i++){pluginInfo=pluginVersions[i];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,pluginInfo.version)){for(j=0;j<pluginInfo.types.length;j++){if(type==pluginInfo.types[j]){return'probably';}}}}
2729return'';},positionFullscreenButton:function(x,y,visibleAndAbove){if(this.pluginApi!=null&&this.pluginApi.positionFullscreenButton){this.pluginApi.positionFullscreenButton(Math.floor(x),Math.floor(y),visibleAndAbove);}},hideFullscreenButton:function(){if(this.pluginApi!=null&&this.pluginApi.hideFullscreenButton){this.pluginApi.hideFullscreenButton();}},setSrc:function(url){if(typeof url=='string'){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(url));this.src=mejs.Utility.absolutizeUrl(url);}else{var i,media;for(i=0;i<url.length;i++){media=url[i];if(this.canPlayType(media.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(media.src));this.src=mejs.Utility.absolutizeUrl(media.src);break;}}}},setCurrentTime:function(time){if(this.pluginApi!=null){if(this.pluginType=='youtube'||this.pluginType=='vimeo'){this.pluginApi.seekTo(time);}else{this.pluginApi.setCurrentTime(time);}
2730this.currentTime=time;}},setVolume:function(volume){if(this.pluginApi!=null){if(this.pluginType=='youtube'){this.pluginApi.setVolume(volume*100);}else{this.pluginApi.setVolume(volume);}
2731this.volume=volume;}},setMuted:function(muted){if(this.pluginApi!=null){if(this.pluginType=='youtube'){if(muted){this.pluginApi.mute();}else{this.pluginApi.unMute();}
2732this.muted=muted;this.dispatchEvent({type:'volumechange'});}else{this.pluginApi.setMuted(muted);}
2733this.muted=muted;}},setVideoSize:function(width,height){if(this.pluginElement&&this.pluginElement.style){this.pluginElement.style.width=width+'px';this.pluginElement.style.height=height+'px';}
2734if(this.pluginApi!=null&&this.pluginApi.setVideoSize){this.pluginApi.setVideoSize(width,height);}},setFullscreen:function(fullscreen){if(this.pluginApi!=null&&this.pluginApi.setFullscreen){this.pluginApi.setFullscreen(fullscreen);}}
2734,enterFullScreen:function(){if(this.pluginApi!=null&&this.pluginApi.setFullscreen){this.setFullscreen(true);}},exitFullScreen:function(){if(this.pluginApi!=null&&this.pluginApi.setFullscreen){this.setFullscreen(false);}},addEventListener:function(eventName,callback,bubble){this.events[eventName]=this.events[eventName]||[];this.events[eventName].push(callback);},removeEventListener:function(eventName,callback){if(!eventName){this.events={};return true;}
2735var callbacks=this.events[eventName];if(!callbacks)return true;if(!callback){this.events[eventName]=[];return true;}
2736for(var i=0;i<callbacks.length;i++){if(callbacks[i]===callback){this.events[eventName].splice(i,1);return true;}}
2737return false;},dispatchEvent:function(event){var i,args,callbacks=this.events[event.type];if(callbacks){for(i=0;i<callbacks.length;i++){callbacks[i].apply(this,[event]);}}},hasAttribute:function(name){return(name in this.attributes);},removeAttribute:function(name){delete this.attributes[name];},getAttribute:function(name){if(this.hasAttribute(name)){return this.attributes[name];}
2738return'';},setAttribute:function(name,value){this.attributes[name]=value;},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id);}};mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(id,pluginMediaElement,htmlMediaElement){this.pluginMediaElements[id]=pluginMediaElement;this.htmlMediaElements[id]=htmlMediaElement;},unregisterPluginElement:function(id){delete this.pluginMediaElements[id];delete this.htmlMediaElements[id];},initPlugin:function(id){var pluginMediaElement=this.pluginMediaElements[id],htmlMediaElement=this.htmlMediaElements[id];if(pluginMediaElement){switch(pluginMediaElement.pluginType){case"flash":pluginMediaElement.pluginElement=pluginMediaElement.pluginApi=document.getElementById(id);break;case"silverlight":pluginMediaElement.pluginElement=document.getElementById(pluginMediaElement.id);pluginMediaElement.pluginApi=pluginMediaElement.pluginElement.Content.MediaElementJS;break;}
2739if(pluginMediaElement.pluginApi!=null&&pluginMediaElement.success){pluginMediaElement.success(pluginMediaElement,htmlMediaElement);}}},fireEvent:function(id,eventName,values){var
2740e,i,bufferedTime,pluginMediaElement=this.pluginMediaElements[id];if(!pluginMediaElement){return;}
2741e={type:eventName,target:pluginMediaElement};for(i in values){pluginMediaElement[i]=values[i];e[i]=values[i];}
2742bufferedTime=values.bufferedTime||0;e.target.buffered=e.buffered={start:function(index){return 0;},end:function(index){return bufferedTime;},length:1};pluginMediaElement.dispatchEvent(e);}};mejs.MediaElementDefaults={mode:'auto',plugins:['flash','silverlight','youtube','vimeo'],enablePluginDebug:false,httpsBasicAuthSite:false,type:'',pluginPath:mejs.Utility.getScriptPath(['mediaelement.js','mediaelement.min.js','mediaelement-and-player.js','mediaelement-and-player.min.js']),flashName:'flashmediaelement.swf',flashStreamer:'',flashScriptAccess:'sameDomain',enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:'start',silverlightName:'silverlightmediaelement.xap',defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(el,o){return mejs.HtmlMediaElementShim.create(el,o);};mejs.HtmlMediaElementShim={create:function(el,o){var
2743options=mejs.MediaElementDefaults,htmlMediaElement=(typeof(el)=='string')?document.getElementById(el):el,tagName=htmlMediaElement.tagName.toLowerCase(),isMediaTag=(tagName==='audio'||tagName==='video'),src=(isMediaTag)?htmlMediaElement.getAttribute('src'):htmlMediaElement.getAttribute('href'),poster=htmlMediaElement.getAttribute('poster'),autoplay=htmlMediaElement.getAttribute('autoplay'),preload=htmlMediaElement.getAttribute('preload'),controls=htmlMediaElement.getAttribute('controls'),playback,prop;for(prop in o){options[prop]=o[prop];}
2744src=(typeof src=='undefined'||src===null||src=='')?null:src;poster=(typeof poster=='undefined'||poster===null)?'':poster;preload=(typeof preload=='undefined'||preload===null||preload==='false')?'none':preload;autoplay=!(typeof autoplay=='undefined'||autoplay===null||autoplay==='false');controls=!(typeof controls=='undefined'||controls===null||controls==='false');playback=this.determinePlayback(htmlMediaElement,options,mejs.MediaFeatures.supportsMediaTag,isMediaTag,src);playback.url=(playback.url!==null)?mejs.Utility.absolutizeUrl(playback.url):'';if(playback.method=='native'){if(mejs.MediaFeatures.isBustedAndroid){htmlMediaElement.src=playback.url;htmlMediaElement.addEventListener('click',function(){htmlMediaElement.play();},false);}
2745return this.updateNative(playback,options,autoplay,preload);}else if(playback.method!==''){return this.createPlugin(playback,options,poster,autoplay,preload,c
2745ontrols);}else{this.createErrorMessage(playback,options,poster);return this;}},determinePlayback:function(htmlMediaElement,options,supportsMediaTag,isMediaTag,src){var
2746mediaFiles=[],i,j,k,l,n,type,result={method:'',url:'',htmlMediaElement:htmlMediaElement,isVideo:(htmlMediaElement.tagName.toLowerCase()!='audio')},pluginName,pluginVersions,pluginInfo,dummy,media;if(typeof options.type!='undefined'&&options.type!==''){if(typeof options.type=='string'){mediaFiles.push({type:options.type,url:src});}else{for(i=0;i<options.type.length;i++){mediaFiles.push({type:options.type[i],url:src});}}}else if(src!==null){type=this.formatType(src,htmlMediaElement.getAttribute('type'));mediaFiles.push({type:type,url:src});}else{for(i=0;i<htmlMediaElement.childNodes.length;i++){n=htmlMediaElement.childNodes[i];if(n.nodeType==1&&n.tagName.toLowerCase()=='source'){src=n.getAttribute('src');type=this.formatType(src,n.getAttribute('type'));media=n.getAttribute('media');if(!media||!window.matchMedia||(window.matchMedia&&window.matchMedia(media).matches)){mediaFiles.push({type:type,url:src});}}}}
2747if(!isMediaTag&&mediaFiles.length>0&&mediaFiles[0].url!==null&&this.getTypeFromFile(mediaFiles[0].url).indexOf('audio')>-1){result.isVideo=false;}
2748if(mejs.MediaFeatures.isBustedAndroid){htmlMediaElement.canPlayType=function(type){return(type.match(/video\/(mp4|m4v)/gi)!==null)?'maybe':'';};}
2749if(mejs.MediaFeatures.isChromium){htmlMediaElement.canPlayType=function(type){return(type.match(/video\/(webm|ogv|ogg)/gi)!==null)?'maybe':'';};}
2750if(supportsMediaTag&&(options.mode==='auto'||options.mode==='auto_plugin'||options.mode==='native')&&!(mejs.MediaFeatures.isBustedNativeHTTPS&&options.httpsBasicAuthSite===true)){if(!isMediaTag){dummy=document.createElement(result.isVideo?'video':'audio');htmlMediaElement.parentNode.insertBefore(dummy,htmlMediaElement);htmlMediaElement.style.display='none';result.htmlMediaElement=htmlMediaElement=dummy;}
2751for(i=0;i<mediaFiles.length;i++){if(mediaFiles[i].type=="video/m3u8"||htmlMediaElement.canPlayType(mediaFiles[i].type).replace(/no/,'')!==''||htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/mp3/,'mpeg')).replace(/no/,'')!==''||htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/m4a/,'mp4')).replace(/no/,'')!==''){result.method='native';result.url=mediaFiles[i].url;break;}}
2752if(result.method==='native'){if(result.url!==null){htmlMediaElement.src=result.url;}
2753if(options.mode!=='auto_plugin'){return result;}}}
2754if(options.mode==='auto'||options.mode==='auto_plugin'||options.mode==='shim'){for(i=0;i<mediaFiles.length;i++){type=mediaFiles[i].type;for(j=0;j<options.plugins.length;j++){pluginName=options.plugins[j];pluginVersions=mejs.plugins[pluginName];for(k=0;k<pluginVersions.length;k++){pluginInfo=pluginVersions[k];if(pluginInfo.version==null||mejs.PluginDetector.hasPluginVersion(pluginName,pluginInfo.version)){for(l=0;l<pluginInfo.types.length;l++){if(type.toLowerCase()==pluginInfo.types[l].toLowerCase()){result.method=pluginName;result.url=mediaFiles[i].url;return result;}}}}}}}
2755if(options.mode==='auto_plugin'&&result.method==='native'){return result;}
2756if(result.method===''&&mediaFiles.length>0){result.url=mediaFiles[0].url;}
2757return result;},formatType:function(url,type){if(url&&!type){return this.getTypeFromFile(url);}else{if(type&&~type.indexOf(';')){return type.substr(0,type.indexOf(';'));}else{return type;}}},getTypeFromFile:function(url){url=url.split('?')[0];var
2758ext=url.substring(url.lastIndexOf('.')+1).toLowerCase(),av=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(ext)?'video/':'audio/';return this.getTypeFromExtension(ext,av);},getTypeFromExtension:function(ext,av){av=av||'';switch(ext){case'mp4':case'm4v':case'm4a':case'f4v':case'f4a':return av+'mp4';case'flv':return av+'x-flv';case'webm':case'webma':case'webmv':return av+'webm';case'ogg':case'oga':case'ogv':return av+'ogg';case'm3u8':return'application/x-mpegurl';case'ts':return av+'mp2t';default:return av+ext;}},createErrorMessage:function(playback,options,poster){var
2759htmlMediaElement=playback.htmlMediaElement,errorContainer=document.createElement('div'),errorContent=options.customError;errorContainer.className='me-cannotplay';try{errorContainer.style.width=htmlMediaElement.width+'px';errorContainer.style.height=htmlMediaElement.height+'px';}catch(e){}
2760if(!errorContent){errorContent='<a href="'+playback.url+'">';if(poster!==''){errorContent+='<img src="'+poster+'" width="100%" height="100%" alt="" />';}
2761errorContent+='<span>'+mejs.i18n.t('Download File')+'</span></a>';}
2762errorContainer.innerHTML=errorContent;htmlMediaElement.parentNode.insertBefore(errorContainer,htmlMediaElement);htmlMediaElement.style.display='none';options.error(htmlMediaElement);},createPlugin:function(playback,options,poster,autoplay,preload,c
2762ontrols){var
2763htmlMediaElement=playback.htmlMediaElement,width=1,height=1,pluginid='me_'+playback.method+'_'+(mejs.meIndex++),pluginMediaElement=new mejs.PluginMediaElement(pluginid,playback.method,playback.url),container=document.createElement('div'),specialIEContainer,node,initVars;pluginMediaElement.tagName=htmlMediaElement.tagName
2764for(var i=0;i<htmlMediaElement.attributes.length;i++){var attribute=htmlMediaElement.attributes[i];if(attribute.specified){pluginMediaElement.setAttribute(attribute.name,attribute.value);}}
2765node=htmlMediaElement.parentNode;while(node!==null&&node.tagName!=null&&node.tagName.toLowerCase()!=='body'&&node.parentNode!=null&&node.parentNode.tagName!=null&&node.parentNode.constructor!=null&&node.parentNode.constructor.name==="ShadowRoot"){if(node.parentNode.tagName.toLowerCase()==='p'){node.parentNode.parentNode.insertBefore(node,node.parentNode);break;}
2766node=node.parentNode;}
2767if(playback.isVideo){width=(options.pluginWidth>0)?options.pluginWidth:(options.videoWidth>0)?options.videoWidth:(htmlMediaElement.getAttribute('width')!==null)?htmlMediaElement.getAttribute('width'):options.defaultVideoWidth;height=(options.pluginHeight>0)?options.pluginHeight:(options.videoHeight>0)?options.videoHeight:(htmlMediaElement.getAttribute('height')!==null)?htmlMediaElement.getAttribute('height'):options.defaultVideoHeight;width=mejs.Utility.encodeUrl(width);height=mejs.Utility.encodeUrl(height);}else{if(options.enablePluginDebug){width=320;height=240;}}
2768pluginMediaElement.success=options.success;mejs.MediaPluginBridge.registerPluginElement(pluginid,pluginMediaElement,htmlMediaElement);container.className='me-plugin';container.id=pluginid+'_container';if(playback.isVideo){htmlMediaElement.parentNode.insertBefore(container,htmlMediaElement);}else{document.body.insertBefore(container,document.body.childNodes[0]);}
2769initVars=['id='+pluginid,'jsinitfunction='+"mejs.MediaPluginBridge.initPlugin",'jscallbackfunction='+"mejs.MediaPluginBridge.fireEvent",'isvideo='+((playback.isVideo)?"true":"false"),'autoplay='+((autoplay)?"true":"false"),'preload='+preload,'width='+width,'startvolume='+options.startVolume,'timerrate='+options.timerRate,'flashstreamer='+options.flashStreamer,'height='+height,'pseudostreamstart='+options.pseudoStreamingStartQueryParam];if(playback.url!==null){if(playback.method=='flash'){initVars.push('file='+mejs.Utility.encodeUrl(playback.url));}else{initVars.push('file='+playback.url);}}
2770if(options.enablePluginDebug){initVars.push('debug=true');}
2771if(options.enablePluginSmoothing){initVars.push('smoothing=true');}
2772if(options.enablePseudoStreaming){initVars.push('pseudostreaming=true');}
2773if(controls){initVars.push('controls=true');}
2774if(options.pluginVars){initVars=initVars.concat(options.pluginVars);}
2775switch(playback.method){case'silverlight':container.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+pluginid+'" name="'+pluginid+'" width="'+width+'" height="'+height+'" class="mejs-shim">'+'<param name="initParams" value="'+initVars.join(',')+'" />'+'<param name="windowless" value="true" />'+'<param name="background" value="black" />'+'<param name="minRuntimeVersion" value="3.0.0.0" />'+'<param name="autoUpgrade" value="true" />'+'<param name="source" value="'+options.pluginPath+options.silverlightName+'" />'+'</object>';break;case'flash':if(mejs.MediaFeatures.isIE){specialIEContainer=document.createElement('div');container.appendChild(specialIEContainer);specialIEContainer.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" '+'id="'+pluginid+'" width="'+width+'" height="'+height+'" class="mejs-shim">'+'<param name="movie" value="'+options.pluginPath+options.flashName+'?x='+(new Date())+'" />'+'<param name="flashvars" value="'+initVars.join('&amp;')+'" />'+'<param name="quality" value="high" />'+'<param name="bgcolor" value="#000000" />'+'<param name="wmode" value="transparent" />'+'<param name="allowScriptAccess" value="'+options.flashScriptAccess+'" />'+'<param name="allowFullScreen" value="true" />'+'<param name="scale" value="default" />'+'</object>';}else{container.innerHTML='<embed id="'+pluginid+'" name="'+pluginid+'" '+'play="true" '+'loop="false" '+'quality="high" '+'bgcolor="#000000" '+'wmode="transparent" '+'allowScriptAccess="'+options.flashScriptAccess+'" '+'allowFullScreen="true" '+'type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" '+'src="'+options.pluginPath+options.flashName+'" '+'flashvars="'+initVars.join('&')+'" '+'width="'+width+'" '+'height="'+height+'" '+'scale="default"'+'class="mejs-shim"></embed>';}
2776break;case'youtube':var videoId;if(playback.url.lastIndexOf("youtu.be")!=-1){videoId=playback.url.substr(playback.url.lastIndexOf('/')+1);if(videoId.indexOf('?')!=-1){videoId=videoId.substr(0,videoId.indexOf('?'));}}
2777else{videoId=playback.url.substr(playback.url.lastIndexOf('=')+1);}
2778youtubeSettings={container:container,containerId:container.id,pluginMediaElement:pluginMediaElement,pluginId:pluginid,videoId:videoId,height:height,width:width};if(mejs.PluginDetector.hasPluginVersion('flash',[10,0,0])){mejs.YouTubeApi.createFlash(youtubeSettings,options);}else{mejs.YouTubeApi.enqueueIframe(youtubeSettings);}
2779break;case'vimeo':var player_id=pluginid+"_player";pluginMediaElement.vimeoid=playback.url.substr(playback.url.lastIndexOf('/')+1);container.innerHTML='<iframe src="//player.vimeo.com/video/'+pluginMediaElement.vimeoid+'?api=1&portrait=0&byline=0&title=0&player_id='+player_id+'" width="'+width+'" height="'+height+'" frameborder="0" class="mejs-shim" id="'+player_id+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';if(typeof($f)=='function'){var player=$f(container.childNodes[0]);player.addEvent('ready',function(){player.playVideo=function(){player.api('play');}
2780player.stopVideo=function(){player.api('unload');}
2781player.pauseVideo=function(){player.api('pause');}
2782player.seekTo=function(seconds){player.api('seekTo',seconds);}
2783player.setVolume=function(volume){player.api('setVolume',volume);}
2784player.setMuted=function(muted){if(muted){player.lastVolume=player.api('getVolume');player.api('setVolume',0);}else{player.api('setVolume',player.lastVolume);delete player.lastVolume;}}
2785function createEvent(player,pluginMediaElement,eventName,e){var event={type:eventName,target:pluginMediaElement};if(eventName=='timeupdate'){pluginMediaElement.currentTime=event.currentTime=e.seconds;pluginMediaElement.duration=event.duration=e.duration;}
2786pluginMediaElement.dispatchEvent(event);}
2787player.addEvent('play',function(){createEvent(player,pluginMediaElement,'play');createEvent(player,pluginMediaElement,'playing');});player.addEvent('pause',function(){createEvent(player,pluginMediaElement,'pause');});player.addEvent('finish',function(){createEvent(player,pluginMediaElement,'ended');});player.addEvent('playProgress',function(e){createEvent(player,pluginMediaElement,'timeupdate',e);});pluginMediaElement.pluginElement=container;pluginMediaElement.pluginApi=player;mejs.MediaPluginBridge.initPlugin(pluginid);});}
2788else{console.warn("You need to include froogaloop for vimeo to work");}
2789break;}
2790htmlMediaElement.style.display='none';htmlMediaElement.removeAttribute('autoplay');return pluginMediaElement;},updateNative:function(playback,options,autoplay,preload){var htmlMediaElement=playback.htmlMediaElement,m;for(m in mejs.HtmlMediaElement){htmlMediaElement[m]=mejs.HtmlMediaElement[m];}
2791options.success(htmlMediaElement,htmlMediaElement);return htmlMediaElement;}};mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var tag=document.createElement('script');tag.src="//www.youtube.com/player_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);this.isIframeStarted=true;}},iframeQueue:[],enqueueIframe:function(yt){if(this.isLoaded){this.createIframe(yt);}else{this.loadIframeApi();this.iframeQueue.push(yt);}},createIframe:function(settings){var
2792pluginMediaElement=settings.pluginMediaElement,player=new YT.Player(settings.containerId,{height:settings.height,width:settings.width,videoId:settings.videoId,playerVars:{controls:0},events:{'onReady':function(){settings.pluginMediaElement.pluginApi=player;mejs.MediaPluginBridge.initPlugin(settings.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(player,pluginMediaElement,'timeupdate');},250);},'onStateChange':function(e){mejs.YouTubeApi.handleStateChange(e.data,player,pluginMediaElement);}}});},createEvent:function(player,pluginMediaElement,eventName){var event={type:eventName,target:pluginMediaElement};if(player&&player.getDuration){pluginMediaElement.currentTime=event.currentTime=player.getCurrentTime();pluginMediaElement.duration=event.duration=player.getDuration();event.paused=pluginMediaElement.paused;event.ended=pluginMediaElement.ended;event.muted=player.isMuted();event.volume=player.getVolume()/100;event.bytesTotal=player.getVideoBytesTotal();event.bufferedBytes=player.getVideoBytesLoaded();var bufferedTime=event.bufferedBytes/event.bytesTotal*event.duration;event.target.buffered=event.buffered={start:function(index){return 0;},end:function(index){return bufferedTime;},length:1};}
2793pluginMediaElement.dispatchEvent(event);},iFrameReady:function(){this.isLoaded=true;this.isIframeLoaded=true;while(this.iframeQueue.length>0){var settings=this.iframeQueue.pop();this.createIframe(settings);}},flashPlayers:{},createFlash:function(settings){this.flashPlayers[settings.pluginId]=settings;var specialIEContainer,youtubeUrl='//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid='+settings.pluginId+'&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';if(mejs.MediaFeatures.isIE){specialIEContainer=document.createElement('div');settings.container.appendChild(specialIEContainer);specialIEContainer.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/s
2793hockwave/cabs/flash/swflash.cab" '+'id="'+settings.pluginId+'" width="'+settings.width+'" height="'+settings.height+'" class="mejs-shim">'+'<param name="movie" value="'+youtubeUrl+'" />'+'<param name="wmode" value="transparent" />'+'<param name="allowScriptAccess" value="'+options.flashScriptAccess+'" />'+'<param name="allowFullScreen" value="true" />'+'</object>';}else{settings.container.innerHTML='<object type="application/x-shockwave-flash" id="'+settings.pluginId+'" data="'+youtubeUrl+'" '+'width="'+settings.width+'" height="'+settings.height+'" style="visibility: visible; " class="mejs-shim">'+'<param name="allowScriptAccess" value="'+options.flashScriptAccess+'">'+'<param name="wmode" value="transparent">'+'</object>';}},flashReady:function(id){var
2794settings=this.flashPlayers[id],player=document.getElementById(id),pluginMediaElement=settings.pluginMediaElement;pluginMediaElement.pluginApi=pluginMediaElement.pluginElement=player;mejs.MediaPluginBridge.initPlugin(id);player.cueVideoById(settings.videoId);var callbackName=settings.containerId+'_callback';window[callbackName]=function(e){mejs.YouTubeApi.handleStateChange(e,player,pluginMediaElement);}
2795player.addEventListener('onStateChange',callbackName);setInterval(function(){mejs.YouTubeApi.createEvent(player,pluginMediaElement,'timeupdate');},250);mejs.YouTubeApi.createEvent(player,pluginMediaElement,'canplay');},handleStateChange:function(youTubeState,player,pluginMediaElement){switch(youTubeState){case-1:pluginMediaElement.paused=true;pluginMediaElement.ended=true;mejs.YouTubeApi.createEvent(player,pluginMediaElement,'loadedmetadata');break;case 0:pluginMediaElement.paused=false;pluginMediaElement.ended=true;mejs.YouTubeApi.createEvent(player,pluginMediaElement,'ended');break;case 1:pluginMediaElement.paused=false;pluginMediaElement.ended=false;mejs.YouTubeApi.createEvent(player,pluginMediaElement,'play');mejs.YouTubeApi.createEvent(player,pluginMediaElement,'playing');break;case 2:pluginMediaElement.paused=true;pluginMediaElement.ended=false;mejs.YouTubeApi.createEvent(player,pluginMediaElement,'pause');break;case 3:mejs.YouTubeApi.createEvent(player,pluginMediaElement,'progress');break;case 5:break;}}}
2796window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady();};window.onYouTubePlayerReady=function(id){mejs.YouTubeApi.flashReady(id);};window.mejs=mejs;window.MediaElement=mejs.MediaElement;;(function(context,exports,undefined){"use strict";var i18n={"locale":{"language":(exports.i18n&&exports.i18n.locale.language)||'',"strings":(exports.i18n&&exports.i18n.locale.strings)||{}},"ietf_lang_regex":/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,"methods":{}};i18n.getLanguage=function(){var language=i18n.locale.language||window.navigator.userLanguage||window.navigator.language;return i18n.ietf_lang_regex.exec(language)?language:null;};if(typeof mejsL10n!='undefined'){i18n.locale.language=mejsL10n.language;}
2797i18n.methods.checkPlain=function(str){var character,regex,replace={'&':'&amp;','"':'&quot;','<':'&lt;','>':'&gt;'};str=String(str);for(character in replace){if(replace.hasOwnProperty(character)){regex=new RegExp(character,'g');str=str.replace(regex,replace[character]);}}
2798return str;};i18n.methods.t=function(str,options){if(i18n.locale.strings&&i18n.locale.strings[options.context]&&i18n.locale.strings[options.context][str]){str=i18n.locale.strings[options.context][str];}
2799return i18n.methods.checkPlain(str);};i18n.t=function(str,options){if(typeof str==='string'&&str.length>0){var language=i18n.getLanguage();options=options||{"context":language};return i18n.methods.t(str,options);}
2800else{throw{"name":'InvalidArgumentException',"message":'First argument is either not a string or empty.'};}};exports.i18n=i18n;}(document,mejs));;(function(exports,undefined){"use strict";if(typeof mejsL10n!='undefined'){exports[mejsL10n.language]=mejsL10n.strings;}}(mejs.i18n.locale.strings));if(typeof jQuery!='undefined'){mejs.$=jQuery;}else if(typeof Zepto!='undefined'){mejs.$=Zepto;Zepto.fn.outerWidth=function(includeMargin){var width=$(this).width();if(includeMargin){width+=parseInt($(this).css('margin-right'),10);width+=parseInt($(this).css('margin-left'),10);}
2801return width}}else if(typeof ender!='undefined'){mejs.$=ender;}
2802(function($){mejs.MepDefaults={poster:'',showPosterWhenEnded:false,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(media){return(media.duration*0.05);},defaultSeekForwardInterval:function(media){return(media.duration*0.05);},setDimensions:true,audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,timeFormat:'',alwaysShowHours:false,showTimeco
2802deFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:['playpause','current','progress','duration','tracks','volume','fullscreen'],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(player,media){if(media.paused||media.ended){media.play();}else{media.pause();}}},{keys:[38],action:function(player,media){player.container.find('.mejs-volume-slider').css('display','block');if(player.isVideo){player.showControls();player.startControlsTimer();}
2803var newVolume=Math.min(media.volume+0.1,1);media.setVolume(newVolume);}},{keys:[40],action:function(player,media){player.container.find('.mejs-volume-slider').css('display','block');if(player.isVideo){player.showControls();player.startControlsTimer();}
2804var newVolume=Math.max(media.volume-0.1,0);media.setVolume(newVolume);}},{keys:[37,227],action:function(player,media){if(!isNaN(media.duration)&&media.duration>0){if(player.isVideo){player.showControls();player.startControlsTimer();}
2805var newTime=Math.max(media.currentTime-player.options.defaultSeekBackwardInterval(media),0);media.setCurrentTime(newTime);}}},{keys:[39,228],action:function(player,media){if(!isNaN(media.duration)&&media.duration>0){if(player.isVideo){player.showControls();player.startControlsTimer();}
2806var newTime=Math.min(media.currentTime+player.options.defaultSeekForwardInterval(media),media.duration);media.setCurrentTime(newTime);}}},{keys:[70],action:function(player,media){if(typeof player.enterFullScreen!='undefined'){if(player.isFullScreen){player.exitFullScreen();}else{player.enterFullScreen();}}}},{keys:[77],action:function(player,media){player.container.find('.mejs-volume-slider').css('display','block');if(player.isVideo){player.showControls();player.startControlsTimer();}
2807if(player.media.muted){player.setMuted(false);}else{player.setMuted(true);}}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(node,o){if(!(this instanceof mejs.MediaElementPlayer)){return new mejs.MediaElementPlayer(node,o);}
2808var t=this;t.$media=t.$node=$(node);t.node=t.media=t.$media[0];if(!t.node){return}
2809if(typeof t.node.player!='undefined'){return t.node.player;}
2810if(typeof o=='undefined'){o=t.$node.data('mejsoptions');}
2811t.options=$.extend({},mejs.MepDefaults,o);if(!t.options.timeFormat){t.options.timeFormat='mm:ss';if(t.options.alwaysShowHours){t.options.timeFormat='hh:mm:ss';}
2812if(t.options.showTimecodeFrameCount){t.options.timeFormat+=':ff';}}
2813mejs.Utility.calculateTimeFormat(0,t.options,t.options.framesPerSecond||25);t.id='mep_'+mejs.mepIndex++;mejs.players[t.id]=t;t.init();return t;};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var
2814t=this,mf=mejs.MediaFeatures,meOptions=$.extend(true,{},t.options,{success:function(media,domNode){t.meReady(media,domNode);},error:function(e){t.handleError(e);}}),tagName=t.media.tagName.toLowerCase();t.isDynamic=(tagName!=='audio'&&tagName!=='video');if(t.isDynamic){t.isVideo=t.options.isVideo;}else{t.isVideo=(tagName!=='audio'&&t.options.isVideo);}
2815if((mf.isiPad&&t.options.iPadUseNativeControls)||(mf.isiPhone&&t.options.iPhoneUseNativeControls)){t.$media.attr('controls','controls');if(mf.isiPad&&t.media.getAttribute('autoplay')!==null){t.play();}}else if(mf.isAndroid&&t.options.AndroidUseNativeControls){}else{t.$media.removeAttr('controls');var videoPlayerTitle=t.isVideo?mejs.i18n.t('Video Player'):mejs.i18n.t('Audio Player');$('<span class="mejs-offscreen">'+videoPlayerTitle+'</span>').insertBefore(t.$media);t.container=$('<div id="'+t.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?'svg':'no-svg')+'" tabindex="0" role="application" aria-label="'+videoPlayerTitle+'">'+'<div class="mejs-inner">'+'<div class="mejs-mediaelement"></div>'+'<div class="mejs-layers"></div>'+'<div class="mejs-controls"></div>'+'<div class="mejs-clear"></div>'+'</div>'+'</div>').addClass(t.$media[0].className).insertBefore(t.$media).focus(function(e){if(!t.controlsAreVisible){t.showControls(true);var playButton=t.container.find('.mejs-playpause-button > button');playButton.focus();}});t.container.addClass((mf.isAndroid?'mejs-android ':'')+
2816(mf.isiOS?'mejs-ios ':'')+
2817(mf.isiPad?'mejs-ipad ':'')+
2818(mf.isiPhone?'mejs-iphone ':'')+
2819(t.isVideo?'mejs-video ':'mejs-audio '));if(mf.isiOS){var $newMedia=t.$media.clone();t.container.find('.mejs-mediaelement').append($newMedia);t.$media.remove();t.$node=t.$media=$newMedia;t.node=t.media=$newMedia[0];}else{t.container.find('.mejs-mediaelement').append(t.$media);}
2820t.node.player=t;t.controls=t.container.find('.mejs-controls');t.layers=t.container.find('.mejs-layers');var tagType=(t.isVideo?'video':'audio'),capsTagName=tagType.substring(0,1).toUpperCase()+tagType.substring(1);if(t.options[tagType+'Width']>0||t.options[tagType+'Width'].toString().indexOf('%')>-1){t.width=t.options[tagType+'Width'];}else if(t.media.style.width!==''&&t.media.style.width!==null){t.width=t.media.style.width;}else if(t.media.getAttribute('width')!==null){t.width=t.$media.attr('width');}else{t.width=t.options['default'+capsTagName+'Width'];}
2821if(t.options[tagType+'Height']>0||t.options[tagType+'Height'].toString().indexOf('%')>
2821-1){t.height=t.options[tagType+'Height'];}else if(t.media.style.height!==''&&t.media.style.height!==null){t.height=t.media.style.height;}else if(t.$media[0].getAttribute('height')!==null){t.height=t.$media.attr('height');}else{t.height=t.options['default'+capsTagName+'Height'];}
2822t.setPlayerSize(t.width,t.height);meOptions.pluginWidth=t.width;meOptions.pluginHeight=t.height;}
2823mejs.MediaElement(t.$media[0],meOptions);if(typeof(t.container)!='undefined'&&t.controlsAreVisible){t.container.trigger('controlsshown');}},showControls:function(doAnimation){var t=this;doAnimation=typeof doAnimation=='undefined'||doAnimation;if(t.controlsAreVisible)
2824return;if(doAnimation){t.controls.css('visibility','visible').stop(true,true).fadeIn(200,function(){t.controlsAreVisible=true;t.container.trigger('controlsshown');});t.container.find('.mejs-control').css('visibility','visible').stop(true,true).fadeIn(200,function(){t.controlsAreVisible=true;});}else{t.controls.css('visibility','visible').css('display','block');t.container.find('.mejs-control').css('visibility','visible').css('display','block');t.controlsAreVisible=true;t.container.trigger('controlsshown');}
2825t.setControlsSize();},hideControls:function(doAnimation){var t=this;doAnimation=typeof doAnimation=='undefined'||doAnimation;if(!t.controlsAreVisible||t.options.alwaysShowControls||t.keyboardAction)
2826return;if(doAnimation){t.controls.stop(true,true).fadeOut(200,function(){$(this).css('visibility','hidden').css('display','block');t.controlsAreVisible=false;t.container.trigger('controlshidden');});t.container.find('.mejs-control').stop(true,true).fadeOut(200,function(){$(this).css('visibility','hidden').css('display','block');});}else{t.controls.css('visibility','hidden').css('display','block');t.container.find('.mejs-control').css('visibility','hidden').css('display','block');t.controlsAreVisible=false;t.container.trigger('controlshidden');}},controlsTimer:null,startControlsTimer:function(timeout){var t=this;timeout=typeof timeout!='undefined'?timeout:1500;t.killControlsTimer('start');t.controlsTimer=setTimeout(function(){t.hideControls();t.killControlsTimer('hide');},timeout);},killControlsTimer:function(src){var t=this;if(t.controlsTimer!==null){clearTimeout(t.controlsTimer);delete t.controlsTimer;t.controlsTimer=null;}},controlsEnabled:true,disableControls:function(){var t=this;t.killControlsTimer();t.hideControls(false);this.controlsEnabled=false;},enableControls:function(){var t=this;t.showControls(false);t.controlsEnabled=true;},meReady:function(media,domNode){var t=this,mf=mejs.MediaFeatures,autoplayAttr=domNode.getAttribute('autoplay'),autoplay=!(typeof autoplayAttr=='undefined'||autoplayAttr===null||autoplayAttr==='false'),featureIndex,feature;if(t.created){return;}else{t.created=true;}
2827t.media=media;t.domNode=domNode;if(!(mf.isAndroid&&t.options.AndroidUseNativeControls)&&!(mf.isiPad&&t.options.iPadUseNativeControls)&&!(mf.isiPhone&&t.options.iPhoneUseNativeControls)){t.buildposter(t,t.controls,t.layers,t.media);t.buildkeyboard(t,t.controls,t.layers,t.media);t.buildoverlays(t,t.controls,t.layers,t.media);t.findTracks();for(featureIndex in t.options.features){feature=t.options.features[featureIndex];if(t['build'+feature]){try{t['build'+feature](t,t.controls,t.layers,t.media);}catch(e){}}}
2828t.container.trigger('controlsready');t.setPlayerSize(t.width,t.height);t.setControlsSize();if(t.isVideo){if(mejs.MediaFeatures.hasTouch){t.$media.bind('touchstart',function(){if(t.controlsAreVisible){t.hideControls(false);}else{if(t.controlsEnabled){t.showControls(false);}}});}else{t.clickToPlayPauseCallback=function(){if(t.options.clickToPlayPause){if(t.media.paused){t.play();}else{t.pause();}}};t.media.addEventListener('click',t.clickToPlayPauseCallback,false);t.container.bind('mouseenter mouseover',function(){if(t.controlsEnabled){if(!t.options.alwaysShowControls){t.killControlsTimer('enter');t.showControls();t.startControlsTimer(2500);}}}).bind('mousemove',function(){if(t.controlsEnabled){if(!t.controlsAreVisible){t.showControls();}
2829if(!t.options.alwaysShowControls){t.startControlsTimer(2500);}}}).bind('mouseleave',function(){if(t.controlsEnabled){if(!t.media.paused&&!t.options.alwaysShowControls){t.startControlsTimer(1000);}}});}
2830if(t.options.hideVideoControlsOnLoad){t.hideControls(false);}
2831if(autoplay&&!t.options.alwaysShowControls){t.hideControls();}
2832if(t.options.enableAutosize){t.media.addEventListener('loadedmetadata',function(e){if(t.options.videoHeight<=0&&t.domNode.getAttribute('height')===null&&!isNaN(e.target.videoHeight)){t.setPlayerSize(e.target.videoWidth,e.target.videoHeight);t.setControlsSize();t.media.setVideoSize(e.target.videoWidth,e.target.videoHeight);}},false);}}
2833media.addEventListener('play',function(){var playerIndex;for(playerIndex in mejs.players){var p=mejs.players[playerIndex];if(p.id!=t.id&&t.options.pauseOtherPlayers&&!p.paused&&!p.ended){p.pause();}
2834p.hasFocus=false;}
2835t.hasFocus=true;},false);t.media.addEventListener('ended',function(e){if(t.options.autoRewind){try{t.media.setCurrentTime(0);window.setTimeout(function(){$(t.container).find('.mejs-overlay-loading').parent().hide();},20);}catch(exp){}}
2836t.media.pause();if(t.setProgressRail){t.setProgressRail();}
2837if(t.setCurrentRail){t.setCurrentRail();}
2838if(t.options.loop){t.play();}else if(!t.options.alwaysShowControls&&t.controlsEnabled){t.showControls();}},false);t.media.addEventListener('loadedmetadata',function(e){if(t.updateDuration){t.updateDuration();}
2839if(t.updateCurrent){t.updateCurrent();}
2840if(!t.isFullScreen){t.setPlayerSize(t.width,t.height);t.setControlsSize();}},false);var duration=null;t.media.addEventListener('timeupdate',function(){if(duration!==this.duration){duration=this.duration;mejs.Utility.calculateTimeFormat(duration,t.options,t.options.framesPerSecond||25);}},false);t.container.focusout(function(e){if(e.relatedTarget){var $target=$(e.relatedTarget);if(t.keyboardAction&&$target.parents('.mejs-container').length===0){t.keyboardAction=false;t.hideControls(true);}}});setTimeout(function(){t.setPlayerSize(t.width,t.height);t.setControlsSize();},50);t.globalBind('resize',function(){if(!(t.isFullScreen||(mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen))){t.setPlayerSize(t.width,t.height);}
2841t.setControlsSize();});if(t.media.pluginType=='youtube'&&(mf.isiOS||mf.isAndroid)){t.container.find('.mejs-overlay-play').hide();}}
2842if(autoplay&&media.pluginType=='native'){t.play();}
2843if(t.options.success){if(typeof t.options.success=='string'){window[t.options.success](t.media,t.domNode,t);}else{t.options.success(t.media,t.domNode,t);}}},handleError:function(e){var t=this;t.controls.hide();if(t.options.error){t.options.error(e);}},setPlayerSize:function(width,height){var t=this;if(!t.options.setDimensions){return false;}
2844if(typeof width!='undefined'){t.width=width;}
2845if(typeof height!='undefined'){t.height=height;}
2846if(t.height.toString().indexOf('%')>0||(t.$node.css('max-width')!=='none'&&t.$node.css('max-width')!=='t.width')||(t.$node[0].currentStyle&&t.$node[0].currentStyle.maxWidth==='100%')){var nativeWidth=(function(){if(t.isVideo){if(t.media.videoWidth&&t.media.videoWidth>0){return t.media.videoWidth;}else if(t.media.getAttribute('width')!==null){return t.media.getAttribute('width');}else{return t.options.defaultVideoWidth;}}else{return t.options.defaultAudioWidth;}})();var nativeHeight=(function(){if(t.isVideo){if(t.media.videoHeight&&t.media.videoHeight>0){return t.media.videoHeight;}else if(t.media.getAttribute('height')!==null){return t.media.getAttribute('height');}else{return t.options.defaultVideoHeight;}}else{return t.options.defaultAudioHeight;}})();var
2847parentWidth=t.container.parent().closest(':visible').width(),parentHeight=t.container.parent().closest(':visible').height(),newHeight=t.isVideo||!t.options.autosizeProgress?parseInt(parentWidth*nativeHeight/nativeWidth,10):nativeHeight;if(isNaN(newHeight)){newHeight=parentHeight;}
2848if(t.container.parent().length>0&&t.container.parent()[0].tagName.toLowerCase()==='body'){parentWidth=$(window).width();newHeight=$(window).height();}
2849if(newHeight&&parentWidth){t.container.width(parentWidth).height(newHeight);t.$media.add(t.container.find('.mejs-shim')).width('100%').height('100%');if(t.isVideo){if(t.media.setVideoSize){t.media.setVideoSize(parentWidth,newHeight);}}
2850t.layers.children('.mejs-layer').width('100%').height('100%');}}else{t.container.width(t.width).height(t.height);t.layers.children('.mejs-layer').width(t.width).height(t.height);}}
2850,setControlsSize:function(){var t=this,usedWidth=0,railWidth=0,rail=t.controls.find('.mejs-time-rail'),total=t.controls.find('.mejs-time-total'),others=rail.siblings(),lastControl=others.last(),lastControlPosition=null;if(!t.container.is(':visible')||!rail.length||!rail.is(':visible')){return;}
2851if(t.options&&!t.options.autosizeProgress){railWidth=parseInt(rail.css('width'),10);}
2852if(railWidth===0||!railWidth){others.each(function(){var $this=$(this);if($this.css('position')!='absolute'&&$this.is(':visible')){usedWidth+=$(this).outerWidth(true);}});railWidth=t.controls.width()-usedWidth-(rail.outerWidth(true)-rail.width());}
2853do{rail.width(railWidth);total.width(railWidth-(total.outerWidth(true)-total.width()));if(lastControl.css('position')!='absolute'){lastControlPosition=lastControl.length?lastControl.position():null;railWidth--;}}while(lastControlPosition!==null&&lastControlPosition.top>0&&railWidth>0);t.container.trigger('controlsresize');},buildposter:function(player,controls,layers,media){var t=this,poster=$('<div class="mejs-poster mejs-layer">'+'</div>').appendTo(layers),posterUrl=player.$media.attr('poster');if(player.options.poster!==''){posterUrl=player.options.poster;}
2854if(posterUrl){t.setPoster(posterUrl);}else{poster.hide();}
2855media.addEventListener('play',function(){poster.hide();},false);if(player.options.showPosterWhenEnded&&player.options.autoRewind){media.addEventListener('ended',function(){poster.show();},false);}},setPoster:function(url){var t=this,posterDiv=t.container.find('.mejs-poster'),posterImg=posterDiv.find('img');if(posterImg.length===0){posterImg=$('<img width="100%" height="100%" alt="" />').appendTo(posterDiv);}
2856posterImg.attr('src',url);posterDiv.css({'background-image':'url('+url+')'});},buildoverlays:function(player,controls,layers,media){var t=this;if(!player.isVideo)
2857return;var
2858loading=$('<div class="mejs-overlay mejs-layer">'+'<div class="mejs-overlay-loading"><span></span></div>'+'</div>').hide().appendTo(layers),error=$('<div class="mejs-overlay mejs-layer">'+'<div class="mejs-overlay-error"></div>'+'</div>').hide().appendTo(layers),bigPlay=$('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+'<div class="mejs-overlay-button"></div>'+'</div>').appendTo(layers).bind('click',function(){if(t.options.clickToPlayPause){if(media.paused){media.play();}}});media.addEventListener('play',function(){bigPlay.hide();loading.hide();controls.find('.mejs-time-buffering').hide();error.hide();},false);media.addEventListener('playing',function(){bigPlay.hide();loading.hide();controls.find('.mejs-time-buffering').hide();error.hide();},false);media.addEventListener('seeking',function(){loading.show();controls.find('.mejs-time-buffering').show();},false);media.addEventListener('seeked',function(){loading.hide();controls.find('.mejs-time-buffering').hide();},false);media.addEventListener('pause',function(){if(!mejs.MediaFeatures.isiPhone){bigPlay.show();}},false);media.addEventListener('waiting',function(){loading.show();controls.find('.mejs-time-buffering').show();},false);media.addEventListener('loadeddata',function(){loading.show();controls.find('.mejs-time-buffering').show();if(mejs.MediaFeatures.isAndroid){media.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var evt=document.createEvent('HTMLEvents');evt.initEvent('canplay',true,true);return media.dispatchEvent(evt);}},300);}},false);media.addEventListener('canplay',function(){loading.hide();controls.find('.mejs-time-buffering').hide();clearTimeout(media.canplayTimeout);},false);media.addEventListener('error',function(e){t.handleError(e);loading.hide();bigPlay.hide();error.show();error.find('.mejs-overlay-error').html("Error loading this resource");},false);media.addEventListener('keydown',function(e){t.onkeydown(player,media,e);},false);},buildkeyboard:function(player,controls,layers,media){var t=this;t.container.keydown(function(){t.keyboardAction=true;});t.globalBind('keydown',function(e){return t.onkeydown(player,media,e);});t.globalBind('click',function(event){player.hasFocus=$(event.target).closest('.mejs-container').length!==0;});},onkeydown:function(player,media,e){if(player.hasFocus&&player.options.enableKeyboard){for(var i=0,il=player.options.keyActions.length;i<il;i++){var keyAction=player.options.keyActions[i];for(var j=0,jl=keyAction.keys.length;j<jl;j++){if(e.keyCode==keyAction.keys[j]){if(typeof(e.preventDefault)=="function")e.preventDefault();keyAction.action(player,media,e.keyCode);return false;}}}}
2859return true;},findTracks:function(){var t=this,tracktags=t.$media.find('track');t.tracks=[];tracktags.each(function(index,track){track=$(track);t.tracks.push({srclang:(track.attr('srclang'))?track.attr('srclang').toLowerCase():'',src:track.attr('src'),kind:track.attr('kind'),label:track.attr('label')||'',entries:[],isLoaded:false});});},changeSkin:function(className){this.container[0].className='mejs-container '+className;this.setPlayerSize(this.width,this.height);this.setControlsSize();},play:function(){this.load();this.media.play();},pause:function(){try{this.media.pause();}catch(e){}},load:function(){if(!this.isLoaded){this.media.load();}
2860this.isLoaded=true;},setMuted:function(muted){this.media.setMuted(muted);},setCurrentTime:function(time){this.media.setCurrentTime(time);},getCurrentTime:function(){return this.media.currentTime;},setVolume:function(volume){this.media.setVolume(volume);},getVolume:function(){return this.media.volume;},setSrc:function(src){this.media.setSrc(src);},remove:function(){var t=this,featureIndex,feature;t.container.prev('.mejs-offscreen').remove();for(featureIndex in t.options.features){feature=t.options.features[featureIndex];if(t['clean'+feature]){try{t['clean'+feature](t);}catch(e){}}}
2861if(!t.isDynamic){t.$media.prop('controls',true);t.$node.clone().insertBefore(t.container).show();t.$node.remove();}else{t.$node.insertBefore(t.container);}
2862if(t.media.pluginType!=='native'){t.media.remove();}
2863delete mejs.players[t.id];if(typeof t.container=='object'){t.container.remove();}
2864t.globalUnbind();delete t.node.player;},rebuildtracks:function(){var t=this;t.findTracks();t.buildtracks(t,t.controls,t.layers,t.media);},resetSize:function(){var t=this;setTimeout(function(){t.setPlayerSize(t.width,t.height);t.setControlsSize();},50);}};(function(){var rwindow=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;function splitEvents(events,id){var ret={d:[],w:[]};$.each((events||'').split(' '),function(k,v){var eventname=v+'.'+id;if(eventname.indexOf('.')===0){ret.d.push(eventname);ret.w.push(eventname);}
2865else{ret[rwindow.test(v)?'w':'d'].push(eventname);}});ret.d=ret.d.join(' ');ret.w=ret.w.join(' ');return ret;}
2866mejs.MediaElementPlayer.prototype.globalBind=function(events,data,callback){var t=this;events=splitEvents(events,t.id);if(events.d)$(document).bind(events.d,data,callback);if(events.w)$(window).bind(events.w,data,callback);};mejs.MediaElementPlayer.prototype.globalUnbind=function(events,callback){var t=this;events=splitEvents(events,t.id);if(events.d)$(document).unbind(events.d,callback);if(events.w)$(window).unbind(events.w,callback);};})();if(typeof $!='undefined'){$.fn.mediaelementplayer=function(options){if(options===false){this.each(function(){var player=$(this).data('mediaelementplayer');if(player){player.remove();}
2867$(this).removeData('mediaelementplayer');});}
2868else{this.each(function(){$(this).data('mediaelementplayer',new mejs.MediaElementPlayer(this,options));});}
2869return this;};$(document).ready(function(){$('.mejs-player').mediaelementplayer();});}
2870window.MediaElementPlayer=mejs.MediaElementPlayer;})(mejs.$);(function($){$.extend(mejs.MepDefaults,{playText:mejs.i18n.t('Play'),pauseText:mejs.i18n.t('Pause')});$.extend(MediaElementPlayer.prototype,{buildplaypause:function(player,controls,layers,media){var
2871t=this,op=t.options,play=$('<div class="mejs-button mejs-playpause-button mejs-play" >'+'<button type="button" aria-controls="'+t.id+'" title="'+op.playText
2871+'" aria-label="'+op.playText+'"></button>'+'</div>').appendTo(controls).click(function(e){e.preventDefault();if(media.paused){media.play();}else{media.pause();}
2872return false;}),play_btn=play.find('button');function togglePlayPause(which){if('play'===which){play.removeClass('mejs-play').addClass('mejs-pause');play_btn.attr({'title':op.pauseText,'aria-label':op.pauseText});}else{play.removeClass('mejs-pause').addClass('mejs-play');play_btn.attr({'title':op.playText,'aria-label':op.playText});}};togglePlayPause('pse');media.addEventListener('play',function(){togglePlayPause('play');},false);media.addEventListener('playing',function(){togglePlayPause('play');},false);media.addEventListener('pause',function(){togglePlayPause('pse');},false);media.addEventListener('paused',function(){togglePlayPause('pse');},false);}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{stopText:'Stop'});$.extend(MediaElementPlayer.prototype,{buildstop:function(player,controls,layers,media){var t=this;$('<div class="mejs-button mejs-stop-button mejs-stop">'+'<button type="button" aria-controls="'+t.id+'" title="'+t.options.stopText+'" aria-label="'+t.options.stopText+'"></button>'+'</div>').appendTo(controls).click(function(){if(!media.paused){media.pause();}
2873if(media.currentTime>0){media.setCurrentTime(0);media.pause();controls.find('.mejs-time-current').width('0px');controls.find('.mejs-time-handle').css('left','0px');controls.find('.mejs-time-float-current').html(mejs.Utility.secondsToTimeCode(0,player.options));controls.find('.mejs-currenttime').html(mejs.Utility.secondsToTimeCode(0,player.options));layers.find('.mejs-poster').show();}});}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{progessHelpText:mejs.i18n.t('Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.')});$.extend(MediaElementPlayer.prototype,{buildprogress:function(player,controls,layers,media){$('<div class="mejs-time-rail">'+'<span  class="mejs-time-total mejs-time-slider">'+'<span class="mejs-time-buffering"></span>'+'<span class="mejs-time-loaded"></span>'+'<span class="mejs-time-current"></span>'+'<span class="mejs-time-handle"></span>'+'<span class="mejs-time-float">'+'<span class="mejs-time-float-current">00:00</span>'+'<span class="mejs-time-float-corner"></span>'+'</span>'+'</span>'+'</div>').appendTo(controls);controls.find('.mejs-time-buffering').hide();var
2874t=this,total=controls.find('.mejs-time-total'),loaded=controls.find('.mejs-time-loaded'),current=controls.find('.mejs-time-current'),handle=controls.find('.mejs-time-handle'),timefloat=controls.find('.mejs-time-float'),timefloatcurrent=controls.find('.mejs-time-float-current'),slider=control
2874s.find('.mejs-time-slider'),handleMouseMove=function(e){var offset=total.offset(),width=total.width(),percentage=0,newTime=0,pos=0,x;if(e.originalEvent&&e.originalEvent.changedTouches){x=e.originalEvent.changedTouches[0].pageX;}else if(e.changedTouches){x=e.changedTouches[0].pageX;}else{x=e.pageX;}
2875if(media.duration){if(x<offset.left){x=offset.left;}else if(x>width+offset.left){x=width+offset.left;}
2876pos=x-offset.left;percentage=(pos/width);newTime=(percentage<=0.02)?0:percentage*media.duration;if(mouseIsDown&&newTime!==media.currentTime){media.setCurrentTime(newTime);}
2877if(!mejs.MediaFeatures.hasTouch){timefloat.css('left',pos);timefloatcurrent.html(mejs.Utility.secondsToTimeCode(newTime,player.options));timefloat.show();}}},mouseIsDown=false,mouseIsOver=false,lastKeyPressTime=0,startedPaused=false,autoRewindInitial=player.options.autoRewind;var updateSlider=function(e){var seconds=media.currentTime,timeSliderText=mejs.i18n.t('Time Slider'),time=mejs.Utility.secondsToTimeCode(seconds,player.options),duration=media.duration;slider.attr({'aria-label':timeSliderText,'aria-valuemin':0,'aria-valuemax':duration,'aria-valuenow':seconds,'aria-valuetext':time,'role':'slider','tabindex':0});};var restartPlayer=function(){var now=new Date();if(now-lastKeyPressTime>=1000){media.play();}};slider.bind('focus',function(e){player.options.autoRewind=false;});slider.bind('blur',function(e){player.options.autoRewind=autoRewindInitial;});slider.bind('keydown',function(e){if((new Date()-lastKeyPressTime)>=1000){startedPaused=media.paused;}
2878var keyCode=e.keyCode,duration=media.duration,seekTime=media.currentTime;switch(keyCode){case 37:seekTime-=1;break;case 39:seekTime+=1;break;case 38:seekTime+=Math.floor(duration*0.1);break;case 40:seekTime-=Math.floor(duration*0.1);break;case 36:seekTime=0;break;case 35:seekTime=duration;break;case 10:media.paused?media.play():media.pause();return;case 13:media.paused?media.play():media.pause();return;default:return;}
2879seekTime=seekTime<0?0:(seekTime>=duration?duration:Math.floor(seekTime));lastKeyPressTime=new Date();if(!startedPaused){media.pause();}
2880if(seekTime<media.duration&&!startedPaused){setTimeout(restartPlayer,1100);}
2881media.setCurrentTime(seekTime);e.preventDefault();e.stopPropagation();return false;});total.bind('mousedown touchstart',function(e){if(e.which===1||e.which===0){mouseIsDown=true;handleMouseMove(e);t.globalBind('mousemove.dur touchmove.dur',function(e){handleMouseMove(e);});t.globalBind('mouseup.dur touchend.dur',function(e){mouseIsDown=false;timefloat.hide();t.globalUnbind('.dur');});}}).bind('mouseenter',function(e){mouseIsOver=true;t.globalBind('mousemove.dur',function(e){handleMouseMove(e);});if(!mejs.MediaFeatures.hasTouch){timefloat.show();}}).bind('mouseleave',function(e){mouseIsOver=false;if(!mouseIsDown){t.globalUnbind('.dur');timefloat.hide();}});media.addEventListener('progress',function(e){player.setProgressRail(e);player.setCurrentRail(e);},false);media.addEventListener('timeupdate',function(e){player.setProgressRail(e);player.setCurrentRail(e);updateSlider(e);},false);t.container.on('controlsresize',function(){player.setProgressRail();player.setCurrentRail();});t.loaded=loaded;t.total=total;t.current=current;t.handle=handle;},setProgressRail:function(e){var
2882t=this,target=(e!==undefined)?e.target:t.media,percent=null;if(target&&target.buffered&&target.buffered.length>0&&target.buffered.end&&target.duration){percent=target.buffered.end(target.buffered.length-1)/target.duration;}
2883else if(target&&target.bytesTotal!==undefined&&target.bytesTotal>0&&target.bufferedBytes!==undefined){percent=target.bufferedBytes/target.bytesTotal;}
2884else if(e&&e.lengthComputable&&e.total!==0){percent=e.loaded/e.total;}
2885if(percent!==null){percent=Math.min(1,Math.max(0,percent));if(t.loaded&&t.total){t.loaded.width(t.total.width()*percent);}}},setCurrentRail:function(){var t=this;if(t.media.currentTime!==undefined&&t.media.duration){if(t.total&&t.handle){var
2886newWidth=Math.round(t.total.width()*t.media.currentTime/t.media.duration),handlePos=newWidth-Math.round(t.handle.outerWidth(true)/2);t.current.width(newWidth);t.handle.css('left',handlePos);}}}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:'<span> | </span>'});$.extend(MediaElementPlayer.prototype,{buildcurrent:function(player,controls,layers,media){var t=this;$('<div class="mejs-time" role="timer" aria-live="off">'+'<span class="mejs-currenttime">'+
2887mejs.Utility.secondsToTimeCode(0,player.options)+'</span>'+'</div>').appendTo(controls);t.currenttime=t.controls.find('.mejs-currenttime');media.addEventListener('timeupdate',function(){player.updateCurrent();},false);},buildduration:function(player,controls,layers,media){var t=this;
2887if(controls.children().last().find('.mejs-currenttime').length>0){$(t.options.timeAndDurationSeparator+'<span class="mejs-duration">'+
2888mejs.Utility.secondsToTimeCode(t.options.duration,t.options)+'</span>').appendTo(controls.find('.mejs-time'));}else{controls.find('.mejs-currenttime').parent().addClass('mejs-currenttime-container');$('<div class="mejs-time mejs-duration-container">'+'<span class="mejs-duration">'+
2889mejs.Utility.secondsToTimeCode(t.options.duration,t.options)+'</span>'+'</div>').appendTo(controls);}
2890t.durationD=t.controls.find('.mejs-duration');media.addEventListener('timeupdate',function(){player.updateDuration();},false);},updateCurrent:function(){var t=this;if(t.currenttime){t.currenttime.html(mejs.Utility.secondsToTimeCode(t.media.currentTime,t.options));}},updateDuration:function(){var t=this;t.container.toggleClass("mejs-long-video",t.media.duration>3600);if(t.durationD&&(t.options.duration>0||t.media.duration)){t.durationD.html(mejs.Utility.secondsToTimeCode(t.options.duration>0?t.options.duration:t.media.duration,t.options));}}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{muteText:mejs.i18n.t('Mute Toggle'),allyVolumeControlText:mejs.i18n.t('Use Up/Down Arrow keys to increase or decrease volume.'),hideVolumeOnTouchDevices:true,audioVolume:'horizontal',videoVolume:'vertical'});$.extend(MediaElementPlayer.prototype,{buildvolume:function(player,controls,layers,media){if((mejs.MediaFeatures.isAndroid||mejs.MediaFeatures.isiOS)&&this.options.hideVolumeOnTouchDevices)
2891return;var t=this,mode=(t.isVideo)?t.options.videoVolume:t.options.audioVolume,mute=(mode=='horizontal')?$('<div class="mejs-button mejs-volume-button mejs-mute">'+'<button type="button" aria-controls="'+t.id+'" title="'+t.options.muteText+'" aria-label="'+t.options.muteText+'"></button>'+'</div>'+'<a href="javascript:void(0);" class="mejs-horizontal-volume-slider">'+'<span class="mejs-offscreen">'+t.options.allyVolumeControlText+'</span>'+'<div class="mejs-horizontal-volume-total"></div>'+'<div class="mejs-horizontal-volume-current"></div>'+'<div class="mejs-horizontal-volume-handle"></div>'+'</a>').appendTo(controls):$('<div class="mejs-button mejs-volume-button mejs-mute">'+'<button type="button" aria-controls="'+t.id+'" title="'+t.options.muteText+'" aria-label="'+t.options.muteText+'"></button>'+'<a href="javascript:void(0);" class="mejs-volume-slider">'+'<span class="mejs-offscreen">'+t.options.allyVolumeControlText+'</span>'+'<div class="mejs-volume-total"></div>'+'<div class="mejs-volume-current"></div>'+'<div class="mejs-volume-handle"></div>'+'</a>'+'</div>').appendTo(controls),volumeSlider=t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'),volumeTotal=t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'),volumeCurrent=t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),volumeHandle=t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),positionVolumeHandle=function(volume,secondTry){if(!volumeSlider.is(':visible')&&typeof secondTry=='undefined'){volumeSlider.show();positionVolumeHandle(volume,true);volumeSlider.hide();return;}
2892volume=Math.max(0,volume);volume=Math.min(volume,1);if(volume===0){mute.removeClass('mejs-mute').addClass('mejs-unmute');mute.children('button').attr('title',mejs.i18n.t('Unmute')).attr('aria-label',mejs.i18n.t('Unmute'));}else{mute.removeClass('mejs-unmute').addClass('mejs-mute');mute.children('button').attr('title',mejs.i18n.t('Mute')).attr('aria-label',mejs.i18n.t('Mute'));}
2893var totalPosition=volumeTotal.position();if(mode=='vertical'){var
2894totalHeight=volumeTotal.height(),newTop=totalHeight-(totalHeight*volume);volumeHandle.css('top',Math.round(totalPosition.top+newTop-(volumeHandle.height()/2)));volumeCurrent.height(totalHeight-newTop);volumeCurrent.css('top',totalPosition.top+newTop);}else{var
2895totalWidth=volumeTotal.width(),newLeft=totalWidth*volume;volumeHandle.css('left',Math.round(totalPosition.left+newLeft-(volumeHandle.width()/2)));volumeCurrent.width(Math.round(newLeft));}},handleVolumeMove=function(e){var volume=null,totalOffset=volumeTotal.offset();if(mode==='vertical'){var
2896railHeight=volumeTotal.height(),newY=e.pageY-totalOffset.top;volume=(railHeight-newY)/railHeight;if(totalOffset.top===0||totalOffset.left===0){return;}}else{var
2897railWidth=volumeTotal.width(),newX=e.pageX-totalOffset.left;volume=newX/railWidth;}
2898volume=Math.max(0,volume);volume=Math.min(volume,1);positionVolumeHandle(volume);if(volume===0){media.setMuted(true);}else{media.setMuted(false);}
2899media.setVolume(volume);}
2899,mouseIsDown=false,mouseIsOver=false;mute.hover(function(){volumeSlider.show();mouseIsOver=true;},function(){mouseIsOver=false;if(!mouseIsDown&&mode=='vertical'){volumeSlider.hide();}});var updateVolumeSlider=function(e){var volume=Math.floor(media.volume*100);volumeSlider.attr({'aria-label':mejs.i18n.t('volumeSlider'),'aria-valuemin':0,'aria-valuemax':100,'aria-valuenow':volume,'aria-valuetext':volume+'%','role':'slider','tabindex':0});};volumeSlider.bind('mouseover',function(){mouseIsOver=true;}).bind('mousedown',function(e){handleVolumeMove(e);t.globalBind('mousemove.vol',function(e){handleVolumeMove(e);});t.globalBind('mouseup.vol',function(){mouseIsDown=false;t.globalUnbind('.vol');if(!mouseIsOver&&mode=='vertical'){volumeSlider.hide();}});mouseIsDown=true;return false;}).bind('keydown',function(e){var keyCode=e.keyCode;var volume=media.volume;switch(keyCode){case 38:volume+=0.1;break;case 40:volume=volume-0.1;break;default:return true;}
2900mouseIsDown=false;positionVolumeHandle(volume);media.setVolume(volume);return false;}).bind('blur',function(){volumeSlider.hide();});mute.find('button').click(function(){media.setMuted(!media.muted);});mute.find('button').bind('focus',function(){volumeSlider.show();});media.addEventListener('volumechange',function(e){if(!mouseIsDown){if(media.muted){positionVolumeHandle(0);mute.removeClass('mejs-mute').addClass('mejs-unmute');}else{positionVolumeHandle(media.volume);mute.removeClass('mejs-unmute').addClass('mejs-mute');}}
2901updateVolumeSlider(e);},false);if(player.options.startVolume===0){media.setMuted(true);}
2902if(media.pluginType==='native'){media.setVolume(player.options.startVolume);}
2903t.container.on('controlsresize',function(){positionVolumeHandle(media.volume);});}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return'';},fullscreenText:mejs.i18n.t('Fullscreen')});$.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(player,controls,layers,media){if(!player.isVideo)
2904return;player.isInIframe=(window.location!=window.parent.location);if(mejs.MediaFeatures.hasTrueNativeFullScreen){var func=function(e){if(player.isFullScreen){if(mejs.MediaFeatures.isFullScreen()){player.isNativeFullScreen=true;player.setControlsSize();}else{player.isNativeFullScreen=false;player.exitFullScreen();}}};player.globalBind(mejs.MediaFeatures.fullScreenEventName,func);}
2905var t=this,fullscreenBtn=$('<div class="mejs-button mejs-fullscreen-button">'+'<button type="button" aria-controls="'+t.id+'" title="'+t.options.fullscreenText+'" aria-label="'+t.options.fullscreenText+'"></button>'+'</div>').appendTo(controls);if(t.media.pluginType==='native'||(!t.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)){fullscreenBtn.click(function(){var isFullScreen=(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen())||player.isFullScreen;if(isFullScreen){player.exitFullScreen();}else{player.enterFullScreen();}});}else{var hideTimeout=null,supportsPointerEvents=(function(){var element=document.createElement('x'),documentElement=document.documentElement,getComputedStyle=window.getComputedStyle,supports;if(!('pointerEvents'in element.style)){return false;}
2906element.style.pointerEvents='auto';element.style.pointerEvents='x';documentElement.appendChild(element);supports=getComputedStyle&&getComputedStyle(element,'').pointerEvents==='auto';documentElement.removeChild(element);return!!supports;})();if(supportsPointerEvents&&!mejs.MediaFeatures.isOpera){var fullscreenIsDisabled=false,restoreControls=function(){if(fullscreenIsDisabled){for(var i in hoverDivs){hoverDivs[i].hide();}
2907fullscreenBtn.css('pointer-events','');t.controls.css('pointer-events','');t.media.removeEventListener('click',t.clickToPlayPauseCallback);fullscreenIsDisabled=false;}},hoverDivs={},hoverDivNames=['top','left','right','bottom'],i,len,positionHoverDivs=function(){var fullScreenBtnOffsetLeft=fullscreenBtn.offset().left-t.container.offset().left,fullScreenBtnOffsetTop=fullscreenBtn.offset().top-t.container.offset().top,fullScreenBtnWidth=fullscreenBtn.outerWidth(true),fullScreenBtnHeight=fullscreenBtn.outerHeight(true),containerWidth=t.container.width(),containerHeight=t.container.height();for(i in hoverDivs){hoverDivs[i].css({position:'absolute',top:0,left:0});}
2908hoverDivs['top'].width(containerWidth).height(fullScreenBtnOffsetTop);hoverDivs['left'].width(fullScreenBtnOffsetLeft).height(fullScreenBtnHeight).css({top:fullScreenBtnOffsetTop});hoverDivs['right'].width(containerWidth-fullScreenBtnOffsetLeft-fullScreenBtnWidth).height(fullScreenBtnHeight).css({top:fullScreenBtnOffsetTop,left:fullScreenBtnOffsetLeft+fullScreenBtnWidth});hoverDivs['bottom'].width(containerWidth).height(containerHeight-fullScreenBtnHeight-fullScreenBtnOffsetTop).css({top:fullScreenBtnOffsetTop+fullScreenBtnHeight});};t.globalBind('resize',function(){positionHoverDivs();});for(i=0,len=hoverDivNames.length;i<len;i++){hoverDivs[hoverDivNames[i]]=$('<div class="mejs-fullscreen-hover" />
2908').appendTo(t.container).mouseover(restoreControls).hide();}
2909fullscreenBtn.on('mouseover',function(){if(!t.isFullScreen){var buttonPos=fullscreenBtn.offset(),containerPos=player.container.offset();media.positionFullscreenButton(buttonPos.left-containerPos.left,buttonPos.top-containerPos.top,false);fullscreenBtn.css('pointer-events','none');t.controls.css('pointer-events','none');t.media.addEventListener('click',t.clickToPlayPauseCallback);for(i in hoverDivs){hoverDivs[i].show();}
2910positionHoverDivs();fullscreenIsDisabled=true;}});media.addEventListener('fullscreenchange',function(e){t.isFullScreen=!t.isFullScreen;if(t.isFullScreen){t.media.removeEventListener('click',t.clickToPlayPauseCallback);}else{t.media.addEventListener('click',t.clickToPlayPauseCallback);}
2911restoreControls();});t.globalBind('mousemove',function(e){if(fullscreenIsDisabled){var fullscreenBtnPos=fullscreenBtn.offset();if(e.pageY<fullscreenBtnPos.top||e.pageY>fullscreenBtnPos.top+fullscreenBtn.outerHeight(true)||e.pageX<fullscreenBtnPos.left||e.pageX>fullscreenBtnPos.left+fullscreenBtn.outerWidth(true)){fullscreenBtn.css('pointer-events','');t.controls.css('pointer-events','');fullscreenIsDisabled=false;}}});}else{fullscreenBtn.on('mouseover',function(){if(hideTimeout!==null){clearTimeout(hideTimeout);delete hideTimeout;}
2912var buttonPos=fullscreenBtn.offset(),containerPos=player.container.offset();media.positionFullscreenButton(buttonPos.left-containerPos.left,buttonPos.top-containerPos.top,true);}).on('mouseout',function(){if(hideTimeout!==null){clearTimeout(hideTimeout);delete hideTimeout;}
2913hideTimeout=setTimeout(function(){media.hideFullscreenButton();},1500);});}}
2914player.fullscreenBtn=fullscreenBtn;t.globalBind('keydown',function(e){if(((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen())||t.isFullScreen)&&e.keyCode==27){player.exitFullScreen();}});t.normalHeight=0;t.normalWidth=0;},cleanfullscreen:function(player){player.exitFullScreen();},containerSizeTimeout:null,enterFullScreen:function(){var t=this;if(t.media.pluginType!=='native'&&(mejs.MediaFeatures.isFirefox||t.options.usePluginFullScreen)){return;}
2915$(document.documentElement).addClass('mejs-fullscreen');t.normalHeight=t.container.height();t.normalWidth=t.container.width();if(t.media.pluginType==='native'){if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(t.container[0]);if(t.isInIframe){setTimeout(function checkFullscreen(){if(t.isNativeFullScreen){var zoomMultiplier=window["devicePixelRatio"]||1,percentErrorMargin=0.002,windowWidth=zoomMultiplier*$(window).width(),screenWidth=screen.width,zoomedWindowWidth=zoomMultiplier*windowWidth;
2915if(Math.abs(screenWidth-windowWidth)>Math.abs(screenWidth-zoomedWindowWidth)){windowWidth=zoomedWindowWidth;}
2916var absDiff=Math.abs(screenWidth-windowWidth),marginError=screenWidth*percentErrorMargin;if(absDiff>marginError){t.exitFullScreen();}else{setTimeout(checkFullscreen,500);}}},1000);}}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){t.media.webkitEnterFullscreen();return;}}
2917if(t.isInIframe){var url=t.options.newWindowCallback(this);if(url!==''){if(!mejs.MediaFeatures.hasTrueNativeFullScreen){t.pause();window.open(url,t.id,'top=0,left=0,width='+screen.availWidth+',height='+screen.availHeight+',resizable=yes,scrollbars=no,status=no,toolbar=no');return;}else{setTimeout(function(){if(!t.isNativeFullScreen){t.pause();window.open(url,t.id,'top=0,left=0,width='+screen.availWidth+',height='+screen.availHeight+',resizable=yes,scrollbars=no,status=no,toolbar=no');}},250);}}}
2918t.container.addClass('mejs-container-fullscreen').width('100%').height('100%');t.containerSizeTimeout=setTimeout(function(){t.container.css({width:'100%',height:'100%'});t.setControlsSize();},500);if(t.media.pluginType==='native'){t.$media.width('100%').height('100%');}else{t.container.find('.mejs-shim').width('100%').height('100%');t.media.setVideoSize($(window).width(),$(window).height());}
2919t.layers.children('div').width('100%').height('100%');if(t.fullscreenBtn){t.fullscreenBtn.removeClass('mejs-fullscreen').addClass('mejs-unfullscreen');}
2920t.setControlsSize();t.isFullScreen=true;t.container.find('.mejs-captions-text').css('font-size',screen.width/t.width*1.00*100+'%');t.container.find('.mejs-captions-position').css('bottom','45px');t.container.trigger('enteredfullscreen');},exitFullScreen:function(){var t=this;clearTimeout(t.containerSizeTimeout);if(t.media.pluginType!=='native'&&mejs.MediaFeatures.isFirefox){t.media.setFullscreen(false);return;}
2921if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||t.isFullScreen)){mejs.MediaFeatures.cancelFullScreen();}
2922$(document.documentElement).removeClass('mejs-fullscreen');t.container.removeClass('mejs-container-fullscreen').width(t.normalWidth).height(t.normalHeight);if(t.media.pluginType==='native'){t.$media.width(t.normalWidth).height(t.normalHeight);}else{t.container.find('.mejs-shim').width(t.normalWidth).height(t.normalHeight);t.media.setVideoSize(t.normalWidth,t.normalHeight);}
2923t.layers.children('div').width(t.normalWidth).height(t.normalHeight);t.fullscreenBtn.removeClass('mejs-unfullscreen').addClass('mejs-fullscreen');t.setControlsSize();t.isFullScreen=false;t.container.find('.mejs-captions-text').css('font-size','');t.container.find('.mejs-captions-position').css('bottom','');t.container.trigger('exitedfullscreen');}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{speeds:['2.00','1.50','1.25','1.00','0.75'],defaultSpeed:'1.00',speedChar:'x'});$.extend(MediaElementPlayer.prototype,{buildspeed:function(player,controls,layers,media){var t=this;if(t.media.pluginType=='native'){var
2924speedButton=null,speedSelector=null,playbackSpeed=null,inputId=null;var speeds=[];var defaultInArray=false;for(var i=0,len=t.options.speeds.length;i<len;i++){var s=t.options.speeds[i];if(typeof(s)==='string'){speeds.push({name:s+t.options.speedChar,value:s});if(s===t.options.defaultSpeed){defaultInArray=true;}}
2925else{speeds.push(s);if(s.value===t.options.defaultSpeed){defaultInArray=true;}}}
2926if(!defaultInArray){speeds.push({name:t.options.defaultSpeed+t.options.speedChar,value:t.options.defaultSpeed});}
2927speeds.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value);});var getSpeedNameFromValue=function(value){for(i=0,len=speeds.length;i<len;i++){if(speeds[i].value===value){return speeds[i].name;}}};var html='<div class="mejs-button mejs-speed-button">'+'<button type="button">'+getSpeedNameFromValue(t.options.defaultSpeed)+'</button>'+'<div class="mejs-speed-selector">'+'<ul>';for(i=0,il=speeds.length;i<il;i++){inputId=t.id+'-speed-'+speeds[i].value;html+='<li>'+'<input type="radio" name="speed" '+'value="'+speeds[i].value+'" '+'id="'+inputId+'" '+
2928(speeds[i].value===t.options.defaultSpeed?' checked':'')+' />'+'<label for="'+inputId+'" '+
2929(speeds[i].value===t.options.defaultSpeed?' class="mejs-speed-selected"':'')+'>'+speeds[i].name+'</label>'+'</li>';}
2930html+='</ul></div></div>';speedButton=$(html).appendTo(controls);speedSelector=speedButton.find('.mejs-speed-selector');playbackSpeed=t.options.defaultSpeed;speedSelector.on('click','input[type="radio"]',function(){var newSpeed=$(this).attr('value');playbackSpeed=newSpeed;media.playbackRate=parseFloat(newSpeed);speedButton.find('button').html(getSpeedNameFromValue(newSpeed));speedButton.find('.mejs-speed-selected').removeClass('mejs-speed-selected');speedButton.find('input[type="radio"]:checked').next().addClass('mejs-speed-selected');});speedButton.one('mouseenter focusin',function(){speedSelector.height(speedButton.find('.mejs-speed-selector ul').outerHeight(true)+
2931speedButton.find('.mejs-speed-translations').outerHeight(true)).css('top',(-1*speedSelector.height())+'px');});}}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{startLanguage:'',tracksText:mejs.i18n.t('Captions/Subtitles'),tracksAriaLive:false,hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:''});$.extend(MediaElementPlayer.prototype,{hasChapters:false,cleartracks:function(player,controls,layers,media){if(player){if(player.captions)player.captions.remove();if(player.chapters)player.chapters.remove();if(player.captionsText)player.captionsText.remove();if(player.captionsButton)player.captionsButton.remove();}},buildtracks:function(player,controls,layers,media){if(player.tracks.length===0)
2932return;var t=this,attr=t.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':'',i;if(t.domNode.textTracks){for(i=t.domNode.textTracks.length-1;i>=0;i--){t.domNode.textTracks[i].mode="hidden";}}
2933t.cleartracks(player,controls,layers,media);player.chapters=$('<div class="mejs-chapters mejs-layer"></div>').prependTo(layers).hide();player.captions=$('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" '+
2934attr+'><span class="mejs-captions-text"></span></div></div>').prependTo(layers).hide();player.captionsText=player.captions.find('.mejs-captions-text');
2934player.captionsButton=$('<div class="mejs-button mejs-captions-button">'+'<button type="button" aria-controls="'+t.id+'" title="'+t.options.tracksText+'" aria-label="'+t.options.tracksText+'"></button>'+'<div class="mejs-captions-selector">'+'<ul>'+'<li>'+'<input type="radio" name="'+player.id+'_captions" id="'+player.id+'_captions_none" value="none" checked="checked" />'+'<label for="'+player.id+'_captions_none">'+mejs.i18n.t('None')+'</label>'+'</li>'+'</ul>'+'</div>'+'</div>').appendTo(controls);var subtitleCount=0;for(i=0;i<player.tracks.length;i++){if(player.tracks[i].kind=='subtitles'){subtitleCount++;}}
2935if(t.options.toggleCaptionsButtonWhenOnlyOne&&subtitleCount==1){player.captionsButton.on('click',function(){if(player.selectedTrack===null){lang=player.tracks[0].srclang;}else{lang='none';}
2936player.setTrack(lang);});}else{player.captionsButton.on('mouseenter focusin',function(){$(this).find('.mejs-captions-selector').css('visibility','visible');}).on('click','input[type=radio]',function(){lang=this.value;player.setTrack(lang);});player.captionsButton.on('mouseleave focusout',function(){$(this).find(".mejs-captions-selector").css("visibility","hidden");});}
2937if(!player.options.alwaysShowControls){player.container.bind('controlsshown',function(){player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');}).bind('controlshidden',function(){if(!media.paused){player.container.find('.mejs-captions-position').removeClass('mejs-captions-position-hover');}});}else{player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');}
2938player.trackToLoad=-1;player.selectedTrack=null;player.isLoadingTrack=false;for(i=0;i<player.tracks.length;i++){if(player.tracks[i].kind=='subtitles'){player.addTrackButton(player.tracks[i].srclang,player.tracks[i].label);}}
2939player.loadNextTrack();media.addEventListener('timeupdate',function(e){player.displayCaptions();},false);if(player.options.slidesSelector!==''){player.slidesContainer=$(player.options.slidesSelector);media.addEventListener('timeupdate',function(e){player.displaySlides();},false);}
2940media.addEventListener('loadedmetadata',function(e){player.displayChapters();},false);player.container.hover(function(){if(player.hasChapters){player.chapters.css('visibility','visible');player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight());}},function(){if(player.hasChapters&&!media.paused){player.chapters.fadeOut(200,function(){$(this).css('visibility','hidden');$(this).css('display','block');});}});t.container.on('controlsresize',function(){t.adjustLanguageBox();});if(player.node.getAttribute('autoplay')!==null){player.chapters.css('visibility','hidden');}},setTrack:function(lang){var t=this,i;if(lang=='none'){t.selectedTrack=null;t.captionsButton.removeClass('mejs-captions-enabled');}else{for(i=0;i<t.tracks.length;i++){if(t.tracks[i].srclang==lang){if(t.selectedTrack===null)
2941t.captionsButton.addClass('mejs-captions-enabled');t.selectedTrack=t.tracks[i];t.captions.attr('lang',t.selectedTrack.srclang);t.displayCaptions();break;}}}},loadNextTrack:function(){var t=this;t.trackToLoad++;if(t.trackToLoad<t.tracks.length){t.isLoadingTrack=true;t.loadTrack(t.trackToLoad);}else{t.isLoadingTrack=false;t.checkForTracks();}},loadTrack:function(index){var
2942t=this,track=t.tracks[index],after=function(){track.isLoaded=true;t.enableTrackButton(track.srclang,track.label);t.loadNextTrack();};$.ajax({url:track.src,dataType:"text",success:function(d){if(typeof d=="string"&&(/<tt\s+xml/ig).exec(d)){track.entries=mejs.TrackFormatParser.dfxp.parse(d);}else{track.entries=mejs.TrackFormatParser.webvtt.parse(d);}
2943after();if(track.kind=='chapters'){t.media.addEventListener('play',function(e){if(t.media.duration>0){t.displayChapters(track);}},false);}
2944if(track.kind=='slides'){t.setupSlides(track);}},error:function(){t.removeTrackButton(track.srclang);t.loadNextTrack();}});},enableTrackButton:function(lang,label){var t=this;if(label===''){label=mejs.language.codes[lang]||lang;}
2945t.captionsButton.find('input[value='+lang+']').prop('disabled',false).siblings('label').html(label);if(t.options.startLanguage==lang){$('#'+t.id+'_captions_'+lang).prop('checked',true).trigger('click');}
2946t.adjustLanguageBox();},removeTrackButton:function(lang){var t=this;t.captionsButton.find('input[value='+lang+']').closest('li').remove();t.adjustLanguageBox();},addTrackButton:function(lang,label){var t=this;if(label===''){label=mejs.language.codes[lang]||lang;}
2947t.captionsButton.find('ul').append($('<li>
2947'+'<input type="radio" name="'+t.id+'_captions" id="'+t.id+'_captions_'+lang+'" value="'+lang+'" disabled="disabled" />'+'<label for="'+t.id+'_captions_'+lang+'">'+label+' (loading)'+'</label>'+'</li>'));t.adjustLanguageBox();t.container.find('.mejs-captions-translations option[value='+lang+']').remove();},adjustLanguageBox:function(){var t=this;t.captionsButton.find('.mejs-captions-selector').height(t.captionsButton.find('.mejs-captions-selector ul').outerHeight(true)+
2948t.captionsButton.find('.mejs-captions-translations').outerHeight(true));},checkForTracks:function(){var
2949t=this,hasSubtitles=false;if(t.options.hideCaptionsButtonWhenEmpty){for(i=0;i<t.tracks.length;i++){if(t.tracks[i].kind=='subtitles'&&t.tracks[i].isLoaded){hasSubtitles=true;break;}}
2950if(!hasSubtitles){t.captionsButton.hide();t.setControlsSize();}}},displayCaptions:function(){if(typeof this.tracks=='undefined')
2951return;var
2952t=this,i,track=t.selectedTrack;if(track!==null&&track.isLoaded){for(i=0;i<track.entries.times.length;i++){if(t.media.currentTime>=track.entries.times[i].start&&t.media.currentTime<=track.entries.times[i].stop){t.captionsText.html(track.entries.text[i]).attr('class','mejs-captions-text '+(track.entries.times[i].identifier||''));t.captions.show().height(0);return;}}
2953t.captions.hide();}else{t.captions.hide();}},setupSlides:function(track){var t=this;t.slides=track;t.slides.entries.imgs=[t.slides.entries.text.length];t.showSlide(0);},showSlide:function(index){if(typeof this.tracks=='undefined'||typeof this.slidesContainer=='undefined'){return;}
2954var t=this,url=t.slides.entries.text[index],img=t.slides.entries.imgs[index];if(typeof img=='undefined'||typeof img.fadeIn=='undefined'){t.slides.entries.imgs[index]=img=$('<img src="'+url+'">').on('load',function(){img.appendTo(t.slidesContainer).hide().fadeIn().siblings(':visible').fadeOut();});}else{if(!img.is(':visible')&&!img.is(':animated')){img.fadeIn().siblings(':visible').fadeOut();}}},displaySlides:function(){if(typeof this.slides=='undefined')
2955return;var
2956t=this,slides=t.slides,i;for(i=0;i<slides.entries.times.length;i++){if(t.media.currentTime>=slides.entries.times[i].start&&t.media.currentTime<=slides.entries.times[i].stop){t.showSlide(i);return;}}},displayChapters:function(){var
2957t=this,i;for(i=0;i<t.tracks.length;i++){if(t.tracks[i].kind=='chapters'&&t.tracks[i].isLoaded){t.drawChapters(t.tracks[i]);t.hasChapters=true;break;}}},drawChapters:function(chapters){var
2958t=this,i,dur,percent=0,usedPercent=0;t.chapters.empty();for(i=0;i<chapters.entries.times.length;i++){dur=chapters.entries.times[i].stop-chapters.entries.times[i].start;percent=Math.floor(dur/t.media.duration*100);if(percent+usedPercent>100||i==chapters.entries.times.length-1&&percent+usedPercent<100)
2959{percent=100-usedPercent;}
2960t.chapters.append($('<div class="mejs-chapter" rel="'+chapters.entries.times[i].start+'" style="left: '+usedPercent.toString()+'%;width: '+percent.toString()+'%;">'+'<div class="mejs-chapter-block'+((i==chapters.entries.times.length-1)?' mejs-chapter-block-last':'')+'">'+'<span class="ch-title">'+chapters.entries.text[i]+'</span>'+'<span class="ch-time">'+mejs.Utility.secondsToTimeCode(chapters.entries.times[i].start,t.options)+'&ndash;'+mejs.Utility.secondsToTimeCode(chapters.entries.times[i].stop,t.options)+'</span>'+'</div>'+'</div>'));usedPercent+=percent;}
2961t.chapters.find('div.mejs-chapter').click(function(){t.media.setCurrentTime(parseFloat($(this).attr('rel')));if(t.media.paused){t.media.play();}});t.chapters.show();}});mejs.language={codes:{af:'Afrikaans',sq:'Albanian',ar:'Arabic',be:'Belarusian',bg:'Bulgarian',ca:'Catalan',zh:'Chinese','zh-cn':'Chinese Simplified','zh-tw':'Chinese Traditional',hr:'Croatian',cs:'Czech',da:'Danish',nl:'Dutch',en:'English',et:'Estonian',fl:'Filipino',fi:'Finnish',fr:'French',gl:'Galician',de:'German',el:'Greek',ht:'Haitian Creole',iw:'Hebrew',hi:'Hindi',hu:'Hungarian',is:'Icelandic',id:'Indonesian',ga:'Irish',it:'Italian',ja:'Japanese',ko:'Korean',lv:'Latvian',lt:'Lithuanian',mk:'Macedonian',ms:'Malay',mt:'Maltese',no:'Norwegian',fa:'Persian',pl:'Polish',pt:'Portuguese',ro:'Romanian',ru:'Russian',sr:'Serbian',sk:'Slovak',sl:'Slovenian',es:'Spanish',sw:'Swahili',sv:'Swedish',tl:'Tagalog',th:'Thai',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',cy:'Welsh',yi:'Yiddish'}};
2961mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(trackText){var
2962i=0,lines=mejs.TrackFormatParser.split2(trackText,/\r?\n/),entries={text:[],times:[]},timecode,text,identifier;for(;i<lines.length;i++){timecode=this.pattern_timecode.exec(lines[i]);if(timecode&&i<lines.length){if((i-1)>=0&&lines[i-1]!==''){identifier=lines[i-1];}
2963i++;text=lines[i];i++;while(lines[i]!==''&&i<lines.length){text=text+'\n'+lines[i];i++;}
2964text=$.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");entries.text.push(text);entries.times.push({identifier:identifier,start:(mejs.Utility.convertSMPTEtoSeconds(timecode[1])===0)?0.200:mejs.Utility.convertSMPTEtoSeconds(timecode[1]),stop:mejs.Utility.convertSMPTEtoSeconds(timecode[3]),settings:timecode[5]});}
2965identifier='';}
2966return entries;}},dfxp:{parse:function(trackText){trackText=$(trackText).filter("tt");var
2967i=0,container=trackText.children("div").eq(0),lines=container.find("p"),styleNode=trackText.find("#"+container.attr("style")),styles,text,entries={text:[],times:[]};if(styleNode.length){var attributes=styleNode.removeAttr("id").get(0).attributes;if(attributes.length){styles={};for(i=0;i<attributes.length;i++){styles[attributes[i].name.split(":")[1]]=attributes[i].value;}}}
2968for(i=0;i<lines.length;i++){var style;var _temp_times={start:null,stop:null,style:null};if(lines.eq(i).attr("begin"))_temp_times.start=mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("begin"));if(!_temp_times.start&&lines.eq(i-1).attr("end"))_temp_times.start=mejs.Utility.convertSMPTEtoSeconds(lines.eq(i-1).attr("end"));if(lines.eq(i).attr("end"))_temp_times.stop=mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("end"));if(!_temp_times.stop&&lines.eq(i+1).attr("begin"))_temp_times.stop=mejs.Utility.convertSMPTEtoSeconds(lines.eq(i+1).attr("begin"));if(styles){style="";for(var _style in styles){style+=_style+":"+styles[_style]+";";}}
2969if(style)_temp_times.style=style;if(_temp_times.start===0)_temp_times.start=0.200;entries.times.push(_temp_times);text=$.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");entries.text.push(text);if(entries.times.start===0)entries.times.start=2;}
2970return entries;}},split2:function(text,regex){return text.split(regex);}};if('x\n\ny'.split(/\n/gi).length!=3){mejs.TrackFormatParser.split2=function(text,regex){var
2971parts=[],chunk='',i;for(i=0;i<text.length;i++){chunk+=text.substring(i,i+1);if(regex.test(chunk)){parts.push(chunk.replace(regex,''));chunk='';}}
2972parts.push(chunk);return parts;};}})(mejs.$);(function($){$.extend(mejs.MepDefaults,{'contextMenuItems':[{render:function(player){if(typeof player.enterFullScreen=='undefined')
2973return null;if(player.isFullScreen){return mejs.i18n.t('Turn off Fullscreen');}else{return mejs.i18n.t('Go Fullscreen');}},click:function(player){if(player.isFullScreen){player.exitFullScreen();}else{player.enterFullScreen();}}},{render:function(player){if(player.media.muted){return mejs.i18n.t('Unmute');}else{return mejs.i18n.t('Mute');}},click:function(player){if(player.media.muted){player.setMuted(false);}else{player.setMuted(true);}}},{isSeparator:true},{render:function(player){return mejs.i18n.t('Download Video');},click:function(player){window.location.href=player.media.currentSrc;}}]});$.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(player,controls,layers,media){player.contextMenu=$('<div class="mejs-contextmenu"></div>').appendTo($('body')).hide();player.container.bind('contextmenu',function(e){if(player.isContextMenuEnabled){e.preventDefault();player.renderContextMenu(e.clientX-1,e.clientY-1);return false;}});player.container.bind('click',function(){player.contextMenu.hide();});player.contextMenu.bind('mouseleave',function(){player.startContextMenuTimer();});},cleancontextmenu:function(player){player.contextMenu.remove();},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true;},disableContextMenu:function(){this.isContextMenuEnabled=false;},contextMenuTimeout:null,startContextMenuTimer:function(){var t=this;t.killContextMenuTimer();t.contextMenuTimer=setTimeout(function(){t.hideContextMenu();t.killContextMenuTimer();},750);},killContextMenuTimer:function(){var timer=this.contextMenuTimer;if(timer!=null){clearTimeout(timer);delete timer;timer=null;}},hideContextMenu:function(){this.contextMenu.hide();},renderContextMenu:function(x,y){var t=this,html='',items=t.options.contextMenuItems;for(var i=0,il=items.length;i<il;i++){if(items[i].isSeparator){html+='<div class="mejs-contextmenu-separator"></div>';}else{var rendered=items[i].render(t);if(rendered!=null){html+='<div class="mejs-contextmenu-item" data-itemindex="'+i+'" id="element-'+(Math.random()*1000000)+'">'+rendered+'</div>';}}}
2974t.contextMenu.empty().append($(html)).css({top:y,left:x}).show();t.contextMenu.find('.mejs-contextmenu-item').each(function(){var $dom=$(this),itemIndex=parseInt($dom.data('itemindex'),10),item=t.options.contextMenuItems[itemIndex];if(typeof item.show!='undefined')
2975item.show($dom,t);$dom.click(function(){if(typeof item.click!='undefined')
2976item.click(t);t.contextMenu.hide();});});setTimeout(function(){t.killControlsTimer('rev3');},100);}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:mejs.i18n.t('Skip back %1 seconds')});$.extend(MediaElementPlayer.prototype,{buildskipback:function(player,controls,layers,media){var
2977t=this,backText=t.options.skipBackText.replace('%1',t.options.skipBackInterval),loop=$('<div class="mejs-button mejs-skip-back-button">'+'<button type="button" aria-controls="'+t.id+'" title="'+backText+'" aria-label="'+backText+'">'+t.options.skipBackInterval+'</button>'+'</div>').appendTo(controls).click(function(){media.setCurrentTime(Math.max(media.currentTime-t.options.skipBackInterval,0));$(this).find('button').blur();});}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t('Close')});$.extend(MediaElementPlayer.prototype,{buildpostroll:function(player,controls,layers,media){var
2978t=this,postrollLink=t.container.find('link[rel="postroll"]').attr('href');if(typeof postrollLink!=='undefined'){player.postroll=$('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+t.options.postrollCloseText+'</a>
2978<div class="mejs-postroll-layer-content"></div></div>').prependTo(layers).hide();t.media.addEventListener('ended',function(e){$.ajax({dataType:'html',url:postrollLink,success:function(data,textStatus){layers.find('.mejs-postroll-layer-content').html(data);}});player.postroll.show();},false);}}});})(mejs.$);(function(window,document,undefined){(function(factory){"use strict";if(typeof define==='function'&&define.amd){define(['jquery'],factory);}
2979else if(jQuery&&!jQuery.fn.dataTable){factory(jQuery);}}
2980(function($){"use strict";var DataTable=function(oInit){function _fnAddColumn(oSettings,nTh){var oDefaults=DataTable.defaults.columns;var iCol=oSettings.aoColumns.length;var oCol=$.extend({},DataTable.models.oColumn,oDefaults,{"sSortingClass":oSettings.oClasses.sSortable,"sSortingClassJUI":oSettings.oClasses.sSortJUI,"nTh":nTh?nTh:document.createElement('th'),"sTitle":oDefaults.sTitle?oDefaults.sTitle:nTh?nTh.innerHTML:'',"aDataSort":oDefaults.aDataSort?oDefaults.aDataSort:[iCol],"mData":oDefaults.mData?oDefaults.oDefaults:iCol});oSettings.aoColumns.push(oCol);if(oSettings.aoPreSearchCols[iCol]===undefined||oSettings.aoPreSearchCols[iCol]===null){oSettings.aoPreSearchCols[iCol]=$.extend({},DataTable.models.oSearch);}
2981else{var oPre=oSettings.aoPreSearchCols[iCol];if(oPre.bRegex===undefined){oPre.bRegex=true;}
2982if(oPre.bSmart===undefined){oPre.bSmart=true;}
2983if(oPre.bCaseInsensitive===undefined){oPre.bCaseInsensitive=true;}}
2984_fnColumnOptions(oSettings,iCol,null);}
2985function _fnColumnOptions(oSettings,iCol,oOptions){var oCol=oSettings.aoColumns[iCol];if(oOptions!==undefined&&oOptions!==null){if(oOptions.mDataProp&&!oOptions.mData){oOptions.mData=oOptions.mDataProp;}
2986if(oOptions.sType!==undefined){oCol.sType=oOptions.sType;oCol._bAutoType=false;}
2987$.extend(oCol,oOptions);_fnMap(oCol,oOptions,"sWidth","sWidthOrig");if(oOptions.iDataSort!==undefined){oCol.aDataSort=[oOptions.iDataSort];}
2988_fnMap(oCol,oOptions,"aDataSort");}
2989var mRender=oCol.mRender?_fnGetObjectDataFn(oCol.mRender):null;var mData=_fnGetObjectDataFn(oCol.mData);oCol.fnGetData=function(oData,sSpecific){var innerData=mData(oData,sSpecific);if(oCol.mRender&&(sSpecific&&sSpecific!=='')){return mRender(innerData,sSpecific,oData);}
2990return innerData;};oCol.fnSetData=_fnSetObjectDataFn(oCol.mData);if(!oSettings.oFeatures.bSort){oCol.bSortable=false;}
2991if(!oCol.bSortable||($.inArray('asc',oCol.asSorting)==-1&&$.inArray('desc',oCol.asSorting)==-1)){oCol.sSortingClass=oSettings.oClasses.sSortableNone;oCol.sSortingClassJUI="";}
2992else if($.inArray('asc',oCol.asSorting)==-1&&$.inArray('desc',oCol.asSorting)==-1){oCol.sSortingClass=oSettings.oClasses.sSortable;oCol.sSortingClassJUI=oSettings.oClasses.sSortJUI;}
2993else if($.inArray('asc',oCol.asSorting)!=-1&&$.inArray('desc',oCol.asSorting)==-1){oCol.sSortingClass=oSettings.oClasses.sSortableAsc;oCol.sSortingClassJUI=oSettings.oClasses.sSortJUIAscAllowed;}
2994else if($.inArray('asc',oCol.asSorting)==-1&&$.inArray('desc',oCol.asSorting)!=-1){oCol.sSortingClass=oSettings.oClasses.sSortableDesc;oCol.sSortingClassJUI=oSettings.oClasses.sSortJUIDescAllowed;}}
2995function _fnAdjustColumnSizing(oSettings){if(oSettings.oFeatures.bAutoWidth===false){return false;}
2996_fnCalculateColumnWidths(oSettings);for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){oSettings.aoColumns[i].nTh.style.width=oSettings.aoColumns[i].sWidth;}}
2997function _fnVisibleToColumnIndex(oSettings,iMatch){var aiVis=_fnGetColumns(oSettings,'bVisible');return typeof aiVis[iMatch]==='number'?aiVis[iMatch]:null;}
2998function _fnColumnIndexToVisible(oSettings,iMatch){var aiVis=_fnGetColumns(oSettings,'bVisible');var iPos=$.inArray(iMatch,aiVis);return iPos!==-1?iPos:null;}
2999function _fnVisbleColumns(oSettings){return _fnGetColumns(oSettings,'bVisible').length;}
3000function _fnGetColumns(oSettings,sParam){var a=[];$.map(oSettings.aoColumns,function(val,i){if(val[sParam]){a.push(i);}});return a;}
3001function _fnDetectType(sData){var aTypes=DataTable.ext.aTypes;var iLen=aTypes.length;for(var i=0;i<iLen;i++){var sType=aTypes[i](sData);if(sType!==null){return sType;}}
3002return'string';}
3003function _fnReOrderIndex(oSettings,sColumns){var aColumns=sColumns.split(',');var aiReturn=[];
3003for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){for(var j=0;j<iLen;j++){if(oSettings.aoColumns[i].sName==aColumns[j]){aiReturn.push(j);break;}}}
3004return aiReturn;}
3005function _fnColumnOrdering(oSettings){var sNames='';for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){sNames+=oSettings.aoColumns[i].sName+',';}
3006if(sNames.length==iLen){return"";}
3007return sNames.slice(0,-1);}
3008function _fnApplyColumnDefs(oSettings,aoColDefs,aoCols,fn){var i,iLen,j,jLen,k,kLen;if(aoColDefs){for(i=aoColDefs.length-1;i>=0;i--){var aTargets=aoColDefs[i].aTargets;if(!$.isArray(aTargets)){_fnLog(oSettings,1,'aTargets must be an array of targets, not a '+(typeof aTargets));}
3009for(j=0,jLen=aTargets.length;j<jLen;j++){if(typeof aTargets[j]==='number'&&aTargets[j]>=0){while(oSettings.aoColumns.length<=aTargets[j]){_fnAddColumn(oSettings);}
3010fn(aTargets[j],aoColDefs[i]);}
3011else if(typeof aTargets[j]==='number'&&aTargets[j]<0){fn(oSettings.aoColumns.length+aTargets[j],aoColDefs[i]);}
3012else if(typeof aTargets[j]==='string'){for(k=0,kLen=oSettings.aoColumns.length;k<kLen;k++){if(aTargets[j]=="_all"||$(oSettings.aoColumns[k].nTh).hasClass(aTargets[j])){fn(k,aoColDefs[i]);}}}}}}
3013if(aoCols){for(i=0,iLen=aoCols.length;i<iLen;i++){fn(i,aoCols[i]);}}
3013}
3014function _fnAddData(oSettings,aDataSupplied){var oCol;var aDataIn=($.isArray(aDataSupplied))?aDataSupplied.slice():$.extend(true,{},aDataSupplied);var iRow=oSettings.aoData.length;var oData=$.extend(true,{},DataTable.models.oRow);oData._aData=aDataIn;oSettings.aoData.push(oData);var nTd,sThisType;for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){oCol=oSettings.aoColumns[i];if(typeof oCol.fnRender==='function'&&oCol.bUseRendered&&oCol.mData!==null){_fnSetCellData(oSettings,iRow,i,_fnRender(oSettings,iRow,i));}
3015else{_fnSetCellData(oSettings,iRow,i,_fnGetCellData(oSettings,iRow,i));}
3016if(oCol._bAutoType&&oCol.sType!='string'){var sVarType=_fnGetCellData(oSettings,iRow,i,'type');if(sVarType!==null&&sVarType!==''){sThisType=_fnDetectType(sVarType);if(oCol.sType===null){oCol.sType=sThisType;}
3017else if(oCol.sType!=sThisType&&oCol.sType!="html"){oCol.sType='string';}}}}
3018oSettings.aiDisplayMaster.push(iRow);if(!oSettings.oFeatures.bDeferRender){_fnCreateTr(oSettings,iRow);}
3019return iRow;}
3020function _fnGatherData(oSettings){var iLoop,i,iLen,j,jLen,jInner,nTds,nTrs,nTd,nTr,aLocalData,iThisIndex,iRow,iRows,iColumn,iColumns,sNodeName,oCol,oData;if(oSettings.bDeferLoading||oSettings.sAjaxSource===null){nTr=oSettings.nTBody.firstChild;while(nTr){if(nTr.nodeName.toUpperCase()=="TR"){iThisIndex=oSettings.aoData.length;nTr._DT_RowIndex=iThisIndex;oSettings.aoData.push($.extend(true,{},DataTable.models.oRow,{"nTr":nTr}));oSettings.aiDisplayMaster.push(iThisIndex);nTd=nTr.firstChild;jInner=0;while(nTd){sNodeName=nTd.nodeName.toUpperCase();if(sNodeName=="TD"||sNodeName=="TH"){_fnSetCellData(oSettings,iThisIndex,jInner,$.trim(nTd.innerHTML));jInner++;}
3021nTd=nTd.nextSibling;}}
3022nTr=nTr.nextSibling;}}
3023nTrs=_fnGetTrNodes(oSettings);nTds=[];for(i=0,iLen=nTrs.length;i<iLen;i++){nTd=nTrs[i].firstChild;while(nTd){sNodeName=nTd.nodeName.toUpperCase();if(sNodeName=="TD"||sNodeName=="TH"){nTds.push(nTd);}
3024nTd=nTd.nextSibling;}}
3025for(iColumn=0,iColumns=oSettings.aoColumns.length;iColumn<iColumns;iColumn++){oCol=oSettings.aoColumns[iColumn];if(oCol.sTitle===null){oCol.sTitle=oCol.nTh.innerHTML;}
3026var
3027bAutoType=oCol._bAutoType,bRender=typeof oCol.fnRender==='function',bClass=oCol.sClass!==null,bVisible=oCol.bVisible,nCell,sThisType,sRendered,sValType;if(bAutoType||bRender||bClass||!bVisible){for(iRow=0,iRows=oSettings.aoData.length;iRow<iRows;iRow++){oData=oSettings.aoData[iRow];nCell=nTds[(iRow*iColumns)+iColumn];if(bAutoType&&oCol.sType!='string'){sValType=_fnGetCellData(oSettings,iRow,iColumn,'type');if(sValType!==''){sThisType=_fnDetectType(sValType);if(oCol.sType===null){oCol.sType=sThisType;}
3028else if(oCol.sType!=sThisType&&oCol.sType!="html"){oCol.sType='string';}}}
3029if(oCol.mRender){nCell.innerHTML=_fnGetCellData(oSettings,iRow,iColumn,'display');}
3030else if(oCol.mData!==iColumn){nCell.innerHTML=_fnGetCellData(oSettings,iRow,iColumn,'display');}
3031if(bRender){sRendered=_fnRender(oSettings,iRow,iColumn);nCell.innerHTML=sRendered;if(oCol.bUseRendered){_fnSetCellData(oSettings,iRow,iColumn,sRendered);}}
3032if(bClass){nCell.className+=' '+oCol.sClass;}
3033if(!bVisible){oData._anHidden[iColumn]=nCell;nCell.parentNode.removeChild(nCell);}
3034else{oData._anHidden[iColumn]=null;}
3035if(oCol.fnCreatedCell){oCol.fnCreatedCell.call(oSettings.oInstance,nCell,_fnGetCellData(oSettings,iRow,iColumn,'display'),oData._aData,iRow,iColumn);}}}}
3036if(oSettings.aoRowCreatedCallback.length!==0){for(i=0,iLen=oSettings.aoData.length;i<iLen;i++){oData=oSettings.aoData[i];_fnCallbackFire(oSettings,'aoRowCreatedCallback',null,[oData.nTr,oData._aData,i]);}}}
3037function _fnNodeToDataIndex(oSettings,n){return(n._DT_RowIndex!==undefined)?n._DT_RowIndex:null;}
3038function _fnNodeToColumnIndex(oSettings,iRow,n){var anCells=_fnGetTdNodes(oSettings,iRow);for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){if(anCells[i]===n){return i;}}
3039return-1;}
3040function _fnGetRowData(oSettings,iRow,sSpecific,aiColumns){var out=[];for(var i=0,iLen=aiColumns.length;i<iLen;i++){out.push(_fnGetCellData(oSettings,iRow,aiColumns[i],sSpecific));}
3041return out;}
3042function _fnGetCellData(oSettings,iRow,iCol,sSpecific){var sData;var oCol=oSettings.aoColumns[iCol];var oData=oSettings.aoData[iRow]._aData;if((sData=oCol.fnGetData(oData,sSpecific))===undefined){if(oSettings.iDrawError!=oSett
3042ings.iDraw&&oCol.sDefaultContent===null){_fnLog(oSettings,0,"Requested unknown parameter "+
3043(typeof oCol.mData=='function'?'{mData function}':"'"+oCol.mData+"'")+" from the data source for row "+iRow);oSettings.iDrawError=oSettings.iDraw;}
3044return oCol.sDefaultContent;}
3045if(sData===null&&oCol.sDefaultContent!==null){sData=oCol.sDefaultContent;}
3046else if(typeof sData==='function'){return sData();}
3047if(sSpecific=='display'&&sData===null){return'';}
3048return sData;}
3049function _fnSetCellData(oSettings,iRow,iCol,val){var oCol=oSettings.aoColumns[iCol];var oData=oSettings.aoData[iRow]._aData;oCol.fnSetData(oData,val);}
3050var __reArray=/\[.*?\]$/;function _fnGetObjectDataFn(mSource){if(mSource===null){return function(data,type){return null;};}
3051else if(typeof mSource==='function'){return function(data,type,extra){return mSource(data,type,extra);};}
3052else if(typeof mSource==='string'&&(mSource.indexOf('.')!==-1||mSource.indexOf('[')!==-1)){var fetchData=function(data,type,src){var a=src.split('.');var arrayNotation,out,innerSrc;if(src!==""){for(var i=0,iLen=a.length;i<iLen;i++){arrayNotation=a[i].match(__reArray);if(arrayNotation){a[i]=a[i].replace(__reArray,'');if(a[i]!==""){data=data[a[i]];}
3053out=[];a.splice(0,i+1);innerSrc=a.join('.');for(var j=0,jLen=data.length;j<jLen;j++){out.push(fetchData(data[j],type,innerSrc));}
3054var join=arrayNotation[0].substring(1,arrayNotation[0].length-1);data=(join==="")?out:out.join(join);break;}
3055if(data===null||data[a[i]]===undefined){return undefined;}
3056data=data[a[i]];}}
3057return data;};return function(data,type){return fetchData(data,type,mSource);};}
3058else{return function(data,type){return data[mSource];};}}
3059function _fnSetObjectDataFn(mSource){if(mSource===null){return function(data,val){};}
3060else if(typeof mSource==='function'){return function(data,val){mSource(data,'set',val);};}
3061else if(typeof mSource==='string'&&(mSource.indexOf('.')!==-1||mSource.indexOf('[')!==-1)){var setData=function(data,val,src){var a=src.split('.'),b;var arrayNotation,o,innerSrc;for(var i=0,iLen=a.length-1;i<iLen;i++){arrayNotation=a[i].match(__reArray);if(arrayNotation){a[i]=a[i].replace(__reArray,'');data[a[i]]=[];b=a.slice();b.splice(0,i+1);innerSrc=b.join('.');for(var j=0,jLen=val.length;j<jLen;j++){o={};setData(o,val[j],innerSrc);data[a[i]].push(o);}
3062return;}
3063if(data[a[i]]===null||data[a[i]]===undefined){data[a[i]]={};}
3064data=data[a[i]];}
3065data[a[a.length-1].replace(__reArray,'')]=val;};return function(data,val){return setData(data,val,mSource);};}
3066else{return function(data,val){data[mSource]=val;};}}
3067function _fnGetDataMaster(oSettings){var aData=[];var iLen=oSettings.aoData.length;for(var i=0;i<iLen;i++){aData.push(oSettings.aoData[i]._aData);}
3068return aData;}
3069function _fnClearTable(oSettings){oSettings.aoData.splice(0,oSettings.aoData.length);oSettings.aiDisplayMaster.splice(0,oSettings.aiDisplayMaster.length);oSettings.aiDisplay.splice(0,oSettings.aiDisplay.length);_fnCalculateEnd(oSettings);}
3070function _fnDeleteIndex(a,iTarget){var iTargetIndex=-1;for(var i=0,iLen=a.length;i<iLen;i++){if(a[i]==iTarget){iTargetIndex=i;}
3071else if(a[i]>iTarget){a[i]--;}}
3072if(iTargetIndex!=-1){a.splice(iTargetIndex,1);}}
3073function _fnRender(oSettings,iRow,iCol){var oCol=oSettings.aoColumns[iCol];return oCol.fnRender({"iDataRow":iRow,"iDataColumn":iCol,"oSettings":oSettings,"aData":oSettings.aoData[iRow]._aData,"mDataProp":oCol.mData},_fnGetCellData(oSettings,iRow,iCol,'display'));}
3074function _fnCreateTr(oSettings,iRow){var oData=oSettings.aoData[iRow];var nTd;if(oData.nTr===null){oData.nTr=document.createElement('tr');oData.nTr._DT_RowIndex=iRow;if(oData._aData.DT_RowId){oData.nTr.id=oData._aData.DT_RowId;}
3075if(oData._aData.DT_RowClass){oData.nTr.className=oData._aData.DT_RowClass;}
3076for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){var oCol=oSettings.aoColumns[i];nTd=document.createElement(oCol.sCellType);nTd.innerHTML=(typeof oCol.fnRender==='function'&&(!oCol.bUseRendered||oCol.mData===null))?_fnRender(oSettings,iRow,i):_fnGetCellData(oSettings,iRow,i,'display');if(oCol.sClass!==null){nTd.className=oCol.sClass;}
3077if(oCol.bVisible){oData.nTr.appendChild(nTd);oData._anHidden[i]=null;}
3078else{oData._anHidden[i]=nTd;}
3079if(oCol.fnCreatedCell){oCol.fnCreatedCell.call(oSettings.oInstance,nTd,_fnGetCellData(oSett
3079ings,iRow,i,'display'),oData._aData,iRow,i);}}
3080_fnCallbackFire(oSettings,'aoRowCreatedCallback',null,[oData.nTr,oData._aData,iRow]);}}
3081function _fnBuildHead(oSettings){var i,nTh,iLen,j,jLen;var iThs=$('th, td',oSettings.nTHead).length;var iCorrector=0;var jqChildren;if(iThs!==0){for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){nTh=oSettings.aoColumns[i].nTh;nTh.setAttribute('role','columnheader');if(oSettings.aoColumns[i].bSortable){nTh.setAttribute('tabindex',oSettings.iTabIndex);nTh.setAttribute('aria-controls',oSettings.sTableId);}
3082if(oSettings.aoColumns[i].sClass!==null){$(nTh).addClass(oSettings.aoColumns[i].sClass);}
3083if(oSettings.aoColumns[i].sTitle!=nTh.innerHTML){nTh.innerHTML=oSettings.aoColumns[i].sTitle;}}}
3084else{var nTr=document.createElement("tr");for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){nTh=oSettings.aoColumns[i].nTh;nTh.innerHTML=oSettings.aoColumns[i].sTitle;nTh.setAttribute('tabindex','0');if(oSettings.aoColumns[i].sClass!==null){$(nTh).addClass(oSettings.aoColumns[i].sClass);}
3085nTr.appendChild(nTh);}
3086$(oSettings.nTHead).html('')[0].appendChild(nTr);_fnDetectHeader(oSettings.aoHeader,oSettings.nTHead);}
3087$(oSettings.nTHead).children('tr').attr('role','row');if(oSettings.bJUI){for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){nTh=oSettings.aoColumns[i].nTh;var nDiv=document.createElement('div');nDiv.className=oSettings.oClasses.sSortJUIWrapper;$(nTh).contents().appendTo(nDiv);var nSpan=document.createElement('span');nSpan.className=oSettings.oClasses.sSortIcon;nDiv.appendChild(nSpan);nTh.appendChild(nDiv);}}
3088if(oSettings.oFeatures.bSort){for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bSortable!==false){_fnSortAttachListener(oSettings,oSettings.aoColumns[i].nTh,i);}
3089else{$(oSettings.aoColumns[i].nTh).addClass(oSettings.oClasses.sSortableNone);}}}
3090if(oSettings.oClasses.sFooterTH!==""){$(oSettings.nTFoot).children('tr').children('th').addClass(oSettings.oClasses.sFooterTH);}
3091if(oSettings.nTFoot!==null){var anCells=_fnGetUniqueThs(oSettings,null,oSettings.aoFooter);for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){if(anCells[i]){oSettings.aoColumns[i].nTf=anCells[i];if(oSettings.aoColumns[i].sClass){$(anCells[i]).addClass(oSettings.aoColumns[i].sClass);}}}}}
3092function _fnDrawHead(oSettings,aoSource,bIncludeHidden){var i,iLen,j,jLen,k,kLen,n,nLocalTr;var aoLocal=[];var aApplied=[];var iColumns=oSettings.aoColumns.length;var iRowspan,iColspan;if(bIncludeHidden===undefined){bIncludeHidden=false;}
3093for(i=0,iLen=aoSource.length;i<iLen;i++){aoLocal[i]=aoSource[i].slice();aoLocal[i].nTr=aoSource[i].nTr;for(j=iColumns-1;j>=0;j--){if(!oSettings.aoColumns[j].bVisible&&!bIncludeHidden){aoLocal[i].splice(j,1);}}
3094aApplied.push([]);}
3095for(i=0,iLen=aoLocal.length;i<iLen;i++){nLocalTr=aoLocal[i].nTr;if(nLocalTr){while((n=nLocalTr.firstChild)){nLocalTr.removeChild(n);}}
3096for(j=0,jLen=aoLocal[i].length;j<jLen;j++){iRowspan=1;iColspan=1;if(aApplied[i][j]===undefined){nLocalTr.appendChild(aoLocal[i][j].cell);aApplied[i][j]=1;while(aoLocal[i+iRowspan]!==undefined&&aoLocal[i][j].cell==aoLocal[i+iRowspan][j].cell){aApplied[i+iRowspan][j]=1;iRowspan++;}
3097while(aoLocal[i][j+iColspan]!==undefined&&aoLocal[i][j].cell==aoLocal[i][j+iColspan].cell){for(k=0;k<iRowspan;k++){aApplied[i+k][j+iColspan]=1;}
3098iColspan++;}
3099aoLocal[i][j].cell.rowSpan=iRowspan;aoLocal[i][j].cell.colSpan=iColspan;}}}}
3100function _fnDraw(oSettings){var aPreDraw=_fnCallbackFire(oSettings,'aoPreDrawCallback','preDraw',[oSettings]);if($.inArray(false,aPreDraw)!==-1){_fnProcessingDisplay(oSettings,false);return;}
3101var i,iLen,n;var anRows=[];var iRowCount=0;var iStripes=oSettings.asStripeClasses.length;var iOpenRows=oSettings.aoOpenRows.length;oSettings.bDrawing=true;if(oSettings.iInitDisplayStart!==undefined&&oSettings.iInitDisplayStart!=-1){if(oSettings.oFeatures.bServerSide){oSettings._iDisplayStart=oSettings.iInitDisplayStart;}
3102else{oSettings._iDisplayStart=(oSettings.iInitDisplayStart>=oSettings.fnRecordsDisplay())?0:oSettings.iInitDisplayStart;}
3103oSettings.iInitDisplayStart=-1;_fnCalculateEnd(oSettings);}
3104if(oSettings.bDeferLoading){oSettings.bDeferLoading=false;oSettings.iDraw++;}
3105else if(!oSettings.oFeatures.bServerSide){oSettings.iDraw++;}
3106else if(!oSettings.bDestroying&&!_fnAjaxUpdate(oSettings)){return;}
3107if(oSettings.aiDisplay.length!==0){var iStart=oSettings._iDisplayStart;var iEnd=oSettings._iDisplayEnd;if(oSettings.oFeatures.bServerSide){iStart=0;iEnd=oSettings.aoData.length;}
3108for(var j=iStart;j<iEnd;j++){var aoData=oSettings.aoData[oSettings.aiDisplay[j]];if(aoData.nTr===null){_fnCreateTr(oSettings,oSettings.aiDisplay[j]);}
3109var nRow=aoData.nTr;if(iStripes!==0){var sStripe=oSettings.asStripeClasses[iRowCount%iStripes];if(aoData._sRowStripe!=sStripe){$(nRow).removeClass(aoData._sRowStripe).addClass(sStripe);aoData._sRowStripe=sStripe;}}
3110_fnCallbackFire(oSettings,'aoRowCallback',null,[nRow,oSettings.aoData[oSettings.aiDisplay[j]]._aData,iRowCount,j]);anRows.push(nRow);iRowCount++;if(iOpenRows!==0){for(var k=0;k<iOpenRows;k++){if(nRow==oSettings.aoOpenRows[k].nParent){anRows.push(oSettings.aoOpenRows[k].nTr);break;}}}}}
3111else{anRows[0]=document.createElement('tr');if(oSettings.asStripeClasses[0]){anRows[0].className=oSettings.asStripeClasses[0];}
3112var oLang=oSettings.oLanguage;var sZero=oLang.sZeroRecords;if(oSettings.iDraw==1&&oSettings.sAjaxSource!==null&&!oSettings.oFeatures.bServerSide){sZero=oLang.sLoadingRecords;}
3113else if(oLang.sEmptyTable&&oSettings.fnRecordsTotal()===0){sZero=oLang.sEmptyTable;}
3114var nTd=document.createElement('td');nTd.setAttribute('valign',"top");nTd.colSpan=_fnVisbleColumns(oSettings);nTd.className=oSettings.oClasses.sRowEmpty;nTd.innerHTML=_fnInfoMacros(oSettings,sZero);anRows[iRowCount].appendChild(nTd);}
3115_fnCallbackFire(oSettings,'aoHeaderCallback','header',[$(oSettings.nTHead).children('tr')[0],_fnGetDataMaster(oSettings),oSettings._iDisplayStart,oSettings.fnDisplayEnd(),oSettings.aiDisplay]);_fnCallbackFire(oSettings,'aoFooterCallback','footer',[$(oSettings.nTFoot).children('tr')[0],_fnGetDataMaster(oSettings),oSettings._iDisplayStart,oSettings.fnDisplayEnd(),oSettings.aiDisplay]);var
3116nAddFrag=document.createDocumentFragment(),nRemoveFrag=document.createDocumentFragment(),nBodyPar,nTrs;if(oSettings.nTBody){nBodyPar=oSettings.nTBody.parentNode;nRemoveFrag.appendChild(oSettings.nTBody);if(!oSettings.oScroll.bInfinite||!oSettings._bInitComplete||oSettings.bSorted||oSettings.bFiltered){while((n=oSettings.nTBody.firstChild)){oSettings.nTBody.removeChild(n);}}
3117for(i=0,iLen=anRows.length;i<iLen;i++){nAddFrag.appendChild(anRows[i]);}
3118oSettings.nTBody.appendChild(nAddFrag);if(nBodyPar!==null){nBodyPar.appendChild(oSettings.nTBody);}}
3119_fnCallbackFire(oSettings,'aoDrawCallback','draw',[oSettings]);oSettings.bSorted=false;oSettings.bFiltered=false;oSettings.bDrawing=false;if(oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,false);if(!oSettings._bInitComplete){_fnInitComplete(oSettings);}}}
3120function _fnReDraw(oSettings){if(oSettings.oFeatures.bSort){_fnSort(oSettings,oSettings.oPreviousSearch);}
3121else if(oSettings.oFeatures.bFilter){_fnFilterComplete(oSettings,oSettings.oPreviousSearch);}
3122else{_fnCalculateEnd(oSettings);_fnDraw(oSettings);}}
3123function _fnAddOptionsHtml(oSettings){var nHolding=$('<div></div>')[0];oSettings.nTable.parentNode.insertBefore(nHolding,oSettings.nTable);oSettings.nTableWrapper=$('<div id="'+oSettings.sTableId+'_wrapper" class="'+oSettings.oClasses.sWrapper+'" role="grid"></div>')[0];oSettings.nTableReinsertBefore=oSettings.nTable.nextSibling;var nInsertNode=oSettings.nTableWrapper;var aDom=oSettings.sDom.split('');var nTmp,iPushFeature,cOption,nNewNode,cNext,sAttr,j;for(var i=0;i<aDom.length;i++){iPushFeature=0;cOption=aDom[i];if(cOption=='<'){nNewNode=$('<div></div>')[0];cNext=aDom[i+1];if(cNext=="'"||cNext=='"'){sAttr="";j=2;while(aDom[i+j]!=cNext){sAttr+=aDom[i+j];j++;}
3124if(sAttr=="H"){sAttr=oSettings.oClasses.sJUIHeader;}
3125else if(sAttr=="F"){sAttr=oSettings.oClasses.sJUIFooter;}
3126if(sAttr.indexOf('.')!=-1){var aSplit=sAttr.split('.');nNewNode.id=aSplit[0].substr(1,aSplit[0].length-1);nNewNode.className=aSplit[1];}
3127else if(sAttr.charAt(0)=="#"){nNewNode.id=sAttr.substr(1,sAttr.length-1);}
3128else{nNewNode.className=sAttr;}
3129i+=j;}
3130nInsertNode.appendChild(nNewNode);nInsertNode=nNewNode;}
3131else if(cOption=='>'){nInsertNode=nInsertNode.parentNode;}
3132else if(cOption=='l'&&oSettings.oFeatures.bPaginate&&oSettings.oFeatures.bLengthChange){nTmp=_fnFeatureHtmlLength(oSett
3132ings);iPushFeature=1;}
3133else if(cOption=='f'&&oSettings.oFeatures.bFilter){nTmp=_fnFeatureHtmlFilter(oSettings);iPushFeature=1;}
3134else if(cOption=='r'&&oSettings.oFeatures.bProcessing){nTmp=_fnFeatureHtmlProcessing(oSettings);iPushFeature=1;}
3135else if(cOption=='t'){nTmp=_fnFeatureHtmlTable(oSettings);iPushFeature=1;}
3136else if(cOption=='i'&&oSettings.oFeatures.bInfo){nTmp=_fnFeatureHtmlInfo(oSettings);iPushFeature=1;}
3137else if(cOption=='p'&&oSettings.oFeatures.bPaginate){nTmp=_fnFeatureHtmlPaginate(oSettings);iPushFeature=1;}
3138else if(DataTable.ext.aoFeatures.length!==0){var aoFeatures=DataTable.ext.aoFeatures;for(var k=0,kLen=aoFeatures.length;k<kLen;k++){if(cOption==aoFeatures[k].cFeature){nTmp=aoFeatures[k].fnInit(oSettings);if(nTmp){iPushFeature=1;}
3139break;}}}
3140if(iPushFeature==1&&nTmp!==null){if(typeof oSettings.aanFeatures[cOption]!=='object'){oSettings.aanFeatures[cOption]=[];}
3141oSettings.aanFeatures[cOption].push(nTmp);nInsertNode.appendChild(nTmp);}}
3142nHolding.parentNode.replaceChild(oSettings.nTableWrapper,nHolding);}
3143function _fnDetectHeader(aLayout,nThead){var nTrs=$(nThead).children('tr');var nTr,nCell;var i,k,l,iLen,jLen,iColShifted,iColumn,iColspan,iRowspan;var bUnique;var fnShiftCol=function(a,i,j){var k=a[i];while(k[j]){j++;}
3144return j;};aLayout.splice(0,aLayout.length);for(i=0,iLen=nTrs.length;i<iLen;i++){aLayout.push([]);}
3145for(i=0,iLen=nTrs.length;i<iLen;i++){nTr=nTrs[i];iColumn=0;nCell=nTr.firstChild;while(nCell){if(nCell.nodeName.toUpperCase()=="TD"||nCell.nodeName.toUpperCase()=="TH"){iColspan=nCell.getAttribute('colspan')*1;iRowspan=nCell.getAttribute('rowspan')*1;iColspan=(!iColspan||iColspan===0||iColspan===1)?1:iColspan;iRowspan=(!iRowspan||iRowspan===0||iRowspan===1)?1:iRowspan;iColShifted=fnShiftCol(aLayout,i,iColumn);bUnique=iColspan===1?true:false;for(l=0;l<iColspan;l++){for(k=0;k<iRowspan;k++){aLayout[i+k][iColShifted+l]={"cell":nCell,"unique":bUnique};aLayout[i+k].nTr=nTr;}}}
3146nCell=nCell.nextSibling;}}}
3147function _fnGetUniqueThs(oSettings,nHeader,aLayout){var aReturn=[];if(!aLayout){aLayout=oSettings.aoHeader;if(nHeader){aLayout=[];_fnDetectHeader(aLayout,nHeader);}}
3148for(var i=0,iLen=aLayout.length;i<iLen;i++){for(var j=0,jLen=aLayout[i].length;j<jLen;j++){if(aLayout[i][j].unique&&(!aReturn[j]||!oSettings.bSortCellsTop)){aReturn[j]=aLayout[i][j].cell;}}}
3149return aReturn;}
3150function _fnAjaxUpdate(oSettings){if(oSettings.bAjaxDataGet){oSettings.iDraw++;_fnProcessingDisplay(oSettings,true);var iColumns=oSettings.aoColumns.length;var aoData=_fnAjaxParameters(oSettings);_fnServerParams(oSettings,aoData);oSettings.fnServerData.call(oSettings.oInstance,oSettings.sAjaxSource,aoData,function(json){_fnAjaxUpdateDraw(oSettings,json);},oSettings);return false;}
3151else{return true;}}
3152function _fnAjaxParameters(oSettings){var iColumns=oSettings.aoColumns.length;var aoData=[],mDataProp,aaSort,aDataSort;var i,j;aoData.push({"name":"sEcho","value":oSettings.iDraw});aoData.push({"name":"iColumns","value":iColumns});aoData.push({"name":"sColumns","value":_fnColumnOrdering(oSettings)});aoData.push({"name":"iDisplayStart","value":oSettings._iDisplayStart});aoData.push({"name":"iDisplayLength","value":oSettings.oFeatures.bPaginate!==false?oSettings._iDisplayLength:-1});for(i=0;i<iColumns;i++){mDataProp=oSettings.aoColumns[i].mData;aoData.push({"name":"mDataProp_"+i,"value":typeof(mDataProp)==="function"?'function':mDataProp});}
3153if(oSettings.oFeatures.bFilter!==false){aoData.push({"name":"sSearch","value":oSettings.oPreviousSearch.sSearch});aoData.push({"name":"bRegex","value":oSettings.oPreviousSearch.bRegex});for(i=0;i<iColumns;i++){aoData.push({"name":"sSearch_"+i,"value":oSettings.aoPreSearchCols[i].sSearch});aoData.push({"name":"bRegex_"+i,"value":oSettings.aoPreSearchCols[i].bRegex});aoData.push({"name":"bSearchable_"+i,"value":oSettings.aoColumns[i].bSearchable});}}
3154if(oSettings.oFeatures.bSort!==false){var iCounter=0;aaSort=(oSettings.aaSortingFixed!==null)?oSettings.aaSortingFixed.concat(oSettings.aaSorting):oSettings.aaSorting.slice();for(i=0;i<aaSort.length;i++){aDataSort=oSettings.aoColumns[aaSort[i][0]].aDataSort;for(j=0;j<aDataSort.length;j++){aoData.push({"name":"iSortCol_"+iCounter,"value":aDataSort[j]});aoData.push({"name":"sSortDir_"+iCounter,"value":aaSort[i][1]});iCounter++;}}
3155aoData.push({"name":"iSortingCols","value":iCounter});for(i=0;i<iColumns;i++){aoData.push({"name":"bSortable_"+i,"value":oSettings.aoColumns[i].bSortable});}}
3156return aoData;}
3157function _fnServerParams(oSettings,aoData){_fnCallbackFire(oSettings,'aoServerParams','serverParams',[aoData]);}
3158function _fnAjaxUpdateDraw(oSettings,json){if(json.sEcho!==undefined){if(json.sEcho*1<oSettings.iDraw){return;}
3159else{oSettings.iDraw=json.sEcho*1;}}
3160if(!oSettings.oScroll.bInfinite||(oSettings.oScroll.bInfinite&&(oSettings.bSorted||oSettings.bFiltered))){_fnClearTable(oSettings);}
3161oSettings._iRecordsTotal=parseInt(json.iTotalRecords,10);oSettings._iRecordsDisplay=parseInt(json.iTotalDisplayRecords,10);var sOrdering=_fnColumnOrdering(oSettings);var bReOrder=(json.sColumns!==undefined&&sOrdering!==""&&json.sColumns!=sOrdering);var aiIndex;if(bReOrder){aiIndex=_fnReOrderIndex(oSettings,json.sColumns);}
3162var aData=_fnGetObjectDataFn(oSettings.sAjaxDataProp)(json);for(var i=0,iLen=aData.length;i<iLen;i++){if(bReOrder){var aDataSorted=[];for(var j=0,jLen=oSettings.aoColumns.length;j<jLen;j++){aDataSorted.push(aData[i][aiIndex[j]]);}
3163_fnAddData(oSettings,aDataSorted);}
3164else{_fnAddData(oSettings,aData[i]);}}
3165oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();oSettings.bAjaxDataGet=false;_fnDraw(oSettings);oSettings.bAjaxDataGet=true;_fnProcessingDisplay(oSettings,false);}
3166function _fnFeatureHtmlFilter(oSettings){var oPreviousSearch=oSettings.oPreviousSearch;var sSearchStr=oSettings.oLanguage.sSearch;sSearchStr=(sSearchStr.indexOf('_INPUT_')!==-1)?sSearchStr.replace('_INPUT_','<input type="text" />'):sSearchStr===""?'<input type="text" />':sSearchStr+' <input type="text" />';var nFilter=document.createElement('div');nFilter.className=oSettings.oClasses.sFilter;nFilter.innerHTML='<label>'+sSearchStr+'</label>';if(!oSettings.aanFeatures.f){nFilter.id=oSettings.sTableId+'_filter';}
3167var jqFilter=$('input[type="text"]',nFilter);nFilter._DT_Input=jqFilter[0];jqFilter.val(oPreviousSearch.sSearch.replace('"','&quot;'));jqFilter.bind('keyup.DT',function(e){var n=oSettings.aanFeatures.f;var val=this.value===""?"":this.value;for(var i=0,iLen=n.length;i<iLen;i++){if(n[i]!=$(this).parents('div.dataTables_filter')[0]){$(n[i]._DT_Input).val(val);}}
3168if(val!=oPreviousSearch.sSearch){_fnFilterComplete(oSettings,{"sSearch":val,"bRegex":oPreviousSearch.bRegex,"bSmart":oPreviousSearch.bSmart,"bCaseInsensitive":oPreviousSearch.bCaseInsensitive});}});jqFilter.attr('aria-controls',oSettings.sTableId).bind('keypress.DT',function(e){if(e.keyCode==13){return false;}});return nFilter;}
3169function _fnFilterComplete(oSettings,oInput,iForce){var oPrevSearch=oSettings.oPreviousSearch;var aoPrevSearch=oSettings.aoPreSearchCols;var fnSaveFilter=function(oFilter){oPrevSearch.sSearch=oFilter.sSearch;oPrevSearch.bRegex=oFilter.bRegex;oPrevSearch.bSmart=oFilter.bSmart;oPrevSearch.bCaseInsensitive=oFilter.bCaseInsensitive;};if(!oSettings.oFeatures.bServerSide){_fnFilter(oSettings,oInput.sSearch,iForce,oInput.bRegex,oInput.bSmart,oInput.bCaseInsensitive);fnSaveFilter(oInput);for(var i=0;i<oSettings.aoPreSearchCols.length;i++){_fnFilterColumn(oSettings,aoPrevSearch[i].sSearch,i,aoPrevSearch[i].bRegex,aoPrevSearch[i].bSmart,aoPrevSearch[i].bCaseInsensitive);}
3170_fnFilterCustom(oSettings);}
3171else{fnSaveFilter(oInput);}
3172oSettings.bFiltered=true;$(oSettings.oInstance).trigger('filter',oSettings);oSettings._iDisplayStart=0;_fnCalculateEnd(oSettings);_fnDraw(oSettings);_fnBuildSearchArray(oSettings,0);}
3173function _fnFilterCustom(oSettings){var afnFilters=DataTable.ext.afnFiltering;var aiFilterColumns=_fnGetColumns(oSettings,'bSearchable');for(var i=0,iLen=afnFilters.length;i<iLen;i++){var iCorrector=0;for(var j=0,jLen=oSettings.aiDisplay.length;j<jLen;j++){var iDisIndex=oSettings.aiDisplay[j-iCorrector];var bTest=afnFilters[i](oSettings,_fnGetRowData(oSettings,iDisIndex,'filter',aiFilterColumns),iDisIndex);if(!bTest){oSettings.aiDisplay.splice(j-iCorrector,1);iCorrector++;}}}}
3174function _fnFilterColumn(oSettings,sInput,iColumn,bRegex,bSmart,bCaseInsensitive){if(sInput===""){return;}
3175var iIndexCorrector=0;var rpSearch=_fnFilterCreateSearch(sInput,bRegex,bSmart,bCaseInsensitive);for(var i=oSettings.aiDisplay.length-1;i>=0;i--){var sData=_fnDataToSearch(_fnGetCellData(oSettings,oSettings.aiDisplay[i],iColumn,'filter'),oSettings.aoColumns[iColumn].sType);if(!rpSearch.test(sData)){oSettings.aiDisplay.splice(i,1);iIndexCorrector++;}}}
3176function _fnFilter(oSettings,sInput,iForce,bRegex,bSmart,bCaseInsensitive){var i;var rpSearch=_fnFilterCreateSearch(sInput,bRegex,bSmart,bCaseInsensitive);var oPrevSearch=oSettings.oPreviousSearch;if(!iForce){iForce=0;}
3177if(DataTable.ext.afnFiltering.length!==0){iForce=1;}
3178if(sInput.length<=0){oSettings.aiDisplay.splice(0,oSettings.aiDisplay.length);oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();}
3179else{if(oSettings.aiDisplay.length==oSettings.aiDisplayMaster.length||oPrevSearch.sSearch.length>sInput.length||iForce==1||sInput.indexOf(oPrevSearch.sSearch)!==0){oSettings.aiDisplay.splice(0,oSettings.aiDisplay.length);_fnBuildSearchArray(oSettings,1);for(i=0;i<oSettings.aiDisplayMaster.length;i++){if(rpSearch.test(oSettings.asDataSearch[i])){oSettings.aiDisplay.push(oSettings.aiDisplayMaster[i]);}}}
3180else{var iIndexCorrector=0;for(i=0;i<oSettings.asDataSearch.length;i++){if(!rpSearch.test(oSettings.asDataSearch[i])){oSettings.aiDisplay.splice(i-iIndexCorrector,1);iIndexCorrector++;}}}}}
3181function _fnBuildSearchArray(oSettings,iMaster){if(!oSettings.oFeatures.bServerSide){oSettings.asDataSearch=[];
3181var aiFilterColumns=_fnGetColumns(oSettings,'bSearchable');var aiIndex=(iMaster===1)?oSettings.aiDisplayMaster:oSettings.aiDisplay;for(var i=0,iLen=aiIndex.length;i<iLen;i++){oSettings.asDataSearch[i]=_fnBuildSearchRow(oSettings,_fnGetRowData(oSettings,aiIndex[i],'filter',aiFilterColumns));}}}
3182function _fnBuildSearchRow(oSettings,aData){var sSearch=aData.join('  ');if(sSearch.indexOf('&')!==-1){sSearch=$('<div>').html(sSearch).text();}
3183return sSearch.replace(/[\n\r]/g," ");}
3184function _fnFilterCreateSearch(sSearch,bRegex,bSmart,bCaseInsensitive){var asSearch,sRegExpString;if(bSmart){asSearch=bRegex?sSearch.split(' '):_fnEscapeRegex(sSearch).split(' ');sRegExpString='^(?=.*?'+asSearch.join(')(?=.*?')+').*$';return new RegExp(sRegExpString,bCaseInsensitive?"i":"");}
3185else{sSearch=bRegex?sSearch:_fnEscapeRegex(sSearch);return new RegExp(sSearch,bCaseInsensitive?"i":"");}}
3186function _fnDataToSearch(sData,sType){if(typeof DataTable.ext.ofnSearch[sType]==="function"){return DataTable.ext.ofnSearch[sType](sData);}
3187else if(sData===null){return'';}
3188else if(sType=="html"){return sData.replace(/[\r\n]/g," ").replace(/<.*?>/g,"");}
3189else if(typeof sData==="string"){return sData.replace(/[\r\n]/g," ");}
3190return sData;}
3191function _fnEscapeRegex(sVal){var acEscape=['/','.','*','+','?','|','(',')','[',']','{','}','\\','$','^','-'];var reReplace=new RegExp('(\\'+acEscape.join('|\\')+')','g');return sVal.replace(reReplace,'\\$1');}
3192function _fnFeatureHtmlInfo(oSettings){var nInfo=document.createElement('div');nInfo.className=oSettings.oClasses.sInfo;if(!oSettings.aanFeatures.i){oSettings.aoDrawCallback.push({"fn":_fnUpdateInfo,"sName":"information"});nInfo.id=oSettings.sTableId+'_info';}
3193oSettings.nTable.setAttribute('aria-describedby',oSettings.sTableId+'_info');return nInfo;}
3194function _fnUpdateInfo(oSettings){if(!oSettings.oFeatures.bInfo||oSettings.aanFeatures.i.length===0){return;}
3195var
3196oLang=oSettings.oLanguage,iStart=oSettings._iDisplayStart+1,iEnd=oSettings.fnDisplayEnd(),iMax=oSettings.fnRecordsTotal(),iTotal=oSettings.fnRecordsDisplay(),sOut;if(iTotal===0){sOut=oLang.sInfoEmpty;}
3197else{sOut=oLang.sInfo;}
3198if(iTotal!=iMax){sOut+=' '+oLang.sInfoFiltered;}
3199sOut+=oLang.sInfoPostFix;sOut=_fnInfoMacros(oSettings,sOut);if(oLang.fnInfoCallback!==null){sOut=oLang.fnInfoCallback.call(oSettings.oInstance,oSettings,iStart,iEnd,iMax,iTotal,sOut);}
3200var n=oSettings.aanFeatures.i;for(var i=0,iLen=n.length;i<iLen;i++){$(n[i]).html(sOut);}}
3201function _fnInfoMacros(oSettings,str){var
3202iStart=oSettings._iDisplayStart+1,sStart=oSettings.fnFormatNumber(iStart),iEnd=oSettings.fnDisplayEnd(),sEnd=oSettings.fnFormatNumber(iEnd),iTotal=oSettings.fnRecordsDisplay(),sTotal=oSettings.fnFormatNumber(iTotal),iMax=oSett
3202ings.fnRecordsTotal(),sMax=oSettings.fnFormatNumber(iMax);if(oSettings.oScroll.bInfinite){sStart=oSettings.fnFormatNumber(1);}
3203return str.replace(/_START_/g,sStart).replace(/_END_/g,sEnd).replace(/_TOTAL_/g,sTotal).replace(/_MAX_/g,sMax);}
3204function _fnInitialise(oSettings){var i,iLen,iAjaxStart=oSettings.iInitDisplayStart;if(oSettings.bInitialised===false){setTimeout(function(){_fnInitialise(oSettings);},200);return;}
3205_fnAddOptionsHtml(oSettings);_fnBuildHead(oSettings);_fnDrawHead(oSettings,oSettings.aoHeader);if(oSettings.nTFoot){_fnDrawHead(oSettings,oSettings.aoFooter);}
3206_fnProcessingDisplay(oSettings,true);if(oSettings.oFeatures.bAutoWidth){_fnCalculateColumnWidths(oSettings);}
3207for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){if(oSettings.aoColumns[i].sWidth!==null){oSettings.aoColumns[i].nTh.style.width=_fnStringToCss(oSettings.aoColumns[i].sWidth);}}
3208if(oSettings.oFeatures.bSort){_fnSort(oSettings);}
3209else if(oSettings.oFeatures.bFilter){_fnFilterComplete(oSettings,oSettings.oPreviousSearch);}
3210else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();_fnCalculateEnd(oSettings);_fnDraw(oSettings);}
3211if(oSettings.sAjaxSource!==null&&!oSettings.oFeatures.bServerSide){var aoData=[];_fnServerParams(oSettings,aoData);oSettings.fnServerData.call(oSettings.oInstance,oSettings.sAjaxSource,aoData,function(json){var aData=(oSettings.sAjaxDataProp!=="")?_fnGetObjectDataFn(oSettings.sAjaxDataProp)(json):json;for(i=0;i<aData.length;i++){_fnAddData(oSettings,aData[i]);}
3212oSettings.iInitDisplayStart=iAjaxStart;if(oSettings.oFeatures.bSort){_fnSort(oSettings);}
3213else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();_fnCalculateEnd(oSettings);_fnDraw(oSettings);}
3214_fnProcessingDisplay(oSettings,false);_fnInitComplete(oSettings,json);},oSettings);return;}
3215if(!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,false);_fnInitComplete(oSettings);}}
3216function _fnInitComplete(oSettings,json){oSettings._bInitComplete=true;_fnCallbackFire(oSettings,'aoInitComplete','init',[oSettings,json]);}
3217function _fnLanguageCompat(oLanguage){var oDefaults=DataTable.defaults.oLanguage;if(!oLanguage.sEmptyTable&&oLanguage.sZeroRecords&&oDefaults.sEmptyTable==="No data available in table"){_fnMap(oLanguage,oLanguage,'sZeroRecords','sEmptyTable');}
3218if(!oLanguage.sLoadingRecords&&oLanguage.sZeroRecords&&oDefaults.sLoadingRecords==="Loading..."){_fnMap(oLanguage,oLanguage,'sZeroRecords','sLoadingRecords');}}
3219function _fnFeatureHtmlLength(oSettings){if(oSettings.oScroll.bInfinite){return null;}
3220var sName='name="'+oSettings.sTableId+'_length"';var sStdMenu='<select size="1" '+sName+'>';var i,iLen;var aLengthMenu=oSettings.aLengthMenu;if(aLengthMenu.length==2&&typeof aLengthMenu[0]==='object'&&typeof aLengthMenu[1]==='object'){for(i=0,iLen=aLengthMenu[0].length;i<iLen;i++){sStdMenu+='<option value="'+aLengthMenu[0][i]+'">'+aLengthMenu[1][i]+'</option>';}}
3221else{for(i=0,iLen=aLengthMenu.length;i<iLen;i++){sStdMenu+='<option value="'+aLengthMenu[i]+'">'+aLengthMenu[i]+'</option>';}}
3222sStdMenu+='</select>';var nLength=document.createElement('div');if(!oSettings.aanFeatures.l){nLength.id=oSettings.sTableId+'_length';}
3223nLength.className=oSettings.oClasses.sLength;nLength.innerHTML='<label>'+oSettings.oLanguage.sLengthMenu.replace('_MENU_',sStdMenu)+'</label>';$('select option[value="'+oSettings._iDisplayLength+'"]',nLength).attr("selected",true);$('select',nLength).bind('change.DT',function(e){var iVal=$(this).val();var n=oSettings.aanFeatures.l;for(i=0,iLen=n.length;i<iLen;i++){if(n[i]!=this.parentNode){$('select',n[i]).val(iVal);}}
3224oSettings._iDisplayLength=parseInt(iVal,10);_fnCalculateEnd(oSettings);if(oSettings.fnDisplayEnd()==oSettings.fnRecordsDisplay()){oSettings._iDisplayStart=oSettings.fnDisplayEnd()-oSettings._iDisplayLength;if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0;}}
3225if(oSettings._iDisplayLength==-1){oSettings._iDisplayStart=0;}
3226_fnDraw(oSettings);});$('select',nLength).attr('aria-controls',oSettings.sTableId);return nLength;}
3227function _fnCalculateEnd(oSettings){if(oSettings.oFeatures.bPaginate===false){oSettings._iDisplayEnd=oSettings.aiDisplay.length;}
3228else{if(oSettings._iDisplayStart+oSettings._iDisplayLength>oSettings.aiDisplay.length||oSettings._iDisplayLength==-1){oSettings._iDisplayEnd=oSettings.aiDisplay.length;}
3229else{oSettings._iDisplayEnd=oSettings._iDisplayStart+oSettings._iDisplayLength;}}}
3230function _fnFeatureHtmlPaginate(oSettings){if(oSettings.oScroll.bInfinite){return null;}
3231var nPaginate=document.createElement('div');nPaginate.className=oSettings.oClasses.sPaging+oSettings.sPaginationType;DataTable.ext.oPagination[oSettings.sPaginationType].fnInit(oSettings,nPaginate,function(oSett
3231ings){_fnCalculateEnd(oSettings);_fnDraw(oSettings);});if(!oSettings.aanFeatures.p){oSettings.aoDrawCallback.push({"fn":function(oSettings){DataTable.ext.oPagination[oSettings.sPaginationType].fnUpdate(oSettings,function(oSettings){_fnCalculateEnd(oSettings);_fnDraw(oSettings);});},"sName":"pagination"});}
3232return nPaginate;}
3233function _fnPageChange(oSettings,mAction){var iOldStart=oSettings._iDisplayStart;if(typeof mAction==="number"){oSettings._iDisplayStart=mAction*oSettings._iDisplayLength;if(oSettings._iDisplayStart>oSettings.fnRecordsDisplay()){oSettings._iDisplayStart=0;}}
3234else if(mAction=="first"){oSettings._iDisplayStart=0;}
3235else if(mAction=="previous"){oSettings._iDisplayStart=oSettings._iDisplayLength>=0?oSettings._iDisplayStart-oSettings._iDisplayLength:0;if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0;}}
3236else if(mAction=="next"){if(oSettings._iDisplayLength>=0){if(oSettings._iDisplayStart+oSettings._iDisplayLength<oSettings.fnRecordsDisplay()){oSettings._iDisplayStart+=oSettings._iDisplayLength;}}
3237else{oSettings._iDisplayStart=0;}}
3238else if(mAction=="last"){if(oSettings._iDisplayLength>=0){var iPages=parseInt((oSettings.fnRecordsDisplay()-1)/oSettings._iDisplayLength,10)+1;oSettings._iDisplayStart=(iPages-1)*oSettings._iDisplayLength;}
3239else{oSettings._iDisplayStart=0;}}
3240else{_fnLog(oSettings,0,"Unknown paging action: "+mAction);}
3241$(oSettings.oInstance).trigger('page',oSettings);return iOldStart!=oSettings._iDisplayStart;}
3242function _fnFeatureHtmlProcessing(oSettings){var nProcessing=document.createElement('div');if(!oSettings.aanFeatures.r){nProcessing.id=oSettings.sTableId+'_processing';}
3243nProcessing.innerHTML=oSettings.oLanguage.sProcessing;nProcessing.className=oSettings.oClasses.sProcessing;oSettings.nTable.parentNode.insertBefore(nProcessing,oSettings.nTable);return nProcessing;}
3244function _fnProcessingDisplay(oSettings,bShow){if(oSettings.oFeatures.bProcessing){var an=oSettings.aanFeatures.r;for(var i=0,iLen=an.length;i<iLen;i++){an[i].style.visibility=bShow?"visible":"hidden";}}
3245$(oSettings.oInstance).trigger('processing',[oSettings,bShow]);}
3246function _fnFeatureHtmlTable(oSettings){if(oSettings.oScroll.sX===""&&oSettings.oScroll.sY===""){return oSettings.nTable;}
3247var
3248nScroller=document.createElement('div'),nScrollHead=document.createElement('div'),nScrollHeadInner=document.createElement('div'),nScrollBody=document.createElement('div'),nScrollFoot=document.createElement('div'),nScrollFootInner=document.createElement('div'),nScrollHeadTable=oSettings.nTable.cloneNode(false),nScrollFootTable=oSettings.nTable.cloneNode(false),nThead=oSettings.nTable.getElementsByTagName('thead')[0],nTfoot=oSettings.nTable.getElementsByTagName('tfoot').length===0?null:oSettings.nTable.getElementsByTagName('tfoot')[0],oClasses=oSettings.oClasses;nScrollHead.appendChild(nScrollHeadInner);nScrollFoot.appendChild(nScrollFootInner);nScrollBody.appendChild(oSettings.nTable);nScroller.appendChild(nScrollHead);nScroller.appendChild(nScrollBody);nScrollHeadInner.appendChild(nScrollHeadTable);nScrollHeadTable.appendChild(nThead);if(nTfoot!==null){nScroller.appendChild(nScrollFoot);nScrollFootInner.appendChild(nScrollFootTable);nScrollFootTable.appendChild(nTfoot);}
3249nScroller.className=oClasses.sScrollWrapper;nScrollHead.className=oClasses.sScrollHead;nScrollHeadInner.className=oClasses.sScrollHeadInner;nScrollBody.className=oClasses.sScrollBody;nScrollFoot.className=oClasses.sScrollFoot;nScrollFootInner.className=oClasses.sScrollFootInner;if(oSettings.oScroll.bAutoCss){nScrollHead.style.overflow="hidden";nScrollHead.style.position="relative";nScrollFoot.style.overflow="hidden";nScrollBody.style.overflow="auto";}
3250nScrollHead.style.border="0";nScrollHead.style.width="100%";nScrollFoot.style.border="0";nScrollHeadInner.style.width=oSettings.oScroll.sXInner!==""?oSettings.oScroll.sXInner:"100%";nScrollHeadTable.removeAttribute('id');nScrollHeadTable.style.marginLeft="0";oSettings.nTable.style.marginLeft="0";if(nTfoot!==null){nScrollFootTable.removeAttribute('id');nScrollFootTable.style.marginLeft="0";}
3251var nCaption=$(oSettings.nTable).children('caption');if(nCaption.length>0){nCaption=nCaption[0];if(nCaption._captionSide==="top"){nScrollHeadTable.appendChild(nCaption);}
3252else if(nCaption._captionSide==="bottom"&&nTfoot){nScrollFootTable.appendChild(nCaption);}}
3253if(oSettings.oScroll.sX!==""){nScrollHead.style.width=_fnStringToCss(oSettings.oScroll.sX);nScrollBody.style.width=_fnStringToCss(oSettings.oScroll.sX);if(nTfoot!==null){nScrollFoot.style.width=_fnStringToCss(oSettings.oScroll.sX);}
3254$(nScrollBody).scroll(function(e){nScrollHead.scrollLeft=this.scrollLeft;if(nTfoot!==null){nScrollFoot.scrollLeft=this.scrollLeft;}});}
3255if(oSettings.oScroll.sY!==""){nScrollBody.style.height=_fnStringToCss(oSettings.oScroll.sY);}
3256oSettings.aoDrawCallback.push({"fn":_fnScrollDraw,"sName":"scrolling"});if(oSettings.oScroll.bInfinite){$(nScrollBody).scroll(function(){if(!oSettings.bDrawing&&$(this).scrollTop()!==0){if($(this).scrollTop()+$(this).height()>$(oSettings.nTable).height()-oSettings.oScroll.iLoadGap){if(oSettings.fnDisplayEnd()<oSettings.fnRecordsDisplay()){_fnPageChange(oSettings,'next');_fnCalculateEnd(oSettings);_fnDraw(oSettings);}}}});}
3257oSettings.nScrollHead=nScrollHead;oSettings.nScrollFoot=nScrollFoot;return nScroller;}
3258function _fnScrollDraw(o){var
3259nScrollHeadInner=o.nScrollHead.getElementsByTagName('div')[0],nScrollHeadTable=nScrollHeadInner.getElementsByTagName('table')[0],nScrollBody=o.nTable.parentNode,i,iLen,j,jLen,anHeadToSize,anHeadSizers,anFootSizers,anFootToSize,oStyle,iVis,nTheadSize,nTfootSize,iWidth,aApplied=[],aAppliedFooter=[],iSanityWidth,nScrollFootInner=(o.nTFoot!==null)?o.nScrollFoot.getElementsByTagName('div')[0]:null,nScrollFootTable=(o.nTFoot!==null)?nScrollFootInner.getElementsByTagName('table')[0]:null,ie67=o.oBrowser.bScrollOversize,zeroOut=function(nSizer){oStyle=nSizer.style;oStyle.paddingTop="0";oStyle.paddingBottom="0";oStyle.borderTopWidth="0";oStyle.borderBottomWidth="0";oStyle.height=0;};$(o.nTable).children('thead, tfoot').remove();nTheadSize=$(o.nTHead).clone()[0];o.nTable.insertBefore(nTheadSize,o.nTable.childNodes[0]);anHeadToSize=o.nTHead.getElementsByTagName('tr');anHeadSizers=nTheadSize.getElementsByTagName('tr');if(o.nTFoot!==null){nTfootSize=$(o.nTFoot).clone()[0];o.nTable.insertBefore(nTfootSize,o.nTable.childNodes[1]);anFootToSize=o.nTFoot.getElementsByTagName('tr');anFootSizers=nTfootSize.getElementsByTagName('tr');}
3260if(o.oScroll.sX===""){nScrollBody.style.width='100%';nScrollHeadInner.parentNode.style.width='100%';}
3261var nThs=_fnGetUniqueThs(o,nTheadSize);for(i=0,iLen=nThs.length;i<iLen;i++){iVis=_fnVisibleToColumnIndex(o,i);nThs[i].style.width=o.aoColumns[iVis].sWidth;}
3262if(o.nTFoot!==null){_fnApplyToChildren(function(n){n.style.width="";},anFootSizers);}
3263if(o.oScroll.bCollapse&&o.oScroll.sY!==""){nScrollBody.style.height=(nScrollBody.offsetHeight+o.nTHead.offsetHeight)+"px";}
3264iSanityWidth=$(o.nTable).outerWidth();if(o.oScroll.sX===""){o.nTable.style.width="100%";if(ie67&&($('tbody',nScrollBody).height()>nScrollBody.offsetHeight||$(nScrollBody).css('overflow-y')=="scroll")){o.nTable.style.width=_fnStringToCss($(o.nTable).outerWidth()-o.oScroll.iBarWidth);}}
3265else{if(o.oScroll.sXInner!==""){o.nTable.style.width=_fnStringToCss(o.oScroll.sXInner);}
3266else if(iSanityWidth==$(nScrollBody).width()&&$(nScrollBody).height()<$(o.nTable).height()){o.nTable.style.width=_fnStringToCss(iSanityWidth-o.oScroll.iBarWidth);if($(o.nTable).outerWidth()>iSanityWidth-o.oScroll.iBarWidth){o.nTable.style.width=_fnStringToCss(iSanityWidth);}}
3267else{o.nTable.style.width=_fnStringToCss(iSanityWidth);}}
3268iSanityWidth=$(o.nTable).outerWidth();_fnApplyToChildren(zeroOut,anHeadSizers);_fnApplyToChildren(function(nSizer){aApplied.push(_fnStringToCss($(nSizer).width()));},anHeadSizers);_fnApplyToChildren(function(nToSize,i){nToSize.style.width=aApplied[i];},anHeadToSize);$(anHeadSizers).height(0);if(o.nTFoot!==null){_fnApplyToChildren(zeroOut,anFootSizers);_fnApplyToChildren(function(nSizer){aAppliedFooter.push(_fnStringToCss($(nSizer).width()));},anFootSizers);_fnApplyToChildren(function(nToSize,i){nToSize.style.width=aAppliedFooter[i];},anFootToSize);$(anFootSizers).height(0);}
3269_fnApplyToChildren(function(nSizer,i){nSizer.innerHTML="";nSizer.style.width=aApplied[i];},anHeadSizers);if(o.nTFoot!==null){_fnApplyToChildren(function(nSizer,i){nSizer.innerHTML="";nSizer.style.width=aAppliedFooter[i];},anFootSizers);}
3270if($(o.nTable).outerWidth()<iSanityWidth){var iCorrection=((nScrollBody.scrollHeight>nScrollBody.offsetHeight||$(nScrollBody).css('overflow-y')=="scroll"))?iSanityWidth+o.oScroll.iBarWidth:iSanityWidth;if(ie67&&(nScrollBody.scrollHeight>nScrollBody.offsetHeight||$(nScrollBody).css('overflow-y')=="scroll")){o.nTable.style.width=_fnStringToCss(iCorrection-o.oScroll.iBarWidth);}
3271nScrollBody.style.width=_fnStringToCss(iCorrection);o.nScrollHead.style.width=_fnStringToCss(iCorrection);if(o.nTFoot!==null){o.nScrollFoot.style.width=_fnStringToCss(iCorrection);}
3272if(o.oScroll.sX===""){_fnLog(o,1,"The table cannot fit into the current element which will cause column"+" misalignment. The table has been drawn at its minimum possible width.");}
3273else if(o.oScroll.sXInner!==""){_fnLog(o,1,"The table cannot fit into the current element which will cause column"+" misalignment. Increase the sScrollXInner value or remove it to allow automatic"+" calculation");}}
3274else{nScrollBody.style.width=_fnStringToCss('100%');o.nScrollHead.style.width=_fnStringToCss('100%');if(o.nTFoot!==null){o.nScrollFoot.style.width=_fnStringToCss('100%');}}
3275if(o.oScroll.sY===""){if(ie67){nScrollBody.style.height=_fnStringToCss(o.nTable.offsetHeight+o.oScroll.iBarWidth);}}
3276if(o.oScroll.sY!==""&&o.oScroll.bCollapse){nScrollBody.style.height=_fnStringToCss(o.oScroll.sY);var iExtra=(o.oScroll.sX!==""&&o.nTable.offsetWidth>nScrollBody.offsetWidth)?o.oScroll.iBarWidth:0;if(o.nTable.offsetHeight<nScrollBody.offsetHeight){nScrollBody.style.height=_fnStringToCss(o.nTable.offsetHeight+iExtra);}}
3277var iOuterWidth=$(o.nTable).outerWidth();nScrollHeadTable.style.width=_fnStringToCss(iOuterWidth);nScrollHeadInner.style.width=_fnStringToCss(iOuterWidth);var bScrolling=$(o.nTable).height()>nScrollBody.clientHeight||$(nScrollBody).css('overflow-y')=="scroll";nScrollHeadInner.style.paddingRight=bScrolling?o.oScroll.iBarWidth+"px":"0px";if(o.nTFoot!==null){nScrollFootTable.style.width=_fnStringToCss(iOuterWidth);nScrollFootInner.style.width=_fnStringToCss(iOuterWidth);nScrollFootInner.style.paddingRight=bScrolling?o.oScroll.iBarWidth+"px":"0px";}
3278$(nScrollBody).scroll();if(o.bSorted||o.bFiltered){nScrollBody.scrollTop=0;}}
3279function _fnApplyToChildren(fn,an1,an2){var index=0,i=0,iLen=an1.length;var nNode1,nNode2;
3279while(i<iLen){nNode1=an1[i].firstChild;nNode2=an2?an2[i].firstChild:null;while(nNode1){if(nNode1.nodeType===1){if(an2){fn(nNode1,nNode2,index);}
3280else{fn(nNode1,index);}
3281index++;}
3282nNode1=nNode1.nextSibling;nNode2=an2?nNode2.nextSibling:null;}
3283i++;}}
3284function _fnConvertToWidth(sWidth,nParent){if(!sWidth||sWidth===null||sWidth===''){return 0;}
3285if(!nParent){nParent=document.body;}
3286var iWidth;var nTmp=document.createElement("div");nTmp.style.width=_fnStringToCss(sWidth);nParent.appendChild(nTmp);iWidth=nTmp.offsetWidth;nParent.removeChild(nTmp);return(iWidth);}
3287function _fnCalculateColumnWidths(oSettings){var iTableWidth=oSettings.nTable.offsetWidth;var iUserInputs=0;var iTmpWidth;var iVisibleColumns=0;var iColums=oSettings.aoColumns.length;var i,iIndex,iCorrector,iWidth;var oHeaders=$('th',oSettings.nTHead);var widthAttr=oSettings.nTable.getAttribute('width');var nWrapper=oSettings.nTable.parentNode;for(i=0;i<iColums;i++){if(oSettings.aoColumns[i].bVisible){iVisibleColumns++;if(oSettings.aoColumns[i].sWidth!==null){iTmpWidth=_fnConvertToWidth(oSettings.aoColumns[i].sWidthOrig,nWrapper);if(iTmpWidth!==null){oSettings.aoColumns[i].sWidth=_fnStringToCss(iTmpWidth);}
3288iUserInputs++;}}}
3289if(iColums==oHeaders.length&&iUserInputs===0&&iVisibleColumns==iColums&&oSettings.oScroll.sX===""&&oSettings.oScroll.sY===""){for(i=0;i<oSettings.aoColumns.length;i++){iTmpWidth=$(oHeaders[i]).width();if(iTmpWidth!==null){oSettings.aoColumns[i].sWidth=_fnStringToCss(iTmpWidth);}}}
3290else{var
3291nCalcTmp=oSettings.nTable.cloneNode(false),nTheadClone=oSettings.nTHead.cloneNode(true),nBody=document.createElement('tbody'),nTr=document.createElement('tr'),nDivSizing;nCalcTmp.removeAttribute("id");nCalcTmp.appendChild(nTheadClone);if(oSettings.nTFoot!==null){nCalcTmp.appendChild(oSettings.nTFoot.cloneNode(true));_fnApplyToChildren(function(n){n.style.width="";},nCalcTmp.getElementsByTagName('tr'));}
3292nCalcTmp.appendChild(nBody);nBody.appendChild(nTr);var jqColSizing=$('thead th',nCalcTmp);if(jqColSizing.length===0){jqColSizing=$('tbody tr:eq(0)>td',nCalcTmp);}
3293var nThs=_fnGetUniqueThs(oSettings,nTheadClone);iCorrector=0;for(i=0;i<iColums;i++){var oColumn=oSettings.aoColumns[i];if(oColumn.bVisible&&oColumn.sWidthOrig!==null&&oColumn.sWidthOrig!==""){nThs[i-iCorrector].style.width=_fnStringToCss(oColumn.sWidthOrig);}
3294else if(oColumn.bVisible){nThs[i-iCorrector].style.width="";}
3295else{iCorrector++;}}
3296for(i=0;i<iColums;i++){if(oSettings.aoColumns[i].bVisible){var nTd=_fnGetWidestNode(oSettings,i);if(nTd!==null){nTd=nTd.cloneNode(true);if(oSettings.aoColumns[i].sContentPadding!==""){nTd.innerHTML+=oSettings.aoColumns[i].sContentPadding;}
3297nTr.appendChild(nTd);}}}
3298nWrapper.appendChild(nCalcTmp);if(oSettings.oScroll.sX!==""&&oSettings.oScroll.sXInner!==""){nCalcTmp.style.width=_fnStringToCss(oSettings.oScroll.sXInner);}
3299else if(oSettings.oScroll.sX!==""){nCalcTmp.style.width="";if($(nCalcTmp).width()<nWrapper.offsetWidth){nCalcTmp.style.width=_fnStringToCss(nWrapper.offsetWidth);}}
3300else if(oSettings.oScroll.sY!==""){nCalcTmp.style.width=_fnStringToCss(nWrapper.offsetWidth);}
3301else if(widthAttr){nCalcTmp.style.width=_fnStringToCss(widthAttr);}
3302nCalcTmp.style.visibility="hidden";_fnScrollingWidthAdjust(oSettings,nCalcTmp);var oNodes=$("tbody tr:eq(0)",nCalcTmp).children();if(oNodes.length===0){oNodes=_fnGetUniqueThs(oSettings,$('thead',nCalcTmp)[0]);}
3303if(oSettings.oScroll.sX!==""){var iTotal=0;iCorrector=0;for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bVisible){if(oSettings.aoColumns[i].sWidthOrig===null){iTotal+=$(oNodes[iCorrector]).outerWidth();}
3304else{iTotal+=parseInt(oSettings.aoColumns[i].sWidth.replace('px',''),10)+
3305($(oNodes[iCorrector]).outerWidth()-$(oNodes[iCorrector]).width());}
3306iCorrector++;}}
3307nCalcTmp.style.width=_fnStringToCss(iTotal);oSettings.nTable.style.width=_fnStringToCss(iTotal);}
3308iCorrector=0;for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bVisible){iWidth=$(oNodes[iCorrector]).width();if(iWidth!==null&&iWidth>0){oSettings.aoColumns[i].sWidth=_fnStringToCss(iWidth);}
3309iCorrector++;}}
3310var cssWidth=$(nCalcTmp).css('width');oSettings.nTable.style.width=(cssWidth.indexOf('%')!==-1)?cssWidth:_fnStringToCss($(nCalcTmp).outerWidth());nCalcTmp.parentNode.removeChild(nCalcTmp);}
3311if(widthAttr){oSettings.nTable.style.width=_fnStringToCss(widthAttr);}}
3312function _fnScrollingWidthAdjust(oSettings,n){if(oSettings.oScroll.sX===""&&oSettings.oScroll.sY!==""){var iOrigWidth=$(n).width();
3312n.style.width=_fnStringToCss($(n).outerWidth()-oSettings.oScroll.iBarWidth);}
3313else if(oSettings.oScroll.sX!==""){n.style.width=_fnStringToCss($(n).outerWidth());}}
3314function _fnGetWidestNode(oSettings,iCol){var iMaxIndex=_fnGetMaxLenString(oSettings,iCol);if(iMaxIndex<0){return null;}
3315if(oSettings.aoData[iMaxIndex].nTr===null){var n=document.createElement('td');n.innerHTML=_fnGetCellData(oSettings,iMaxIndex,iCol,'');return n;}
3316return _fnGetTdNodes(oSettings,iMaxIndex)[iCol];}
3317function _fnGetMaxLenString(oSettings,iCol){var iMax=-1;var iMaxIndex=-1;for(var i=0;i<oSettings.aoData.length;i++){var s=_fnGetCellData(oSettings,i,iCol,'display')+"";s=s.replace(/<.*?>/g,"");if(s.length>iMax){iMax=s.length;iMaxIndex=i;}}
3318return iMaxIndex;}
3319function _fnStringToCss(s){if(s===null){return"0px";}
3320if(typeof s=='number'){if(s<0){return"0px";}
3321return s+"px";}
3322var c=s.charCodeAt(s.length-1);if(c<0x30||c>0x39){return s;}
3323return s+"px";}
3324function _fnScrollBarWidth(){var inner=document.createElement('p');var style=inner.style;style.width="100%";style.height="200px";style.padding="0px";var outer=document.createElement('div');style=outer.style;style.position="absolute";style.top="0px";style.left="0px";style.visibility="hidden";style.width="200px";style.height="150px";style.padding="0px";style.overflow="hidden";outer.appendChild(inner);document.body.appendChild(outer);var w1=inner.offsetWidth;outer.style.overflow='scroll';var w2=inner.offsetWidth;if(w1==w2){w2=outer.clientWidth;}
3325document.body.removeChild(outer);return(w1-w2);}
3326function _fnSort(oSettings,bApplyClasses){var
3327i,iLen,j,jLen,k,kLen,sDataType,nTh,aaSort=[],aiOrig=[],oSort=DataTable.ext.oSort,aoData=oSettings.aoData,aoColumns=oSettings.aoColumns,oAria=oSettings.oLanguage.oAria;if(!oSettings.oFeatures.bServerSide&&(oSettings.aaSorting.length!==0||oSettings.aaSortingFixed!==null)){aaSort=(oSettings.aaSortingFixed!==null)?oSettings.aaSortingFixed.concat(oSettings.aaSorting):oSettings.aaSorting.slice();for(i=0;i<aaSort.length;i++){var iColumn=aaSort[i][0];var iVisColumn=_fnColumnIndexToVisible(oSettings,iColumn);sDataType=oSettings.aoColumns[iColumn].sSortDataType;if(DataTable.ext.afnSortData[sDataType]){var aData=DataTable.ext.afnSortData[sDataType].call(oSettings.oInstance,oSettings,iColumn,iVisColumn);if(aData.length===aoData.length){for(j=0,jLen=aoData.length;j<jLen;j++){_fnSetCellData(oSettings,j,iColumn,aData[j]);}}
3328else{_fnLog(oSettings,0,"Returned data sort array (col "+iColumn+") is the wrong length");}}}
3329for(i=0,iLen=oSettings.aiDisplayMaster.length;i<iLen;i++){aiOrig[oSettings.aiDisplayMaster[i]]=i;}
3330var iSortLen=aaSort.length;var fnSortFormat,aDataSort;for(i=0,iLen=aoData.length;i<iLen;i++){for(j=0;j<iSortLen;j++){aDataSort=aoColumns[aaSort[j][0]].aDataSort;for(k=0,kLen=aDataSort.length;k<kLen;k++){sDataType=aoColumns[aDataSort[k]].sType;fnSortFormat=oSort[(sDataType?sDataType:'string')+"-pre"];aoData[i]._aSortData[aDataSort[k]]=fnSortFormat?fnSortFormat(_fnGetCellData(oSettings,i,aDataSort[k],'sort')):_fnGetCellData(oSettings,i,aDataSort[k],'sort');}}}
3331oSettings.aiDisplayMaster.sort(function(a,b){var k,l,lLen,iTest,aDataSort,sDataType;for(k=0;k<iSortLen;k++){aDataSort=aoColumns[aaSort[k][0]].aDataSort;for(l=0,lLen=aDataSort.length;l<lLen;l++){sDataType=aoColumns[aDataSort[l]].sType;iTest=oSort[(sDataType?sDataType:'string')+"-"+aaSort[k][1]](aoData[a]._aSortData[aDataSort[l]],aoData[b]._aSortData[aDataSort[l]]);if(iTest!==0){return iTest;}}}
3332return oSort['numeric-asc'](aiOrig[a],aiOrig[b]);});}
3333if((bApplyClasses===undefined||bApplyClasses)&&!oSettings.oFeatures.bDeferRender){_fnSortingClasses(oSettings);}
3334for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){var sTitle=aoColumns[i].sTitle.replace(/<.*?>/g,"");nTh=aoColumns[i].nTh;nTh.removeAttribute('aria-sort');nTh.removeAttribute('aria-label');if(aoColumns[i].bSortable){if(aaSort.length>0&&aaSort[0][0]==i){nTh.setAttribute('aria-sort',aaSort[0][1]=="asc"?"ascending":"descending");var nextSort=(aoColumns[i].asSorting[aaSort[0][2]+1])?aoColumns[i].asSorting[aaSort[0][2]+1]:aoColumns[i].asSorting[0];nTh.setAttribute('aria-label',sTitle+
3335(nextSort=="asc"?oAria.sSortAscending:oAria.sSortDescending));}
3336else{nTh.setAttribute('aria-label',sTitle+
3337(aoColumns[i].asSorting[0]=="asc"?oAria.sSortAscending:oAria.sSortDescending));}}
3338else{nTh.setAttribute('aria-label',sTitle);}}
3339oSettings.bSorted=true;$(oSettings.oInstance).trigger('sort',oSettings);if(oSettings.oFeatures.bFilter){_fnFilterComplete(oSettings,oSettings.oPreviousSearch,1);}
3340else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();oSettings._iDisplayStart=0;_fnCalculateEnd(oSettings);_fnDraw(oSettings);}}
3341function _fnSortAttachListener(oSettings,nNode,iDataIndex,fnCallback){_fnBindAction(nNode,{},function(e){if(oSettings.aoColumns[iDataIndex].bSortable===false){return;}
3342var fnInnerSorting=function(){var iColumn,iNextSort;if(e.shiftKey){var bFound=false;for(var i=0;i<oSettings.aaSorting.length;i++){if(oSettings.aaSorting[i][0]==iDataIndex){bFound=true;iColumn=oSettings.aaSorting[i][0];iNextSort=oSettings.aaSorting[i][2]+1;if(!oSettings.aoColumns[iColumn].asSorting[iNextSort]){oSettings.aaSorting.splice(i,1);}
3343else{oSettings.aaSorting[i][1]=oSettings.aoColumns[iColumn].asSorting[iNextSort];oSettings.aaSorting[i][2]=iNextSort;}
3344break;}}
3345if(bFound===false){oSettings.aaSorting.push([iDataIndex,oSettings.aoColumns[iDataIndex].asSorting[0],0]);}}
3346else{if(oSettings.aaSorting.length==1&&oSettings.aaSorting[0][0]==iDataIndex){iColumn=oSettings.aaSorting[0][0];iNextSort=oSettings.aaSorting[0][2]+1;if(!oSettings.aoColumns[iColumn].asSorting[iNextSort]){iNextSort=0;}
3347oSettings.aaSorting[0][1]=oSettings.aoColumns[iColumn].asSorting[iNextSort];oSettings.aaSorting[0][2]=iNextSort;}
3348else{oSettings.aaSorting.splice(0,oSettings.aaSorting.length);oSettings.aaSorting.push([iDataIndex,oSettings.aoColumns[iDataIndex].asSorting[0],0]);}}
3349_fnSort(oSettings);};if(!oSettings.oFeatures.bProcessing){fnInnerSorting();}
3350else{_fnProcessingDisplay(oSettings,true);setTimeout(function(){fnInnerSorting();if(!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,false);}},0);}
3351if(typeof fnCallback=='function'){fnCallback(oSettings);}});}
3352function _fnSortingClasses(oSettings){var i,iLen,j,jLen,iFound;var aaSort,sClass;var iColumns=oSettings.aoColumns.length;var oClasses=oSettings.oClasses;for(i=0;i<iColumns;i++){if(oSettings.aoColumns[i].bSortable){$(oSettings.aoColumns[i].nTh).removeClass(oClasses.sSortAsc+" "+oClasses.sSortDesc+" "+oSettings.aoColumns[i].sSortingClass);}}
3353if(oSettings.aaSortingFixed!==null){aaSort=oSettings.aaSortingFixed.concat(oSettings.aaSorting);}
3354else{aaSort=oSettings.aaSorting.slice();}
3355for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bSortable){sClass=oSettings.aoColumns[i].sSortingClass;iFound=-1;for(j=0;j<aaSort.length;j++){if(aaSort[j][0]==i){sClass=(aaSort[j][1]=="asc")?oClasses.sSortAsc:oClasses.sSortDesc;iFound=j;break;}}
3356$(oSettings.aoColumns[i].nTh).addClass(sClass);if(oSettings.bJUI){var jqSpan=$("span."+oClasses.sSortIcon,oSettings.aoColumns[i].nTh);jqSpan.removeClass(oClasses.sSortJUIAsc+" "+oClasses.sSortJUIDesc+" "+
3357oClasses.sSortJUI+" "+oClasses.sSortJUIAscAllowed+" "+oClasses.sSortJUIDescAllowed);var sSpanClass;if(iFound==-1){sSpanClass=oSettings.aoColumns[i].sSortingClassJUI;}
3358else if(aaSort[iFound][1]=="asc"){sSpanClass=oClasses.sSortJUIAsc;}
3359else{sSpanClass=oClasses.sSortJUIDesc;}
3360jqSpan.addClass(sSpanClass);}}
3361else{$(oSettings.aoColumns[i].nTh).addClass(oSettings.aoColumns[i].sSortingClass);}}
3362sClass=oClasses.sSortColumn;if(oSettings.oFeatures.bSort&&oSettings.oFeatures.bSortClasses){var nTds=_fnGetTdNodes(oSettings);var iClass,iTargetCol;var asClasses=[];for(i=0;i<iColumns;i++){asClasses.push("");}
3363for(i=0,iClass=1;i<aaSort.length;i++){iTargetCol=parseInt(aaSort[i][0],10);asClasses[iTargetCol]=sClass+iClass;if(iClass<3){iClass++;}}
3364var reClass=new RegExp(sClass+"[123]");var sTmpClass,sCurrentClass,sNewClass;for(i=0,iLen=nTds.length;i<iLen;i++){iTargetCol=i%iColumns;sCurrentClass=nTds[i].className;sNewClass=asClasses[iTargetCol];sTmpClass=sCurrentClass.replace(reClass,sNewClass);if(sTmpClass!=sCurrentClass){nTds[i].className=$.trim(sTmpClass);}
3365else if(sNewClass.length>0&&sCurrentClass.indexOf(sNewClass)==-1){nTds[i].className=sCurrentClass+" "+sNewClass;}}}}
3366function _fnSaveState(oSettings){if(!oSettings.oFeatures.bStateSave||oSettings.bDestroying){return;}
3367var i,iLen,bInfinite=oSettings.oScroll.bInfinite;var oState={"iCreate":new Date().getTime(),"iStart":(bInfinite?0:oSettings._iDisplayStart),"iEnd":(bInfinite?oSettings._iDisplayLength:oSettings._iDisplayEnd),"iLength":oSettings._iDisplayLength,"aaSorting":$.extend(true,[],oSettings.aaSorting),"oSearch":$.extend(true,{},oSettings.oPreviousSearch),"aoSearchCols":$.extend(true,[],oSettings.aoPreSearchCols),"abVisCols":[]};for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){oState.abVisCols.push(oSettings.aoColumns[i].bVisible);}
3368_fnCallbackFire(oSettings,"aoStateSaveParams",'stateSaveParams',[oSettings,oState]);oSettings.fnStateSave.call(oSettings.oInstance,oSettings,oState);}
3369function _fnLoadState(oSettings,oInit){if(!oSettings.oFeatures.bStateSave){return;}
3370var oData=oSettings.fnStateLoad.call(oSettings.oInstance,oSettings);if(!oData){return;}
3371var abStateLoad=_fnCallbackFire(oSettings,'aoStateLoadParams','stateLoadParams',[oSettings,oData]);if($.inArray(false,abStateLoad)!==-1){return;}
3372oSettings.oLoadedState=$.extend(true,{},oData);oSettings._iDisplayStart=oData.iStart;oSettings.iInitDisplayStart=oData.iStart;oSettings._iDisplayEnd=oData.iEnd;oSettings._iDisplayLength=oData.iLength;oSettings.aaSorting=oData.aaSorting.slice();oSettings.saved_aaSorting=oData.aaSorting.slice();$.extend(oSettings.oPreviousSearch,oData.oSearch);$.extend(true,oSettings.aoPreSearchCols,oData.aoSearchCols);oInit.saved_aoColumns=[];for(var i=0;i<oData.abVisCols.length;i++){oInit.saved_aoColumns[i]={};oInit.saved_aoColumns[i].bVisible=oData.abVisCols[i];}
3373_fnCallbackFire(oSettings,'aoStateLoaded','stateLoaded',[oSettings,oData]);}
3374function _fnCreateCookie(sName,sValue,iSecs,sBaseName,fnCallback){var date=new Date();date.setTime(date.getTime()+(iSecs*1000));var aParts=window.location.pathname.split('/');var sNameFile=sName+'_'+aParts.pop().replace(/[\/:]/g,"").toLowerCase();var sFullCookie,oData;if(fnCallback!==null){oData=(typeof $.parseJSON==='function')?$.parseJSON(sValue):eval('('+sValue+')');sFullCookie=fnCallback(sNameFile,oData,date.toGMTString(),aParts.join('/')+"/");}
3375else{sFullCookie=sNameFile+"="+encodeURIComponent(sValue)+"; expires="+date.toGMTString()+"; path="+aParts.join('/')+"/";}
3376var
3377aCookies=document.cookie.split(';'),iNewCookieLen=sFullCookie.split(';')[0].length,aOldCookies=[];if(iNewCookieLen+document.cookie.length+10>4096)
3378{for(var i=0,iLen=aCookies.length;i<iLen;i++){if(aCookies[i].indexOf(sBaseName)!=-1){var aSplitCookie=aCookies[i].split('=');try{oData=eval('('+decodeURIComponent(aSplitCookie[1])+')');if(oData&&oData.iCreate){aOldCookies.push({"name":aSplitCookie[0],"time":oData.iCreate});}}
3379catch(e){}}}
3380aOldCookies.sort(function(a,b){return b.time-a.time;});while(iNewCookieLen+document.cookie.length+10>4096){if(aOldCookies.length===0){return;}
3381var old=aOldCookies.pop();document.cookie=old.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
3382aParts.join('/')+"/";}}
3383document.cookie=sFullCookie;}
3384function _fnReadCookie(sName){var
3385aParts=window.location.pathname.split('/'),sNameEQ=sName+'_'+aParts[aParts.length-1].replace(/[\/:]/g,"").toLowerCase()+'=',sCookieContents=document.cookie.split(';');for(var i=0;i<sCookieContents.length;i++){var c=sCookieContents[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}
3386if(c.indexOf(sNameEQ)===0){return decodeURIComponent(c.substring(sNameEQ.length,c.length));}}
3387return null;}
3388function _fnSettingsFromNode(nTable){for(var i=0;i<DataTable.settings.length;i++){if(DataTable.settings[i].nTable===nTable){return DataTable.settings[i];}}
3389return null;}
3390function _fnGetTrNodes(oSettings){var aNodes=[];var aoData=oSettings.aoData;for(var i=0,iLen=aoData.length;i<iLen;i++){if(aoData[i].nTr!==null){aNodes.push(aoData[i].nTr);}}
3391return aNodes;}
3392function _fnGetTdNodes(oSettings,iIndividualRow){var anReturn=[];var iCorrector;var anTds,nTd;var iRow,iRows=oSettings.aoData.length,iColumn,iColumns,oData,sNodeName,iStart=0,iEnd=iRows;if(iIndividualRow!==undefined){iStart=iIndividualRow;iEnd=iIndividualRow+1;}
3393for(iRow=iStart;iRow<iEnd;iRow++){oData=oSettings.aoData[iRow];if(oData.nTr!==null){anTds=[];nTd=oData.nTr.firstChild;while(nTd){sNodeName=nTd.nodeName.toLowerCase();if(sNodeName=='td'||sNodeName=='th'){anTds.push(nTd);}
3394nTd=nTd.nextSibling;}
3395iCorrector=0;for(iColumn=0,iColumns=oSettings.aoColumns.length;iColumn<iColumns;iColumn++){if(oSettings.aoColumns[iColumn].bVisible){anReturn.push(anTds[iColumn-iCorrector]);}
3396else{anReturn.push(oData._anHidden[iColumn]);iCorrector++;}}}}
3397return anReturn;}
3398function _fnLog(oSettings,iLevel,sMesg){var sAlert=(oSettings===null)?"DataTables warning: "+sMesg:"DataTables warning (table id = '"+oSettings.sTableId+"'): "+sMesg;if(iLevel===0){if(DataTable.ext.sErrMode=='alert'){alert(sAlert);}
3399else{throw new Error(sAlert);}
3400return;}
3401else if(window.console&&console.log){console.log(sAlert);}}
3402function _fnMap(oRet,oSrc,sName,sMappedName){if(sMappedName===undefined){sMappedName=sName;}
3403if(oSrc[sName]!==undefined){oRet[sMappedName]=oSrc[sName];}}
3404function _fnExtend(oOut,oExtender){var val;for(var prop in oExtender){if(oExtender.hasOwnProperty(prop)){val=oExtender[prop];if(typeof oInit[prop]==='object'&&val!==null&&$.isArray(val)===false){$.extend(true,oOut[prop],val);}
3405else{oOut[prop]=val;}}}
3406return oOut;}
3407function _fnBindAction(n,oData,fn){$(n).bind('click.DT',oData,function(e){n.blur();fn(e);}).bind('keypress.DT',oData,function(e){if(e.which===13){fn(e);}}).bind('selectstart.DT',function(){return false;});}
3408function _fnCallbackReg(oSettings,sStore,fn,sName){if(fn){oSettings[sStore].push({"fn":fn,"sName":sName});}}
3409function _fnCallbackFire(oSettings,sStore,sTrigger,aArgs){var aoStore=oSettings[sStore];var aRet=[];for(var i=aoStore.length-1;i>=0;i--){aRet.push(aoStore[i].fn.apply(oSettings.oInstance,aArgs));}
3410if(sTrigger!==null){$(oSettings.oInstance).trigger(sTrigger,aArgs);}
3411return aRet;}
3412var _fnJsonString=(window.JSON)?JSON.stringify:function(o){var sType=typeof o;if(sType!=="object"||o===null){if(sType==="string"){o='"'+o+'"';}
3413return o+"";}
3414var
3415sProp,mValue,json=[],bArr=$.isArray(o);for(sProp in o){mValue=o[sProp];sType=typeof mValue;if(sType==="string"){mValue='"'+mValue+'"';}
3416else if(sType==="object"&&mValue!==null){mValue=_fnJsonString(mValue);}
3417json.push((bArr?"":'"'+sProp+'":')+mValue);}
3418return(bArr?"[":"{")+json+(bArr?"]":"}");};function _fnBrowserDetect(oSettings){var n=$('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden">'+'<div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;">'+'<div id="DT_BrowserTest" style="width:100%; height:10px;"></div>'+'</div>'+'</div>')[0];document.body.appendChild(n);oSettings.oBrowser.bScrollOversize=$('#DT_BrowserTest',n)[0].offsetWidth===100?true:false;document.body.removeChild(n);}
3419this.$=function(sSelector,oOpts){var i,iLen,a=[],tr;var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var aoData=oSettings.aoData;var aiDisplay=oSettings.aiDisplay;var aiDisplayMaster=oSettings.aiDisplayMaster;if(!oOpts){oOpts={};}
3420oOpts=$.extend({},{"filter":"none","order":"current","page":"all"},oOpts);if(oOpts.page=='current'){for(i=oSettings._iDisplayStart,iLen=oSett
3420ings.fnDisplayEnd();i<iLen;i++){tr=aoData[aiDisplay[i]].nTr;if(tr){a.push(tr);}}}
3421else if(oOpts.order=="current"&&oOpts.filter=="none"){for(i=0,iLen=aiDisplayMaster.length;i<iLen;i++){tr=aoData[aiDisplayMaster[i]].nTr;if(tr){a.push(tr);}}}
3422else if(oOpts.order=="current"&&oOpts.filter=="applied"){for(i=0,iLen=aiDisplay.length;i<iLen;i++){tr=aoData[aiDisplay[i]].nTr;if(tr){a.push(tr);}}}
3423else if(oOpts.order=="original"&&oOpts.filter=="none"){for(i=0,iLen=aoData.length;i<iLen;i++){tr=aoData[i].nTr;if(tr){a.push(tr);}}}
3424else if(oOpts.order=="original"&&oOpts.filter=="applied"){for(i=0,iLen=aoData.length;i<iLen;i++){tr=aoData[i].nTr;if($.inArray(i,aiDisplay)!==-1&&tr){a.push(tr);}}}
3425else{_fnLog(oSettings,1,"Unknown selection options");}
3426var jqA=$(a);var jqTRs=jqA.filter(sSelector);var jqDescendants=jqA.find(sSelector);return $([].concat($.makeArray(jqTRs),$.makeArray(jqDescendants)));};this._=function(sSelector,oOpts){var aOut=[];var i,iLen,iIndex;var aTrs=this.$(sSelector,oOpts);for(i=0,iLen=aTrs.length;i<iLen;i++){aOut.push(this.fnGetData(aTrs[i]));}
3427return aOut;};this.fnAddData=function(mData,bRedraw){if(mData.length===0){return[];}
3428var aiReturn=[];var iTest;var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);if(typeof mData[0]==="object"&&mData[0]!==null){for(var i=0;i<mData.length;i++){iTest=_fnAddData(oSettings,mData[i]);if(iTest==-1){return aiReturn;}
3429aiReturn.push(iTest);}}
3430else{iTest=_fnAddData(oSettings,mData);if(iTest==-1){return aiReturn;}
3431aiReturn.push(iTest);}
3432oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();if(bRedraw===undefined||bRedraw){_fnReDraw(oSettings);}
3433return aiReturn;};this.fnAdjustColumnSizing=function(bRedraw){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);_fnAdjustColumnSizing(oSettings);if(bRedraw===undefined||bRedraw){this.fnDraw(false);}
3434else if(oSettings.oScroll.sX!==""||oSettings.oScroll.sY!==""){this.oApi._fnScrollDraw(oSettings);}};this.fnClearTable=function(bRedraw){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);_fnClearTable(oSettings);if(bRedraw===undefined||bRedraw){_fnDraw(oSettings);}};this.fnClose=function(nTr){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);for(var i=0;i<oSettings.aoOpenRows.length;i++){if(oSettings.aoOpenRows[i].nParent==nTr){var nTrParent=oSettings.aoOpenRows[i].nTr.parentNode;if(nTrParent){nTrParent.removeChild(oSettings.aoOpenRows[i].nTr);}
3435oSettings.aoOpenRows.splice(i,1);return 0;}}
3436return 1;};this.fnDeleteRow=function(mTarget,fnCallBack,bRedraw){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var i,iLen,iAODataIndex;iAODataIndex=(typeof mTarget==='object')?_fnNodeToDataIndex(oSettings,mTarget):mTarget;var oData=oSettings.aoData.splice(iAODataIndex,1);for(i=0,iLen=oSettings.aoData.length;i<iLen;i++){if(oSettings.aoData[i].nTr!==null){oSettings.aoData[i].nTr._DT_RowIndex=i;}}
3437var iDisplayIndex=$.inArray(iAODataIndex,oSettings.aiDisplay);oSettings.asDataSearch.splice(iDisplayIndex,1);_fnDeleteIndex(oSettings.aiDisplayMaster,iAODataIndex);_fnDeleteIndex(oSettings.aiDisplay,iAODataIndex);if(typeof fnCallBack==="function"){fnCallBack.call(this,oSettings,oData);}
3438if(oSettings._iDisplayStart>=oSettings.fnRecordsDisplay()){oSettings._iDisplayStart-=oSettings._iDisplayLength;if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0;}}
3439if(bRedraw===undefined||bRedraw){_fnCalculateEnd(oSettings);_fnDraw(oSettings);}
3440return oData;};this.fnDestroy=function(bRemove){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var nOrig=oSettings.nTableWrapper.parentNode;var nBody=oSettings.nTBody;var i,iLen;bRemove=(bRemove===undefined)?false:bRemove;oSettings.bDestroying=true;_fnCallbackFire(oSettings,"aoDestroyCallback","destroy",[oSettings]);if(!bRemove){for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){if(oSettings.aoColumns[i].bVisible===false){this.fnSetColumnVis(i,true);}}}
3441$(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT');$('tbody>tr>td.'+oSettings.oClasses.sRowEmpty,oSettings.nTable).parent().remove();if(oSettings.nTable!=oSettings.nTHead.parentNode){$(oSettings.nTable).children('thead').remove();oSettings.nTable.appendChild(oSettings.nTHead);}
3442if(oSettings.nTFoot&&oSettings.nTable!=oSettings.nTFoot.parentNode){$(oSettings.nTable).children('tfoot').remove();oSettings.nTable.appendChild(oSettings.nTFoot);}
3443oSettings.nTable.parentNode.removeChild(oSettings.nTable);$(oSettings.nTableWrapper).remove();oSettings.aaSorting=[];oSettings.aaSortingFixed=[];_fnSortingClasses(oSettings);$(_fnGetTrNodes(oSettings)).removeClass(oSettings.asStripeClasses.join(' '));$('th, td',oSettings.nTHead).removeClass([oSettings.oClasses.sSortable,oSettings.oClasses.sSortableAsc,oSettings.oClasses.sSortableDesc,oSettings.oClasses.sSortableNone].join(' '));if(oSettings.bJUI){$('th span.'+oSettings.oClasses.sSortIcon
3444+', td span.'+oSettings.oClasses.sSortIcon,oSettings.nTHead).remove();$('th, td',oSettings.nTHead).each(function(){var jqWrapper=$('div.'+oSettings.oClasses.sSortJUIWrapper,this);var kids=jqWrapper.contents();$(this).append(kids);jqWrapper.remove();});}
3445if(!bRemove&&oSettings.nTableReinsertBefore){nOrig.insertBefore(oSettings.nTable,oSettings.nTableReinsertBefore);}
3446else if(!bRemove){nOrig.appendChild(oSettings.nTable);}
3447for(i=0,iLen=oSettings.aoData.length;i<iLen;i++){if(oSettings.aoData[i].nTr!==null){nBody.appendChild(oSettings.aoData[i].nTr);}}
3448if(oSettings.oFeatures.bAutoWidth===true){oSettings.nTable.style.width=_fnStringToCss(oSettings.sDestroyWidth);}
3449iLen=oSettings.asDestroyStripes.length;if(iLen){var anRows=$(nBody).children('tr');for(i=0;i<iLen;i++){anRows.filter(':nth-child('+iLen+'n + '+i+')').addClass(oSettings.asDestroyStripes[i]);}}
3450for(i=0,iLen=DataTable.settings.length;i<iLen;i++){if(DataTable.settings[i]==oSettings){DataTable.settings.splice(i,1);}}
3451oSettings=null;oInit=null;};this.fnDraw=function(bComplete){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);if(bComplete===false){_fnCalculateEnd(oSettings);_fnDraw(oSettings);}
3452else{_fnReDraw(oSettings);}};this.fnFilter=function(sInput,iColumn,bRegex,bSmart,bShowGlobal,bCaseInsensitive){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);if(!oSettings.oFeatures.bFilter){return;}
3453if(bRegex===undefined||bRegex===null){bRegex=false;}
3454if(bSmart===undefined||bSmart===null){bSmart=true;}
3455if(bShowGlobal===undefined||bShowGlobal===null){bShowGlobal=true;}
3456if(bCaseInsensitive===undefined||bCaseInsensitive===null){bCaseInsensitive=true;}
3457if(iColumn===undefined||iColumn===null){_fnFilterComplete(oSettings,{"sSearch":sInput+"","bRegex":bRegex,"bSmart":bSmart,"bCaseInsensitive":bCaseInsensitive},1);if(bShowGlobal&&oSettings.aanFeatures.f){var n=oSettings.aanFeatures.f;for(var i=0,iLen=n.length;i<iLen;i++){try{if(n[i]._DT_Input!=document.activeElement){$(n[i]._DT_Input).val(sInput);}}
3458catch(e){$(n[i]._DT_Input).val(sInput);}}}}
3459else{$.extend(oSettings.aoPreSearchCols[iColumn],{"sSearch":sInput+"","bRegex":bRegex,"bSmart":bSmart,"bCaseInsensitive":bCaseInsensitive});_fnFilterComplete(oSettings,oSettings.oPreviousSearch,1);}};this.fnGetData=function(mRow,iCol){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);if(mRow!==undefined){var iRow=mRow;if(typeof mRow==='object'){var sNode=mRow.nodeName.toLowerCase();if(sNode==="tr"){iRow=_fnNodeToDataIndex(oSettings,mRow);}
3460else if(sNode==="td"){iRow=_fnNodeToDataIndex(oSettings,mRow.parentNode);iCol=_fnNodeToColumnIndex(oSettings,iRow,mRow);}}
3461if(iCol!==undefined){return _fnGetCellData(oSettings,iRow,iCol,'');}
3462return(oSettings.aoData[iRow]!==undefined)?oSettings.aoData[iRow]._aData:null;}
3463return _fnGetDataMaster(oSettings);};this.fnGetNodes=function(iRow){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);if(iRow!==undefined){return(oSettings.aoData[iRow]!==undefined)?oSettings.aoData[iRow].nTr:null;}
3464return _fnGetTrNodes(oSettings);};this.fnGetPosition=function(nNode){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var sNodeName=nNode.nodeName.toUpperCase();if(sNodeName=="TR"){return _fnNodeToDataIndex(oSettings,nNode);}
3465else if(sNodeName=="TD"||sNodeName=="TH"){var iDataIndex=_fnNodeToDataIndex(oSettings,nNode.parentNode);var iColumnIndex=_fnNodeToColumnIndex(oSettings,iDataIndex,nNode);return[iDataIndex,_fnColumnIndexToVisible(oSettings,iColumnIndex),iColumnIndex];}
3466return null;};this.fnIsOpen=function(nTr){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var aoOpenRows=oSettings.aoOpenRows;for(var i=0;i<oSettings.aoOpenRows.length;i++){if(oSettings.aoOpenRows[i].nParent==nTr){return true;}}
3467return false;};this.fnOpen=function(nTr,mHtml,sClass){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var nTableRows=_fnGetTrNodes(oSettings);if($.inArray(nTr,nTableRows)===-1){return;}
3468this.fnClose(nTr);var nNewRow=document.createElement("tr");var nNewCell=document.createElement("td");nNewRow.appendChild(nNewCell);nNewCell.className=sClass;
3468nNewCell.colSpan=_fnVisbleColumns(oSettings);if(typeof mHtml==="string"){nNewCell.innerHTML=mHtml;}
3469else{$(nNewCell).html(mHtml);}
3470var nTrs=$('tr',oSettings.nTBody);if($.inArray(nTr,nTrs)!=-1){$(nNewRow).insertAfter(nTr);}
3471oSettings.aoOpenRows.push({"nTr":nNewRow,"nParent":nTr});return nNewRow;};this.fnPageChange=function(mAction,bRedraw){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);_fnPageChange(oSettings,mAction);_fnCalculateEnd(oSettings);if(bRedraw===undefined||bRedraw){_fnDraw(oSettings);}};this.fnSetColumnVis=function(iCol,bShow,bRedraw){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var i,iLen;var aoColumns=oSettings.aoColumns;var aoData=oSettings.aoData;var nTd,bAppend,iBefore;if(aoColumns[iCol].bVisible==bShow){return;}
3472if(bShow){var iInsert=0;for(i=0;i<iCol;i++){if(aoColumns[i].bVisible){iInsert++;}}
3473bAppend=(iInsert>=_fnVisbleColumns(oSettings));if(!bAppend){for(i=iCol;i<aoColumns.length;i++){if(aoColumns[i].bVisible){iBefore=i;break;}}}
3474for(i=0,iLen=aoData.length;i<iLen;i++){if(aoData[i].nTr!==null){if(bAppend){aoData[i].nTr.appendChild(aoData[i]._anHidden[iCol]);}
3475else{aoData[i].nTr.insertBefore(aoData[i]._anHidden[iCol],_fnGetTdNodes(oSettings,i)[iBefore]);}}}}
3476else{for(i=0,iLen=aoData.length;i<iLen;i++){if(aoData[i].nTr!==null){nTd=_fnGetTdNodes(oSettings,i)[iCol];aoData[i]._anHidden[iCol]=nTd;nTd.parentNode.removeChild(nTd);}}}
3477aoColumns[iCol].bVisible=bShow;_fnDrawHead(oSettings,oSettings.aoHeader);if(oSettings.nTFoot){_fnDrawHead(oSettings,oSettings.aoFooter);}
3478for(i=0,iLen=oSettings.aoOpenRows.length;i<iLen;i++){oSettings.aoOpenRows[i].nTr.colSpan=_fnVisbleColumns(oSettings);}
3479if(bRedraw===undefined||bRedraw){_fnAdjustColumnSizing(oSettings);_fnDraw(oSettings);}
3480_fnSaveState(oSettings);};this.fnSettings=function(){return _fnSettingsFromNode(this[DataTable.ext.iApiIndex]);};this.fnSort=function(aaSort){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);oSettings.aaSorting=aaSort;_fnSort(oSettings);};this.fnSortListener=function(nNode,iColumn,fnCallback){_fnSortAttachListener(_fnSettingsFromNode(this[DataTable.ext.iApiIndex]),nNode,iColumn,fnCallback);};this.fnUpdate=function(mData,mRow,iColumn,bRedraw,bAction){var oSettings=_fnSettingsFromNode(this[DataTable.ext.iApiIndex]);var i,iLen,sDisplay;var iRow=(typeof mRow==='object')?_fnNodeToDataIndex(oSettings,mRow):mRow;if($.isArray(mData)&&iColumn===undefined){oSettings.aoData[iRow]._aData=mData.slice();for(i=0;i<oSettings.aoColumns.length;i++){this.fnUpdate(_fnGetCellData(oSettings,iRow,i),iRow,i,false,false);}}
3481else if($.isPlainObject(mData)&&iColumn===undefined){oSettings.aoData[iRow]._aData=$.extend(true,{},mData);for(i=0;i<oSettings.aoColumns.length;i++){this.fnUpdate(_fnGetCellData(oSettings,iRow,i),iRow,i,false,false);}}
3482else{_fnSetCellData(oSettings,iRow,iColumn,mData);sDisplay=_fnGetCellData(oSettings,iRow,iColumn,'display');var oCol=oSettings.aoColumns[iColumn];if(oCol.fnRender!==null){sDisplay=_fnRender(oSettings,iRow,iColumn);if(oCol.bUseRendered){_fnSetCellData(oSettings,iRow,iColumn,sDisplay);}}
3483if(oSettings.aoData[iRow].nTr!==null){_fnGetTdNodes(oSettings,iRow)[iColumn].innerHTML=sDisplay;}}
3484var iDisplayIndex=$.inArray(iRow,oSettings.aiDisplay);oSettings.asDataSearch[iDisplayIndex]=_fnBuildSearchRow(oSettings,_fnGetRowData(oSettings,iRow,'filter',_fnGetColumns(oSettings,'bSearchable')));if(bAction===undefined||bAction){_fnAdjustColumnSizing(oSettings);}
3485if(bRedraw===undefined||bRedraw){_fnReDraw(oSettings);}
3486return 0;};this.fnVersionCheck=DataTable.ext.fnVersionCheck;function _fnExternApiFunc(sFunc){return function(){var aArgs=[_fnSettingsFromNode(this[DataTable.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return DataTable.ext.oApi[sFunc].apply(this,aArgs);};}
3487this.oApi={"_fnExternApiFunc":_fnExternApiFunc,"_fnInitialise":_fnInitialise,"_fnInitComplete":_fnInitComplete,"_fnLanguageCompat":_fnLanguageCompat,"_fnAddColumn":_fnAddColumn,"_fnColumnOptions":_fnColumnOptions,"_fnAddData":_fnAddData,"_fnCreateTr":_fnCreateTr,"_fnGatherData":_fnGatherData,"_fnBuildHead":_fnBuildHead,"_fnDrawHead":_fnDrawHead,"_fnDraw":_fnDraw,"_fnReDraw":_fnReDraw,"_fnAjaxUpdate":_fnAjaxUpdate,"_fnAjaxParameters":_fnAjaxParameters,"_fnAjaxUpdateDraw":_fnAjaxUpdateDraw,"_fnServerParams":_fnServerParams,"_fnAddOptionsHtml":_fnAddOptionsHtml,"_fnFeatureHtmlTable":_fnFeatureHtmlTable,"_fnScrollDraw":_fnScrollDraw,"_fnAdjustColumnSizing":_fnAdjustColumnSizing,"_fnFeatureHtmlFilter":_fnFeatureHtmlFilter,"_fnFilterComplete":_fnFilterComplete,"_fnFilterCustom"
3487:_fnFilterCustom,"_fnFilterColumn":_fnFilterColumn,"_fnFilter":_fnFilter,"_fnBuildSearchArray":_fnBuildSearchArray,"_fnBuildSearchRow":_fnBuildSearchRow,"_fnFilterCreateSearch":_fnFilterCreateSearch,"_fnDataToSearch":_fnDataToSearch,"_fnSort":_fnSort,"_fnSortAttachListener":_fnSortAttachListener,"_fnSortingClasses":_fnSortingClasses,"_fnFeatureHtmlPaginate":_fnFeatureHtmlPaginate,"_fnPageChange":_fnPageChange,"_fnFeatureHtmlInfo":_fnFeatureHtmlInfo,"_fnUpdateInfo":_fnUpdateInfo,"_fnFeatureHtmlLength":_fnFeatureHtmlLength,"_fnFeatureHtmlProcessing":_fnFeatureHtmlProcessing,"_fnProcessingDisplay":_fnProcessingDisplay,"_fnVisibleToColumnIndex":_fnVisibleToColumnIndex,"_fnColumnIndexToVisible":_fnColumnIndexToVisible,"_fnNodeToDataIndex":_fnNodeToDataIndex,"_fnVisbleColumns":_fnVisbleColumns,"_fnCalculateEnd":_fnCalculateEnd,"_fnConvertToWidth":_fnConvertToWidth,"_fnCalculateColumnWidths":_fnCalculateColumnWidths,"_fnScrollingWidthAdjust":_fnScrollingWidthAdjust,"_fnGetWidestNode":_fnGetWidestNode,"_fnGetMaxLenString":_fnGetMaxLenString,"_fnStringToCss":_fnStringToCss,"_fnDetectType":_fnDetectType,"_fnSettingsFromNode":_fnSettingsFromNode,"_fnGetDataMaster":_fnGetDataMaster,"_fnGetTrNodes":_fnGetTrNodes,"_fnGetTdNodes":_fnGetTdNodes,"_fnEscapeRegex":_fnEscapeRegex,"_fnDeleteIndex":_fnDeleteIndex,"_fnReOrderIndex":_fnReOrderIndex,"_fnColumnOrdering":_fnColumnOrdering,"_fnLog":_fnLog,"_fnClearTable":_fnClearTable,"_fnSaveState":_fnSaveState,"_fnLoadState":_fnLoadState,"_fnCreateCookie":_fnCreateCookie,"_fnReadCookie":_fnReadCookie,"_fnDetectHeader":_fnDetectHeader,"_fnGetUniqueThs":_fnGetUniqueThs,"_fnScrollBarWidth":_fnScrollBarWidth,"_fnApplyToChildren":_fnApplyToChildren,"_fnMap":_fnMap,"_fnGetRowData":_fnGetRowData,"_fnGetCellData":_fnGetCellData,"_fnSetCellData":_fnSetCellData,"_fnGetObjectDataFn":_fnGetObjectDataFn,"_fnSetObjectDataFn":_fnSetObjectDataFn,"_fnApplyColumnDefs":_fnApplyColumnDefs,"_fnBindAction":_fnBindAction,"_fnExtend":_fnExtend,"_fnCallbackReg":_fnCallbackReg,"_fnCallbackFire":_fnCallbackFire,"_fnJsonString":_fnJsonString,"_fnRender":_fnRender,"_fnNodeToColumnIndex":_fnNodeToColumnIndex,"_fnInfoMacros":_fnInfoMacros,"_fnBrowserDetect":_fnBrowserDetect,"_fnGetColumns":_fnGetColumns};$.extend(DataTable.ext.oApi,this.oApi);for(var sFunc in DataTable.ext.oApi){if(sFunc){this[sFunc]=_fnExternApiFunc(sFunc);}}
3488var _that=this;this.each(function(){var i=0,iLen,j,jLen,k,kLen;var sId=this.getAttribute('id');var bInitHandedOff=false;var bUsePassedData=false;if(this.nodeName.toLowerCase()!='table'){_fnLog(null,0,"Attempted to initialise DataTables on a node which is not a "+"table: "+this.nodeName);return;}
3489for(i=0,iLen=DataTable.settings.length;i<iLen;i++){if(DataTable.settings[i].nTable==this){if(oInit===undefined||oInit.bRetrieve){return DataTable.settings[i].oInstance;}
3490else if(oInit.bDestroy){DataTable.settings[i].oInstance.fnDestroy();break;}
3491else{_fnLog(DataTable.settings[i],0,"Cannot reinitialise DataTable.\n\n"+"To retrieve the DataTables object for this table, pass no arguments or see "+"the docs for bRetrieve and bDestroy");return;}}
3492if(DataTable.settings[i].sTableId==this.id){DataTable.settings.splice(i,1);break;}}
3493if(sId===null||sId===""){sId="DataTables_Table_"+(DataTable.ext._oExternConfig.iNextUnique++);this.id=sId;}
3494var oSettings=$.extend(true,{},DataTable.models.oSettings,{"nTable":this,"oApi":_that.oApi,"oInit":oInit,"sDestroyWidth":$(this).width(),"sInstance":sId,"sTableId":sId});DataTable.settings.push(oSettings);oSettings.oInstance=(_that.length===1)?_that:$(this).dataTable();if(!oInit){oInit={};}
3495if(oInit.oLanguage){_fnLanguageCompat(oInit.oLanguage);}
3496oInit=_fnExtend($.extend(true,{},DataTable.defaults),oInit);_fnMap(oSettings.oFeatures,oInit,"bPaginate");_fnMap(oSettings.oFeatures,oInit,"bLengthChange");_fnMap(oSettings.oFeatures,oInit,"bFilter");_fnMap(oSettings.oFeatures,oInit,"bSort");_fnMap(oSettings.oFeatures,oInit,"bInfo");_fnMap(oSettings.oFeatures,oInit,"bProcessing");_fnMap(oSettings.oFeatures,oInit,"bAutoWidth");_fnMap(oSettings.oFeatures,oInit,"bSortClasses");_fnMap(oSettings.oFeatures,oInit,"bServerSide");_fnMap(oSettings.oFeatures,oInit,"bDeferRender");_fnMap(oSettings.oScroll,oInit,"sScrollX","sX");_fnMap(oSettings.oScroll,oInit,"sScrollXInner","sXInner");_fnMap(oSettings.oScroll,oInit,"sScrollY","sY");
3496_fnMap(oSettings.oScroll,oInit,"bScrollCollapse","bCollapse");_fnMap(oSettings.oScroll,oInit,"bScrollInfinite","bInfinite");_fnMap(oSettings.oScroll,oInit,"iScrollLoadGap","iLoadGap");_fnMap(oSettings.oScroll,oInit,"bScrollAutoCss","bAutoCss");_fnMap(oSettings,oInit,"asStripeClasses");_fnMap(oSettings,oInit,"asStripClasses","asStripeClasses");_fnMap(oSettings,oInit,"fnServerData");_fnMap(oSettings,oInit,"fnFormatNumber");_fnMap(oSettings,oInit,"sServerMethod");_fnMap(oSettings,oInit,"aaSorting");_fnMap(oSettings,oInit,"aaSortingFixed");_fnMap(oSettings,oInit,"aLengthMenu");_fnMap(oSettings,oInit,"sPaginationType");_fnMap(oSettings,oInit,"sAjaxSource");_fnMap(oSettings,oInit,"sAjaxDataProp");_fnMap(oSettings,oInit,"iCookieDuration");_fnMap(oSettings,oInit,"sCookiePrefix");_fnMap(oSettings,oInit,"sDom");_fnMap(oSettings,oInit,"bSortCellsTop");_fnMap(oSettings,oInit,"iTabIndex");_fnMap(oSettings,oInit,"oSearch","oPreviousSearch");_fnMap(oSettings,oInit,"aoSearchCols","aoPreSearchCols");_fnMap(oSettings,oInit,"iDisplayLength","_iDisplayLength");_fnMap(oSettings,oInit,"bJQueryUI","bJUI");_fnMap(oSettings,oInit,"fnCookieCallback");_fnMap(oSettings,oInit,"fnStateLoad");_fnMap(oSettings,oInit,"fnStateSave");_fnMap(oSettings.oLanguage,oInit,"fnInfoCallback");_fnCallbackReg(oSettings,'aoDrawCallback',oInit.fnDrawCallback,'user');_fnCallbackReg(oSettings,'aoServerParams',oInit.fnServerParams,'user');_fnCallbackReg(oSettings,'aoStateSaveParams',oInit.fnStateSaveParams,'user');_fnCallbackReg(oSettings,'aoStateLoadParams',oInit.fnStateLoadParams,'user');_fnCallbackReg(oSettings,'aoStateLoaded',oInit.fnStateLoaded,'user');_fnCallbackReg(oSettings,'aoRowCallback',oInit.fnRowCallback,'user');_fnCallbackReg(oSettings,'aoRowCreatedCallback',oInit.fnCreatedRow,'user');_fnCallbackReg(oSettings,'aoHeaderCallback',oInit.fnHeaderCallback,'user');_fnCallbackReg(oSettings,'aoFooterCallback',oInit.fnFooterCallback,'user');_fnCallbackReg(oSettings,'aoInitComplete',oInit.fnInitComplete,'user');_fnCallbackReg(oSettings,'aoPreDrawCallback',oInit.fnPreDrawCallback,'user');if(oSettings.oFeatures.bServerSide&&oSettings.oFeatures.bSort&&oSettings.oFeatures.bSortClasses){_fnCallbackReg(oSettings,'aoDrawCallback',_fnSortingClasses,'server_side_sort_classes');}
3497else if(oSettings.oFeatures.bDeferRender){_fnCallbackReg(oSettings,'aoDrawCallback',_fnSortingClasses,'defer_sort_classes');}
3498if(oInit.bJQueryUI){$.extend(oSettings.oClasses,DataTable.ext.oJUIClasses);if(oInit.sDom===DataTable.defaults.sDom&&DataTable.defaults.sDom==="lfrtip"){oSettings.sDom='<"H"lfr>t<"F"ip>';}}
3499else{$.extend(oSettings.oClasses,DataTable.ext.oStdClasses);}
3500$(this).addClass(oSettings.oClasses.sTable);if(oSettings.oScroll.sX!==""||oSettings.oScroll.sY!==""){oSettings.oScroll.iBarWidth=_fnScrollBarWidth();}
3501if(oSettings.iInitDisplayStart===undefined){oSettings.iInitDisplayStart=oInit.iDisplayStart;oSettings._iDisplayStart=oInit.iDisplayStart;}
3502if(oInit.bStateSave){oSettings.oFeatures.bStateSave=true;_fnLoadState(oSettings,oInit);_fnCallbackReg(oSettings,'aoDrawCallback',_fnSaveState,'state_save');}
3503if(oInit.iDeferLoading!==null){oSettings.bDeferLoading=true;var tmp=$.isArray(oInit.iDeferLoading);oSettings._iRecordsDisplay=tmp?oInit.iDeferLoading[0]:oInit.iDeferLoading;oSettings._iRecordsTotal=tmp?oInit.iDeferLoading[1]:oInit.iDeferLoading;}
3504if(oInit.aaData!==null){bUsePassedData=true;}
3505if(oInit.oLanguage.sUrl!==""){oSettings.oLanguage.sUrl=oInit.oLanguage.sUrl;$.getJSON(oSettings.oLanguage.sUrl,null,function(json){_fnLanguageCompat(json);$.extend(true,oSettings.oLanguage,oInit.oLanguage,json);_fnInitialise(oSettings);});bInitHandedOff=true;}
3506else{$.extend(true,oSettings.oLanguage,oInit.oLanguage);}
3507if(oInit.asStripeClasses===null){oSettings.asStripeClasses=[oSettings.oClasses.sStripeOdd,oSettings.oClasses.sStripeEven];}
3508iLen=oSettings.asStripeClasses.length;oSettings.asDestroyStripes=[];if(iLen){var bStripeRemove=false;var anRows=$(this).children('tbody').children('tr:lt('+iLen+')');for(i=0;i<iLen;i++){if(anRows.hasClass(oSettings.asStripeClasses[i])){bStripeRemove=true;oSettings.asDestroyStripes.push(oSettings.asStripeClasses[i]);}}
3508
3509if(bStripeRemove){anRows.removeClass(oSettings.asStripeClasses.join(' '));}}
3510var anThs=[];var aoColumnsInit;var nThead=this.getElementsByTagName('thead');if(nThead.length!==0){_fnDetectHeader(oSettings.aoHeader,nThead[0]);anThs=_fnGetUniqueThs(oSettings);}
3511if(oInit.aoColumns===null){aoColumnsInit=[];for(i=0,iLen=anThs.length;i<iLen;i++){aoColumnsInit.push(null);}}
3512else{aoColumnsInit=oInit.aoColumns;}
3513for(i=0,iLen=aoColumnsInit.length;i<iLen;i++){if(oInit.saved_aoColumns!==undefined&&oInit.saved_aoColumns.length==iLen){if(aoColumnsInit[i]===null){aoColumnsInit[i]={};}
3514aoColumnsInit[i].bVisible=oInit.saved_aoColumns[i].bVisible;}
3515_fnAddColumn(oSettings,anThs?anThs[i]:null);}
3516_fnApplyColumnDefs(oSettings,oInit.aoColumnDefs,aoColumnsInit,function(iCol,oDef){_fnColumnOptions(oSettings,iCol,oDef);});for(i=0,iLen=oSettings.aaSorting.length;i<iLen;i++){if(oSettings.aaSorting[i][0]>=oSettings.aoColumns.length){oSettings.aaSorting[i][0]=0;}
3517var oColumn=oSettings.aoColumns[oSettings.aaSorting[i][0]];if(oSettings.aaSorting[i][2]===undefined){oSettings.aaSorting[i][2]=0;}
3518if(oInit.aaSorting===undefined&&oSettings.saved_aaSorting===undefined){oSettings.aaSorting[i][1]=oColumn.asSorting[0];}
3519for(j=0,jLen=oColumn.asSorting.length;j<jLen;j++){if(oSettings.aaSorting[i][1]==oColumn.asSorting[j]){oSettings.aaSorting[i][2]=j;break;}}}
3520_fnSortingClasses(oSettings);_fnBrowserDetect(oSettings);var captions=$(this).children('caption').each(function(){this._captionSide=$(this).css('caption-side');});var thead=$(this).children('thead');if(thead.length===0){thead=[document.createElement('thead')];this.appendChild(thead[0]);}
3521oSettings.nTHead=thead[0];var tbody=$(this).children('tbody');if(tbody.length===0){tbody=[document.createElement('tbody')];this.appendChild(tbody[0]);}
3522oSettings.nTBody=tbody[0];oSettings.nTBody.setAttribute("role","alert");oSettings.nTBody.setAttribute("aria-live","polite");oSettings.nTBody.setAttribute("aria-relevant","all");var tfoot=$(this).children('tfoot');if(tfoot.length===0&&captions.length>0&&(oSettings.oScroll.sX!==""||oSettings.oScroll.sY!=="")){tfoot=[document.createElement('tfoot')];this.appendChild(tfoot[0]);}
3523if(tfoot.length>0){oSettings.nTFoot=tfoot[0];_fnDetectHeader(oSettings.aoFooter,oSettings.nTFoot);}
3524if(bUsePassedData){for(i=0;i<oInit.aaData.length;i++){_fnAddData(oSettings,oInit.aaData[i]);}}
3525else{_fnGatherData(oSettings);}
3526oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();oSettings.bInitialised=true;if(bInitHandedOff===false){_fnInitialise(oSettings);}});_that=null;return this;};DataTable.fnVersionCheck=function(sVersion){var fnZPad=function(Zpad,count){while(Zpad.length<count){Zpad+='0';}
3527return Zpad;};var aThis=DataTable.ext.sVersion.split('.');var aThat=sVersion.split('.');var sThis='',sThat='';for(var i=0,iLen=aThat.length;i<iLen;i++){sThis+=fnZPad(aThis[i],3);sThat+=fnZPad(aThat[i],3);}
3528return parseInt(sThis,10)>=parseInt(sThat,10);};DataTable.fnIsDataTable=function(nTable){var o=DataTable.settings;for(var i=0;i<o.length;i++){if(o[i].nTable===nTable||o[i].nScrollHead===nTable||o[i].nScrollFoot===nTable){return true;}}
3529return false;};DataTable.fnTables=function(bVisible){var out=[];jQuery.each(DataTable.settings,function(i,o){if(!bVisible||(bVisible===true&&$(o.nTable).is(':visible'))){out.push(o.nTable);}});return out;};DataTable.version="1.9.4";DataTable.settings=[];DataTable.models={};DataTable.models.ext={"afnFiltering":[],"afnSortData":[],"aoFeatures":[],"aTypes":[],"fnVersionCheck":DataTable.fnVersionCheck,"iApiIndex":0,"ofnSearch":{},"oApi":{},"oStdClasses":{},"oJUIClasses":{},"oPagination":{},"oSort":{},"sVersion":DataTable.version,"sErrMode":"alert","_oExternConfig":{"iNextUnique":0}};DataTable.models.oSearch={"bCaseInsensitive":true,"sSearch":"","bRegex":false,"bSmart":true};DataTable.models.oRow={"nTr":null,"_aData":[],"_aSortData":[],"_anHidden":[],"_sRowStripe":""};DataTable.models.oColumn={"aDataSort":null,"asSorting":null,"bSearchable":null,"bSortable":null,"bUseRendered":null,"bVisible":null,"_bAutoType":true,"fnCreatedCell":null,"fnGetData":null,"fnRender":null,"fnSetData":null,"mData":null,"mRender":null,"nTh":null,"nTf":null,"sClass":null,"sContentPadding":null,"sDefaultContent":null,"sName":null,"sSortDataType":'std',"sSortingClass":null,"sSortingClassJUI":null,"sTitle":null,"sType":null,"sWidth":null,"sWidthOrig":null};DataTable.defaults={"aaData":null,"aaSorting":[[0,'asc']],"aaSortingFixed":null,"aLengthMenu":[10,25,50,100],"aoColumns":null,"aoColumnDefs":null,"aoSearchCols":[],"asStripeClasses":null,"bAutoWidth":true,"bDeferRender":false,"bDestroy":false,"bFilter":true,"bInfo":true,"bJQueryUI":false,"bLengthChange":true,"bPaginate":true,"bProcessing":false,"bRetrieve":false,"bScrollAutoCss":true,"bScrollC
3529ollapse":false,"bScrollInfinite":false,"bServerSide":false,"bSort":true,"bSortCellsTop":false,"bSortClasses":true,"bStateSave":false,"fnCookieCallback":null,"fnCreatedRow":null,"fnDrawCallback":null,"fnFooterCallback":null,"fnFormatNumber":function(iIn){if(iIn<1000){return iIn;}
3530var s=(iIn+""),a=s.split(""),out="",iLen=s.length;for(var i=0;i<iLen;i++){if(i%3===0&&i!==0){out=this.oLanguage.sInfoThousands+out;}
3531out=a[iLen-i-1]+out;}
3532return out;},"fnHeaderCallback":null,"fnInfoCallback":null,"fnInitComplete":null,"fnPreDrawCallback":null,"fnRowCallback":null,"fnServerData":function(sUrl,aoData,fnCallback,oSettings){oSettings.jqXHR=$.ajax({"url":sUrl,"data":aoData,"success":function(json){if(json.sError){oSettings.oApi._fnLog(oSettings,0,json.sError);}
3533$(oSettings.oInstance).trigger('xhr',[oSettings,json]);fnCallback(json);},"dataType":"json","cache":false,"type":oSettings.sServerMethod,"error":function(xhr,error,thrown){if(error=="parsererror"){oSettings.oApi._fnLog(oSettings,0,"DataTables warning: JSON data from "+"server could not be parsed. This is caused by a JSON formatting error.");}}});},"fnServerParams":null,"fnStateLoad":function(oSettings){var sData=this.oApi._fnReadCookie(oSettings.sCookiePrefix+oSettings.sInstance);var oData;try{oData=(typeof $.parseJSON==='function')?$.parseJSON(sData):eval('('+sData+')');}catch(e){oData=null;}
3534return oData;},"fnStateLoadParams":null,"fnStateLoaded":null,"fnStateSave":function(oSettings,oData){this.oApi._fnCreateCookie(oSettings.sCookiePrefix+oSettings.sInstance,this.oApi._fnJsonString(oData),oSettings.iCookieDuration,oSettings.sCookiePrefix,oSettings.fnCookieCallback);},"fnStateSaveParams":null,"iCookieDuration":7200,"iDeferLoading":null,"iDisplayLength":10,"iDisplayStart":0,"iScrollLoadGap":100,"iTabIndex":0,"oLanguage":{"oAria":{"sSortAscending":": activate to sort column ascending","sSortDescending":": activate to sort column descending"},"oPaginate":{"sFirst":"First","sLast":"Last","sNext":"Next","sPrevious":"Previous"},"sEmptyTable":"No data available in table","sInfo":"Showing _START_ to _END_ of _TOTAL_ entries","sInfoEmpty":"Showing 0 to 0 of 0 entries","sInfoFiltered":"(filtered from _MAX_ total entries)","sInfoPostFix":"","sInfoThousands":",","sLengthMenu":"Show _MENU_ entries","sLoadingRecords":"Loading...","sProcessing":"Processing...","sSearch":"Search","sUrl":"","sZeroRecords":"No matching records found"},"oSearch":$.extend({},DataTable.models.oSearch),"sAjaxDataProp":"aaData","sAjaxSource":null,"sCookiePrefix":"SpryMedia_DataTables_","sDom":"lfrtip","sPaginationType":"two_button","sScrollX":"","sScrollXInner":"","sScrollY":"","sServerMethod":"GET"};DataTable.defaults.columns={"aDataSort":null,"asSorting":['asc','desc'],"bSearchable":true,"bSortable":true,"bUseRendered":true,"bVisible":true,"fnCreatedCell":null,"fnRender":null,"iDataSort":-1,"mData":null,"mRender":null,"sCellType":"td","sClass":"","sContentPadding":"","sDefaultContent":null,"sName":"","sSortDataType":"std","sTitle":null,"sType":null,"sWidth":null};DataTable.models.oSettings={"oFeatures":{"bAutoWidth":null,"bDeferRender":null,"bFilter":null,"bInfo":null,"bLengthChange":null,"bPaginate":null,"bProcessing":null,"bServerSide":null,"bSort":null,"bSortClasses":null,"bStateSave":null},"oScroll":{"bAutoCss":null,"bCollapse":null,"bInfinite":null,"iBarWidth":0,"iLoadGap":null,"sX":null,"sXInner":null,"sY":null},"oLanguage":{"fnInfoCallback":null},"oBrowser":{"bScrollOversize":false},"aanFeatures":[],"aoData":[],"aiDisplay":[],"aiDisplayMaster":[],"aoColumns":[],"aoHeader":[],"aoFooter":[],"asDataSearch":[],"oPreviousSearch":{},"aoPreSearchCols":[],"aaSorting":null,"aaSortingFixed":null,"asStripeClasses":null,"asDestroyStripes":[],"sDestroyWidth":0,"aoRowCallback":[],"aoHeaderCallback":[],"aoFooterCallback":[],"aoDrawCallback":[],"aoRowCreatedCallback":[],"aoPreDrawCallback":[],"aoInitComplete":[],"aoStateSaveParams":[],"aoStateLoadParams":[],"aoStateLoaded":[],"sTableId":"","nTable":null,"nTHead":null,"nTFoot":null,"nTBody":null,"nTableWrapper":null,"bDeferLoading":false,"bInitialised":false,"aoOpenRows":[],"sDom":null,"sPaginationType":"two_button","iCookieDuration":0,"sCookiePrefix":"","fnCookieCallback":null,"aoStateSave":[],"aoStateLoad":[],"oLoadedState":null,"sAjaxSource":null,"sAjaxDataProp":null,"bAjaxDataGet":true,"jqXHR":null,"f
3534nServerData":null,"aoServerParams":[],"sServerMethod":null,"fnFormatNumber":null,"aLengthMenu":null,"iDraw":0,"bDrawing":false,"iDrawError":-1,"_iDisplayLength":10,"_iDisplayStart":0,"_iDisplayEnd":10,"_iRecordsTotal":0,"_iRecordsDisplay":0,"bJUI":null,"oClasses":{},"bFiltered":false,"bSorted":false,"bSortCellsTop":null,"oInit":null,"aoDestroyCallback":[],"fnRecordsTotal":function(){if(this.oFeatures.bServerSide){return parseInt(this._iRecordsTotal,10);}else{return this.aiDisplayMaster.length;}},"fnRecordsDisplay":function(){if(this.oFeatures.bServerSide){return parseInt(this._iRecordsDisplay,10);}else{return this.aiDisplay.length;}},"fnDisplayEnd":function(){if(this.oFeatures.bServerSide){if(this.oFeatures.bPaginate===false||this._iDisplayLength==-1){return this._iDisplayStart+this.aiDisplay.length;}else{return Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay);}}else{return this._iDisplayEnd;}},"oInstance":null,"sInstance":null,"iTabIndex":0,"nScrollHead":null,"nScrollFoot":null};DataTable.ext=$.extend(true,{},DataTable.models.ext);$.extend(DataTable.ext.oStdClasses,{"sTable":"dataTable","sPagePrevEnabled":"paginate_enabled_previous","sPagePrevDisabled":"paginate_disabled_previous","sPageNextEnabled":"paginate_enabled_next","sPageNextDisabled":"paginate_disabled_next","sPageJUINext":"","sPageJUIPrev":"","sPageButton":"paginate_button","sPageButtonActive":"paginate_active","sPageButtonStaticDisabled":"paginate_button paginate_button_disabled","sPageFirst":"first","sPagePrevious":"previous","sPageNext":"next","sPageLast":"last","sStripeOdd":"odd","sStripeEven":"even","sRowEmpty":"dataTables_empty","sWrapper":"dataTables_wrapper","sFilter":"dataTables_filter","sInfo":"dataTables_info","sPaging":"dataTables_paginate paging_","sLength":"dataTables_length","sProcessing":"dataTables_processing","sSortAsc":"sorting_asc","sSortDesc":"sorting_desc","sSortable":"sorting","sSortableAsc":"sorting_asc_disabled","sSortableDesc":"sorting_desc_disabled","sSortableNone":"sorting_disabled","sSortColumn":"sorting_","sSortJUIAsc":"","sSortJUIDesc":"","sSortJUI":"","sSortJUIAscAllowed":"","sSortJUIDescAllowed":"","sSortJUIWrapper":"","sSortIcon":"","sScrollWrapper":"dataTables_scroll","sScrollHead":"dataTables_scrollHead","sScrollHeadInner":"dataTables_scrollHeadInner","sScrollBody":"dataTables_scrollBody","sScrollFoot":"dataTables_scrollFoot","sScrollFootInner":"dataTables_scrollFootInner","sFooterTH":"","sJUIHeader":"","sJUIFooter":""});$.extend(DataTable.ext.oJUIClasses,DataTable.ext.oStdClasses,{"sPagePrevEnabled":"fg-button ui-button ui-state-default ui-corner-left","sPagePrevDisabled":"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled","sPageNextEnabled":"fg-button ui-button ui-state-default ui-corner-right","sPageNextDisabled":"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled","sPageJUINext":"ui-icon ui-icon-circle-arrow-e","sPageJUIPrev":"ui-icon ui-icon-circle-arrow-w","sPageButton":"fg-button ui-button ui-state-default","sPageButtonActive":"fg-button ui-button ui-state-default ui-state-disabled","sPageButtonStaticDisabled":"fg-button ui-button ui-state-default ui-state-disabled","sPageFirst":"first ui-corner-tl ui-corner-bl","sPageLast":"last ui-corner-tr ui-corner-br","sPaging":"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+"ui-buttonset-multi paging_","sSortAsc":"ui-state-default","sSortDesc":"ui-state-default","sSortable":"ui-state-default","sSortableAsc":"ui-state-default","sSortableDesc":"ui-state-default","sSortableNone":"ui-state-default","sSortJUIAsc":"css_right ui-icon ui-icon-triangle-1-n","sSortJUIDesc":"css_right ui-icon ui-icon-triangle-1-s","sSortJUI":"css_right ui-icon ui-icon-carat-2-n-s","sSortJUIAscAllowed":"css_right ui-icon ui-icon-carat-1-n","sSortJUIDescAllowed":"css_right ui-icon ui-icon-carat-1-s","sSortJUIWrapper":"DataTables_sort_wrapper","sSortIcon":"DataTables_sort_icon","sScrollHead":"dataTables_scrollHead ui-state-default","sScrollFoot":"dataTables_scrollFoot ui-state-default","sFooterTH":"ui-state-default","sJUIHeader":"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix","sJUIFooter":"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});$.extend(DataTable.ext.oPagination,{"two_button":{"fnInit":function(oSett
3534ings,nPaging,fnCallbackDraw){var oLang=oSettings.oLanguage.oPaginate;var oClasses=oSettings.oClasses;var fnClickHandler=function(e){if(oSettings.oApi._fnPageChange(oSettings,e.data.action)){fnCallbackDraw(oSettings);}};var sAppend=(!oSettings.bJUI)?'<a class="'+oSettings.oClasses.sPagePrevDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button">'+oLang.sPrevious+'</a>'+'<a class="'+oSettings.oClasses.sPageNextDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button">'+oLang.sNext+'</a>':'<a class="'+oSettings.oClasses.sPagePrevDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button"><span class="'+oSettings.oClasses.sPageJUIPrev+'"></span></a>'+'<a class="'+oSettings.oClasses.sPageNextDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button"><span class="'+oSettings.oClasses.sPageJUINext+'"></span></a>';$(nPaging).append(sAppend);var els=$('a',nPaging);var nPrevious=els[0],nNext=els[1];oSettings.oApi._fnBindAction(nPrevious,{action:"previous"},fnClickHandler);oSettings.oApi._fnBindAction(nNext,{action:"next"},fnClickHandler);if(!oSettings.aanFeatures.p){nPaging.id=oSettings.sTableId+'_paginate';nPrevious.id=oSettings.sTableId+'_previous';nNext.id=oSettings.sTableId+'_next';nPrevious.setAttribute('aria-controls',oSettings.sTableId);nNext.setAttribute('aria-controls',oSettings.sTableId);}},"fnUpdate":function(oSettings,fnCallbackDraw){if(!oSettings.aanFeatures.p){return;}
3535var oClasses=oSettings.oClasses;var an=oSettings.aanFeatures.p;var nNode;for(var i=0,iLen=an.length;i<iLen;i++){nNode=an[i].firstChild;if(nNode){nNode.className=(oSettings._iDisplayStart===0)?oClasses.sPagePrevDisabled:oClasses.sPagePrevEnabled;nNode=nNode.nextSibling;nNode.className=(oSettings.fnDisplayEnd()==oSettings.fnRecordsDisplay())?oClasses.sPageNextDisabled:oClasses.sPageNextEnabled;}}}},"iFullNumbersShowPages":5,"full_numbers":{"fnInit":function(oSettings,nPaging,fnCallbackDraw){var oLang=oSettings.oLanguage.oPaginate;var oClasses=oSettings.oClasses;var fnClickHandler=function(e){if(oSettings.oApi._fnPageChange(oSettings,e.data.action)){fnCallbackDraw(oSettings);}};$(nPaging).append('<a  tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageFirst+'">'+oLang.sFirst+'</a>
3535'+'<a  tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPagePrevious+'">'+oLang.sPrevious+'</a>'+'<span></span>'+'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageNext+'">'+oLang.sNext+'</a>'+'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageLast+'">'+oLang.sLast+'</a>');var els=$('a',nPaging);var nFirst=els[0],nPrev=els[1],nNext=els[2],nLast=els[3];oSettings.oApi._fnBindAction(nFirst,{action:"first"},fnClickHandler);oSettings.oApi._fnBindAction(nPrev,{action:"previous"},fnClickHandler);oSettings.oApi._fnBindAction(nNext,{action:"next"},fnClickHandler);oSettings.oApi._fnBindAction(nLast,{action:"last"},fnClickHandler);if(!oSettings.aanFeatures.p){nPaging.id=oSettings.sTableId+'_paginate';nFirst.id=oSettings.sTableId+'_first';nPrev.id=oSettings.sTableId+'_previous';nNext.id=oSettings.sTableId+'_next';nLast.id=oSettings.sTableId+'_last';}},"fnUpdate":function(oSettings,fnCallbackDraw){if(!oSettings.aanFeatures.p){return;}
3536var iPageCount=DataTable.ext.oPagination.iFullNumbersShowPages;var iPageCountHalf=Math.floor(iPageCount/2);var iPages=Math.ceil((oSettings.fnRecordsDisplay())/oSettings._iDisplayLength);var iCurrentPage=Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength)+1;var sList="";var iStartButton,iEndButton,i,iLen;var oClasses=oSettings.oClasses;var anButtons,anStatic,nPaginateList,nNode;var an=oSettings.aanFeatures.p;var fnBind=function(j){oSettings.oApi._fnBindAction(this,{"page":j+iStartButton-1},function(e){oSettings.oApi._fnPageChange(oSettings,e.data.page);fnCallbackDraw(oSettings);e.preventDefault();});};if(oSettings._iDisplayLength===-1){iStartButton=1;iEndButton=1;iCurrentPage=1;}
3537else if(iPages<iPageCount){iStartButton=1;iEndButton=iPages;}
3538else if(iCurrentPage<=iPageCountHalf){iStartButton=1;iEndButton=iPageCount;}
3539else if(iCurrentPage>=(iPages-iPageCountHalf)){iStartButton=iPages-iPageCount+1;iEndButton=iPages;}
3540else{iStartButton=iCurrentPage-Math.ceil(iPageCount/2)+1;iEndButton=iStartButton+iPageCount-1;}
3541for(i=iStartButton;i<=iEndButton;i++){sList+=(iCurrentPage!==i)?'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+'">'+oSettings.fnFormatNumber(i)+'</a>':'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButtonActive+'">'+oSettings.fnFormatNumber(i)+'</a>';}
3542for(i=0,iLen=an.length;i<iLen;i++){nNode=an[i];if(!nNode.hasChildNodes()){continue;}
3543$('span:eq(0)',nNode).html(sList).children('a').each(fnBind);anButtons=nNode.getElementsByTagName('a');anStatic=[anButtons[0],anButtons[1],anButtons[anButtons.length-2],anButtons[anButtons.length-1]];$(anStatic).removeClass(oClasses.sPageButton+" "+oClasses.sPageButtonActive+" "+oClasses.sPageButtonStaticDisabled);
3543$([anStatic[0],anStatic[1]]).addClass((iCurrentPage==1)?oClasses.sPageButtonStaticDisabled:oClasses.sPageButton);$([anStatic[2],anStatic[3]]).addClass((iPages===0||iCurrentPage===iPages||oSettings._iDisplayLength===-1)?oClasses.sPageButtonStaticDisabled:oClasses.sPageButton);}}}});$.extend(DataTable.ext.oSort,{"string-pre":function(a){if(typeof a!='string'){a=(a!==null&&a.toString)?a.toString():'';}
3544return a.toLowerCase();},"string-asc":function(x,y){return((x<y)?-1:((x>y)?1:0));},"string-desc":function(x,y){return((x<y)?1:((x>y)?-1:0));},"html-pre":function(a){return a.replace(/<.*?>/g,"").toLowerCase();},"html-asc":function(x,y){return((x<y)?-1:((x>y)?1:0));},"html-desc":function(x,y){return((x<y)?1:((x>y)?-1:0));},"date-pre":function(a){var x=Date.parse(a);if(isNaN(x)||x===""){x=Date.parse("01/01/1970 00:00:00");}
3545return x;},"date-asc":function(x,y){return x-y;},"date-desc":function(x,y){return y-x;},"numeric-pre":function(a){return(a=="-"||a==="")?0:a*1;},"numeric-asc":function(x,y){return x-y;},"numeric-desc":function(x,y){return y-x;}});$.extend(DataTable.ext.aTypes,[function(sData){if(typeof sData==='number'){return'numeric';}
3546else if(typeof sData!=='string'){return null;}
3547var sValidFirstChars="0123456789-";var sValidChars="0123456789.";var Char;var bDecimal=false;Char=sData.charAt(0);if(sValidFirstChars.indexOf(Char)==-1){return null;}
3548for(var i=1;i<sData.length;i++){Char=sData.charAt(i);if(sValidChars.indexOf(Char)==-1){return null;}
3549if(Char=="."){if(bDecimal){return null;}
3550bDecimal=true;}}
3551return'numeric';},function(sData){var iParse=Date.parse(sData);if((iParse!==null&&!isNaN(iParse))||(typeof sData==='string'&&sData.length===0)){return'date';}
3552return null;},function(sData){if(typeof sData==='string'&&sData.indexOf('<')!=-1&&sData.indexOf('>')!=-1){return'html';}
3553return null;}]);$.fn.DataTable=DataTable;$.fn.dataTable=DataTable;$.fn.dataTableSettings=DataTable.settings;$.fn.dataTableExt=DataTable.ext;}));}(window,document));(function($,w,d){ViewsTool=function(a,b){!this instanceof ViewsTool&&alert("Warning: ViewsTool must be initialised with the keyword 'new'");this.settings={that:this,dt:a.fnSettings(),custom:{}};this.dom={container:null,dropdown:null,dropdownToggle:null,buttonSet:null,table:null};this.originalStates=[];this.classes=$.extend(!0,{},ViewsTool.classes);this.fnSettings=function(){return this.settings;};"undefined"==typeof b&&(b={});this._fnConstruct(b);return this;};ViewsTool.prototype={_fnConstruct:function(a){var b=this;this._fnCustomiseSettings(a);this.dom.container=d.createElement(this.settings.tags.container);$(this.dom.container).css({'position':'relative','float':'right'});if(this.settings.custom.actionsWrapper==='dropdown'){this._fnCreateDropDown(this.dom.container,this.settings.custom.actions);}else{this._fnCreateButtonSet(this.dom.container,this.settings.custom.actions);}
3554this._fnHandleActions();this.settings.dt.aoDestroyCallback.push({sName:"ViewTools",fn:function(){$(b.dom.container).empty();}});},_fnCustomiseSettings:function(a){"undefined"==typeof this.settings.dt._ViewsToolInit&&(this.settings.master=!0,this.settings.dt._ViewsToolInit=!0);this.dom.table=this.settings.dt.nTable;this.settings.custom=$.extend({},ViewsTool.DEFAULTS,a);this.settings.tags=this.settings.custom.oTags;},_fnCreateDropDown:function(root,actions){if(actions&&actions.oDefault&&actions.oDefault.label){if(actions.oOptions){this.dom.dropdown=$('<div>').addClass(this.classes.dropdown.root).appendTo(root);this.dom.dropdownToggle=$('<strong>').attr('data-toggle','dropdown').addClass(this.classes.dropdown.oDefault).appendTo(this.dom.dropdown);if(actions.oDefault.icon){$('<img>').attr('src',actions.oDefault.icon).attr('alt',actions.oDefault.label).appendTo(this.dom.dropdownToggle);}
3555this.dom.dropdownToggle.html(this.dom.dropdownToggle.html()+actions.oDefault.label);$('<span>').html(actions.oDefault.label);var $menu=$('<div>').addClass(this.classes.dropdown.menu).appendTo(this.dom.dropdown),$rootUl=$('<ul>').appendTo($menu);$.each(actions.oOptions,function(groupIndex,group){if(group.group.length>0){var $groupLi=$('<li>').appendTo($rootUl);$('<strong>').html(group.groupLabel).appendTo($groupLi);var $groupUl=$('<ul>').appendTo($groupLi);$.each(group.group,function(actionIndex,action){if(action.label){var $actionLi=$('
3555<li>').appendTo($groupUl);if(action.icon){$('<img>').attr('alt',action.label).attr('src',action.icon).appendTo($actionLi);}
3556var $a=$('<a>').data('actionbinding',action).attr('href','#').html(action.label).appendTo($actionLi);if(action.metadatas){$.each(action.metadatas,function(metaIndex,metaElement){$a.data(metaIndex,metaElement);});}}});}});}else{this.dom.dropdownToggle=$('<strong>').addClass(this.classes.dropdown.oDefault).appendTo(this.dom.dropdown);if(actions.oDefault.icon){$('<img>').attr('src',actions.oDefault.icon).attr('alt',actions.oDefault.label).appendTo(this.dom.dropdownToggle);}
3557$('<span>').html(actions.oDefault.label);}}},_fnCreateButtonSet:function(root,actions){var that=this;if(actions&&actions.oDefault&&actions.oDefault.label){if(actions.oOptions){this.dom.buttonSet=$('<div>').addClass(that.classes.toggle.root).attr('data-toggle','buttons-radio').appendTo(root);$.each(actions.oOptions,function(groupIndex,group){if(group.group.length>0){$.each(group.group,function(actionIndex,action){if((action.label&&that.settings.custom.bLabel)||(action.icon&&that.settings.custom.bIcon)){var $radio=$('<input>').attr({'type':'radio','name':'viewsRadio','id':'viewsRadio'+actionIndex,'data-button-bootstrap-class':that.classes.toggle.button}).appendTo(that.dom.buttonSet);if(action.icon&&that.settings.custom.bIcon){$radio.attr({'data-icon-src':action.icon,'data-icon-alt':action.label});}
3558if(action.label&&that.settings.custom.bLabel){$('<label>').attr('for','viewsRadio'+actionIndex).html(action.label).appendTo(that.dom.buttonSet);}
3559if(action.metadatas){$.each(action.metadatas,function(metaIndex,metaElement){$radio.data(metaIndex,metaElement);});}
3560$radio.data('actionbinding',action);}});}});}}},_fnHandleActions:function(){var that=this,$actions=that.dom.dropdown.find(':data(actionbinding)');$actions.click(function(){that._fnProcessAction($(this),$(this).data('actionbinding'));return false;});},_fnProcessAction:function(element,action){this._fnProcessCss(element,action.css);this._fnProcessJs(element,action.js);if(this.settings.bReflectSelection){this.dom.dropdownToggle.html('');if(action.icon){$('<img>').attr('src',action.icon).attr('alt',action.label).appendTo(this.dom.dropdownToggle);}
3561this.dom.dropdownToggle.html(this.dom.dropdownToggle.html()+action.label);}
3562return false;},_fnRestoreOriginalState:function(){var that=this;$('link[data-viewstool="true"]').remove();$.each(that.originalStates,function(index,element){var $element=that.settings.dt.oInstance.find(''+element);if($element.length>0){$element.removeAttr('style');}});that.originalStates=[];},_fnProcessCss:function(element,css){if(css){var that=this;this._fnRestoreOriginalState();if(typeof css==='string'){$('<link>').attr({'rel':'stylesheet','media':'screen, projection','href':css,'data-viewstool':'true'}).appendTo('head');return;}
3563$.each(css,function(index,element){var $element=that.settings.dt.oInstance.find(''+index);if($element.length>0){that.originalStates.push(index);$element.css(element);}});that.settings.dt.oInstance.fnAdjustColumnSizing();}},_fnProcessJs:function(element,js){if(js){js(element,this.settings.dt.oInstance);}}};ViewsTool._aInstances=[];ViewsTool._aListeners=[];ViewsTool.fnGetMasters=function(){for(var a=[],b=0,c=ViewsTool._aInstances.length;b<c;b++)ViewsTool._aInstances[b].settings.master&&a.push(ViewsTool._aInstances[b]);return a;};ViewsTool.fnGetInstance=function(a){"object"!=typeof a&&(a=g.getElementById(a));for(var b=0,c=ViewsTool._aInstances.length;b<c;b++)
3564if(ViewsTool._aInstances[b].settings.master&&ViewsTool._aInstances[b].dom.table==a)return ViewsTool._aInstances[b];return null;};ViewsTool._fnEventListen=function(a,b,c){ViewsTool._aListeners.push({that:a,type:b,fn:c});};ViewsTool._fnEventDispatch=function(a,b,c,d){for(var f=ViewsTool._aListeners,e=0,g=f.length;e<g;e++)a.dom.table==f[e].that.dom.table&&f[e].type==b&&f[e].fn(c,d);};ViewsTool.classes={container:'ViewsTool_container',dropdown:{root:'dropdown',oDefault:'dropdown-toggle button',menu:'dropdown-menu pull-right'},toggle:{root:'btn-group',button:'btn btn-mini'}};ViewsTool.DEFAULTS={bLabel:true,bIcon:true,bReflectSelection:true,actionsWrapper:'dropdown',actions:{},oTags:{container:"div",button:"a",liner:"span",collection:{container:"div",button:"a",liner:"span"}}};
vendor: 22,731 bytes, lines 3564-3657
3564$.fn.dataTableExt.aoFeatures.push({"fnInit":function(oSettings){oSettings=new ViewsTool(oSettings.oInstance,"undefined"!=typeof oSettings.oInit.oViewsTool?oSettings.oInit.oViewsTool:{});ViewsTool._aInstances.push(oSettings);return oSettings.dom.container;},"cFeature":"V","sFeature":"ViewsTool"});$.fn.DataTable.ViewsTool=ViewsTool;})(jQuery,window,document);;(function($){var CLOSE_EVENT='Close',BEFORE_CLOSE_EVENT='BeforeClose',AFTER_CLOSE_EVENT='AfterClose',BEFORE_APPEND_EVENT='BeforeAppend',MARKUP_PARSE_EVENT='MarkupParse',OPEN_EVENT='Open',CHANGE_EVENT='Change',NS='mfp',EVENT_NS='.'+NS,READY_CLASS='mfp-ready',REMOVING_CLASS='mfp-removing',PREVENT_CLOSE_CLASS='mfp-prevent-close';var mfp,MagnificPopup=function(){},_isJQ=!!(window.jQuery),_prevStatus,_window=$(window),_body,_document,_prevContentType,_wrapClasses,_currPopupType;var _mfpOn=function(name,f){mfp.ev.on(NS+name+EVENT_NS,f);},_getEl=function(className,appendTo,html,raw){var el=document.createElement('div');el.className='mfp-'+className;if(html){el.innerHTML=html;}
3565if(!raw){el=$(el);if(appendTo){el.appendTo(appendTo);}}else if(appendTo){appendTo.appendChild(el);}
3566return el;},_mfpTrigger=function(e,data){mfp.ev.triggerHandler(NS+e,data);if(mfp.st.callbacks){e=e.charAt(0).toLowerCase()+e.slice(1);if(mfp.st.callbacks[e]){mfp.st.callbacks[e].apply(mfp,$.isArray(data)?data:[data]);}}},_getCloseBtn=function(type){if(type!==_currPopupType||!mfp.currTemplate.closeBtn){mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace('%title%',mfp.st.tClose));_currPopupType=type;}
3567return mfp.currTemplate.closeBtn;},_checkInstance=function(){if(!$.magnificPopup.instance){mfp=new MagnificPopup();mfp.init();$.magnificPopup.instance=mfp;}},supportsTransitions=function(){var s=document.createElement('p').style,v=['ms','O','Moz','Webkit'];if(s['transition']!==undefined){return true;}
3568while(v.length){if(v.pop()+'Transition'in s){return true;}}
3569return false;};MagnificPopup.prototype={constructor:MagnificPopup,init:function(){var appVersion=navigator.appVersion;mfp.isIE7=appVersion.indexOf("MSIE 7.")!==-1;mfp.isIE8=appVersion.indexOf("MSIE 8.")!==-1;mfp.isLowIE=mfp.isIE7||mfp.isIE8;mfp.isAndroid=(/android/gi).test(appVersion);mfp.isIOS=(/iphone|ipad|ipod/gi).test(appVersion);mfp.supportsTransition=supportsTransitions();mfp.probablyMobile=(mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent));_document=$(document);mfp.popupsCache={};},open:function(data){if(!_body){_body=$(document.body);}
3570var i;if(data.isObj===false){mfp.items=data.items.toArray();mfp.index=0;var items=data.items,item;for(i=0;i<items.length;i++){item=items[i];if(item.parsed){item=item.el[0];}
3571if(item===data.el[0]){mfp.index=i;break;}}}else{mfp.items=$.isArray(data.items)?data.items:[data.items];mfp.index=data.index||0;}
3572if(mfp.isOpen){mfp.updateItemHTML();return;}
3573mfp.types=[];_wrapClasses='';if(data.mainEl&&data.mainEl.length){mfp.ev=data.mainEl.eq(0);}else{mfp.ev=_document;}
3574if(data.key){if(!mfp.popupsCache[data.key]){mfp.popupsCache[data.key]={};}
3575mfp.currTemplate=mfp.popupsCache[data.key];}else{mfp.currTemplate={};}
3576mfp.st=$.extend(true,{},$.magnificPopup.defaults,data);mfp.fixedContentPos=mfp.st.fixedContentPos==='auto'?!mfp.probablyMobile:mfp.st.fixedContentPos;if(mfp.st.modal){mfp.st.closeOnContentClick=false;mfp.st.closeOnBgClick=false;mfp.st.showCloseBtn=false;mfp.st.enableEscapeKey=false;}
3577if(!mfp.bgOverlay){mfp.bgOverlay=_getEl('bg').on('click'+EVENT_NS,function(){mfp.close();});mfp.wrap=_getEl('wrap').attr('tabindex',-1).on('click'+EVENT_NS,function(e){if(mfp._checkIfClose(e.target)){mfp.close();}});mfp.container=_getEl('container',mfp.wrap);}
3578mfp.contentContainer=_getEl('content');if(mfp.st.preloader){mfp.preloader=_getEl('preloader',mfp.container,mfp.st.tLoading);}
3579var modules=$.magnificPopup.modules;for(i=0;i<modules.length;i++){var n=modules[i];n=n.charAt(0).toUpperCase()+n.slice(1);mfp['init'+n].call(mfp);}
3580_mfpTrigger('BeforeOpen');if(mfp.st.showCloseBtn){if(!mfp.st.closeBtnInside){mfp.wrap.append(_getCloseBtn());}else{_mfpOn(MARKUP_PARSE_EVENT,function(e,template,values,item){values.close_replaceWith=_getCloseBtn(item.type);});_wrapClasses+=' mfp-close-btn-in';}}
3581if(mfp.st.alignTop){_wrapClasses+=' mfp-align-top';}
3582if(mfp.fixedContentPos){mfp.wrap.css({overflow:mfp.st.overflowY,overflowX:'hidden',overflowY:mfp.st.overflowY});}else{mfp.wrap.css({top:_window.scrollTop(),position:'absolute'});}
3583if(mfp.st.fixedBgPos===false||(mfp.st.fixedBgPos==='auto'&&!mfp.fixedContentPos)){mfp.bgOverlay.css({height:_document.height(),position:'absolute'});}
3584if(mfp.st.enableEscapeKey){_document.on('keyup'+EVENT_NS,function(e){if(e.keyCode===27){mfp.close();}});}
3585_window.on('resize'+EVENT_NS,function(){mfp.updateSize();});if(!mfp.st.closeOnContentClick){_wrapClasses+=' mfp-auto-cursor';}
3586if(_wrapClasses)
3587mfp.wrap.addClass(_wrapClasses);var windowHeight=mfp.wH=_window.height();var windowStyles={};if(mfp.fixedContentPos){if(mfp._hasScrollBar(windowHeight)){var s=mfp._getScrollbarSize();if(s){windowStyles.marginRight=s;}}}
3588if(mfp.fixedContentPos){if(!mfp.isIE7){windowStyles.overflow='hidden';}else{$('body, html').css('overflow','hidden');}}
3589var classesToadd=mfp.st.mainClass;if(mfp.isIE7){classesToadd+=' mfp-ie7';}
3590if(classesToadd){mfp._addClassToMFP(classesToadd);}
3591mfp.updateItemHTML();_mfpTrigger('BuildControls');$('html').css(windowStyles);mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo||_body);mfp._lastFocusedEl=document.activeElement;setTimeout(function(){if(mfp.content){mfp._addClassToMFP(READY_CLASS);mfp._setFocus();}else{mfp.bgOverlay.addClass(READY_CLASS);}
3592_document.on('focusin'+EVENT_NS,mfp._onFocusIn);},16);mfp.isOpen=true;mfp.updateSize(windowHeight);_mfpTrigger(OPEN_EVENT);return data;},close:function(){if(!mfp.isOpen)return;_mfpTrigger(BEFORE_CLOSE_EVENT);mfp.isOpen=false;if(mfp.st.removalDelay&&!mfp.isLowIE&&mfp.supportsTransition){mfp._addClassToMFP(REMOVING_CLASS);setTimeout(function(){mfp._close();},mfp.st.removalDelay);}else{mfp._close();}},_close:function(){_mfpTrigger(CLOSE_EVENT);var classesToRemove=REMOVING_CLASS+' '+READY_CLASS+' ';mfp.bgOverlay.detach();mfp.wrap.detach();mfp.container.empty();if(mfp.st.mainClass){classesToRemove+=mfp.st.mainClass+' ';}
3593mfp._removeClassFromMFP(classesToRemove);if(mfp.fixedContentPos){var windowStyles={marginRight:''};if(mfp.isIE7){$('body, html').css('overflow','');}else{windowStyles.overflow='';}
3594$('html').css(windowStyles);}
3595_document.off('keyup'+EVENT_NS+' focusin'+EVENT_NS);mfp.ev.off(EVENT_NS);mfp.wrap.attr('class','mfp-wrap').removeAttr('style');mfp.bgOverlay.attr('class','mfp-bg');mfp.container.attr('class','mfp-container');if(mfp.st.showCloseBtn&&(!mfp.st.closeBtnInside||mfp.currTemplate[mfp.currItem.type]===true)){if(mfp.currTemplate.closeBtn)
3596mfp.currTemplate.closeBtn.detach();}
3597if(mfp._lastFocusedEl){$(mfp._lastFocusedEl).focus();}
3598mfp.currItem=null;mfp.content=null;mfp.currTemplate=null;mfp.prevHeight=0;_mfpTrigger(AFTER_CLOSE_EVENT);},updateSize:function(winHeight){if(mfp.isIOS){var zoomLevel=document.documentElement.clientWidth/window.innerWidth;var height=window.innerHeight*zoomLevel;mfp.wrap.css('height',height);mfp.wH=height;}else{mfp.wH=winHeight||_window.height();}
3599if(!mfp.fixedContentPos){mfp.wrap.css('height',mfp.wH);}
3600_mfpTrigger('Resize');},updateItemHTML:function(){var item=mfp.items[mfp.index];mfp.contentContainer.detach();mfp.contentContainer.removeClass().addClass('mfp-content');if(mfp.content)
3601mfp.content.detach();if(!item.parsed){item=mfp.parseEl(mfp.index);}
3602var type=item.type;_mfpTrigger('BeforeChange',[mfp.currItem?mfp.currItem.type:'',type]);mfp.currItem=item;if(!mfp.currTemplate[type]){var markup=mfp.st[type]?mfp.st[type].markup:false;_mfpTrigger('FirstMarkupParse',markup);if(markup){mfp.currTemplate[type]=$(markup);}else{mfp.currTemplate[type]=true;}}
3603if(_prevContentType&&_prevContentType!==item.type){mfp.container.removeClass('mfp-'+_prevContentType+'-holder');}
3604var newContent=mfp['get'+type.charAt(0).toUpperCase()+type.slice(1)](item,mfp.currTemplate[type]);mfp.appendContent(newContent,type);item.preloaded=true;_mfpTrigger(CHANGE_EVENT,item);_prevContentType=item.type;mfp.container.prepend(mfp.contentContainer);_mfpTrigger('AfterChange');},appendContent:function(newContent,type){mfp.content=newContent;if(newContent){if(mfp.st.showCloseBtn&&mfp.st.closeBtnInside&&mfp.currTemplate[type]===true){if(!mfp.content.find('.mfp-close').length){mfp.content.append(_getCloseBtn());}}else{mfp.content=newContent;}}else{mfp.content='';}
3605_mfpTrigger(BEFORE_APPEND_EVENT);mfp.container.addClass('mfp-'+type+'-holder');mfp.contentContainer.append(mfp.content);},parseEl:function(index){var item=mfp.items[index],type=item.type;if(item.tagName){item={el:$(item)};}else{item={data:item,src:item.src};}
3606if(item.el){var types=mfp.types;for(var i=0;i<types.length;i++){if(item.el.hasClass('mfp-'+types[i])){type=types[i];break;}}
3607item.src=item.el.attr('data-mfp-src');if(!item.src){item.src=item.el.attr('href');}}
3608item.type=type||mfp.st.type||'inline';item.index=index;item.parsed=true;mfp.items[index]=item;_mfpTrigger('ElementParse',item);return mfp.items[index];},addGroup:function(el,options){var eHandler=function(e){e.mfpEl=this;mfp._openClick(e,el,options);};if(!options){options={};}
3609var eName='click.magnificPopup';options.mainEl=el;if(options.items){options.isObj=true;el.off(eName).on(eName,eHandler);}else{options.isObj=false;if(options.delegate){el.off(eName).on(eName,options.delegate,eHandler);}else{options.items=el;el.off(eName).on(eName,eHandler);}}},_openClick:function(e,el,options){var midClick=options.midClick!==undefined?options.midClick:$.magnificPopup.defaults.midClick;if(!midClick&&(e.which===2||e.ctrlKey||e.metaKey)){return;}
3610var disableOn=options.disableOn!==undefined?options.disableOn:$.magnificPopup.defaults.disableOn;if(disableOn){if($.isFunction(disableOn)){if(!disableOn.call(mfp)){return true;}}else{if(_window.width()<disableOn){return true;}}}
3611if(e.type){e.preventDefault();if(mfp.isOpen){e.stopPropagation();}}
3612options.el=$(e.mfpEl);options.index=options.el.data('index')||0;if(options.delegate){options.items=el.find(options.delegate);}
3613mfp.open(options);},updateStatus:function(status,text){if(mfp.preloader){if(_prevStatus!==status){mfp.container.removeClass('mfp-s-'+_prevStatus);}
3614if(!text&&status==='loading'){text=mfp.st.tLoading;}
3615var data={status:status,text:text};_mfpTrigger('UpdateStatus',data);status=data.status;text=data.text;mfp.preloader.html(text);mfp.preloader.find('a').on('click',function(e){e.stopImmediatePropagation();});mfp.container.addClass('mfp-s-'+status);_prevStatus=status;}},_checkIfClose:function(target){if($(target).hasClass(PREVENT_CLOSE_CLASS)){return;}
3616var closeOnContent=mfp.st.closeOnContentClick;var closeOnBg=mfp.st.closeOnBgClick;if(closeOnContent&&closeOnBg){return true;}else{if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){return true;}
3617if((target!==mfp.content[0]&&!$.contains(mfp.content[0],target))){if(closeOnBg){if($.contains(document,target)){return true;}}}else if(closeOnContent){return true;}}
3618return false;},_addClassToMFP:function(cName){mfp.bgOverlay.addClass(cName);mfp.wrap.addClass(cName);},_removeClassFromMFP:function(cName){this.bgOverlay.removeClass(cName);mfp.wrap.removeClass(cName);},_hasScrollBar:function(winHeight){return((mfp.isIE7?_document.height():document.body.scrollHeight)>(winHeight||_window.height()));},_setFocus:function(){(mfp.st.focus?mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus();},_onFocusIn:function(e){if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0],e.target)){mfp._setFocus();return false;}},_parseMarkup:function(template,values,item){var arr;if(item.data){values=$.extend(item.data,values);}
3619_mfpTrigger(MARKUP_PARSE_EVENT,[template,values,item]);$.each(values,function(key,value){if(value===undefined||value===false){return true;}
3620arr=key.split('_');if(arr.length>1){var el=template.find(EVENT_NS+'-'+arr[0]);if(el.length>0){var attr=arr[1];if(attr==='replaceWith'){if(el[0]!==value[0]){el.replaceWith(value);}}else if(attr==='img'){if(el.is('img')){el.attr('src',value);}else{el.replaceWith('<img src="'+value+'" class="'+el.attr('class')+'" />');}}else{el.attr(arr[1],value);}}}else{template.find(EVENT_NS+'-'+key).html(value);}});},_getScrollbarSize:function(){if(mfp.scrollbarSize===undefined){var scrollDiv=document.createElement("div");scrollDiv.id="mfp-sbm";scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';document.body.appendChild(scrollDiv);mfp.scrollbarSize=scrollDiv.offsetWidth-scrollDiv.clientWidth;document.body.removeChild(scrollDiv);}
3621return mfp.scrollbarSize;}};$.magnificPopup={instance:null,proto:MagnificPopup.prototype,modules:[],open:function(options,index){_checkInstance();if(!options){options={};}else{options=$.extend(true,{},options);}
3622options.isObj=true;options.index=index||0;return this.instance.open(options);},close:function(){return $.magnificPopup.instance&&$.magnificPopup.instance.close();},registerModule:function(name,module){if(module.options){$.magnificPopup.defaults[name]=module.options;}
3623$.extend(this.proto,module.proto);this.modules.push(name);},defaults:{disableOn:0,key:null,midClick:false,mainClass:'',preloader:true,focus:'',closeOnContentClick:false,closeOnBgClick:true,closeBtnInside:true,showCloseBtn:true,enableEscapeKey:true,modal:false,alignTop:false,removalDelay:0,prependTo:null,fixedContentPos:'auto',fixedBgPos:'auto',overflowY:'auto',closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:'Close (Esc)',tLoading:'Loading...'}};$.fn.magnificPopup=function(options){_checkInstance();var jqEl=$(this);if(typeof options==="string"){if(options==='open'){var items,itemOpts=_isJQ?jqEl.data('magnificPopup'):jqEl[0].magnificPopup,index=parseInt(arguments[1],10)||0;if(itemOpts.items){items=itemOpts.items[index];}else{items=jqEl;if(itemOpts.delegate){items=items.find(itemOpts.delegate);}
3624items=items.eq(index);}
3625mfp._openClick({mfpEl:items},jqEl,itemOpts);}else{if(mfp.isOpen)
3626mfp[options].apply(mfp,Array.prototype.slice.call(arguments,1));}}else{options=$.extend(true,{},options);if(_isJQ){jqEl.data('magnificPopup',options);}else{jqEl[0].magnificPopup=options;}
3627mfp.addGroup(jqEl,options);}
3628return jqEl;};var INLINE_NS='inline',_hiddenClass,_inlinePlaceholder,_lastInlineElement,_putInlineElementsBack=function(){if(_lastInlineElement){_inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach();_lastInlineElement=null;}};$.magnificPopup.registerModule(INLINE_NS,{options:{hiddenClass:'hide',markup:'',tNotFound:'Content not found'},proto:{initInline:function(){mfp.types.push(INLINE_NS);_mfpOn(CLOSE_EVENT+'.'+INLINE_NS,function(){_putInlineElementsBack();});},getInline:function(item,template){_putInlineElementsBack();if(item.src){var inlineSt=mfp.st.inline,el=$(item.src);if(el.length){var parent=el[0].parentNode;if(parent&&parent.tagName){if(!_inlinePlaceholder){_hiddenClass=inlineSt.hiddenClass;_inlinePlaceholder=_getEl(_hiddenClass);_hiddenClass='mfp-'+_hiddenClass;}
3629_lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);}
3630mfp.updateStatus('ready');}else{mfp.updateStatus('error',inlineSt.tNotFound);el=$('<div>');}
3631item.inlineElement=el;return el;}
3632mfp.updateStatus('ready');mfp._parseMarkup(template,{},item);return template;}}});var AJAX_NS='ajax',_ajaxCur,_removeAjaxCursor=function(){if(_ajaxCur){_body.removeClass(_ajaxCur);}},_destroyAjaxRequest=function(){_removeAjaxCursor();if(mfp.req){mfp.req.abort();}};$.magnificPopup.registerModule(AJAX_NS,{options:{settings:null,cursor:'mfp-ajax-cur',tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){mfp.types.push(AJAX_NS);_ajaxCur=mfp.st.ajax.cursor;_mfpOn(CLOSE_EVENT+'.'+AJAX_NS,_destroyAjaxRequest);_mfpOn('BeforeChange.'+AJAX_NS,_destroyAjaxRequest);},getAjax:function(item){if(_ajaxCur)
3633_body.addClass(_ajaxCur);mfp.updateStatus('loading');var opts=$.extend({url:item.src,success:function(data,textStatus,jqXHR){var temp={data:data,xhr:jqXHR};_mfpTrigger('ParseAjax',temp);mfp.appendContent($(temp.data),AJAX_NS);item.finished=true;_removeAjaxCursor();mfp._setFocus();setTimeout(function(){mfp.wrap.addClass(READY_CLASS);},16);mfp.updateStatus('ready');_mfpTrigger('AjaxContentAdded');},error:function(){_removeAjaxCursor();item.finished=item.loadError=true;mfp.updateStatus('error',mfp.st.ajax.tError.replace('%url%',item.src));}},mfp.st.ajax.settings);mfp.req=$.ajax(opts);return'';}}});var _imgInterval,_getTitle=function(item){if(item.data&&item.data.title!==undefined)
3634return item.data.title;var src=mfp.st.image.titleSrc;if(src){if($.isFunction(src)){return src.call(mfp,item);}else if(item.el){return item.el.attr(src)||'';}}
3635return'';};$.magnificPopup.registerModule('image',{options:{markup:'<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<figure>'+'<div class="mfp-img"></div>'+'<figcaption>'+'<div class="mfp-bottom-bar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'</div>'+'</figcaption>'+'</figure>'+'</div>',cursor:'mfp-zoom-out-cur',titleSrc:'title',verticalFit:true,verticalMargin:0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var imgSt=mfp.st.image,ns='.image';mfp.types.push('image');_mfpOn(OPEN_EVENT+ns,function(){if(mfp.currItem.type==='image'&&imgSt.cursor){_body.addClass(imgSt.cursor);}});_mfpOn(CLOSE_EVENT+ns,function(){if(imgSt.cursor){_body.removeClass(imgSt.cursor);}
3636_window.off('resize'+EVENT_NS);});_mfpOn('Resize'+ns,mfp.resizeImage);if(mfp.isLowIE){_mfpOn('AfterChange',mfp.resizeImage);}},resizeImage:function(){var item=mfp.currItem;if(!item||!item.img)return;if(mfp.st.image.verticalFit){var decr=0;if(mfp.isLowIE){decr=parseInt(item.img.css('padding-top'),10)+parseInt(item.img.css('padding-bottom'),10);}
3637item.img.css('max-height',mfp.wH-decr-mfp.st.image.verticalMargin);}},_onImageHasSize:function(item){if(item.img){item.hasSize=true;if(_imgInterval){clearInterval(_imgInterval);}
3638item.isCheckingImgSize=false;_mfpTrigger('ImageHasSize',item);if(item.imgHidden){if(mfp.content)
3639mfp.content.removeClass('mfp-loading');item.imgHidden=false;}}},findImageSize:function(item){var counter=0,img=item.img[0],mfpSetInterval=function(delay){if(_imgInterval){clearInterval(_imgInterval);}
3640_imgInterval=setInterval(function(){if(img.naturalWidth>0){mfp._onImageHasSize(item);return;}
3641if(counter>200){clearInterval(_imgInterval);}
3642counter++;if(counter===3){mfpSetInterval(10);}else if(counter===40){mfpSetInterval(50);}else if(counter===100){mfpSetInterval(500);}},delay);};mfpSetInterval(1);},getImage:function(item,template){var guard=0,onLoadComplete=function(){if(item){if(item.img[0].complete){item.img.off('.mfploader');if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus('ready');}
3643item.hasSize=true;item.loaded=true;_mfpTrigger('ImageLoadComplete');}
3644else{guard++;if(guard<200){setTimeout(onLoadComplete,100);}else{onLoadError();}}}},onLoadError=function(){if(item){item.img.off('.mfploader');if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus('error',imgSt.tError.replace('%url%',item.src));}
3645item.hasSize=true;item.loaded=true;item.loadError=true;}},imgSt=mfp.st.image;var el=template.find('.mfp-img');if(el.length){var img=document.createElement('img');img.className='mfp-img';item.img=$(img).on('load.mfploader',onLoadComplete).on('error.mfploader',onLoadError);img.src=item.src;if(el.is('img')){item.img=item.img.clone();}
3646img=item.img[0];if(img.naturalWidth>0){item.hasSize=true;}else if(!img.width){item.hasSize=false;}}
3647mfp._parseMarkup(template,{title:_getTitle(item),img_replaceWith:item.img},item);mfp.resizeImage();if(item.hasSize){if(_imgInterval)clearInterval(_imgInterval);if(item.loadError){template.addClass('mfp-loading');mfp.updateStatus('error',imgSt.tError.replace('%url%',item.src));}else{template.removeClass('mfp-loading');mfp.updateStatus('ready');}
3648return template;}
3649mfp.updateStatus('loading');item.loading=true;if(!item.hasSize){item.imgHidden=true;template.addClass('mfp-loading');mfp.findImageSize(item);}
3650return template;}}});var hasMozTransform,getHasMozTransform=function(){if(hasMozTransform===undefined){hasMozTransform=document.createElement('p').style.MozTransform!==undefined;}
3651return hasMozTransform;};$.magnificPopup.registerModule('zoom',{options:{enabled:false,easing:'ease-in-out',duration:300,opener:function(element){return element.is('img')?element:element.find('img');}},proto:{initZoom:function(){var zoomSt=mfp.st.zoom,ns='.zoom',image;if(!zoomSt.enabled||!mfp.supportsTransition){return;}
3652var duration=zoomSt.duration,getElToAnimate=function(image){var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),transition='all '+(zoomSt.duration/1000)+'s '+zoomSt.easing,cssObj={position:'fixed',zIndex:9999,left:0,top:0,'-webkit-backface-visibility':'hidden'},t='transition';cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition;newImg.css(cssObj);return newImg;},showMainContent=function(){mfp.content.css('visibility','visible');},openTimeout,animatedImg;_mfpOn('BuildControls'+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.content.css('visibility','hidden');image=mfp._getItemToZoom();if(!image){showMainContent();return;}
3653animatedImg=getElToAnimate(image);animatedImg.css(mfp._getOffset());mfp.wrap.append(animatedImg);openTimeout=setTimeout(function(){animatedImg.css(mfp._getOffset(true));openTimeout=setTimeout(function(){showMainContent();setTimeout(function(){animatedImg.remove();image=animatedImg=null;_mfpTrigger('ZoomAnimationEnded');},16);},duration);},16);}});_mfpOn(BEFORE_CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.st.removalDelay=duration;if(!image){image=mfp._getItemToZoom();if(!image){return;}
3654animatedImg=getElToAnimate(image);}
3655animatedImg.css(mfp._getOffset(true));mfp.wrap.append(animatedImg);mfp.content.css('visibility','hidden');setTimeout(function(){animatedImg.css(mfp._getOffset());},16);}});_mfpOn(CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){showMainContent();if(animatedImg){animatedImg.remove();}
3656image=null;}});},_allowZoom:function(){return mfp.currItem.type==='image';},_getItemToZoom:function(){if(mfp.currItem.hasSize){return mfp.currItem.img;}else{return false;}},_getOffset:function(isLarge){var el;if(isLarge){el=mfp.currItem.img;}else{el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem);}
3657var offset=el.offset();var paddingTop=parseInt(el.css('padding-top'),10);var paddingBottom=parseInt(el.css('padding-bottom'),10);offset.top-=($(window).scrollTop()-paddingTop);
3657var obj={width:el.width(),height:(_isJQ?el.innerHeight():el[0].offsetHeight)-paddingBottom-paddingTop};if(getHasMozTransform()){obj['-moz-transform']=obj['transform']='translate('+offset.left+'px,'+offset.top+'px)';}else{obj.left=offset.left;obj.top=offset.top;}
3658return obj;}}});var IFRAME_NS='iframe',_emptyPage='//about:blank',_fixIframeBugs=function(isShowing){if(mfp.currTemplate[IFRAME_NS]){var el=mfp.currTemplate[IFRAME_NS].find('iframe');if(el.length){if(!isShowing){el[0].src=_emptyPage;}
3659if(mfp.isIE8){el.css('display',isShowing?'block':'none');}}}};$.magnificPopup.registerModule(IFRAME_NS,{options:{markup:'<div class="mfp-iframe-scaler">'+'<div class="mfp-close"></div>'+'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+'</div>',srcAction:'iframe_src',titleSrc:'title',patterns:{youtube:{index:'youtube.com',id:'v=',src:'//www.youtube.com/embed/%id%?autoplay=1'},vimeo:{index:'vimeo.com/',id:'/',src:'//player.vimeo.com/video/%id%?autoplay=1'},gmaps:{index:'//maps.google.',src:'%id%&output=embed'}}},proto:{initIframe:function(){mfp.types.push(IFRAME_NS);_mfpOn('BeforeChange',function(e,prevType,newType){if(prevType!==newType){if(prevType===IFRAME_NS){_fixIframeBugs();}else if(newType===IFRAME_NS){_fixIframeBugs(true);}}});_mfpOn(CLOSE_EVENT+'.'+IFRAME_NS,function(){_fixIframeBugs();});},getIframe:function(item,template){var embedSrc=item.src;var iframeSt=mfp.st.iframe;$.each(iframeSt.patterns,function(){var currentPatternIndex=-1;if(typeof this.index==='string'){currentPatternIndex=embedSrc.indexOf(this.index);}else{currentPatternIndex=this.index.call(this,embedSrc);}
3660if(currentPatternIndex>-1){if(this.id){if(typeof this.id==='string'){embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length,embedSrc.length);}else{embedSrc=this.id.call(this,embedSrc);}}
3661embedSrc=this.src.replace('%id%',embedSrc);mfp.contentContainer.addClass(this.className);return false;}});var dataObj={};if(iframeSt.srcAction){dataObj[iframeSt.srcAction]=embedSrc;}
3662if(iframeSt.titleSrc){if($.isFunction(iframeSt.titleSrc)){dataObj['title']=iframeSt.titleSrc.call(mfp,item);}else{dataObj['title']=iframeSt.titleSrc;}
3663dataObj[iframeSt.srcAction]=embedSrc;}
3664mfp._parseMarkup(template,dataObj,item);mfp.updateStatus('ready');return template;}}});var _getLoopedId=function(index){var numSlides=mfp.items.length;if(index>numSlides-1){return index-numSlides;}else if(index<0){return numSlides+index;}
3665return index;},_replaceCurrTotal=function(text,curr,total){return text.replace(/%curr%/gi,curr+1).replace(/%total%/gi,total);};$.magnificPopup.registerModule('gallery',{options:{enabled:false,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:true,arrows:true,tPrev:'Previous (Left arrow key)',tNext:'Next (Right arrow key)',tCounter:'%curr% of %total%'},proto:{initGallery:function(){var gSt=mfp.st.gallery,ns='.mfp-gallery',supportsFastClick=Boolean($.fn.mfpFastClick);mfp.direction=true;if(!gSt||!gSt.enabled)return false;_wrapClasses+=' mfp-gallery';_mfpOn(OPEN_EVENT+ns,function(){if(gSt.navigateByImgClick){mfp.wrap.on('click'+ns,'.mfp-img',function(){if(mfp.items.length>1){mfp.next();return false;}});}
3666_document.on('keydown'+ns,function(e){if(e.keyCode===37){mfp.prev();}else if(e.keyCode===39){mfp.next();}});});_mfpOn('UpdateStatus'+ns,function(e,data){if(data.text){data.text=_replaceCurrTotal(data.text,mfp.currItem.index,mfp.items.length);}});_mfpOn(MARKUP_PARSE_EVENT+ns,function(e,element,values,item){var l=mfp.items.length;values.counter=l>1?_replaceCurrTotal(gSt.tCounter,item.index,l):'';});_mfpOn('BuildControls'+ns,function(){if(mfp.items.length>1&&gSt.arrows&&!mfp.arrowLeft){var markup=gSt.arrowMarkup,arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi,gSt.tPrev).replace(/%dir%/gi,'left')).addClass(PREVENT_CLOSE_CLASS),arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi,gSt.tNext).replace(/%dir%/gi,'right')).addClass(PREVENT_CLOSE_CLASS);var eName=supportsFastClick?'mfpFastClick':'click';arrowLeft[eName](function(){mfp.prev();});arrowRight[eName](function(){mfp.next();});if(mfp.isIE7){_getEl('b',arrowLeft[0],false,true);_getEl('a',arrowLeft[0],false,true);_getEl('b',arrowRight[0],false,true);_getEl('a',arrowRight[0],false,true);}
3667mfp.container.append(arrowLeft.add(arrowRight));}});_mfpOn(CHANGE_EVENT+ns,function(){if(mfp._preloadTimeout)clearTimeout(mfp._preloadTimeout);mfp._preloadTimeout=setTimeout(function(){mfp.preloadNearbyImages();mfp._preloadTimeout=null;},16);});_mfpOn(CLOSE_EVENT+ns,function(){_document.off(ns);mfp.wrap.off('click'+ns);if(mfp.arrowLeft&&supportsFastClick){mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();}
3668mfp.arrowRight=mfp.arrowLeft=null;});},next:function(){mfp.direction=true;mfp.index=_getLoopedId(mfp.index+1);mfp.updateItemHTML();},prev:function(){mfp.direction=false;mfp.index=_getLoopedId(mfp.index-1);mfp.updateItemHTML();},goTo:function(newIndex){mfp.direction=(newIndex>
3668=mfp.index);mfp.index=newIndex;mfp.updateItemHTML();},preloadNearbyImages:function(){var p=mfp.st.gallery.preload,preloadBefore=Math.min(p[0],mfp.items.length),preloadAfter=Math.min(p[1],mfp.items.length),i;for(i=1;i<=(mfp.direction?preloadAfter:preloadBefore);i++){mfp._preloadItem(mfp.index+i);}
3669for(i=1;i<=(mfp.direction?preloadBefore:preloadAfter);i++){mfp._preloadItem(mfp.index-i);}},_preloadItem:function(index){index=_getLoopedId(index);if(mfp.items[index].preloaded){return;}
3670var item=mfp.items[index];if(!item.parsed){item=mfp.parseEl(index);}
3671_mfpTrigger('LazyLoad',item);if(item.type==='image'){item.img=$('<img class="mfp-img" />').on('load.mfploader',function(){item.hasSize=true;}).on('error.mfploader',function(){item.hasSize=true;item.loadError=true;_mfpTrigger('LazyLoadError',item);}).attr('src',item.src);}
3672item.preloaded=true;}}});var RETINA_NS='retina';$.magnificPopup.registerModule(RETINA_NS,{options:{replaceSrc:function(item){return item.src.replace(/\.\w+$/,function(m){return'@2x'+m;});},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var st=mfp.st.retina,ratio=st.ratio;ratio=!isNaN(ratio)?ratio:ratio();if(ratio>1){_mfpOn('ImageHasSize'+'.'+RETINA_NS,function(e,item){item.img.css({'max-width':item.img[0].naturalWidth/ratio,'width':'100%'});});_mfpOn('ElementParse'+'.'+RETINA_NS,function(e,item){item.src=st.replaceSrc(item,ratio);});}}}}});(function(){var ghostClickDelay=1000,supportsTouch='ontouchstart'in window,unbindTouchMove=function(){_window.off('touchmove'+ns+' touchend'+ns);},eName='mfpFastClick',ns='.'+eName;$.fn.mfpFastClick=function(callback){return $(this).each(function(){var elem=$(this),lock;if(supportsTouch){var timeout,startX,startY,pointerMoved,point,numPointers;elem.on('touchstart'+ns,function(e){pointerMoved=false;numPointers=1;point=e.originalEvent?e.originalEvent.touches[0]:e.touches[0];startX=point.clientX;startY=point.clientY;_window.on('touchmove'+ns,function(e){point=e.originalEvent?e.originalEvent.touches:e.touches;numPointers=point.length;point=point[0];if(Math.abs(point.clientX-startX)>10||Math.abs(point.clientY-startY)>10){pointerMoved=true;unbindTouchMove();}}).on('touchend'+ns,function(e){unbindTouchMove();if(pointerMoved||numPointers>1){return;}
3673lock=true;e.preventDefault();clearTimeout(timeout);timeout=setTimeout(function(){lock=false;},ghostClickDelay);callback();});});}
3674elem.on('click'+ns,function(){if(!lock){callback();}});});};$.fn.destroyMfpFastClick=function(){$(this).off('touchstart'+ns+' click'+ns);if(supportsTouch)_window.off('touchmove'+ns+' touchend'+ns);};})();_checkInstance();})(window.jQuery||window.Zepto);(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'&&typeof require==='function'){factory(require('jquery'));}else{factory(jQuery);}}(function($){'use strict';var
3675utils=(function(){return{escapeRegExChars:function(value){return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");},createNode:function(containerClass){var div=document.createElement('div');div.className=containerClass;div.style.position='absolute';div.style.display='none';return div;}};}()),keys={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};function Autocomplete(el,options){var noop=function(){},that=this,defaults={ajaxSettings:{},autoSelectFirst:false,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:'auto',minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:Autocomplete.formatResult,delimiter:null,zIndex:9999,type:'GET',noCache:false,onSearchStart:noop,onSearchComplete:noop,onSearchError:noop,preserveInput:false,containerClass:'autocomplete-suggestions',tabDisabled:false,dataType:'text',currentRequest:null,triggerSelectOnValidInput:true,preventBadQueries:true,lookupFilter:function(suggestion,originalQuery,queryLowerCase){return suggestion.value.toLowerCase().indexOf(queryLowerCase)!==-1;},paramName:'query',transformResult:function(response){return typeof response==='string'?$.parseJSON(response):response;},showNoSuggestionNotice:false,noSuggestionNotice:'No results',orientation:'bottom',forceFixPosition:false};that.element=el;that.el=$(el);that.suggestions=[];that.badQueries=[];
3675that.selectedIndex=-1;that.currentValue=that.element.value;that.intervalId=0;that.cachedResponse={};that.onChangeInterval=null;that.onChange=null;that.isLocal=false;that.suggestionsContainer=null;that.noSuggestionsContainer=null;that.options=$.extend({},defaults,options);that.classes={selected:'autocomplete-selected',suggestion:'autocomplete-suggestion'};that.hint=null;that.hintValue='';that.selection=null;that.initialize();that.setOptions(options);}
3676Autocomplete.utils=utils;$.Autocomplete=Autocomplete;Autocomplete.formatResult=function(suggestion,currentValue){var pattern='('+utils.escapeRegExChars(currentValue)+')';return suggestion.value.replace(new RegExp(pattern,'gi'),'<strong>$1<\/strong>').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/&lt;(\/?strong)&gt;/g,'<$1>');};Autocomplete.prototype={killerFn:null,initialize:function(){var that=this,suggestionSelector='.'+that.classes.suggestion,selected=that.classes.selected,options=that.options,container;that.element.setAttribute('autocomplete','off');that.killerFn=function(e){if($(e.target).closest('.'+that.options.containerClass).length===0){that.killSuggestions();that.disableKillerFn();}};that.noSuggestionsContainer=$('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0);that.suggestionsContainer=Autocomplete.utils.createNode(options.containerClass);container=$(that.suggestionsContainer);container.appendTo(options.appendTo);if(options.width!=='auto'){container.width(options.width);}
3677container.on('mouseover.autocomplete',suggestionSelector,function(){that.activate($(this).data('index'));});container.on('mouseout.autocomplete',function(){that.selectedIndex=-1;container.children('.'+selected).removeClass(selected);});container.on('click.autocomplete',suggestionSelector,function(){that.select($(this).data('index'));});that.fixPositionCapture=function(){if(that.visible){that.fixPosition();}};$(window).on('resize.autocomplete',that.fixPositionCapture);that.el.on('keydown.autocomplete',function(e){that.onKeyPress(e);});that.el.on('keyup.autocomplete',function(e){that.onKeyUp(e);});that.el.on('blur.autocomplete',function(){that.onBlur();});that.el.on('focus.autocomplete',function(){that.onFocus();});that.el.on('change.autocomplete',function(e){that.onKeyUp(e);});that.el.on('input.autocomplete',function(e){that.onKeyUp(e);});},onFocus:function(){var that=this;that.fixPosition();if(that.options.minChars===0&&that.el.val().length===0){that.onValueChange();}},onBlur:function(){this.enableKillerFn();},abortAjax:function(){var that=this;if(that.currentRequest){that.currentRequest.abort();that.currentRequest=null;}},setOptions:function(suppliedOptions){var that=this,options=that.options;$.extend(options,suppliedOptions);that.isLocal=$.isArray(options.lookup);if(that.isLocal){options.lookup=that.verifySuggestionsFormat(options.lookup);}
3678options.orientation=that.validateOrientation(options.orientation,'bottom');$(that.suggestionsContainer).css({'max-height':options.maxHeight+'px','width':options.width+'px','z-index':options.zIndex});},clearCache:function(){this.cachedResponse={};this.badQueries=[];},clear:function(){this.clearCache();this.currentValue='';this.suggestions=[];},disable:function(){var that=this;that.disabled=true;clearInterval(that.onChangeInterval);that.abortAjax();},enable:function(){this.disabled=false;},fixPosition:function(){var that=this,$container=$(that.suggestionsContainer),containerParent=$container.parent().get(0);if(containerParent!==document.body&&!that.options.forceFixPosition){return;}
3679var orientation=that.options.orientation,containerHeight=$container.outerHeight(),height=that.el.outerHeight(),offset=that.el.offset(),styles={'top':offset.top,'left':offset.left};if(orientation==='auto'){var viewPortHeight=$(window).height(),scrollTop=$(window).scrollTop(),topOverflow=-scrollTop+offset.top-containerHeight,bottomOverflow=scrollTop+viewPortHeight-(offset.top+height+containerHeight);orientation=(Math.max(topOverflow,bottomOverflow)===topOverflow)?'top':'bottom';}
3680if(orientation==='top'){styles.top+=-containerHeight;}else{styles.top+=height;}
3681if(containerParent!==document.body){var opacity=$container.css('opacity'),parentOffsetDiff;if(!that.visible){$container.css('opacity',0).show();}
3682parentOffsetDiff=$container.offsetParent().offset();styles.top-=parentOffsetDiff.top;styles.left-=parentOffsetDiff.left;if(!that.visible){$container.css('opacity',opacity).hide();}}
3683if(that.options.width==='auto'){styles.width=(that.el.outerWidth()-2)+'px';}
3684$container.css(styles);},enableKillerFn:function(){var that=this;$(document).on('click.autocomplete',that.killerFn);},disableKillerFn:function(){var that=this;$(document).off('click.autocomplete',that.killerFn);},killSuggestions:function(){var that=this;
3684that.stopKillSuggestions();that.intervalId=window.setInterval(function(){if(that.visible){that.el.val(that.currentValue);that.hide();}
3685that.stopKillSuggestions();},50);},stopKillSuggestions:function(){window.clearInterval(this.intervalId);},isCursorAtEnd:function(){var that=this,valLength=that.el.val().length,selectionStart=that.element.selectionStart,range;if(typeof selectionStart==='number'){return selectionStart===valLength;}
3686if(document.selection){range=document.selection.createRange();range.moveStart('character',-valLength);return valLength===range.text.length;}
3687return true;},onKeyPress:function(e){var that=this;if(!that.disabled&&!that.visible&&e.which===keys.DOWN&&that.currentValue){that.suggest();return;}
3688if(that.disabled||!that.visible){return;}
3689switch(e.which){case keys.ESC:that.el.val(that.currentValue);that.hide();break;case keys.RIGHT:if(that.hint&&that.options.onHint&&that.isCursorAtEnd()){that.selectHint();break;}
3690return;case keys.TAB:if(that.hint&&that.options.onHint){that.selectHint();return;}
3691if(that.selectedIndex===-1){that.hide();return;}
3692that.select(that.selectedIndex);if(that.options.tabDisabled===false){return;}
3693break;case keys.RETURN:if(that.selectedIndex===-1){that.hide();return;}
3694that.select(that.selectedIndex);break;case keys.UP:that.moveUp();break;case keys.DOWN:that.moveDown();break;default:return;}
3695e.stopImmediatePropagation();e.preventDefault();},onKeyUp:function(e){var that=this;if(that.disabled){return;}
3696switch(e.which){case keys.UP:case keys.DOWN:return;}
3697clearInterval(that.onChangeInterval);if(that.currentValue!==that.el.val()){that.findBestHint();if(that.options.deferRequestBy>0){that.onChangeInterval=setInterval(function(){that.onValueChange();},that.options.deferRequestBy);}else{that.onValueChange();}}},onValueChange:function(){var that=this,options=that.options,value=that.el.val(),query=that.getQuery(value);
3697if(that.selection&&that.currentValue!==query){that.selection=null;(options.onInvalidateSelection||$.noop).call(that.element);}
3698clearInterval(that.onChangeInterval);that.currentValue=value;that.selectedIndex=-1;if(options.triggerSelectOnValidInput&&that.isExactMatch(query)){that.select(0);return;}
3699if(query.length<options.minChars){that.hide();}else{that.getSuggestions(query);}},isExactMatch:function(query){var suggestions=this.suggestions;return(suggestions.length===1&&suggestions[0].value.toLowerCase()===query.toLowerCase());},getQuery:function(value){var delimiter=this.options.delimiter,parts;if(!delimiter){return value;}
3700parts=value.split(delimiter);return $.trim(parts[parts.length-1]);},getSuggestionsLocal:function(query){var that=this,options=that.options,queryLowerCase=query.toLowerCase(),filter=options.lookupFilter,limit=parseInt(options.lookupLimit,10),data;data={suggestions:$.grep(options.lookup,function(suggestion){return filter(suggestion,query,queryLowerCase);})};if(limit&&data.suggestions.length>limit){data.suggestions=data.suggestions.slice(0,limit);}
3701return data;},getSuggestions:function(q){var response,that=this,options=that.options,serviceUrl=options.serviceUrl,params,cacheKey,ajaxSettings;options.params[options.paramName]=q;params=options.ignoreParams?null:options.params;if(options.onSearchStart.call(that.element,options.params)===false){return;}
3702if($.isFunction(options.lookup)){options.lookup(q,function(data){that.suggestions=data.suggestions;that.suggest();options.onSearchComplete.call(that.element,q,data.suggestions);});return;}
3703if(that.isLocal){response=that.getSuggestionsLocal(q);}else{if($.isFunction(serviceUrl)){serviceUrl=serviceUrl.call(that.element,q);}
3704cacheKey=serviceUrl+'?'+$.param(params||{});response=that.cachedResponse[cacheKey];}
3705if(response&&$.isArray(response.suggestions)){that.suggestions=response.suggestions;that.suggest();options.onSearchComplete.call(that.element,q,response.suggestions);}else if(!that.isBadQuery(q)){that.abortAjax();ajaxSettings={url:serviceUrl,data:params,type:options.type,dataType:options.dataType};$.extend(ajaxSettings,options.ajaxSettings);that.currentRequest=$.ajax(ajaxSettings).done(function(data){var result;that.currentRequest=null;result=options.transformResult(data,q);that.processResponse(result,q,cacheKey);options.onSearchComplete.call(that.element,q,result.suggestions);}).fail(function(jqXHR,textStatus,errorThrown){options.onSearchError.call(that.element,q,jqXHR,textStatus,errorThrown);});}else{options.onSearchComplete.call(that.element,q,[]);}},isBadQuery:function(q){if(!this.options.preventBadQueries){return false;}
3706var badQueries=this.badQueries,i=badQueries.length;while(i--){if(q.indexOf(badQueries[i])===0){return true;}}
3707return false;},hide:function(){var that=this,container=$(that.suggestionsContainer);if($.isFunction(that.options.onHide)&&that.visible){that.options.onHide.call(that.element,container);}
3708that.visible=false;that.selectedIndex=-1;clearInterval(that.onChangeInterval);$(that.suggestionsContainer).hide();that.signalHint(null);},suggest:function(){if(this.suggestions.length===0){if(this.options.showNoSuggestionNotice){this.noSuggestions();}else{this.hide();}
3709return;}
3710var that=this,options=that.options,groupBy=options.groupBy,formatResult=options.formatResult,value=that.getQuery(that.currentValue),className=that.classes.suggestion,classSelected=that.classes.selected,container=$(that.suggestionsContainer),noSuggestionsContainer=$(that.noSuggestionsContainer),beforeRender=options.beforeRender,html='',category,formatGroup=function(suggestion,index){var currentCategory=suggestion.data[groupBy];if(category===currentCategory){return'';}
3711category=currentCategory;return'<div class="autocomplete-group"><strong>'+category+'</strong></div>';};if(options.triggerSelectOnValidInput&&that.isExactMatch(value)){that.select(0);return;}
3712$.each(that.suggestions,function(i,suggestion){if(groupBy){html+=formatGroup(suggestion,value,i);}
3713html+='<div class="'+className+'" data-index="'+i+'">'+formatResult(suggestion,value)+'</div>';});this.adjustContainerWidth();noSuggestionsContainer.detach();container.html(html);if($.isFunction(beforeRender)){beforeRender.call(that.element,container);}
3714that.fixPosition();container.show();if(options.autoSelectFirst){that.selectedIndex=0;container.scrollTop(0);container.children('.'+className).first().addClass(classSelected);}
3715that.visible=true;that.findBestHint();},noSuggestions:function(){var that=this,container=$(that.suggestionsContainer),noSuggestionsContainer=$(that.noSuggestionsContainer);this.adjustContainerWidth();noSuggestionsContainer.detach();container.empty();container.append(noSuggestionsContainer);that.fixPosition();container.show();that.visible=true;},adjustContainerWidth:function(){var that=this,options=that.options,width,container=$(that.suggestionsContainer);if(options.width==='auto'){width=that.el.outerWidth()-2;container.width(width>0?width:300);}},findBestHint:function(){var that=this,value=that.el.val().toLowerCase(),bestMatch=null;if(!value){return;}
3716$.each(that.suggestions,function(i,suggestion){var foundMatch=suggestion.value.toLowerCase().indexOf(value)===0;if(foundMatch){bestMatch=suggestion;}
3717return!foundMatch;});that.signalHint(bestMatch);},signalHint:function(suggestion){var hintValue='',that=this;if(suggestion){hintValue=that.currentValue+suggestion.value.substr(that.currentValue.length);}
3718if(that.hintValue!==hintValue){that.hintValue=hintValue;that.hint=suggestion;(this.options.onHint||$.noop)(hintValue);}},verifySuggestionsFormat:function(suggestions){if(suggestions.length&&typeof suggestions[0]==='string'){return $.map(suggestions,function(value){return{value:value,data:null};});}
3719return suggestions;},validateOrientation:function(orientation,fallback){orientation=$.trim(orientation||'').toLowerCase();if($.inArray(orientation,['auto','bottom','top'])===-1){orientation=fallback;}
3720return orientation;},processResponse:function(result,originalQuery,cacheKey){var that=this,options=that.options;result.suggestions=that.verifySuggestionsFormat(result.suggestions);if(!options.noCache){that.cachedResponse[cacheKey]=result;if(options.preventBadQueries&&result.suggestions.length===0){that.badQueries.push(originalQuery);}}
3721if(originalQuery!==that.getQuery(that.currentValue)){return;}
3722that.suggestions=result.suggestions;that.suggest();},activate:function(index){var that=this,activeItem,selected=that.classes.selected,container=$(that.suggestionsContainer),children=container.find('.'+that.classes.suggestion);container.find('.'+selected).removeClass(selected);that.selectedIndex=index;if(that.selectedIndex!==-1&&children.length>that.selectedIndex){activeItem=children.get(that.selectedIndex);$(activeItem).addClass(selected);return activeItem;}
3723return null;},selectHint:function(){var that=this,i=$.inArray(that.hint,that.suggestions);that.select(i);},select:function(i){var that=this;that.hide();that.onSelect(i);},moveUp:function(){var that=this;if(that.selectedIndex===-1){return;}
3724if(that.selectedIndex===0){$(that.suggestionsContainer).children().first().removeClass(that.classes.selected);that.selectedIndex=-1;that.el.val(that.currentValue);that.findBestHint();return;}
3725that.adjustScroll(that.selectedIndex-1);},moveDown:function(){var that=this;if(that.selectedIndex===(that.suggestions.length-1)){return;}
3726that.adjustScroll(that.selectedIndex+1);},adjustScroll:function(index){var that=this,activeItem=that.activate(index);if(!activeItem){return;}
3727var offsetTop,upperBound,lowerBound,heightDelta=$(activeItem).outerHeight();offsetTop=activeItem.offsetTop;upperBound=$(that.suggestionsContainer).scrollTop();lowerBound=upperBound+that.options.maxHeight-heightDelta;if(offsetTop<upperBound){$(that.suggestionsContainer).scrollTop(offsetTop);}else if(offsetTop>lowerBound){$(that.suggestionsContainer).scrollTop(offsetTop-that.options.maxHeight+heightDelta);}
3728if(!that.options.preserveInput){that.el.val(that.getValue(that.suggestions[index].value));}
3729that.signalHint(null);},onSelect:function(index){var that=this,onSelectCallback=that.options.onSelect,suggestion=that.suggestions[index];that.currentValue=that.getValue(suggestion.value);if(that.currentValue!==that.el.val()&&!that.options.preserveInput){that.el.val(that.currentValue);}
3730that.signalHint(null);that.suggestions=[];that.selection=suggestion;if($.isFunction(onSelectCallback)){onSelectCallback.call(that.element,suggestion);}},getValue:function(value){var that=this,delimiter=that.options.delimiter,currentValue,parts;if(!delimiter){return value;}
3731currentValue=that.currentValue;parts=currentValue.split(delimiter);if(parts.length===1){return value;}
3732return currentValue.substr(0,currentValue.length-parts[parts.length-1].length)+value;},dispose:function(){var that=this;that.el.off('.autocomplete').removeData('autocomplete');that.disableKillerFn();$(window).off('resize.autocomplete',that.fixPositionCapture);$(that.suggestionsContainer).remove();}};$.fn.autocomplete=$.fn.devbridgeAutocomplete=function(options,args){var dataKey='autocomplete';if(arguments.length===0){return this.first().data(dataKey);}
3733return this.each(function(){var inputElement=$(this),instance=inputElement.data(dataKey);if(typeof options==='string'){if(instance&&typeof instance[options]==='function'){instance[options](args);}}else{if(instance&&instance.dispose){instance.dispose();}
3734instance=new Autocomplete(this,options);inputElement.data(dataKey,instance);}});};}));(function($){$.datepicker.regional['fr']={closeText:'Fermer',prevText:'Précédent',nextText:'Suivant',currentText:'Aujourd hui',monthNames:['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','N
3734ovembre','Décembre'],monthNamesShort:['Janv.','Févr.','Mars','Avril','Mai','Juin','Juil.','Août','Sept.','Oct.','Nov.','Déc.'],dayNames:['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],dayNamesShort:['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],dayNamesMin:['D','L','M','M','J','V','S'],weekHeader:'Sem.',dateFormat:'dd/mm/yy',firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:''};$.datepicker.setDefaults($.datepicker.regional['fr']);}(jQuery));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","../jquery.validate-1.13.1"],factory);}else{factory(jQuery);}}(function($){$.extend($.validator.messages,{required:"Ce champ est obligatoire.",remote:"Veuillez corriger ce champ.",email:"Veuillez fournir une adresse électronique valide.",url:"Veuillez fournir une adresse URL valide.",date:"Veuillez fournir une date valide.",dateISO:"Veuillez fournir une date valide (ISO).",number:"Veuillez fournir un numéro valide.",digits:"Veuillez fournir seulement des chiffres.",creditcard:"Veuillez fournir un numéro de carte de crédit valide.",equalTo:"Veuillez fournir encore la même valeur.",extension:"Veuillez fournir une valeur avec une extension valide.",maxlength:$.validator.format("Veuillez fournir au plus {0} caractères."),minlength:$.validator.format("Veuillez fournir au moins {0} caractères."),rangelength:$.validator.format("Veuillez fournir une valeur qui contient entre {0} et {1} caractères."),range:$.validator.format("Veuillez fournir une valeur entre {0} et {1}."),max:$.validator.format("Veuillez fournir une valeur inférieure ou égale à {0}."),min:$.validator.format("Veuillez fournir une valeur supérieure ou égale à {0}."),maxWords:$.validator.format("Veuillez fournir au plus {0} mots."),minWords:$.validator.format("Veuillez fournir au moins {0} mots."),rangeWords:$.validator.format("Veuillez fournir entre {0} et {1} mots."),letterswithbasicpunc:"Veuillez fournir seulement des lettres et des signes de ponctuation.",alphanumeric:"Veuillez fournir seulement des lettres, nombres, espaces et soulignages.",lettersonly:"Veuillez fournir seulement des lettres.",nowhitespace:"Veuillez ne pas inscrire d'espaces blancs.",ziprange:"Veuillez fournir un code postal entre 902xx-xxxx et 905-xx-xxxx.",integer:"Veuillez fournir un nombre non décimal qui est positif ou négatif.",vinUS:"Veuillez fournir un numéro d'identification du véhicule (VIN).",dateITA:"Veuillez fournir une date valide.",time:"Veuillez fournir une heure valide entre 00:00 et 23:59.",phoneUS:"Veuillez fournir un numéro de téléphone valide.",phoneUK:"Veuillez fournir un numéro de téléphone valide.",mobileUK:"Veuillez fournir un numéro de téléphone mobile valide.",strippedminlength:$.validator.format("Veuillez fournir au moins {0} caractères."),email2:"Veuillez fournir une adresse électronique valide.",url2:"Veuillez fournir une adresse URL valide.",creditcardtypes:"Veuillez fournir un numéro de carte de crédit valide.",ipv4:"Veuillez fournir une adresse IP v4 valide.",ipv6:"Veuillez fournir une adresse IP v6 valide.",require_from_group:$.validator.format("Veuillez fournir au moins {0} de ces champs."),nifES:"Veuillez fournir un numéro NIF valide.",nieES:"Veuillez fournir un numéro NIE valide.",cifES:"Veuillez fournir un numéro CIF valide.",postalCodeCA:"Veuillez fournir un code postal valide."});}));(function($){$.extend($.fn.dataTable.defaults.oLanguage,{"sProcessing":"Traitement en cours&hellip;","sSearch":"Filtrer","sLengthMenu":"Afficher _MENU_ éléments","sInfo":"Éléments _START_ à _END_ sur _TOTAL_","sInfoEmpty":"","sInfoFiltered":"(filtré de _MAX_ éléments au total)","sInfoPostFix":"&nbsp;","sLoadingRecords":"Chargement en cours&hellip;","sZeroRecords":"Aucun élément à afficher","sEmptyTable":"Aucune donnée disponible dans le tableau","oPaginate":{"sFirst":"Premier","sPrevious":"Précédent","sNext":"Suivant","sLast":"Dernier"},"oAria":{"sSortAscending":": activer pour trier la colonne par ordre croissant","sSortDescending":": activer pour trier la colonne par ordre décroissant"}});})(jQuery);LOCALE_BO={supprimer:"Supprimer",ajouter:"Ajouter",valider:"Valider",archiver:"Archiver",consulter:"Consulter",modifier:"Modifier",nouvelleFenetre:"(Nouvelle fenêtre)",selectionner:"Sélectionner",confirmer:"Confirmer",fermer:"Non",erreur:"Erreur",ok:"Oui",confirmQuitterPage:"Êtes-vous sûr de vouloir quitter cette page&nbsp;?",confirmSupprFiche:"Êtes-vous sûr de vouloir supprimer cette fiche&nbsp;?",selectionnerUnELement:"Veuillez sélectionner au moins un élément avant de lancer une action.",confirmSupprFiches:"Êtes-vous sûr de vouloir supprimer ces fiches&nbsp;?",confirmSupprUtilisateur:"Êtes-vous sûr de vouloir supprimer cet utilisateur&nbsp;?",confirmSupprUtilisateurs:"Êtes-vous sûr de vouloir supprimer ces utilisateurs&nbsp;?",confirmSupprRubrique:"Êtes-vous certain de vouloir supprimer la rubrique &quot;{0}&quot; ainsi que son arborescence et tous ses contenus ? Attention, seules les fiches et leurs plugins vont être supprimés.<br/>Cette action est définitive.",confirmArchFiches:"Êtes-vous sûr de vouloir archiver ces fiches&nbsp;?<br>(Seules les fiches en ligne seront archivées.)",lExtension:"L'extension",leModule:"Le module",patienter:"<br/>Merci de bien vouloir patienter&hellip;",voirEnLigne:"Voir en ligne",actions:"Actions",erreurRecherche:"Une erreur s'est produite lors du calcul de vos résultats de recherche.",erreurActionMasse:"Une erreur s'est produite lors du traitement de votre action.",confirmationActionMasseSuppr:"Les fiches sélectionnées ont bien été supprimées.",confirmationActionMasseArchi:"Les fiches sélectionnées ont bien été archivées.",confirmationActionMasseUtilisateur:"Les utilisateurs sélectionnés ont bien été supprimés.",activer:"Activer",desactiver:"Désactiver",enCoursSuppression:"est en cours de suppression.",enCoursRechargement:"Le rechargement est en cours.",enSuccesSuppression:"La suppression a bien été effectuée",enErreurSuppression:"Une erreur est survenue lors de la suppression",enCoursdActivation:"est en cours d'activation.",enSuccesActivation:"L'activation a bien été effectuée",enErreurActivation:"Une erreur est survenue lors de l'activation",enCoursdeDesactivation:"est en cours de désactivation.",enSuccesDesactivation:"La désactivation a bien été effectuée",enErreurDesactivation:"Une erreur est survenue lors de la désactivation",enSuccesRechargement:"Le rechargement a bien été effectué",enErreurRechargement:"Une erreur est survenue lors du rechargement",enSucces:"Succès",enErreur:"Erreur",validationMessages:{ksupDate:"Veuillez fournir une date valide",ksupPhone:"Veuillez fournir un numéro de téléphone valide",pwdVerdicts:["Faible","Normal","Moyen","Fort","Très fort"],pwdErrorMessages:{password_too_short:"Trop court",email_as_password:"N'utilisez pas votre email comme mot de passe",same_as_username:"Votre mot de passe ne doit pas contenir votre nom d'utilisateur",two_character_classes:"Variez la casse",repeated_character:"Trop de répétitions",sequence_found:"Votre mot de passe contient des séquences"}},services:{arbre:{indisponible:"Le service de gestion d'arborescence est actuellement indisponible. Aucune modification ne sera prise en compte.",confirmerSuppression:"Êtes-vous sûr de vouloir supprimer {0} ?"},auto_complete:{search:"Recherche en cours&hellip;",noresult:"Pas de résultat"}},popin:{title:{generique:"Veuillez sélectionner un élément",structure:{mono:"Sélectionner une structure",multi:"Sélectionner des structures"},rubrique:{mono:"Sélectionner une rubrique",multi:"Sélectionner des rubriques"},groupe:{mono:"Sélectionner un groupe",multi:"Sélectionner des groupes"},utilisateur:"Sélectionner un utilisateur",objet:"Sélectionner une fiche",pagelibre:"Sélectionner une page",photo:"Ajouter une image",f
3734ichier:"Ajouter un fichier"}},media:{player:{mute:"Activer/Désactiver le son",playPause:"Lire/Mettre en pause",fullscreen:"Plein écran",tracks:"Sous-titres",postRoll:"Fermer"}},kselect:{mono:{select:"Sélectionner",clear:"Effacer"},multi:{parentLabel:"Item(s) disponible(s)",compositionLabel:"Item(s) sélectionné(s)"}},libelle:{inconnu:"Libellé inconnu"},ckeditor:{anchor:{alert:"Le nom doit commencer par une lettre et ne doit contenir que les caractères suivant : A-Z, a-z, 0-9, :-_."},notifications:{spellcheker:"La correction orthographique est accessible via <kbd title=&quot;Controle&quot;>Ctrl</kbd> + clic droit"},plugins:{listeFiche:{title:"Liste de fiches",insert:"Insérer une liste de fiches"},link:{title:"Insérer un lien",anchor:{tip:{alert:"Aucune ancre n'a été détectée dans la page en cours d'édition."}}},kflipbook:{title:"Insérer un Flipbook",menu:"Propriétés du Flipbook"},kimage:{title:"Insérer une image",menu:"Propriétés de l'image"},kvideo:{title:"Insérer une vidéo",menu:"Propriétés de la vidéo"},kaudio:{title:"Insérer de l'audio",menu:"Propriétés de l'audio"},kflash:{title:"Insérer une animation Flash",menu:"Propriétés de l'animation Flash"},kpdfviewer:{title:"Insérer un PDF",menu:"Propriétés du PDF"},ktag:{title:"Tags",menu:"Propriétés du tag"}}}};LOCALE_FO={popin:{title:{dossier:{mono:"Sélectionner un dossier"}}},galerie:{controls:{next:"Suivant (flêche de droite)",previous:"Précédent (flêche de gauche)",close:"Fermer (Esc)"},display:{counter:"sur",loading:"Chargement&hellip;",errorIFrame:"Une erreur est survenue lors du chargement de l'élément",errorImage:"Une erreur est survenue lors du chargement de l'image",errorFormatInconnu:"Ce format de fichier n'est pas supporté par la visionneuse"}},menu:{retour:"Retour"},search:{search_by_keyword:"Recherche par mots-clés",no_result:"Aucune proposition de résultat",wait_result:"Recherche de résultats..."}};RESPONSIVE_PREVISUALIZATION={messages:{device_mobile_portrait:"Mobile en mode portrait",device_mobile_landscape:"Mobile en mode paysage",device_tablet_portrait:"Tablette en mode portrait",device_tablet_landscape:"Tablette en mode paysage",device_desktop:"Desktop",resolution:"Prévisualisation du site en résolution",disclaimer:"Cliquez sur un type de terminal pour obtenir une prévisualisation du site.<br/><br/>Le rendu réel est susceptible de varier en fonction des spécificités du mobile utilisé ainsi que du navigateur employé pour la consultation",close:"Fermer"}};;(function($,window,document,undefined){var drag,state,e;drag={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null};state={isTouch:false,isScrolling:false,isSwiping:false,direction:false,inMotion:false};e={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null};function Owl(element,options){this.settings=null;this.options=$.extend({},Owl.Defaults,options);this.$element=$(element);this.drag=$.extend({},drag);this.state=$.extend({},state);this.e=$.extend({},e);this._plugins={};this._supress={};this._current=null;this._speed=null;this._coordinates=[];this._breakpoint=null;this._width=null;this._items=[];this._clones=[];this._mergers=[];this._invalidated={};this._pipe=[];$.each(Owl.Plugins,$.proxy(function(key,plugin){this._plugins[key[0].toLowerCase()+key.slice(1)]=new plugin(this);},this));$.each(Owl.Pipe,$.proxy(function(priority,worker){this._pipe.push({'filter':worker.filter,'run':$.proxy(worker.run,this)});},this));this.setup();this.initialize();}
3735Owl.Defaults={items:3,loop:false,center:false,mouseDrag:true,touchDrag:true,pullDrag:true,freeDrag:false,margin:0,stagePadding:0,merge:false,mergeFit:true,autoWidth:false,startPosition:0,rtl:false,smartSpeed:250,fluidSpeed:false,dragEndSpeed:false,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:window,responsiveClass:false,fallbackEasing:'swing',info:false,nestedItemSelector:false,itemElement:'div',stageElement:'div',themeClass:'owl-theme',baseClass:'owl-carousel',itemClass:'owl-item',centerClass:'center',activeClass:'active'};Owl.Width={Default:'default',Inner:'inner',Outer:'outer'};Owl.Plugins={};Owl.Pipe=[{filter:['width','items','settings'],run:function(cache){cache.current=this._items&&this._items[this.relative(this._current)];}},{filter:['items','settings'],run:function(){var cached=this._clones,clones=this.$stage.children('.cloned');if(clones.length!==cached.length||(!this.settings.loop&&cached.length>0)){this.$stage.children('.cloned').remove();this._clones=[];}}},{filter:['items','settings'],run:function(){var i,n,clones=this._clones,items=this._items,delta=this.settings.loop?clones.length-Math.max(this.settings.items*2,4):0;for(i=0,n=Math.abs(delta/2);i<n;i++){if(delta>
37350){this.$stage.children().eq(items.length+clones.length-1).remove();clones.pop();this.$stage.children().eq(0).remove();clones.pop();}else{clones.push(clones.length/2);this.$stage.append(items[clones[clones.length-1]].clone().addClass('cloned'));clones.push(items.length-1-(clones.length-1)/2);this.$stage.prepend(items[clones[clones.length-1]].clone().addClass('cloned'));}}}},{filter:['width','items','settings'],run:function(){var rtl=(this.settings.rtl?1:-1),width=(this.width()/this.settings.items).toFixed(3),coordinate=0,merge,i,n;this._coordinates=[];for(i=0,n=this._clones.length+this._items.length;i<n;i++){merge=this._mergers[this.relative(i)];merge=(this.settings.mergeFit&&Math.min(merge,this.settings.items))||merge;coordinate+=(this.settings.autoWidth?this._items[this.relative(i)].width()+this.settings.margin:width*merge)*rtl;this._coordinates.push(coordinate);}}},{filter:['width','items','settings'],run:function(){var i,n,width=(this.width()/this.settings.items).toFixed(3),css={'width':Math.abs(this._coordinates[this._coordinates.length-1])+this.settings.stagePadding*2,'padding-left':this.settings.stagePadding||'','padding-right':this.settings.stagePadding||''};this.$stage.css(css);css={'width':this.settings.autoWidth?'auto':width-this.settings.margin};css[this.settings.rtl?'margin-left':'margin-right']=this.settings.margin;if(!this.settings.autoWidth&&$.grep(this._mergers,function(v){return v>1}).length>0){for(i=0,n=this._coordinates.length;i<n;i++){css.width=Math.abs(this._coordinates[i])-Math.abs(this._coordinates[i-1]||0)-this.settings.margin;this.$stage.children().eq(i).css(css);}}else{this.$stage.children().css(css);}}},{filter:['width','items','settings'],run:function(cache){cache.current&&this.reset(this.$stage.children().index(cache.current));}},{filter:['position'],run:function(){this.animate(this.coordinates(this._current));}},{filter:['width','position','items','settings'],run:function(){var rtl=this.settings.rtl?1:-1,padding=this.settings.stagePadding*2,begin=this.coordinates(this.current())+padding,end=begin+this.width()*rtl,inner,outer,matches=[],i,n;for(i=0,n=this._coordinates.length;i<n;i++){inner=this._coordinates[i-1]||0;outer=Math.abs(this._coordinates[i])+padding*rtl;if((this.op(inner,'<=',begin)&&(this.op(inner,'>',end)))||(this.op(outer,'<',begin)&&this.op(outer,'>',end))){matches.push(i);}}
3736this.$stage.children('.'+this.settings.activeClass).removeClass(this.settings.activeClass);this.$stage.children(':eq('+matches.join('), :eq(')+')').addClass(this.settings.activeClass);if(this.settings.center){this.$stage.children('.'+this.settings.centerClass).removeClass(this.settings.centerClass);this.$stage.children().eq(this.current()).addClass(this.settings.centerClass);}}}];Owl.prototype.initialize=function(){this.trigger('initialize');this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass('owl-rtl',this.settings.rtl);this.browserSupport();if(this.settings.autoWidth&&this.state.imagesLoaded!==true){var imgs,nestedSelector,width;imgs=this.$element.find('img');nestedSelector=this.settings.nestedItemSelector?'.'+this.settings.nestedItemSelector:undefined;width=this.$element.children(nestedSelector).width();if(imgs.length&&width<=0){this.preloadAutoWidthImages(imgs);return false;}}
3737this.$element.addClass('owl-loading');this.$stage=$('<'+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">');this.$element.append(this.$stage.parent());this.replace(this.$element.children().not(this.$stage.parent()));this._width=this.$element.width();this.refresh();this.$element.removeClass('owl-loading').addClass('owl-loaded');this.eventsCall();this.internalEvents();this.addTriggerableEvents();this.trigger('initialized');};Owl.prototype.setup=function(){var viewport=this.viewport(),overwrites=this.options.responsive,match=-1,settings=null;if(!overwrites){settings=$.extend({},this.options);}else{$.each(overwrites,function(breakpoint){if(breakpoint<=viewport&&breakpoint>match){match=Number(breakpoint);}});settings=$.extend({},this.options,overwrites[match]);delete settings.responsive;if(settings.responsiveClass){this.$element.attr('class',function(i,c){return c.replace(/\b owl-responsive-\S+/g,'');}).addClass('owl-responsive-'+match);}}
3738if(this.settings===null||this._breakpoint!==match){this.trigger('change',{property:{name:'settings',value:settings}});this._breakpoint=match;this.settings=settings;this.invalidate('settings');this.trigger('changed',{property:{name:'settings',value:this.settings}});}};Owl.prototype.optionsLogic=function(){this.$element.toggleClass('owl-center',this.settings.center);if(this.settings.loop&&this._items.length<this.settings.items){this.settings.loop=false;}
3739if(this.settings.autoWidth){this.settings.stagePadding=false;this.settings.merge=false;}};Owl.prototype.prepare=function(item){var event=this.trigger('prepare',{content:item});if(!event.data){event.data=$('<'+this.settings.itemElement+'/>').addClass(this.settings.itemClass).append(item)}
3740this.trigger('prepared',{content:event.data});return event.data;};Owl.prototype.update=function(){var i=0,n=this._pipe.length,filter=$.proxy(function(p){return this[p]},this._invalidated),cache={};while(i<n){if(this._invalidated.all||$.grep(this._pipe[i].filter,filter).length>0){this._pipe[i].run(cache);}
3741i++;}
3742this._invalidated={};};Owl.prototype.width=function(dimension){dimension=dimension||Owl.Width.Default;switch(dimension){case Owl.Width.Inner:case Owl.Width.Outer:return this._width;default:return this._width-this.settings.stagePadding*2+this.settings.margin;}};Owl.prototype.refresh=function(){if(this._items.length===0){return false;}
3743var start=new Date().getTime();this.trigger('refresh');this.setup();this.optionsLogic();this.$stage.addClass('owl-refresh');this.update();this.$stage.removeClass('owl-refresh');this.state.orientation=window.orientation;this.watchVisibility();this.trigger('refreshed');};Owl.prototype.eventsCall=function(){this.e._onDragStart=$.proxy(function(e){this.onDragStart(e);},this);this.e._onDragMove=$.proxy(function(e){this.onDragMove(e);},this);this.e._onDragEnd=$.proxy(function(e){this.onDragEnd(e);},this);this.e._onResize=$.proxy(function(e){this.onResize(e);},this);this.e._transitionEnd=$.proxy(function(e){this.transitionEnd(e);},this);this.e._preventClick=$.proxy(function(e){this.preventClick(e);},this);};Owl.prototype.onThrottledResize=function(){window.clearTimeout(this.resizeTimer);this.resizeTimer=window.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate);};Owl.prototype.onResize=function(){if(!this._items.length){return false;}
3744if(this._width===this.$element.width()){return false;}
3745if(this.trigger('resize').isDefaultPrevented()){return false;}
3746this._width=this.$element.width();this.invalidate('width');this.refresh();this.trigger('resized');};Owl.prototype.eventsRouter=function(event){var type=event.type;if(type==="mousedown"||type==="touchstart"){this.onDragStart(event);}else if(type==="mousemove"||type==="touchmove"){this.onDragMove(event);}else if(type==="mouseup"||type==="touchend"){this.onDragEnd(event);}else if(type==="touchcancel"){this.onDragEnd(event);}};Owl.prototype.internalEvents=function(){var isTouch=isTouchSupport(),isTouchIE=isTouchSupportIE();if(this.settings.mouseDrag){this.$stage.on('mousedown',$.proxy(function(event){this.eventsRouter(event)},this));this.$stage.on('dragstart',function(){return false});this.$stage.get(0).onselectstart=function(){return false};}else{this.$element.addClass('owl-text-select-on');}
3747if(this.settings.touchDrag&&!isTouchIE){this.$stage.on('touchstart touchcancel',$.proxy(function(event){this.eventsRouter(event)},this));}
3748if(this.transitionEndVendor){this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,false);}
3749if(this.settings.responsive!==false){this.on(window,'resize',$.proxy(this.onThrottledResize,this));}};Owl.prototype.onDragStart=function(event){var ev,isTouchEvent,pageX,pageY,animatedPos;ev=event.originalEvent||event||window.event;if(ev.which===3||this.state.isTouch){return false;}
3750if(ev.type==='mousedown'){this.$stage.addClass('owl-grab');}
3751this.trigger('drag');this.drag.startTime=new Date().getTime();this.speed(0);this.state.isTouch=true;this.state.isScrolling=false;this.state.isSwiping=false;this.drag.distance=0;pageX=getTouches(ev).x;pageY=getTouches(ev).y;this.drag.offsetX=this.$stage.position().left;this.drag.offsetY=this.$stage.position().top;if(this.settings.rtl){this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()
3752+this.settings.margin;}
3753if(this.state.inMotion&&this.support3d){animatedPos=this.getTransformProperty();this.drag.offsetX=animatedPos;this.animate(animatedPos);this.state.inMotion=true;}else if(this.state.inMotion&&!this.support3d){this.state.inMotion=false;return false;}
3754this.drag.startX=pageX-this.drag.offsetX;this.drag.startY=pageY-this.drag.offsetY;this.drag.start=pageX-this.drag.startX;this.drag.targetEl=ev.target||ev.srcElement;this.drag.updatedX=this.drag.start;if(this.drag.targetEl.tagName==="IMG"||this.drag.targetEl.tagName==="A"){this.drag.targetEl.draggable=false;}
3755$(document).on('mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents',$.proxy(function(event){this.eventsRouter(event)},this));};Owl.prototype.onDragMove=function(event){var ev,isTouchEvent,pageX,pageY,minValue,maxValue,pull;if(!this.state.isTouch){return;}
3756if(this.state.isScrolling){return;}
3757ev=event.originalEvent||event||window.event;pageX=getTouches(ev).x;pageY=getTouches(ev).y;this.drag.currentX=pageX-this.drag.startX;this.drag.currentY=pageY-this.drag.startY;this.drag.distance=this.drag.currentX-this.drag.offsetX;if(this.drag.distance<0){this.state.direction=this.settings.rtl?'right':'left';}else if(this.drag.distance>0){this.state.direction=this.settings.rtl?'left':'right';}
3758if(this.settings.loop){if(this.op(this.drag.currentX,'>',this.coordinates(this.minimum()))&&this.state.direction==='right'){this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length);}else if(this.op(this.drag.currentX,'<',this.coordinates(this.maximum()))&&this.state.direction==='left'){this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length);}}else{minValue=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum());maxValue=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum());pull=this.settings.pullDrag?this.drag.distance/5:0;this.drag.currentX=Math.max(Math.min(this.drag.currentX,minValue+pull),maxValue+pull);}
3759if((this.drag.distance>8||this.drag.distance<-8)){if(ev.preventDefault!==undefined){ev.preventDefault();}else{ev.returnValue=false;}
3760this.state.isSwiping=true;}
3761this.drag.updatedX=this.drag.currentX;if((this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===false){this.state.isScrolling=true;this.drag.updatedX=this.drag.start;}
3762this.animate(this.drag.updatedX);};Owl.prototype.onDragEnd=function(event){var compareTimes,distanceAbs,closest;if(!this.state.isTouch){return;}
3763if(event.type==='mouseup'){this.$stage.removeClass('owl-grab');}
3764this.trigger('dragged');this.drag.targetEl.removeAttribute("draggable");this.state.isTouch=false;this.state.isScrolling=false;this.state.isSwiping=false;if(this.drag.distance===0&&this.state.inMotion!==true){this.state.inMotion=false;return false;}
3765this.drag.endTime=new Date().getTime();compareTimes=this.drag.endTime-this.drag.startTime;distanceAbs=Math.abs(this.drag.distance);if(distanceAbs>3||compareTimes>300){this.removeClick(this.drag.targetEl);}
3766closest=this.closest(this.drag.updatedX);this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed);this.current(closest);this.invalidate('position');this.update();if(!this.settings.pullDrag&&this.drag.updatedX===this.coordinates(closest)){this.transitionEnd();}
3767this.drag.distance=0;$(document).off('.owl.dragEvents');};Owl.prototype.removeClick=function(target){this.drag.targetEl=target;$(target).on('click.preventClick',this.e._preventClick);window.setTimeout(function(){$(target).off('click.preventClick');},300);};Owl.prototype.preventClick=function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}
3768if(ev.stopPropagation){ev.stopPropagation();}
3769$(ev.target).off('click.preventClick');};Owl.prototype.getTransformProperty=function(){var transform,matrix3d;transform=window.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+'transform');transform=transform.replace(/matrix(3d)?\(|\)/g,'').split(',');matrix3d=transform.length===16;return matrix3d!==true?transform[4]:transform[12];};Owl.prototype.closest=function(coordinate){var position=-1,pull=30,width=this.width(),coordinates=this.coordinates();if(!this.settings.freeDrag){$.each(coordinates,$.proxy(function(index,value){if(coordinate>value-pull&&coordinate<value+pull){position=index;}else if(this.op(coordinate,'<',value)&&this.op(coordinate,'>',coordinates[index+1]||value-width)){position=this.state.direction==='left'?index+1:index;}
3770return position===-1;},this));}
3771if(!this.settings.loop){if(this.op(coordinate,'>',coordinates[this.minimum()])){position=coordinate=this.minimum();}else if(this.op(coordinate,'<',coordinates[this.maximum()])){position=coordinate=this.maximum();}}
3772return position;};Owl.prototype.animate=function(coordinate){this.trigger('translate');this.state.inMotion=this.speed()>0;if(this.support3d){this.$stage.css({transform:'translate3d('+coordinate+'px'+',0px, 0px)',transition:(this.speed()/1000)+'s'});}else if(this.state.isTouch){this.$stage.css({left:coordinate+'px'});}else{this.$stage.animate({left:coordinate},this.speed()/1000,this.settings.fallbackEasing,$.proxy(function(){if(this.state.inMotion){this.transitionEnd();}},this));}};Owl.prototype.current=function(position){if(position===undefined){return this._current;}
3773if(this._items.length===0){return undefined;}
3774position=this.normalize(position);if(this._current!==position){var event=this.trigger('change',{property:{name:'position',value:position}});
3774if(event.data!==undefined){position=this.normalize(event.data);}
3775this._current=position;this.invalidate('position');this.trigger('changed',{property:{name:'position',value:this._current}});}
3776return this._current;};Owl.prototype.invalidate=function(part){this._invalidated[part]=true;}
3777Owl.prototype.reset=function(position){position=this.normalize(position);if(position===undefined){return;}
3778this._speed=0;this._current=position;this.suppress(['translate','translated']);this.animate(this.coordinates(position));this.release(['translate','translated']);};Owl.prototype.normalize=function(position,relative){var n=(relative?this._items.length:this._items.length+this._clones.length);if(!$.isNumeric(position)||n<1){return undefined;}
3779if(this._clones.length){position=((position%n)+n)%n;}else{position=Math.max(this.minimum(relative),Math.min(this.maximum(relative),position));}
3780return position;};Owl.prototype.relative=function(position){position=this.normalize(position);position=position-this._clones.length/2;return this.normalize(position,true);};Owl.prototype.maximum=function(relative){var maximum,width,i=0,coordinate,settings=this.settings;if(relative){return this._items.length-1;}
3781if(!settings.loop&&settings.center){maximum=this._items.length-1;}else if(!settings.loop&&!settings.center){maximum=this._items.length-settings.items;}else if(settings.loop||settings.center){maximum=this._items.length+settings.items;}else if(settings.autoWidth||settings.merge){revert=settings.rtl?1:-1;width=this.$stage.width()-this.$element.width();while(coordinate=this.coordinates(i)){if(coordinate*revert>=width){break;}
3782maximum=++i;}}else{throw'Can not detect maximum absolute position.'}
3783return maximum;};Owl.prototype.minimum=function(relative){if(relative){return 0;}
3784return this._clones.length/2;};Owl.prototype.items=function(position){if(position===undefined){return this._items.slice();}
3785position=this.normalize(position,true);return this._items[position];};Owl.prototype.mergers=function(position){if(position===undefined){return this._mergers.slice();}
3786position=this.normalize(position,true);return this._mergers[position];};Owl.prototype.clones=function(position){var odd=this._clones.length/2,even=odd+this._items.length,map=function(index){return index%2===0?even+index/2:odd-(index+1)/2};if(position===undefined){return $.map(this._clones,function(v,i){return map(i)});}
3787return $.map(this._clones,function(v,i){return v===position?map(i):null});};Owl.prototype.speed=function(speed){if(speed!==undefined){this._speed=speed;}
3788return this._speed;};Owl.prototype.coordinates=function(position){var coordinate=null;if(position===undefined){return $.map(this._coordinates,$.proxy(function(coordinate,index){return this.coordinates(index);},this));}
3789if(this.settings.center){coordinate=this._coordinates[position];coordinate+=(this.width()-coordinate+(this._coordinates[position-1]||0))/2*(this.settings.rtl?-1:1);}else{coordinate=this._coordinates[position-1]||0;}
3790return coordinate;};Owl.prototype.duration=function(from,to,factor){return Math.min(Math.max(Math.abs(to-from),1),6)*Math.abs((factor||this.settings.smartSpeed));};Owl.prototype.to=function(position,speed){if(this.settings.loop){var distance=position-this.relative(this.current()),revert=this.current(),before=this.current(),after=this.current()+distance,direction=before-after<0?true:false,items=this._clones.length+this._items.length;if(after<this.settings.items&&direction===false){revert=before+this._items.length;this.reset(revert);}else if(after>=items-this.settings.items&&direction===true){revert=before-this._items.length;this.reset(revert);}
3791window.clearTimeout(this.e._goToLoop);this.e._goToLoop=window.setTimeout($.proxy(function(){this.speed(this.duration(this.current(),revert+distance,speed));this.current(revert+distance);this.update();},this),30);}else{this.speed(this.duration(this.current(),position,speed));this.current(position);this.update();}};Owl.prototype.next=function(speed){speed=speed||false;this.to(this.relative(this.current())+1,speed);};Owl.prototype.prev=function(speed){speed=speed||false;this.to(this.relative(this.current())-1,speed);};Owl.prototype.transitionEnd=function(event){if(event!==undefined){event.stopPropagation();if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){return false;}}
3792this.state.inMotion=false;this.trigger('translated');};Owl.prototype.viewport=function(){var width;if(this.options.responsiveBaseElement!==window){width=$(this.options.responsiveBaseElement).width();}else if(window.innerWidth){width=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){
3792width=document.documentElement.clientWidth;}else{throw'Can not detect viewport width.';}
3793return width;};Owl.prototype.replace=function(content){this.$stage.empty();this._items=[];if(content){content=(content instanceof jQuery)?content:$(content);}
3794if(this.settings.nestedItemSelector){content=content.find('.'+this.settings.nestedItemSelector);}
3795content.filter(function(){return this.nodeType===1;}).each($.proxy(function(index,item){item=this.prepare(item);this.$stage.append(item);this._items.push(item);this._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge')*1||1);},this));this.reset($.isNumeric(this.settings.startPosition)?this.settings.startPosition:0);this.invalidate('items');};Owl.prototype.add=function(content,position){position=position===undefined?this._items.length:this.normalize(position,true);this.trigger('add',{content:content,position:position});if(this._items.length===0||position===this._items.length){this.$stage.append(content);this._items.push(content);this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge')*1||1);}else{this._items[position].before(content);this._items.splice(position,0,content);this._mergers.splice(position,0,content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge')*1||1);}
3796this.invalidate('items');this.trigger('added',{content:content,position:position});};Owl.prototype.remove=function(position){position=this.normalize(position,true);if(position===undefined){return;}
3797this.trigger('remove',{content:this._items[position],position:position});this._items[position].remove();this._items.splice(position,1);this._mergers.splice(position,1);this.invalidate('items');this.trigger('removed',{content:null,position:position});};Owl.prototype.addTriggerableEvents=function(){var handler=$.proxy(function(callback,event){return $.proxy(function(e){if(e.relatedTarget!==this){this.suppress([event]);callback.apply(this,[].slice.call(arguments,1));this.release([event]);}},this);},this);$.each({'next':this.next,'prev':this.prev,'to':this.to,'destroy':this.destroy,'refresh':this.refresh,'replace':this.replace,'add':this.add,'remove':this.remove},$.proxy(function(event,callback){this.$element.on(event+'.owl.carousel',handler(callback,event+'.owl.carousel'));},this));};Owl.prototype.watchVisibility=function(){if(!isElVisible(this.$element.get(0))){this.$element.addClass('owl-hidden');window.clearInterval(this.e._checkVisibile);this.e._checkVisibile=window.setInterval($.proxy(checkVisible,this),500);}
3798function isElVisible(el){return el.offsetWidth>0&&el.offsetHeight>0;}
3799function checkVisible(){if(isElVisible(this.$element.get(0))){this.$element.removeClass('owl-hidden');this.refresh();window.clearInterval(this.e._checkVisibile);}}};Owl.prototype.preloadAutoWidthImages=function(imgs){var loaded,that,$el,img;loaded=0;that=this;imgs.each(function(i,el){$el=$(el);img=new Image();img.onload=function(){loaded++;$el.attr('src',img.src);$el.css('opacity',1);if(loaded>=imgs.length){that.state.imagesLoaded=true;that.initialize();}};img.src=$el.attr('src')||$el.attr('data-src')||$el.attr('data-src-retina');});};Owl.prototype.destroy=function(){if(this.$element.hasClass(this.settings.themeClass)){this.$element.removeClass(this.settings.themeClass);}
3800if(this.settings.responsive!==false){$(window).off('resize.owl.carousel');}
3801if(this.transitionEndVendor){this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);}
3802for(var i in this._plugins){this._plugins[i].destroy();}
3803if(this.settings.mouseDrag||this.settings.touchDrag){this.$stage.off('mousedown touchstart touchcancel');$(document).off('.owl.dragEvents');this.$stage.get(0).onselectstart=function(){};this.$stage.off('dragstart',function(){return false});}
3804this.$element.off('.owl');this.$stage.children('.cloned').remove();this.e=null;this.$element.removeData('owlCarousel');this.$stage.children().contents().unwrap();this.$stage.children().unwrap();this.$stage.unwrap();};Owl.prototype.op=function(a,o,b){var rtl=this.settings.rtl;switch(o){case'<':return rtl?a>b:a<b;case'>':return rtl?a<b:a>b;case'>=':return rtl?a<=b:a>=b;case'<=':return rtl?a>=b:a<=b;default:break;}};Owl.prototype.on=function(element,event,listener,capture){if(element.addEventListener){element.addEventListener(event,listener,capture);}else if(element.attachEvent){element.attachEvent('on'+event,listener);}};Owl.prototype.off=function(element,event,listener,capture){if(element.removeEventListener){element.removeEventListener(event,listener,capture);}else if(element.detachEvent){element.detachEvent('on'+event,listener);}};Owl.prototype.trigger=function(name,data,namespace){var status={item:{count:this._items.length,index:this.current()}}
3804,handler=$.camelCase($.grep(['on',name,namespace],function(v){return v}).join('-').toLowerCase()),event=$.Event([name,'owl',namespace||'carousel'].join('.').toLowerCase(),$.extend({relatedTarget:this},status,data));if(!this._supress[name]){$.each(this._plugins,function(name,plugin){if(plugin.onTrigger){plugin.onTrigger(event);}});this.$element.trigger(event);if(this.settings&&typeof this.settings[handler]==='function'){this.settings[handler].apply(this,event);}}
3805return event;};Owl.prototype.suppress=function(events){$.each(events,$.proxy(function(index,event){this._supress[event]=true;},this));}
3806Owl.prototype.release=function(events){$.each(events,$.proxy(function(index,event){delete this._supress[event];},this));}
3807Owl.prototype.browserSupport=function(){this.support3d=isPerspective();if(this.support3d){this.transformVendor=isTransform();var endVendors=['transitionend','webkitTransitionEnd','transitionend','oTransitionEnd'];this.transitionEndVendor=endVendors[isTransition()];this.vendorName=this.transformVendor.replace(/Transform/i,'');this.vendorName=this.vendorName!==''?'-'+this.vendorName.toLowerCase()+'-':'';}
3808this.state.orientation=window.orientation;};function getTouches(event){if(event.touches!==undefined){return{x:event.touches[0].pageX,y:event.touches[0].pageY};}
3809if(event.touches===undefined){if(event.pageX!==undefined){return{x:event.pageX,y:event.pageY};}
3810if(event.pageX===undefined){return{x:event.clientX,y:event.clientY};}}}
3811function isStyleSupported(array){var p,s,fake=document.createElement('div'),list=array;for(p in list){s=list[p];if(typeof fake.style[s]!=='undefined'){fake=null;return[s,p];}}
3812return[false];}
3813function isTransition(){return isStyleSupported(['transition','WebkitTransition','MozTransition','OTransition'])[1];}
3814function isTransform(){return isStyleSupported(['transform','WebkitTransform','MozTransform','OTransform','msTransform'])[0];}
3815function isPerspective(){return isStyleSupported(['perspective','webkitPerspective','MozPerspective','OPerspective','MsPerspective'])[0];}
3816function isTouchSupport(){return'ontouchstart'in window||!!(navigator.msMaxTouchPoints);}
3817function isTouchSupportIE(){return window.navigator.msPointerEnabled;}
3818$.fn.owlCarousel=function(options){return this.each(function(){if(!$(this).data('owlCarousel')){$(this).data('owlCarousel',new Owl(this,options));}});};$.fn.owlCarousel.Constructor=Owl;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Lazy=function(carousel){this._core=carousel;this._loaded=[];this._handlers={'initialized.owl.carousel change.owl.carousel':$.proxy(function(e){if(!e.namespace){return;}
3819if(!this._core.settings||!this._core.settings.lazyLoad){return;}
3820if((e.property&&e.property.name=='position')||e.type=='initialized'){var settings=this._core.settings,n=(settings.center&&Math.ceil(settings.items/2)||settings.items),i=((settings.center&&n*-1)||0),position=((e.property&&e.property.value)||this._core.current())+i,clones=this._core.clones().length,load=$.proxy(function(i,v){this.load(v)},this);while(i++<n){this.load(clones/2+this._core.relative(position));clones&&$.each(this._core.clones(this._core.relative(position++)),load);}}},this)};this._core.options=$.extend({},Lazy.Defaults,this._core.options);this._core.$element.on(this._handlers);}
3821Lazy.Defaults={lazyLoad:false}
3822Lazy.prototype.load=function(position){var $item=this._core.$stage.children().eq(position),$elements=$item&&$item.find('.owl-lazy');if(!$elements||$.inArray($item.get(0),this._loaded)>-1){return;}
3823$elements.each($.proxy(function(index,element){var $element=$(element),image,url=(window.devicePixelRatio>1&&$element.attr('data-src-retina'))||$element.attr('data-src');this._core.trigger('load',{element:$element,url:url},'lazy');if($element.is('img')){$element.one('load.owl.lazy',$.proxy(function(){$element.css('opacity',1);this._core.trigger('loaded',{element:$element,url:url},'lazy');},this)).attr('src',url);}else{image=new Image();image.onload=$.proxy(function(){$element.css({'background-image':'url('+url+')','opacity':'1'});this._core.trigger('loaded',{element:$element,url:url},'lazy');},this);image.src=url;}},this));this._loaded.push($item.get(0));}
3824Lazy.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this._core.$element.off(handler,this.handlers[handler]);}
3825for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}}
3826$.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var AutoHeight=function(carousel){this._core=carou
3826sel;this._handlers={'initialized.owl.carousel':$.proxy(function(){if(this._core.settings.autoHeight){this.update();}},this),'changed.owl.carousel':$.proxy(function(e){if(this._core.settings.autoHeight&&e.property.name=='position'){this.update();}},this),'loaded.owl.lazy':$.proxy(function(e){if(this._core.settings.autoHeight&&e.element.closest('.'+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())){this.update();}},this)};this._core.options=$.extend({},AutoHeight.Defaults,this._core.options);this._core.$element.on(this._handlers);};AutoHeight.Defaults={autoHeight:false,autoHeightClass:'owl-height'};AutoHeight.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass);};AutoHeight.prototype.destroy=function(){var handler,property;for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
3827for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Video=function(carousel){this._core=carousel;this._videos={};this._playing=null;this._fullscreen=false;this._handlers={'resize.owl.carousel':$.proxy(function(e){if(this._core.settings.video&&!this.isInFullScreen()){e.preventDefault();}},this),'refresh.owl.carousel changed.owl.carousel':$.proxy(function(e){if(this._playing){this.stop();}},this),'prepared.owl.carousel':$.proxy(function(e){var $element=$(e.content).find('.owl-video');if($element.length){$element.css('display','none');this.fetch($element,$(e.content));}},this)};this._core.options=$.extend({},Video.Defaults,this._core.options);this._core.$element.on(this._handlers);this._core.$element.on('click.owl.video','.owl-video-play-icon',$.proxy(function(e){this.play(e);},this));};Video.Defaults={video:false,videoHeight:false,videoWidth:false};Video.prototype.fetch=function(target,item){var type=target.attr('data-vimeo-id')?'vimeo':'youtube',id=target.attr('data-vimeo-id')||target.attr('data-youtube-id'),width=target.attr('data-width')||this._core.settings.videoWidth,height=target.attr('data-height')||this._core.settings.videoHeight,url=target.attr('href');if(url){id=url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);if(id[3].indexOf('youtu')>-1){type='youtube';}else if(id[3].indexOf('vimeo')>-1){type='vimeo';}else{throw new Error('Video URL not supported.');}
3828id=id[6];}else{throw new Error('Missing video URL.');}
3829this._videos[url]={type:type,id:id,width:width,height:height};item.attr('data-video',url);this.thumbnail(target,this._videos[url]);};Video.prototype.thumbnail=function(target,video){var tnLink,icon,path,dimensions=video.width&&video.height?'style="width:'+video.width+'px;height:'+video.height+'px;"':'',customTn=target.find('img'),srcType='src',lazyClass='',settings=this._core.settings,create=function(path){icon='<div class="owl-video-play-icon"></div>';if(settings.lazyLoad){tnLink='<div class="owl-video-tn '+lazyClass+'" '+srcType+'="'+path+'"></div>';}else{tnLink='<div class="owl-video-tn" style="opacity:1;background-image:url('+path+')"></div>';}
3830target.after(tnLink);target.after(icon);};target.wrap('<div class="owl-video-wrapper"'+dimensions+'></div>');if(this._core.settings.lazyLoad){srcType='data-src';lazyClass='owl-lazy';}
3831if(customTn.length){create(customTn.attr(srcType));customTn.remove();return false;}
3832if(video.type==='youtube'){path="http://img.youtube.com/vi/"+video.id+"/hqdefault.jpg";create(path);}else if(video.type==='vimeo'){$.ajax({type:'GET',url:'http://vimeo.com/api/v2/video/'+video.id+'.json',jsonp:'callback',dataType:'jsonp',success:function(data){path=data[0].thumbnail_large;create(path);}});}};Video.prototype.stop=function(){this._core.trigger('stop',null,'video');this._playing.find('.owl-video-frame').remove();this._playing.removeClass('owl-video-playing');this._playing=null;};Video.prototype.play=function(ev){this._core.trigger('play',null,'video');if(this._playing){this.stop();}
3833var target=$(ev.target||ev.srcElement),item=target.closest('.'+this._core.settings.itemClass),video=this._videos[item.attr('data-video')],width=video.width||'100%',height=video.height||this._core.$stage.height(),html,wrap;if(video.type==='youtube'){html='<iframe width="'+width+'" height="'+height+'" src="http://www.youtube.com/embed/'
3834+video.id+'?autoplay=1&v='+video.id+'" frameborder="0" allowfullscreen></iframe>';}else if(video.type==='vimeo'){html='<iframe src="http://player.vimeo.com/video/'+video.id+'?autoplay=1" width="'+width
3835+'" height="'+height
3836+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';}
3837item.addClass('owl-video-playing');this._playing=item;wrap=$('<div style="height:'+height+'px; width:'+width+'px" class="owl-video-frame">'
3838+html+'</div>');target.after(wrap);};Video.prototype.isInFullScreen=function(){var element=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;if(element&&$(element).parent().hasClass('owl-video-frame')){this._core.speed(0);this._fullscreen=true;}
3839if(element&&this._fullscreen&&this._playing){return false;}
3840if(this._fullscreen){this._fullscreen=false;return false;}
3841if(this._playing){if(this._core.state.orientation!==window.orientation){this._core.state.orientation=window.orientation;return false;}}
3842return true;};Video.prototype.destroy=function(){var handler,property;this._core.$element.off('click.owl.video');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
3843for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Video=Video;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Animate=function(scope){this.core=scope;this.core.options=$.extend({},Animate.Defaults,this.core.options);this.swapping=true;this.previous=undefined;this.next=undefined;this.handlers={'change.owl.carousel':$.proxy(function(e){if(e.property.name=='position'){this.previous=this.core.current();this.next=e.property.value;}},this),'drag.owl.carousel dragged.owl.carousel translated.owl.carousel':$.proxy(function(e){this.swapping=e.type=='translated';},this),'translate.owl.carousel':$.proxy(function(e){if(this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){this.swap();}},this)};this.core.$element.on(this.handlers);};Animate.Defaults={animateOut:false,animateIn:false};Animate.prototype.swap=function(){if(this.core.settings.items!==1||!this.core.support3d){return;}
3844this.core.speed(0);var left,clear=$.proxy(this.clear,this),previous=this.core.$stage.children().eq(this.previous),next=this.core.$stage.children().eq(this.next),incoming=this.core.settings.animateIn,outgoing=this.core.settings.animateOut;if(this.core.current()===this.previous){return;}
3845if(outgoing){left=this.core.coordinates(this.previous)-this.core.coordinates(this.next);previous.css({'left':left+'px'}).addClass('animated owl-animated-out').addClass(outgoing).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',clear);}
3846if(incoming){next.addClass('animated owl-animated-in').addClass(incoming).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',clear);}};Animate.prototype.clear=function(e){$(e.target).css({'left':''}).removeClass('animated owl-animated-out owl-animated-in').removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut);this.core.transitionEnd();}
3847Animate.prototype.destroy=function(){var handler,property;for(handler in this.handlers){this.core.$element.off(handler,this.handlers[handler]);}
3848for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.Animate=Animate;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){var Autoplay=function(scope){this.core=scope;this.core.options=$.extend({},Autoplay.Defaults,this.core.options);this.handlers={'translated.owl.carousel refreshed.owl.carousel':$.proxy(function(){this.autoplay();},this),'play.owl.autoplay':$.proxy(function(e,t,s){this.play(t,s);},this),'stop.owl.autoplay':$.proxy(function(){this.stop();},this),'mouseover.owl.autoplay':$.proxy(function(){if(this.core.settings.autoplayHoverPause){this.pause();}},this),'mouseleave.owl.autoplay':$.proxy(function(){if(this.core.settings.autoplayHoverPause){this.autoplay();}},this)};this.core.$element.on(this.handlers);};Autoplay.Defaults={autoplay:false,autoplayTimeout:5000,autoplayHoverPause:false,autoplaySpeed:false};Autoplay.prototype.autoplay=function(){if(this.core.settings.autoplay&&!this.core.state.videoPlay){window.clearInterval(this.interval);this.interval=window.setInterval($.proxy(function(){this.play();},this),this.core.settings.autoplayTimeout);}else{window.clearInterval(this.interval);}};Autoplay.prototype.play=function(timeout,speed){if(document.hidden===true){return;}
3849if(this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion){return;}
3850if(this.core.settings.autoplay===false){window.clearInterval(this.interval);return;}
3851this.core.next(this.core.settings.autoplaySpeed);};Autoplay.prototype.stop=function(){window.clearInterval(this.interval);};Autoplay.prototype.pause=function(){window.clearInterval(this.interval);};Autoplay.prototype.destroy=function(){var handler,property;window.clearInterval(this.interval);for(handler in this.handlers){this.core.$element.off(handler,this.handlers[handler]);}
3852for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}};$.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){'use strict';
3852var Navigation=function(carousel){this._core=carousel;this._initialized=false;this._pages=[];this._controls={};this._templates=[];this.$element=this._core.$element;this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to};this._handlers={'prepared.owl.carousel':$.proxy(function(e){if(this._core.settings.dotsData){this._templates.push($(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));}},this),'add.owl.carousel':$.proxy(function(e){if(this._core.settings.dotsData){this._templates.splice(e.position,0,$(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));}},this),'remove.owl.carousel prepared.owl.carousel':$.proxy(function(e){if(this._core.settings.dotsData){this._templates.splice(e.position,1);}},this),'change.owl.carousel':$.proxy(function(e){if(e.property.name=='position'){if(!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var current=this._core.current(),maximum=this._core.maximum(),minimum=this._core.minimum();e.data=e.property.value>maximum?current>=maximum?minimum:maximum:e.property.value<minimum?maximum:e.property.value;}}},this),'changed.owl.carousel':$.proxy(function(e){if(e.property.name=='position'){this.draw();}},this),'refreshed.owl.carousel':$.proxy(function(){if(!this._initialized){this.initialize();this._initialized=true;}
3853this._core.trigger('refresh',null,'navigation');this.update();this.draw();this._core.trigger('refreshed',null,'navigation');},this)};this._core.options=$.extend({},Navigation.Defaults,this._core.options);this.$element.on(this._handlers);}
3854Navigation.Defaults={nav:false,navRewind:true,navText:['prev','next'],navSpeed:false,navElement:'div',navContainer:false,navContainerClass:'owl-nav',navClass:['owl-prev','owl-next'],slideBy:1,dotClass:'owl-dot',dotsClass:'owl-dots',dots:true,dotsEach:false,dotData:false,dotsSpeed:false,dotsContainer:false,controlsClass:'owl-control
3854s'}
3855Navigation.prototype.initialize=function(){var $container,override,options=this._core.settings;if(!options.dotsData){this._templates=[$('<div>').addClass(options.dotClass).append($('<span>')).prop('outerHTML')];}
3856if(!options.navContainer||!options.dotsContainer){this._controls.$container=$('<div>').addClass(options.controlsClass).appendTo(this.$element);}
3857this._controls.$indicators=options.dotsContainer?$(options.dotsContainer):$('<div>').hide().addClass(options.dotsClass).appendTo(this._controls.$container);this._controls.$indicators.on('click','div',$.proxy(function(e){var index=$(e.target).parent().is(this._controls.$indicators)?$(e.target).index():$(e.target).parent().index();e.preventDefault();this.to(index,options.dotsSpeed);},this));$container=options.navContainer?$(options.navContainer):$('<div>').addClass(options.navContainerClass).prependTo(this._controls.$container);this._controls.$next=$('<'+options.navElement+'>');this._controls.$previous=this._controls.$next.clone();this._controls.$previous.addClass(options.navClass[0]).html(options.navText[0]).hide().prependTo($container).on('click',$.proxy(function(e){this.prev(options.navSpeed);},this));this._controls.$next.addClass(options.navClass[1]).html(options.navText[1]).hide().appendTo($container).on('click',$.proxy(function(e){this.next(options.navSpeed);},this));for(override in this._overrides){this._core[override]=$.proxy(this[override],this);}}
3858Navigation.prototype.destroy=function(){var handler,control,property,override;for(handler in this._handlers){this.$element.off(handler,this._handlers[handler]);}
3859for(control in this._controls){this._controls[control].remove();}
3860for(override in this.overides){this._core[override]=this._overrides[override];}
3861for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}}
3862Navigation.prototype.update=function(){var i,j,k,options=this._core.settings,lower=this._core.clones().length/2,upper=lower+this._core.items().length,size=options.center||options.autoWidth||options.dotData?1:options.dotsEach||options.items;if(options.slideBy!=='page'){options.slideBy=Math.min(options.slideBy,options.items);}
3863if(options.dots||options.slideBy=='page'){this._pages=[];for(i=lower,j=0,k=0;i<upper;i++){if(j>=size||j===0){this._pages.push({start:i-lower,end:i-lower+size-1});j=0,++k;}
3864j+=this._core.mergers(this._core.relative(i));}}}
3865Navigation.prototype.draw=function(){var difference,i,html='',options=this._core.settings,$items=this._core.$stage.children(),index=this._core.relative(this._core.current());if(options.nav&&!options.loop&&!options.navRewind){this._controls.$previous.toggleClass('disabled',index<=0);this._controls.$next.toggleClass('disabled',index>=this._core.maximum());}
3866this._controls.$previous.toggle(options.nav);this._controls.$next.toggle(options.nav);if(options.dots){difference=this._pages.length-this._controls.$indicators.children().length;if(options.dotData&&difference!==0){for(i=0;i<this._controls.$indicators.children().length;i++){html+=this._templates[this._core.relative(i)];}
3867this._controls.$indicators.html(html);}else if(difference>0){html=new Array(difference+1).join(this._templates[0]);this._controls.$indicators.append(html);}else if(difference<0){this._controls.$indicators.children().slice(difference).remove();}
3868this._controls.$indicators.find('.active').removeClass('active');this._controls.$indicators.children().eq($.inArray(this.current(),this._pages)).addClass('active');}
3869this._controls.$indicators.toggle(options.dots);}
3870Navigation.prototype.onTrigger=function(event){var settings=this._core.settings;event.page={index:$.inArray(this.current(),this._pages),count:this._pages.length,size:settings&&(settings.center||settings.autoWidth||settings.dotData?1:settings.dotsEach||settings.items)};}
3871Navigation.prototype.current=function(){var index=this._core.relative(this._core.current());return $.grep(this._pages,function(o){return o.start<=index&&o.end>=index;}).pop();}
3872Navigation.prototype.getPosition=function(successor){var position,length,options=this._core.settings;if(options.slideBy=='page'){position=$.inArray(this.current(),this._pages);length=this._pages.length;successor?++position:--position;
3872position=this._pages[((position%length)+length)%length].start;}else{position=this._core.relative(this._core.current());length=this._core.items().length;successor?position+=options.slideBy:position-=options.slideBy;}
3873return position;}
3874Navigation.prototype.next=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(true),speed);}
3875Navigation.prototype.prev=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(false),speed);}
3876Navigation.prototype.to=function(position,speed,standard){var length;if(!standard){length=this._pages.length;$.proxy(this._overrides.to,this._core)(this._pages[((position%length)+length)%length].start,speed);}else{$.proxy(this._overrides.to,this._core)(position,speed);}}
3877$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){'use strict';var Hash=function(carousel){this._core=carousel;this._hashes={};this.$element=this._core.$element;this._handlers={'initialized.owl.carousel':$.proxy(function(){if(this._core.settings.startPosition=='URLHash'){$(window).trigger('hashchange.owl.navigation');}},this),'prepared.owl.carousel':$.proxy(function(e){var hash=$(e.content).find('[data-hash]').andSelf('[data-hash]').attr('data-hash');this._hashes[hash]=e.content;},this)};this._core.options=$.extend({},Hash.Defaults,this._core.options);this.$element.on(this._handlers);$(window).on('hashchange.owl.navigation',$.proxy(function(){var hash=window.location.hash.substring(1),items=this._core.$stage.children(),position=this._hashes[hash]&&items.index(this._hashes[hash])||0;if(!hash){return false;}
3878this._core.to(position,false,true);},this));}
3879Hash.Defaults={URLhashListener:false}
3880Hash.prototype.destroy=function(){var handler,property;$(window).off('hashchange.owl.navigation');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}
3881for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}}
3882$.fn.owlCarousel.Constructor.Plugins.Hash=Hash;})(window.Zepto||window.jQuery,window,document);;(function(window,document){'use strict';window.DataToggle=function(initSettings,directLoad){function objectValues(o){var values=[];for(var key in o){if(o.hasOwnProperty(key)){values.push(o[key]);}}
3883return values;}
3884function forEach(elements,callback){[].forEach.call(elements,callback);}
3885function extend(){for(var i=1;i<arguments.length;i++){for(var key in arguments[i]){if(arguments[i].hasOwnProperty(key)){arguments[0][key]=arguments[i][key];}}}
3886return arguments[0];}
3887function matches(el,selector){if(!el){return false;}
3888var matchesCallable=(el.matches||el.matchesSelector||el.msMatchesSelector||el.mozMatchesSelector||el.webkitMatchesSelector||el.oMatchesSelector);if(!matchesCallable){return false;}
3889return matchesCallable.call(el,selector);}
3890function filter(els,selector){var filtered=[];var test=typeof selector==='string'?function(a,b){return matches(a,b);}:function(a,b){return a===b;};forEach(els,function(el){if(test(el,selector)){filtered.push(el);}});return filtered;}
3891function triggerEvent(element,event,data){var e;if(window.CustomEvent){e=new CustomEvent(event,{detail:data});}else{e=document.createEvent('CustomEvent');e.initCustomEvent(event,true,true,data);}
3892element.dispatchEvent(e);}
3893function addClasses(elements,classes){forEach(elements,function(element){element.classList.add.apply(element.classList,classes);});}
3894function removeClasses(elements,classes){forEach(elements,function(element){element.classList.remove.apply(element.classList,classes);});}
3895function toggleClasses(elements,classes){forEach(elements,function(element){element.classList.toggle.apply(element.classList,classes);});}
3896var instance={binds:{},settings:{dataToggleElements:function(){return document.querySelectorAll('[data-toggle]');},dataToggleSameElements:function(toggleExpression){return document.querySelectorAll('[data-toggle="'+toggleExpression+'"]');},dataToggleGroupElements:function(group){return document.querySelectorAll('[data-toggle-group="'+group+'"]');},target:function(element){return element.getAttribute('data-toggle');},groups:function(element){return element.getAttribute('data-toggle-group');},events:function(element){return element.getAttribute('data-toggle-event');}
3896,classes:function(element){return element.getAttribute('data-toggle-class');},method:function(element){return element.getAttribute('data-toggle-method');},isBubble:function(element){return element.hasAttribute('data-toggle-bubble');},activeClasses:['active'],preventingCallback:function($element,$target,$el,options){return false;},triggerMethods:{button:{trigger:function(element,target,options,callback){var handleClick=function(event){return callback(event);};element.addEventListener('click',handleClick,false);return{click:handleClick};},preventingCallback:function($element,$target,$el,options){return false;}},check:{trigger:function(element,target,options,callback){var handleChange=function(event){var status=element.checked;return callback(event,{status:status,callback:function(el,elStatus){if(el.hasAttribute('type')&&(el.getAttribute('type')==='radio'||el.getAttribute('type')==='checkbox')){if(elStatus===true||elStatus===false){el.checked=elStatus;}else{el.checked=!el.checked;}}}});};element.addEventListener('change',handleChange,false);return{change:handleChange};},preventingCallback:function($element,$target,$el,options){if($el.tagName.toLowerCase()==='label'&&$el.hasAttribute('for')){var forElement=document.getElementById($el.getAttribute('for'));var dataToggles=options.dataToggleElements();if(filter(dataToggles,forElement).length>0){return true;}}
3897return false;}}},defaultTriggerMethod:'button'},dispatchEvents:function(events,element,status){for(var e=0;e<events.length;++e){triggerEvent(element,events[e],[status]);}},handleGroupedToggles:function($element,groups,classes,events,additional){var self=this;var dataToggleGroupElements=function(groupElement){if(groupElement!==$element){removeClasses([groupElement],classes);if(additional.hasOwnProperty('callback')){additional.callback(groupElement,false);}
3898forEach(document.querySelectorAll(self.settings.target(groupElement)),function(destinationElement){self.dispatchEvents(events,destinationElement,false);removeClasses([destinationElement],classes);});}};for(var g=0;g<groups.length;++g){forEach(self.settings.dataToggleGroupElements(groups[g]),dataToggleGroupElements);}},handleSameToggles:function($target,target,classes,events,additional){var self=this;forEach(self.settings.dataToggleSameElements(target),function(sameElement){var status=filter($target,'.'+classes.join(' ')).length>0;(status?addClasses:removeClasses)([sameElement],classes);if(additional.hasOwnProperty('callback')){additional.callback(sameElement,status);}
3899forEach($target,function(targetElement){self.dispatchEvents(events,targetElement,status);});});},handlePreventing:function($element,$el,$target,classes){if(filter(this.settings.dataToggleElements(),$el).length>0&&$element!==$el){return true;}
3900var preventingByTriggerType=false;for(var trigger in this.settings.triggerMethods){if(this.settings.triggerMethods.hasOwnProperty(trigger)&&!preventingByTriggerType){preventingByTriggerType=this.settings.triggerMethods[trigger].preventingCallback($element,$target,$el,this.settings);}}
3901return preventingByTriggerType||this.settings.preventingCallback($element,$target,$el,this.settings);},dataToggle:function(event,element,target,options,additional){var $el=event.target;var $element=typeof element==='string'?document.querySelectorAll(element):element;var $target=typeof target==='string'?document.querySelectorAll(target):target;var groups=(typeof options.groups==='string'?options.groups.split(' '):options.groups)||[];var events=(typeof options.events==='string'?options.events.split(' '):options.events)||[];var classes=(typeof options.classes==='string'?options.classes.split(' '):options.classes)||objectValues(this.settings.activeClasses);additional=additional||{};if(this.handlePreventing($element,$el,$target,classes)){return true;}
3902if(!(this.settings.isBubble($element))){event.preventDefault();}
3903this.handleGroupedToggles($element,groups,classes,events,additional);if(additional.hasOwnProperty('status')){(additional.status?addClasses:removeClasses)($target,classes);}else{toggleClasses($target,classes);}
3904this.handleSameToggles($target,target,classes,events,additional);return!(event.isDefaultPrevented);},storeBind:function(element,binds){if(this.binds[this.settings.target(element)]===undefined){this.binds[this.settings.target(element)]=[];}
3905this.binds[this.settings.target(element)].push({element:element,binds:binds});},bind:function(element,target,options){var self=this;options=options||{};var method=this.settings.triggerMethods[this.settings.triggerMethods.hasOwnProperty(options.method)?options.method:this.settings.defaultTr
3905iggerMethod].trigger;var binds=method(element,target,options,function(event,additional){if(!event.defaultPrevented){self.dataToggle.call(self,event,element,target,options,additional);}});self.storeBind(element,binds);},bindAll:function(){var self=this;forEach(this.settings.dataToggleElements(),function(element){var target=self.settings.target(element);var groups=self.settings.groups(element);var events=self.settings.events(element);var classes=self.settings.classes(element);var method=self.settings.method(element);self.bind(element,target,{groups:groups,events:events,classes:classes,method:method});});},unbind:function(toggleExpression){if(!this.binds.hasOwnProperty(toggleExpression)){return;}
3906var elementBinds=this.binds[toggleExpression];for(var i=0;i<elementBinds.length;++i){var eb=elementBinds[i];var element=eb.element;for(var eventName in eb.binds){if(eb.binds.hasOwnProperty(eventName)){var eventHandler=eb.binds[eventName];element.removeEventListener(eventName,eventHandler);}}}
3907delete this.binds[toggleExpression];},unbindAll:function(){for(var b in this.binds){if(this.binds.hasOwnProperty(b)){this.unbind(b);}}},refresh:function(){this.unbindAll();this.bindAll();},init:function(settings,loadDirect){var self=this;this.settings=extend({},self.settings,settings);if(!!loadDirect){self.bindAll();}else{window.addEventListener('load',function(){self.bindAll();},false);}
3908return self;}};return instance.init(initSettings,directLoad);};})(window,document);(function(window,doc,$){iFrameHelper=function(){this.registerediFrames=[];this.usedGuid=[];};iFrameHelper.prototype={registeriFrame:function(object){var that=this,defaultObject={onSendValues:function(){},onAbort:function(){},iFrame:null,caller:null},registerObject=$.extend(defaultObject,object||{});registerObject.id=$.generateGuid();if(registerObject.iFrame&&registerObject.caller){registerObject.iFrame.load(function(){this.contentWindow.iFrameHelper=that;this.contentWindow.iFrameRegistration=registerObject.id;if(this.contentWindow.iFrameHelperCallback){this.contentWindow.iFrameHelperCallback();}});}
3909this.registerediFrames.push(registerObject);return registerObject.id;},unregisteriFrame:function(id){var that=this,unregistered=false;$.each(this.registerediFrames,function(index,value){if(value.id===id){var guidIndex=$.inArray(value.id,that.usedGuid);if(guidIndex>-1){that.usedGuid.splice(guidIndex,1);}
3910value.iFrame.unbind();that.registerediFrames.splice(index,1);unregistered=true;return false;}});return unregistered;},isRegisterediFrame:function(id){var found=false;$.each(this.registerediFrames,function(index,value){if(value.id===id){found=true;return false;}});return found;},abort:function(id){$.each(this.registerediFrames,function(index,value){if(value.id===id){value.onAbort();return false;}});return false;},sendValues:function(id,object){$.each(this.registerediFrames,function(index,value){if(value.id===id){value.onSendValues(object);return false;}});return false;}};if(typeof exports!=='undefined'){exports.iFrameHelper=new iFrameHelper;}else{window.iFrameHelper=new iFrameHelper;}})(window,document,jQuery.noConflict());(function($){function fireVanillaEvent(type,$inputs){var event;if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent(type,true,true);}else{event=document.createEventObject();event.eventType=type;}
3911event.eventName=type;$inputs.each(function(index,component){if(document.createEvent){component.dispatchEvent(event);}else{component.fireEvent('on'+event.eventType,event);}});}
3912function buildCompositionList($iframeContent,$iframe,$component){var treeInstance=$iframe[0].contentWindow.treeInstance;if(treeInstance){var jsTree=$iframe[0].contentWindow.treeInstance,$compositionList=$component.find('.kmultiselect-composition-list'),$input=$component.find('input[name="'+$component.attr('id').replace('kmultiselect','')+'"]'),values=$.cleanArray($input.val().split(';')),$libelles=$component.find('input[name="LIBELLE_'+$component.attr('id').replace('kmultiselect','')+'"]'),libelles=$.cleanArray($libelles.val().split(';')),keepValues=[];
3912jsTree.get_selected().forEach(function(select){var currentSelect=jsTree.get_node(select);var $foundItem=$compositionList.find('li').filter(function(){return $(this).attr('data-value')===currentSelect.li_attr.code;});var path=jsTree.get_path('#'+select);path=$.map(path,function(value){return $('<div>').html(value).text();});path=$.cleanArray(path).join(' > ');if(currentSelect.li_attr.rel!=='locked'){if($foundItem.length>0){keepValues.push(currentSelect.li_attr.code);$foundItem.html(currentSelect.text);}else{keepValues.unshift(currentSelect.li_attr.code);values.unshift(currentSelect.li_attr.code);libelles.unshift(currentSelect.text);$('<li>').html(currentSelect.text).attr('data-value',currentSelect.li_attr.code).attr('title',path).prependTo($compositionList);}}});for(var i=0;i<values.length;i++){if($.inArray(values[i],keepValues)===-1){var $li=$compositionList.find('li[data-value="'+values[i]+'"]:not(.ignore)');if($li.length>0){$compositionList.find('li[data-value="'+values[i]+'"]').remove();libelles.splice(i,1);values.splice(i,1);i--;}}}
3913$input.val(values.join(';'));$libelles.val(libelles.join(';'));$component.kMultiSelect().update();fireVanillaEvent('change',$input);}}
3914var $kMultiselectsLtl=$('.kmultiselect-ltl');if($kMultiselectsLtl.length>0){$kMultiselectsLtl.each(function(index,component){$(component).kMultiSelect({instance:false,listMode:'LtL',sortable:true,editable:$(component).hasClass('editable')?true:false,removable:true,multiSelect:true,oldMode:true,editAction:function(row){if(window.specificEditAction){window.specificEditAction(row);}},onAfterItemAdd:function(list,items){if(list.hasClass('kmultiselect-composition-list')){var $kMultiSelect=list.closest('.kmultiselect-ltl'),$input=$kMultiSelect.find('input[name="'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),$libelles=$kMultiSelect.find('input[name="LIBELLE_'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),values=$.cleanArray($input.val().split(';')).join(';'),libellesValues=$.cleanArray($libelles.val().split(';')).join(';');$input.val(values);$libelles.val(libellesValues);items.each(function(){if($input.val()){$input.val($input.val()+';'+$(this).data('value'));}else{$input.val($(this).data('value'));}
3915if($libelles.val()){$libelles.val($libelles.val()+';'+$(this).attr('title'));}else{$libelles.val($(this).attr('title'));}});if(window.specificAfterItemAdd){window.specificAfterItemAdd(list,items);}
3916fireVanillaEvent('change',$input);}},onAfterItemRemove:function(list,items){if(list.hasClass('kmultiselect-composition-list')){var $kMultiSelect=list.closest('.kmultiselect-ltl'),$input=$kMultiSelect.find('input[name="'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),$libelles=$kMultiSelect.find('input[name="LIBELLE_'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),values=$.cleanArray($input.val().split(';')),libellesValues=$.cleanArray($libelles.val().split(';'));items.each(function(){values.removeByValue($(this).data('value'));libellesValues.removeByValue($(this).attr('title'));});$input.val(values.join(';'));$libelles.val(libellesValues.join(';'));fireVanillaEvent('change',$input);}
3917if(window.specificAfterItemRemove){window.specificAfterItemRemove(list,items);}},onItemSort:function(list){var $kMultiSelect=list.closest('.kmultiselect-ltl'),$input=$kMultiSelect.find('input[name="'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),$libelles=$kMultiSelect.find('input[name="LIBELLE_'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]');if(list.hasClass('kmultiselect-composition-list')){$input.val('');$libelles.val('');list.find('li').each(function(){if($input.val()){$input.val($input.val()+';'+$(this).data('value'));$libelles.val($libelles.val()+';'+$(this).attr('title'));}else{$input.val($(this).data('value'));$libelles.val($(this).attr('title'));}});fireVanillaEvent('change',$input);}}});});$kMultiselectsLtl.each(function(){var $this=$(this),$compositionList=$this.find('.kmultiselect-composition-list'),$parentList=$this.find('.kmultiselect-parent-list'),inputName=$this.attr('id').replace('kmultiselect',''),values=$this.find('input[name="'+inputName+'"]').val().split(';');$.each(values,function(index,value){if(value){var $parentItem=$parentList.find('li[data-value="'+value+'"]');
3917if($parentItem.length===0){$('<li data-value="'+value+'" class="error">'+LOCALE_BO.libelle.inconnu+'</li>').appendTo($compositionList);}else{$parentList.find('li[data-value="'+value+'"]').appendTo($compositionList);}}});$this.kMultiSelect().update();});}
3918var $kMultiselectsTtl=$('.kmultiselect-ttl');if($kMultiselectsTtl.length>0){$kMultiselectsTtl.each(function(index,component){var $component=$(component),actions={};if($component.data('popinvalidate')){actions.validate={title:LOCALE_BO.valider,callback:function($iframeContent,event,$iframe){buildCompositionList($iframeContent,$iframe,$component);this.destroy();}};actions.cancel={title:LOCALE_BO.annuler,callback:function(){this.destroy();}};}
3919$component.kMultiSelect({listMode:'TtL',addAction:function(){try{eval($component.data('addaction'));}catch(err){var $input=$component.find('input[name="'+$component.attr('id').replace('kmultiselect','')+'"]');var popin=$.iframePopin({title:eval($component.data('popintitle')),url:$.parametizeString($component.data('addaction'),[encodeURIComponent($input.val()),'']),autoOpen:true,resizable:true,width:$component.data('popinwidth'),buttons:actions,onClose:function(){this.destroy();}});var registeredId=iFrameHelper.registeriFrame({onSendValues:function(object){var $multiInput=$component.find('input[name="'+$component.attr('id').replace('kmultiselect','')+'"]'),$libelles=$component.find('input[name="LIBELLE_'+$component.attr('id').replace('kmultiselect','')+'"]'),values=$.cleanArray($multiInput.val().split(';')),libelles=$.cleanArray($libelles.val().split(';'));if($.inArray(object.sCode,values)===-1){var $li=$('<li>').attr('data-value',object.sCode).html(object.libelle);$component.kMultiSelect().add($li,true);values.unshift(object.sCode);libelles.unshift(object.libelle);$multiInput.val(values.join(';'));$libelles.val(libelles.join(';'));fireVanillaEvent('change',$multiInput);}
3920if(object.destroy!==false){popin.destroy();iFrameHelper.unregisteriFrame(registeredId);}},onAbort:function(){popin.destroy();iFrameHelper.unregisteriFrame(registeredId);},iFrame:popin.iFrame,caller:$component});}},editAction:function($item){var $input=$component.find('input[name="'+$component.attr('id').replace('kmultiselect','')+'"]'),$libelles=$component.find('input[name="LIBELLE_'+$component.attr('id').replace('kmultiselect','')+'"]'),values=$.cleanArray($input.val().split(';')),libelles=$.cleanArray($libelles.val().split(';')),itemIndex=$item.index(),popinUrl=$.parametizeString(specificModifyItem($item),[$item.data('value'),'']);var popin=$.iframePopin({title:eval($component.data('popintitle')),url:popinUrl,autoOpen:true,resizable:true,width:$component.data('popinwidth'),buttons:actions,onClose:function(){this.destroy();}});var registeredId=iFrameHelper.registeriFrame({onSendValues:function(object){$item.attr('data-value',object.sCode).html(object.libelle);values[itemIndex]=object.sCode;libelles[itemIndex]=object.libelle;$input.val(values.join(';'));$libelles.val(libelles.join(';'));fireVanillaEvent('change',$input);$component.kMultiSelect().update();if(object.destroy!==false){popin.destroy();iFrameHelper.unregisteriFrame(registeredId);}},onAbort:function(){popin.destroy();iFrameHelper.unregisteriFrame(registeredId);},iFrame:popin.iFrame,caller:$component});},sortable:true,editable:$(component).hasClass('editable')?true:false,removable:true,multiSelect:true,toolbox:{add:true,edit:false,remove:true},oldMode:true,onAfterItemRemove:function(list,items){if(list.hasClass('kmultiselect-composition-list')){var $kMultiSelect=list.closest('.kmultiselect-ttl'),$input=$kMultiSelect.find('input[name="'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),$libelles=$kMultiSelect.find('input[name="LIBELLE_'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),values=$.cleanArray($input.val().split(';')),libelles=$.cleanArray($libelles.val().split(';'));items.each(function(){values.removeByValue($(this).data('value'));libelles.removeByValue($(this).text());});$input.val(values.join(';'));$libelles.val(libelles.join(';'));fireVanillaEvent('change',$input);}},onItemSort:function(list){var $kMultiSelect=list.closest('.kmultiselect-ttl'),$input
3920=$kMultiSelect.find('input[name="'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]'),$libelles=$kMultiSelect.find('input[name="LIBELLE_'+$kMultiSelect.attr('id').replace('kmultiselect','')+'"]');$input.val('');$libelles.val('');list.find('li').each(function(){if($input.val()){$input.val($input.val()+';'+$(this).data('value'));}else{$input.val($(this).data('value'));}
3921if($libelles.val()){$libelles.val($libelles.val()+';'+$(this).text());}else{$libelles.val($(this).text());}
3922fireVanillaEvent('change',$input);});}});});$kMultiselectsTtl.each(function(){var $this=$(this),$compositionList=$this.find('.kmultiselect-composition-list'),$input=$this.find('input[name="'+$this.attr('id').replace('kmultiselect','')+'"]'),$libelles=$this.find('input[name="LIBELLE_'+$this.attr('id').replace('kmultiselect','')+'"]'),$arianes=$this.find('input[name="ARIANE_'+$this.attr('id').replace('kmultiselect','')+'"]'),values=$.cleanArray($input.val().split(';')),libelles=$.cleanArray($libelles.val().split(';')),arianes=$.cleanArray($arianes.val().split(';'));$.each(values,function(index,value){var ignore=value.lastIndexOf('#AUTO#',0)===0;$('<li>').addClass(ignore?'ignore':'').html(libelles[index]).attr('data-value',value).attr('title',arianes[index]).appendTo($compositionList);});$this.kMultiSelect().update();});}})(jQuery);(function($){'use strict';function fireVanillaEvent(type,$inputs){var event;if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent(type,true,true);}else{event=document.createEventObject();event.eventType=type;}
3923event.eventName=type;$inputs.each(function(index,component){if(document.createEvent){component.dispatchEvent(event);}else{component.fireEvent('on'+event.eventType,event);}});}
3924var $kMonoSelects=$('.kmonoselect');if($kMonoSelects.length>0){$kMonoSelects.each(function(index,component){var $component=$(component),$input=$component.find('input[name="'+$component.attr('id').replace('kMonoSelect','')+'"]'),$inputLibelle=$component.find('input[name="LIBELLE_'+$input.attr('name')+'"]');var actions={};if($component.data('popinvalidate')){actions.validate={title:LOCALE_BO.valider,callback:function($iframeContent,event,$iframe){var iFrame$=$iframe[0].contentWindow.jQuery,datatable=iFrame$.fn.dataTable.fnTables(true),$selected;if(datatable.length>0){$selected=iFrame$('.datatableUtilisateurRECHERCHE');}else{var jsTree=iFrame$.jstree._reference('.kTree');$selected=jsTree.get_selected();}
3925if($selected.length===1){$input.val($selected.data('sCode'));$inputLibelle.val($selected.data('libelle'));$component.kMonoSelect().value($selected.data('libelle'));}
3926this.destroy();}};actions.cancel={title:LOCALE_BO.annuler,callback:function(){this.destroy();}};}
3927$component.kMonoSelect({isLabelOnButtonsVisible:false,value:$component.data('value'),title:$component.data('title'),isClearable:!$component.hasClass('not-clearable'),cultures:{'fr':{'placeholder':window.kMonoSelectPlaceHolder&&window.kMonoSelectPlaceHolder[$component.data('placeholder')]?window.kMonoSelectPlaceHolder[$component.data('placeholder')]:''}},editAction:function(){try{eval($component.data('editaction'));}catch(err){var popin=$.iframePopin({title:eval($component.data('popintitle')),url:$.parametizeString($component.data('editaction'),[$input.val(),'']),autoOpen:true,resizable:false,width:$component.data('popinwidth'),onClose:function($iframe){this.destroy();},buttons:actions});var registeredId=iFrameHelper.registeriFrame({onSendValues:function(object){$input.val(object.sCode);$inputLibelle.val(object.libelle);fireVanillaEvent('change',$input);$component.kMonoSelect().value(object.libelle,object.fil);popin.destroy();iFrameHelper.unregisteriFrame(registeredId);},onAbort:function(){popin.destroy();iFrameHelper.unregisteriFrame(registeredId);},iFrame:popin.iFrame,caller:$component});}},onFieldCleared:function(){$input.val('');fireVanillaEvent('change',$input);$inputLibelle.val('');}});});}})(jQuery);(function($){'use strict';$.fn.dataTable.tools={};$.fn.dataTableExt.oApi.fnResetAllFilters=function(oSettings,bDraw){for(var iCol=0;iCol<oSettings.aoPreSearchCols.length;iCol++){oSettings.aoPreSearchCols[iCol].sSearch='';}
3928oSettings.oPreviousSearch.sSearch='';if(typeof bDraw==='undefined'){bDraw=true;}
3929if(bDraw){this.fnDraw();}};
3929$.fn.dataTableExt.oApi.fnSetFilteringDelay=function(oSettings,iDelay){var that=this;if(iDelay===undefined){iDelay=250;}
3930this.each(function(i){$.fn.dataTableExt.iApiIndex=i;var oTimerId=null,anControl=$('input',that.fnSettings().aanFeatures.f);anControl.unbind('keyup search input').bind('keyup search input',function(){window.clearTimeout(oTimerId);oTimerId=window.setTimeout(function(){$.fn.dataTableExt.iApiIndex=i;if(anControl.val()){that.fnFilter(anControl.val());}else{that.fnResetAllFilters();}},iDelay);});return this;});return this;};$.extend($.fn.dataTable.defaults,{'bJQueryUI':true,'bAutoWidth':false,'sPaginationType':'full_numbers'});$.extend($.fn.dataTableExt.oSort,{'date-jjmmaaaa-pre':function(a){var date=a.split('/');return date[2]+date[1]+date[0];},'date-jjmmaaaa-asc':function(x,y){var result=0;if(x<y){result=-1;}else if(x>y){result=1;}
3931return result;},'date-jjmmaaaa-desc':function(x,y){var result=0;if(x<y){result=1;}else if(x>y){result=-1;}
3932return result;}});$.extend($.fn.dataTableExt.oSort,{'date-jjmmaaaa-hhmm-pre':function(a){var datetime=a.split(' ');var date=datetime[0].split('/');var time=datetime[1].split(':');return date[2]+date[1]+date[0]+time[0]+time[1];},'date-jjmmaaaa-hhmm-asc':function(x,y){var result=0;if(x<y){result=-1;}else if(x>y){result=1;}
3933return result;},'date-jjmmaaaa-hhmm-desc':function(x,y){var result=0;if(x<y){result=1;}else if(x>y){result=-1;}
3934return result;}});$.fn.dataTable.tools.gestionNavigation=function(idDatagrid){if($('#'+idDatagrid+'_wrapper .dataTables_paginate > span > a').size()<=1){$('#'+idDatagrid+'_wrapper .dataTables_paginate').addClass('disabled');}else{$('#'+idDatagrid+'_wrapper .dataTables_paginate').removeClass('disabled');}};$('.fiches_a_valider').dataTable({'aaSorting':[[0,'asc']],'aoColumns':[null,null,null,null,{'sType':'date-jjmmaaaa'},null,null],'fnDrawCallback':function(){$.fn.dataTable.tools.gestionNavigation(this.attr('id'));}}).fnSetFilteringDelay();$('.datatableHistorique').dataTable({'aaSorting':[[0,'desc']],'aoColumns':[{'sType':'date-jjmmaaaa-hhmm'}
3934,null,null,null],'fnDrawCallback':function(){$.fn.dataTable.tools.gestionNavigation(this.attr('id'));}}).fnSetFilteringDelay();$('.datatableLight').dataTable({'sDom':'<"H"flr>t<"F"ip>','aoColumnDefs':[{'bSortable':false,'aTargets':['sanstri']},{'sType':'date-jjmmaaaa','aTargets':['js-date-order']},{'sType':'date-jjmmaaaa-hhmm','aTargets':['js-datetime-order']},{'bSearchable':false,'aTargets':['sansfiltre']}],'fnDrawCallback':function(){$.fn.dataTable.tools.gestionNavigation(this.attr('id'));}}).fnSetFilteringDelay();$('.datatable').dataTable({'aoColumnDefs':[{'bSortable':false,'aTargets':['sanstri']},{'sType':'date-jjmmaaaa','aTargets':['js-date-order']},{'sType':'date-jjmmaaaa-hhmm','aTargets':['js-datetime-order']},{'bSearchable':false,'aTargets':['sansfiltre']}],'fnDrawCallback':function(){$.fn.dataTable.tools.gestionNavigation(this.attr('id'));}}).fnSetFilteringDelay();var ajaxURL='';$.fn.dataTable.tools.processRequest=function(sSource,aoData,fnCallback){var idDatagrid=this.attr('id');$.getJSON(sSource,aoData,function(json){if(json.sAlerte){$('#messageApplicatif').html('<p class="message alerte">'+json.sAlerte+'</p>');}
3935fnCallback(json);$.fn.dataTable.tools.gestionNavigation(idDatagrid);}).error(function(){$('#messageApplicatif').html('<p class="message erreur">'+LOCALE_BO.erreurRecherche+'</p>');$.fn.dataTable.tools.gestionNavigation(idDatagrid);});};var colonneSelectionParId={'mData':'id','sDefaultContent':'<input type="checkbox" disabled="disabled" />','bSortable':false,'mRender':function(data,type,full){if(data&&full.urlSuppression){return'<input id="idsMetas-'+data+'" type="checkbox" name="idsMetas" value="'+data+'" />';}}},colonneLibelle={'mData':'libelle','sDefaultContent':'','bSortable':true,'mRender':function(data,type,full){if(full.urlModification){var lienModifier=$('<a class="ellipsis" href="'+full.urlModification+'">');lienModifier.text(data);lienModifier.attr('title',data);return $('<div/>').html(lienModifier).html();}
3936return $('<div/>').text(data).html();}},colonneDateModif={'mData':'dateModification','sDefaultContent':'','bSortable':true},colonneRubrique={'mData':'rubrique','sDefaultContent':'','bSortable':true,'mRender':function(data,type,full){return'<span title="'+full.filAriane+'">'+data+'</span>';}},colonneTypeObjet={'mData':'typeObjet','sDefaultContent':'','bSortable':true},colonneLangue={'mData':'langue','sDefaultContent':'','bSortable':true,'mRender':function(data,type,full){return'<img src="'+full.urlDrapeauLangue+'" alt="'+data+'"/>';}},colonneEtatFiche={'mData':'etatFiche','sDefaultContent':'','bSortable':true,'mRender':function(data,type,full){return'<span class="'+full.classEtatFiche+'">'+data+'</span>';}},colonneAction={'mData':'url','sDefaultContent':'','bSortable':false,'bSearchable':false,'sClass':'text-nowrap'},colonneCodeFiche={'mData':'codeFiche','sDefaultContent':'','bSortable':false,'bSearchable':false},colonneCodeFiche={'mData':'codeFiche','sDefaultContent':'','bSortable':false,'bSearchable':false};var boutonActionMasse=function(oConfig,action,selecteur,messageAvertissement,messageConfirm){var objetsSelectionnees=$(selecteur);if(objetsSelectionnees.length===0){$('<div>'+LOCALE_BO.selectionnerUnELement+'</div>').dialog({title:LOCALE_BO.erreur,modal:true});}else{$('<div>'+messageAvertissement+'</div>').dialog({title:LOCALE_BO.confirmer,modal:true,buttons:[{text:LOCALE_BO.ok,click:function(){$.ajax({dataType:'json',url:oConfig.sAjaxUrl+'&ACTION='+action+'&'+$.param(objetsSelectionnees),success:function(){$('#messageApplicatif').html('<p class="message confirmation">'+messageConfirm+'</p>');oConfig.fnAjaxComplete();},error:function(){$('#messageApplicatif').html('<p class="message erreur">'+LOCALE_BO.erreurActionMasse+'</p>');oConfig.fnAjaxComplete();}});$(this).dialog('close');}},{text:LOCALE_BO.fermer,click:function(){$(this).dialog('close');}}]});}};var ajoutEnMasse=function(datagridToolboxMultiSelect,oConfig,selecteur){var objetsSelectionnees=$.find(selecteur);if(objetsSelectionnees.length===0){$('<div>'+LOCALE_BO.selectionnerUnELement+'</div>').dialog({title:LOCALE_BO.erreur,modal:true});}
3937if(window.iFrameRegistration){objetsSelectionnees.forEach(function(data,index){var dataItem=datagridToolboxMultiSelect.fnGetData(data.parentElement.parentElement);var codeFicheCodeLangue=dataItem.codeFiche+',LANGUE='+dataItem.codeLangue;var object={sCode:codeFicheCodeLangue,libelle:dataItem.libelle,destroy:index===objetsSelectionnees.length-1};iFrameHelper.sendValues(window.iFrameRegistration,object);});}};var toolbox;var liste;var datagridToolbox=$('.datatableFichetoolbox');if(datagridToolbox.length>0){toolbox=datagridToolbox.data('toolbox')||'';liste=datagridToolbox.data('liste')||'';ajaxURL=datagridToolbox.data('search')||'';datagridToolbox.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sAjaxSource':ajaxURL,'aoColumns':[$.extend(colonneLibelle,{'mRender':function(data,type,full){return'<a href="'+full.url+'&amp;TOOLBOX='+toolbox+'&amp;LISTE='+liste+'">'+data+'</a>';}}),colonneRubrique,colonneLangue]}).fnSetFilteringDelay();}
3938var datagridToolboxMultiSelect=$('.datatableFichetoolboxMultiSelect');if(datagridToolboxMultiSelect.length>0){toolbox=datagridToolboxMultiSelect.data('toolbox')||'';liste=datagridToolboxMultiSelect.data('liste')||'';ajaxURL=datagridToolboxMultiSelect.data('search')||'';datagridToolboxMultiSelect.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sDom':'<"H"Tflr>t<"F"ip>','sAjaxSource':ajaxURL,'oTableTools':{'aButtons':[{sExtends:'ajax',sButtonText:LOCALE_BO.valider,sAjaxUrl:ajaxURL,fnClick:function(nButton,oConfig){ajoutEnMasse(datagridToolboxMultiSelect,oConfig,'input[name="codesFiche"]:checked');},fnAjaxComplete:function(){$('#checkall').prop('checked',false);datagridToolboxMultiSelect.fnDraw();}}]},'aoColumns':[$.extend(colonneCodeFiche,{'mRender':function(data){if(data){return'<input id="codesFiche-'+data+'" type="checkbox" name="codesFiche" value="'+data+'" />';}}}),$.extend(colonneLibelle,{'mRender':function(data,type,full){var textColonneLibelle=$('<a href="'+full.url+'&amp;TOOLBOX='+toolbox+'&amp;LISTE='+liste+'">');textColonneLibelle.text(data);return textColonneLibelle.html();}}),colonneRubrique,colonneLangue]}).fnSetFilteringDelay();datagridToolboxMultiSelect.on('click','#checkall',function(){$('input[name="codesFiche"]').prop('checked',this.checked);});}
3939var datagridMultiFicheToolbox=$('.datatableMultiFichetoolbox');if(datagridMultiFicheToolbox.length>0){toolbox=datagridMultiFicheToolbox.data('toolbox')||'';liste=datagridMultiFicheToolbox.data('liste')||'';ajaxURL=datagridMultiFicheToolbox.data('search')||'';datagridMultiFicheToolbox.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sAjaxSource':ajaxURL,'aoColumns':[$.extend(colonneLibelle,{'mRender':function(data,type,full){return'<a href="'+full.url+'&amp;TOOLBOX='+toolbox+'&amp;LISTE='+liste+'">'+data+'</a>';}}),colonneRubrique,colonneTypeObjet,colonneLangue]}).fnSetFilteringDelay();}
3940var datagridMultiFiche=$('.datatableMultiFiche');if(datagridMultiFiche.length>0){ajaxURL=datagridMultiFiche.data('search')||'';datagridMultiFiche.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'aaSorting':[[6,'desc']],'sDom':'<"H"Tflr>t<"F"ip>','oTableTools':{'aButtons':[{sExtends:'ajax',sButtonText:LOCALE_BO.supprimer,sAjaxUrl:ajaxURL,fnClick:function(nButton,oConfig){boutonActionMasse(oConfig,'SUPPRIMER','input[name="idsMetas"]:checked',LOCALE_BO.confirmSupprFiches,LOCALE_BO.confirmationActionMasseSuppr);},fnAjaxComplete:function(){$('#checkall').prop('checked',false);datagridMultiFiche.fnDraw();}},{sExtends:'ajax',sButtonText:LOCALE_BO.archiver,sAjaxUrl:ajaxURL,fnClick:function(nButton,oConfig){boutonActionMasse(oConfig,'ARCHIVER','input[name="idsMetas"]:checked',LOCALE_BO.confirmArchFiches,LOCALE_BO.confirmationActionMasseArchi);},fnAjaxComplete:function(){$('#checkall').prop('checked',false);datagridMultiFiche.fnDraw();}}]},'sAjaxSource':ajaxURL,'aoColumns':[colonneSelectionParId,colonneLibelle,colonneRubrique,colonneTypeObjet,colonneLangue,colonneEtatFiche,colonneDateModif,$.extend(colonneAction,{'mRender':function(data,type,full){var actions='';if(full.urlModification){actions+='<a class="action_modifier" href="'+full.urlModification+'" title="'+LOCALE_BO.modifier+'" >'+LOCALE_BO.modifier+'</a>';}
3941if(full.urlSuppression){if(actions.length>0){actions+=' | ';}
3942actions+='<a class="action_supprimer" href="'+full.urlSuppression+'" title="'+LOCALE_BO.supprimer+'" data-confirm="'+LOCALE_BO.confirmSupprFiche+'" >'+LOCALE_BO.supprimer+'</a>';}
3943if(full.url){if(actions.length>0){actions+=' | ';}
3944actions+='<a class="action_apercu" href="'+full.url+'" title="'+LOCALE_BO.nouvelleFenetre+'" >'+LOCALE_BO.voirEnLigne+'</a>';}
3945return actions;}})]}).fnSetFilteringDelay();datagridMultiFiche.on('click','#checkall',function(){$('input[name="idsMetas"]').prop('checked',this.checked);});}
3946var datagridFiche=$('.datatableFiche');if(datagridFiche.length>0){ajaxURL=datagridFiche.data('search')||'';datagridFiche.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'aaSorting':[[5,'desc']],'sDom':'<"H"Tflr>t<"F"ip>','oTableTools':{'aButtons':[{sExtends:'ajax',sButtonText:LOCALE_BO.supprimer,sAjaxUrl:ajaxURL,fnClick:function(nButton,oConfig){boutonActionMasse(oConfig,'SUPPRIMER','input[name="idsFiches"]:checked',LOCALE_BO.confirmSupprFiches,LOCALE_BO.confirmationActionMasseSuppr);}
3946,fnAjaxComplete:function(){$('#checkall').prop('checked',false);datagridFiche.fnDraw();}},{sExtends:'ajax',sButtonText:LOCALE_BO.archiver,sAjaxUrl:ajaxURL,fnClick:function(nButton,oConfig){boutonActionMasse(oConfig,'ARCHIVER','input[name="idsFiches"]:checked',LOCALE_BO.confirmArchFiches,LOCALE_BO.confirmationActionMasseArchi);},fnAjaxComplete:function(){$('#checkall').prop('checked',false);datagridFiche.fnDraw();}}]},'sAjaxSource':ajaxURL,'aoColumns':[$.extend(colonneSelectionParId,{'mRender':function(data,type,full){if(data&&full.urlSuppression){return'<input id="idsFiches-'+data+'" type="checkbox" name="idsFiches" value="'+data+'" />';}}}),colonneLibelle,colonneRubrique,colonneLangue,colonneEtatFiche,colonneDateModif,$.extend(colonneAction,{'mRender':function(data,type,full){var actions='';if(full.urlModification){actions+='<a class="action_modifier" href="'+full.urlModification+'" title="'+LOCALE_BO.modifier+'" >'+LOCALE_BO.modifier+'</a>';}
3947if(full.urlSuppression){if(actions.length>0){actions+=' | ';}
3948actions+='<a class="action_supprimer" href="'+full.urlSuppression+'" data-confirm="'+LOCALE_BO.confirmSupprFiche+'" title="'+LOCALE_BO.supprimer+'" >'+LOCALE_BO.supprimer+'</a>';}
3949if(full.url){if(actions.length>0){actions+=' | ';}
3950actions+='<a class="action_apercu" href="'+full.url+'" title="'+LOCALE_BO.nouvelleFenetre+'" >'+LOCALE_BO.voirEnLigne+'</a>';}
3951return actions;}})]}).fnSetFilteringDelay();datagridFiche.on('click','#checkall',function(){$('input[name="idsFiches"]').prop('checked',this.checked);});}
3952var datagridUtilisateurPopup=$('.datatableUtilisateurRECHERCHE');if(datagridUtilisateurPopup.length>0){ajaxURL=datagridUtilisateurPopup.data('search')||'';datagridUtilisateurPopup.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sAjaxSource':ajaxURL,'aoColumns':[{'mData':'nom','sDefaultContent':'','bSearchable':null,'bSortable':true,'mRender':function(data,type,full){return'<a href="#" class="userResult" data-userCode="'+full.code+'" title="'+full.nom+' '+full.prenom+'">'+full.nom+' '+full.prenom+'</a>';}},{'mData':'code','sDefaultContent':'','bSearchable':null,'bSortable':true},{'mData':'structure','sDefaultContent':'','bSearchable':null,'bSortable':true,'mRender':function(data,type,full){return'<span title="'+full.arboStructure+'">'+data+'</span>';}}]}).fnSetFilteringDelay();datagridUtilisateurPopup.on('click','.userResult',function(){iFrameHelper.sendValues(window.iFrameRegistration,{sCode:$(this).attr('data-userCode'),libelle:$(this).attr('title')});return false;});}
3953var datagridUtilisateur=$('.datatableUtilisateurGESTION');if(datagridUtilisateur.length>0){ajaxURL=datagridUtilisateur.data('search')||'';datagridUtilisateur.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sDom':'<"H"Tflr>t<"F"ip>','oTableTools':{'aButtons':[{sExtends:'ajax',sButtonText:LOCALE_BO.supprimer,sAjaxUrl:ajaxURL,fnClick:function(nButton,oConfig){boutonActionMasse(oConfig,'SUPPRIMER','input[name="idsUtilisateur"]:checked',LOCALE_BO.confirmSupprUtilisateurs,LOCALE_BO.confirmationActionMasseUtilisateur);},fnAjaxComplete:function(){$('#checkall').prop('checked',false);datagridUtilisateur.fnDraw();}}]},'sAjaxSource':ajaxURL,'aaSorting':[[1,'asc']],'aoColumns':[$.extend(colonneSelectionParId,{'mRender':function(data){return'<input id="idsUtilisateur-'+data+'" type="checkbox" name="idsUtilisateur" value="'+data+'" />';}}),{'mData':'libelle','sDefaultContent':'','bSearchable':null,'bSortable':true,'mRender':function(data,type,full){if(full.urlModification){return'<a title="'+data+'" href="'+full.urlModification+'" >'+data+'</a>';}else{return data;}}},{'mData':'code','sDefaultContent':'','bSearchable':null,'bSortable':true},{'mData':'mail','sDefaultContent':'','bSearchable':null,'bSortable':true},{'mData':'structure','sDefaultContent':'','bSearchable':null,'bSortable':true,'mRender':function(data,type,full){return'<span title="'+full.arboStructure+'">'+data+'</span>';}},$.extend(colonneAction,{'mRender':function(data,type,full){if(full.urlModification&&full.urlSuppression){return'<a class="action_modifier" href="'+full.urlModification+'" >'+LOCALE_BO.modifier+'</a> | <a class="action_supprimer" href="'+full.urlSuppression+'" data-confirm="'+LOCALE_BO.confirmSupprUtilisateur+'"  >'+LOCALE_BO.supprimer+'</a>';}else{return'';}}})]}).fnSetFilteringDelay();datagridUtilisateur.on('click','#checkall',function(){$('input[name="idsUtilisateur"]').prop('checked',this.checked);});}
3954var datagridUtilisateurListe=$('.datatableUtilisateurGROUPE');if(datagridUtilisateurListe.length>0){ajaxURL=datagridUtilisateurListe.data('search')||'';datagridUtilisateurListe.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sDom':'<"H"flr>t<"F"ip>','sAjaxSource':ajaxURL,'aaSorting':[[1,'asc']],'aoColumns':[{'mData':'code','sDefaultContent':'','bSearchable':null,'bSortable':true},{'mData':'libelle','sDefaultContent':'','bSearchable':null,'bSortable':true},$.extend(colonneAction,{'mRender':function(data,type,full){return'<a class="action_supprimer" href="'+full.urlSuppressionGroupe+'" data-confirm="'+LOCALE_BO.confirmSupprUtilisateur+'"  >'+LOCALE_BO.supprimer+'</a>';}})]}).fnSetFilteringDelay();}
3955var datagridUtilisateurGroupeDynamque=$('.datatableUtilisateurGROUPEDYN');if(datagridUtilisateurGroupeDynamque.length>0){ajaxURL=datagridUtilisateurGroupeDynamque.data('search')||'';datagridUtilisateurGroupeDynamque.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sDom':'<"H"flr>t<"F"ip>','sAjaxSource':ajaxURL,'aaSorting':[[1,'asc']],'aoColumns':[{'mData':'code','sDefaultContent':'','bSearchable':null,'bSortable':true},{'mData':'libelle','sDefaultContent':'','bSearchable':null,'bSortable':true}]}).fnSetFilteringDelay();}
3956var datagridMultiFicheRubrique=$('.datatableMultiFicheRubrique');if(datagridMultiFicheRubrique.length>0){ajaxURL=datagridMultiFicheRubrique.data('search')||'';datagridMultiFicheRubrique.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'aaSorting':[[6,'desc']],'sDom':'rt<"F"ip>','sAjaxSource':ajaxURL,'aoColumns':[colonneLibelle,colonneTypeObjet,colonneLangue,colonneEtatFiche,colonneDateModif,$.extend(colonneAction,{'mRender':function(data,type,full){var actions='';if(full.urlModification){actions+='<a class="action_modifier" href="'+full.urlModification+'" title="'+LOCALE_BO.modifier+'" >'+LOCALE_BO.modifier+'</a>';}
3957if(full.url){if(actions.length>0){actions+=' | ';}
3958actions+='<a class="action_apercu" href="'+full.url+'" title="'+LOCALE_BO.nouvelleFenetre+'" >'+LOCALE_BO.voirEnLigne+'</a>';}
3959return actions;}})]}).fnSetFilteringDelay();}
3960var datagridLibelle=$('.datatableLibelle');if(datagridLibelle.length>0){ajaxURL=datagridLibelle.data('search')||'';datagridLibelle.dataTable({'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sDom':'<"H"flr>t<"F"ip>','sAjaxSource':ajaxURL,'aaSorting':[[0,'asc']],'aoColumns':[{'mData':'type','sDefaultContent':'','bSortable':true},{'mData':'code','sDefaultContent':'','bSortable':true},{'mData':'libelleParLangue','sDefaultContent':'','bSortable':true,'mRender':function(data,type,full){var valeur='<ul>';$.each(data,function(index,value){valeur+='<li><img src="'+value.urlLangue+'" alt="'+value.langage+'" title="'+value.langue+'" />&nbsp;';if(full.urlModification){valeur+='<a class="action_modifier" href="'+full.urlModification+'">'+value.libelle+'</a></li>';}else{valeur+=value.libelle+'</li>';}});valeur+='</ul>';return valeur;}},{'mData':'perimetre','sDefaultContent':'','bSortable':true},$.extend(colonneAction,{'mRender':function(data,type,full){var out='';if(full.urlModification){out+='<a class="action_modifier" href="'+full.urlModification+'">'+LOCALE_BO.modifier+'</a>';}
3961if(full.urlSuppression){if(full.urlModification){out+=' | ';}
3962out+='<a class="action_supprimer" href="'+full.urlSuppression+'" data-confirm="'+LOCALE_BO.confirmSupprLibelle+'"  >'+LOCALE_BO.supprimer+'</a>';}
3963return out;}})]}).fnSetFilteringDelay();}
3964var datagridRubrique=$('.datatableViews');if(datagridRubrique.length>0){ajaxURL=datagridRubrique.data('search')||'';var dataTableInitData={'sDom':'<"H"<"resume">flr>t<"F"ip>','aoColumnDefs':[{'bSortable':false,'aTargets':['sanstri']},{'bSearchable':false,'aTargets':['sansfiltre']}],'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sAjaxSource':ajaxURL,'aoColumns':[colonneLibelle,{'mData':'rubriqueMere','sDefaultContent':'','bSearchable':null,'bSortable':true},{'mData':'code','sDefaultContent':'','bSearchable':null,'bSortable':true},colonneLangue,$.extend(colonneAction,{'mRender':function(data,type,full){var actions='';if(full.urlModification){actions+='<a class="action_modifier" href="'+full.urlModification+'" title="'+LOCALE_BO.modifier+'" >'+LOCALE_BO.modifier+'</a>';}
3965if(full.urlSuppression){actions+=' | <a class="action_supprimer" href="'+full.urlSuppression+'" ';if(datagridRubrique.hasClass('js-advancedFeatured-enabled')){actions+='data-confirm="'+LOCALE_BO.confirmSupprRubrique.replace('{0}',full.libelle)+'"';}
3966actions+='>'+LOCALE_BO.supprimer+'</a>';}
3967if(full.copyUrl){if(datagridRubrique.hasClass('js-siteJobWorking')){actions+=' | <span title="'+LOCALE_BO.jobSiteInProgress+'" class="unclickable--link-like">'+LOCALE_BO.copy+'</span>';}else{actions+=' | <a class="action_duplicate" href="'+full.copyUrl+'" title="'+LOCALE_BO.copy+'" >'+LOCALE_BO.copy+'</a>';}}
3968return actions;}})],'fnDrawCallback':function(){$.fn.dataTable.tools.gestionNavigation(this.attr('id'));}};datagridRubrique.dataTable(dataTableInitData).fnSetFilteringDelay();}
3969var datagridGroupe=$('.datatableViewsGroupe');if(datagridGroupe.length>0){ajaxURL=datagridGroupe.data('search')||'';datagridGroupe.dataTable({'sDom':'<"H"<"resume">flr>t<"F"ip>','aoColumnDefs':[{'bSortable':false,'aTargets':['sanstri']},{'bSearchable':false,'aTargets':['sansfiltre']}],'fnServerData':$.fn.dataTable.tools.processRequest,'bServerSide':true,'bProcessing':true,'sAjaxSource':ajaxURL,'aoColumns':[colonneLibelle,{'mData':'typeGroupe','sDefaultContent':'','bSearchable':null,'bSortable':true},{'mData':'structure','sDefaultContent':'','bSearchable':null,'bSortable':true},$.extend(colonneAction,{'mRender':function(data,type,full){var actions='';if(full.urlModification){actions+='<a class="action_modifier" href="'+full.urlModification+'" title="'+LOCALE_BO.modifier+'" >'+LOCALE_BO.modifier+'</a>';}
3970if(full.urlSuppression){actions+=' | <a class="action_supprimer" href="'+full.urlSuppression+'" data-confirm="'+LOCALE_BO.confirmSupprGroupe+'"  >'+LOCALE_BO.supprimer+'</a>';}
3971return actions;}})],'fnDrawCallback':function(){$.fn.dataTable.tools.gestionNavigation(this.attr('id'));}}).fnSetFilteringDelay();}
3972$('.datatableRubrique').dataTable({'sDom':'t<"F"ip>','fnDrawCallback':function(){$.fn.dataTable.tools.gestionNavigation(this.attr('id'));}}).fnSetFilteringDelay();$('.dataTable').on('click','a[data-confirm], button[data-confirm]',function(event){var that=$(this);event.preventDefault();$('<div></div>').html(that.data('confirm')).dialog({buttons:[{text:LOCALE_BO.ok,click:function(){$(this).dialog('close');if(that.attr('href')){window.location=that.attr('href');}else if(that.attr('data-action')){var formulaire=that.closest('form');document.querySelector('[name=ACTION]').value=that.attr('data-action');var inputTarget=document.querySelector('[name='+that.attr('data-value-target')+']');if(inputTarget){inputTarget.value=that.attr('data-value');}else{formulaire.append('<input type="hidden" name="'+that.attr('data-value-target')+'" value="'+that.attr('data-value')+'"/>');}
3973formulaire.submit();}}},{text:LOCALE_BO.fermer,click:function(){$(this).dialog('close');}}],title:LOCALE_BO.confirmer});});})(jQuery.noConflict());(function($){'use strict';var defaultConfiguration;function customizeConf(configuration){if(configuration.disableNativeSpellChecker===false){configuration.globalNotifications={globalMessages:[{'uuid':'6c0df62e-3c07-425e-9f96-a2e2bbcad016','message':LOCALE_BO.ckeditor.notifications.spellcheker,'level':'info'}]};}
3974var htmlElement=document.getElementsByTagName('html')[0];configuration.allowedContent=true;configuration.language=htmlElement.lang;}
3975function loadExternalPlugins(conf){if(conf.externalPaths){for(var property in conf.externalPaths){if(conf.externalPaths.hasOwnProperty(property)&&!CKEDITOR.plugins.externals.hasOwnProperty(property)){CKEDITOR.plugins.addExternal(property,conf.externalPaths[property]);}}}}
3976function loadCkeditors(editors,confKeys){$.ajax({'url':'/servlet/ckeditor/configuration','data':{'conf_keys[]':confKeys},'dataType':'json','success':function(configs){editors.each(function(){var $this=$(this),currentConfKey=$this.attr('data-conf'),currentConf=configs[currentConfKey];if(currentConfKey){customizeConf(currentConf);if(currentConf){var maxLength=$this.attr('maxLength');if(maxLength&&currentConf.hasOwnProperty('wordcount'))
3977{currentConf.wordcount.maxCharCount=maxLength;}
3978var currentEditor=CKEDITOR.replace($this.attr('id'),currentConf);currentEditor.on('configLoaded',function(event){loadExternalPlugins(event.listenerData.conf);},null,{'conf':currentConf});currentEditor.on('instanceReady',function(){this.document.$.execCommand('enableObjectResizing',false,false);});
3978var page=document.querySelector('#page');currentEditor.on('maximize',function(e){if(page){if(CKEDITOR.TRISTATE_ON===e.data){page.classList.add('page_maximized_cke');}else{page.classList.remove('page_maximized_cke');}}});}else{CKEDITOR.replace($this.attr('id'),defaultConfiguration);}}});},'error':function(){editors.each(function(){var $this=$(this);if($this.attr('data-conf')){CKEDITOR.replace($this.attr('id'),defaultConfiguration);}});}});}
3979function loadDefaultConfiguration(){$.ajax({url:'/adminsite/ckeditor/configurations/defaultConfig.json',async:false,dataType:'json',success:function(response){defaultConfiguration=response;},error:function(){defaultConfiguration={};}});}
3980function init(){var editors=$('.js-ckeditor'),confKeys=[];loadDefaultConfiguration();if(editors.length>0){CKEDITOR.timestamp=+new Date();editors.each(function configureSpecificToolbox(){var $this=$(this),currentConfKey=$this.attr('data-conf');if(currentConfKey){confKeys.push(currentConfKey);}else{CKEDITOR.replace($this.attr('id'),defaultConfiguration);}});if(confKeys.length>0){loadCkeditors(editors,confKeys);}}}
3981$(function onDomReadyToolbox(){init();});})(jQuery.noConflict());(function(){'use strict';let callbacks=[];window.collapsableCommons={hideAll:function(exceptions){let opened=document.querySelectorAll('.plier-deplier__contenu--ouvert');if(typeof exceptions==='string'){opened=Array.prototype.filter.call(opened,function(selectedElement){return!selectedElement.classList.contains(exceptions);});}else if(Object.prototype.toString.call(exceptions)==='[object Array]'){opened=exceptions.forEach(exception=>Array.prototype.filter.call(opened,function(selectedElement){return!selectedElement.classList.contains(exception);}));}
3982opened.forEach(element=>{element.classList.remove('plier-deplier__contenu--ouvert');element.classList.add('plier-deplier__contenu--clos');let buttons=element.parentNode.getElementsByClassName('plier-deplier__bouton');if(buttons[0]){buttons[0].setAttribute('aria-expanded',true);}});callbacks.forEach(function(callback){callback()});},registerCallback:function(callback){if(callback&&{}.toString.call(callback)==='[object Function]'){callbacks.push(callback);}}};let foldUnfoldElements=document.querySelectorAll('.plier-deplier');document.documentElement.addEventListener('click',function(){collapsableCommons.hideAll('plier-deplier__contenu--relatif')});document.querySelectorAll('.plier-deplier__contenu').forEach(function(element){element.addEventListener('click',function(e){e.stopPropagation();})});foldUnfoldElements.forEach(function(element){element.addEventListener('focus',function(e){e.stopPropagation();})});let buttonList=Array.prototype.filter.call(foldUnfoldElements,function(selectedElement){return!selectedElement.classList.contains('plier-deplier__contenu--relatif');});let buttonList2=Array.prototype.filter.call(document.getElementsByClassName('plier-deplier__bouton'),function(selectedElement){return selectedElement.id!=='menu-principal-bouton';});buttonList.concat(buttonList2).forEach(function(element){element.addEventListener('click',foldUnfold)});function foldUnfold(element){element.preventDefault();element.stopPropagation();let contents=this.parentNode.getElementsByClassName('plier-deplier__contenu');let haveToClose=true;for(let i=0;i<contents.length;i++){haveToClose&=contents[i].classList.contains('plier-deplier__contenu--ouvert');contents[i].classList.toggle('plier-deplier__contenu--clos');contents[i].classList.toggle('plier-deplier__contenu--ouvert');}
3983if(haveToClose){collapsableCommons.hideAll();}}})();(function($){'use strict';$.validator.addMethod('ksupDate',function ksupDate(value){if(!value){return true;}
3984var patternElement=document.querySelector('[name=DATE_PATTERN_FORMAT]'),pattern='dd/MM/yyyy';if(patternElement){pattern=patternElement.value;}
3985var monthIndex=pattern.split('/').findIndex(function(current){return current.toLowerCase()==='mm';});var dayIndex=pattern.split('/').findIndex(function(current){return current.toLowerCase()==='dd';});var regExp=/([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/g,values=regExp.exec(value);if(values==null||regExp.test(value)){return false;}
3986var day=$.parseInteger(values[dayIndex+1]),month=$.parseInteger(values[monthIndex+1]);if(day>31||month>12){return false;}
3987return!(month===2&&day>29);},LOCALE_BO.validationMessages.ksupDate);$.validator.addMethod('ksupPhone',function ksupPhone(value){if(!value){return true;}
3988var regExp=/^((\+)*[0-9]{1,3}|0)[0-9]{9}$/;return regExp.test(value);},LOCALE_BO.validationMessages.ksupPhone);$.validator.addMethod('constraint',function constraint(value,element){var hasInvalidClass=$(element).hasClass('js-constraint-violation__field');if(hasInvalidClass){$(element).removeClass('js-constraint-violation__field');}
3989return!hasInvalidClass;},LOCALE_BO.validationMessages.constraint);$.validator.addClassRules('type_phone',{required:function(element){return $(element).prop('required');},ksupPhone:true});$.validator.addClassRules('type_email',{required:function(element){return $(element).prop('required');},'email':true});$.validator.addClassRules('type_date',{required:function(element){return $(element).prop('required');},ksupDate:true,maxlength:10});$.validator.addClassRules('type_url',{required:function(element){return $(element).prop('required');},url:true});$.validator.addClassRules('numeric_input',{required:function(element){return $(element).prop('required');},digits:true});$.validator.addClassRules('js-constraint-violation__field',{constraint:true});var $formToValidate=$('form');$formToValidate.find('input + .js-constraint-violation__message').each(function(){var $currentElement=$(this);var input=$currentElement.prev();input.addClass('js-constraint-violation__field');input.attr('data-msg-constraint',$currentElement.text());});var validateOptions={ignore:'.ignore, :hidden',focusCleanup:true,errorElement:'div'};$formToValidate.each(function(index,component){var $component=$(component);$component.validate(validateOptions);});var serverErrorFields=$formToValidate.find('[data-msg-constraint]');if(serverErrorFields.length>0){serverErrorFields.valid(validateOptions);}
3990function updateToolTip(){var $this=$(this),popover=$(this).data('tooltip'),tip=popover.tip(),len=$this[0].value.replace(/(\r\n|\n|\r)/g,'--').length;
3990popover.options.content=len+' / '+$(this).attr('maxlength')+' caractères autorisés';popover.options.title=popover.options.content;var visible=popover&&tip&&tip.is(':visible');if(visible){tip.find('.tooltip-inner').html(popover.options.content);}else{popover.show();}}
3991var $maxedInputs=$('form:not([data-no-tooltip]) input[type="text"][maxlength], form:not([data-no-tooltip]) textarea[maxlength]');if($maxedInputs.length>0){$maxedInputs.removeAttr('title');$maxedInputs.each(function(index,component){var $component=$(component);$component.tooltip({placement:'right',title:$component.val().length+' / '+$component.attr('maxlength')+' caractères autorisés',trigger:'focus'});$component.bind('change keyup blur input focus',updateToolTip);if($component.is(':focus')){$component.tooltip('show');}});}
3992$('textarea[maxlength]').bind('keyup blur',function(){var $this=$(this),len=$this[0].value.replace(/(\r\n|\n|\r)/g,'--').length,maxlength=$this.attr('maxlength');if(maxlength&&len>maxlength){var delta=len-maxlength;$this.val($this.val().slice(0,maxlength-delta));}});var options={ui:{bootstrap2:true,showVerdicts:false,showErrors:true,verdicts:LOCALE_BO.validationMessages.pwdVerdicts,errorMessages:LOCALE_BO.validationMessages.pwdErrorMessages,viewports:{progress:".pwd--progress",errors:"pwd--error-list"}}};if(window.pwsOptions){$.extend(true,options,window.pwsOptions);}
3993$('.pwdStrength :password').pwstrength(options);$formToValidate.triggerHandler('validate.ready');})(jQuery.noConflict());(function($){if(!$.support.transition)$.fn.transition=$.fn.animate;var locale=$('html').attr('lang');$('.type_date').datepicker($.datepicker.regional[locale]);$('.type_rubrique_0004').click(function(){window.open(this.href);return false;});$('.js-force-reload').click(function(){window.location.reload(true);});$('a[data-imgmagnifier]').magnificPopup({type:'image'});})(jQuery.noConflict());(function($){function matches(el,selector){if(!el){return false;}
3994var matchesCallable=(el.matches||el.matchesSelector||el.msMatchesSelector||el.mozMatchesSelector||el.webkitMatchesSelector||el.oMatchesSelector);if(!matchesCallable){return false;}
3995return matchesCallable.call(el,selector);}
3996function closest(el,fn){return el&&(fn(el)?el:closest(el.parentNode,fn));}
3997function parentMatches(el,selector){return closest(el,function(e){return matches(e,selector);})!=null;}
3998function ancestorIndex(el,selector){var index=0;while(el!==null&&!matches(el,selector)){el=el.parentNode;index++;}
3999if(el===null){return null;}else{return index;}}
4000(new DataToggle({preventingCallback:function($element,$target,$el){if(parentMatches($el,'[data-toggle-target]')){var parentDataToggleTarget=ancestorIndex($el,'[data-toggle-target]');var parentDataToggle=ancestorIndex($el,'[data-toggle]');if(parentDataToggle===null){return true;}else{return parentDataToggleTarget<parentDataToggle;}}
4001return false;}}));var parentsElements=function(elem,selector){var elements=[];var ishaveselector=selector!==undefined;while((elem=elem.parentElement)!==null){if(elem.nodeType!==Node.ELEMENT_NODE){continue;}
4002if(!ishaveselector||elem.matches(selector)){elements.push(elem);}}
4003return elements;};[].forEach.call(document.querySelectorAll('.menu_principal--riche li[data-toggle-id]'),function($element){$element.addEventListener('menu-riche-toggle',function(event){var $target=event.target;var parents=parentsElements($target,'.menu_principal--riche');if(parents.length>0){parents[0].classList[$target.classList.contains('active')?'add':'remove']('active');}});});$('.owl-carousel').each(function(){var $t=$(this);var willBeAnimated=$t.find('.item').length>1;$t.owlCarousel({items:1,margin:10,loop:willBeAnimated,nav:false,autoplay:willBeAnimated,mouseDrag:willBeAnimated,touchDrag:willBeAnimated,autoplayTimeout:8000,autoplayHoverPause:true});$t.find('.owl-controls').prepend('<button class="owl-prev"></button>').append('<button class="owl-next"></button>');$t.find('.owl-controls .owl-prev').click(function(){$t.trigger('prev.owl.carousel');}).end().find('.owl-controls .owl-next').click(function(){$t.trigger('next.owl.carousel');});});[].forEach.call(document.querySelectorAll('.header_toggle__menu'),function(element){element.addEventListener('give-focus',function(){var inputs=element.querySelectorAll('.header_toggle__input');if(inputs.length>0){inputs[0].focus();}});});$('.js-share-action').on('click',function(e){e.preventDefault();var href=$(this).attr('href');window.open(href,'','height=400,width=600,titlebar=yes');return false;});var $resultatSelecteur=$("#resultatSelecteur");if($resultatSelecteur.length>0){$resultatSelecteur.dataTable();}
4004$("blockquote, q, cite").wrapInner("<span></span>");$(".objets .vignette_deco img").each(function(){$(this).parent(".vignette_deco").addClass("loaded").css("background-image","url('"+$(this).attr("src")+"')");});$('a').each(function(){var $this=$(this);if($this.children('img').length===1){$this.addClass('img_link');}});})(jQuery.noConflict());var patterns={'image':/.((-|\.)jpeg|(-|\.)jpg|(-|\.)gif|(-|\.)png)/,'iframe':{'youtube':/(youtube|youtu)\.(com|be)\/(watch\?v=(\w+)|(\w+))/,'dailymotion':/dailymotion\.com\/(\w+)/,'vimeo':/vimeo\.com\/(\w+)/,'video':/.((-|\.)mp4|(-|\.)flv|(-|\.)avi|(-|\.)mov)/,'audio':/.((-|\.)mp3|(-|\.)ogg)/,'doc':/.((-|\.)pdf|(-|\.)doc|(-|\.)docx|(-|\.)xls|(-|\.)xlsx|(-|\.)ppt|(-|\.)pptx)/,'flash':/.((-|\.)swf)/}};var replacePattern=/&(WIDTH|width|HEIGHT|height|MEDIA|media)(=[0-9]+)*/gi;(function($){function is(type,obj){var clas=Object.prototype.toString.call(obj).slice(8,-1);return obj!==undefined&&obj!==null&&clas===type;}
4005function getLinkType(link){var href=$(link).attr('href'),type='undefined';$.each(patterns,function(key,value){if(type!=='undefined'){return false;}
4006if(is('RegExp',value)){if(href.match(value)){type=key;return false;}}else if(is('Object',value)){$.each(value,function(subKey,subValue){if(href.match(subValue)){type=key;return false;}});}});return type;}
4007$('.galerie_onglet').each(function(index){var $gallery=$(this),$tabs=$gallery.find('li[class^="galerie_onglet"]');$tabs.click(function(){var $this=$(this),$div=$('#'+$this.data('tabid'));$('[class^="galerie_onglet_contenu"]',$gallery).removeClass('galerie_onglet_contenu--show');$div.addClass('galerie_onglet_contenu--show');});});$('.pagination_suivant').click(function(e){e.preventDefault();var $this=$(this),$galerie=$this.closest('.galerie_playlist'),$page=$this.closest('.visionneuse_pagination');
4007$('.visionneuse_pagination',$galerie).removeClass('visionneuse_pagination--show');$page.nextAll('.visionneuse_pagination:first').addClass('visionneuse_pagination--show');});$('.pagination_precedent').click(function(e){e.preventDefault();var $this=$(this),$galerie=$this.closest('.galerie_playlist'),$page=$this.closest('.visionneuse_pagination');$('.visionneuse_pagination',$galerie).removeClass('visionneuse_pagination--show');$page.prevAll('.visionneuse_pagination:first').addClass('visionneuse_pagination--show');});var contents=[];$('.pagination_contenu .lanceur_media, .pagination_contenu .lien_externe a').each(function(index){var $this=$(this),type=getLinkType(this);if(type!=='undefined'){contents.push({src:$this.attr('href'),type:type});}else{contents.push({src:'#',type:'inline'});}
4008$(this).data('index',index);$this.removeAttr('onclick');});var $triggers=$('.pagination_contenu .lanceur_media, .pagination_contenu .lien_externe');$triggers.magnificPopup({items:contents,image:{titleSrc:function(item){var $link=$triggers.eq(item.index),title=$link.closest('div').find('[class*="media_titre"]').html();return title?title:'';},tError:LOCALE_FO.galerie.display.errorImage},inline:{tNotFound:LOCALE_FO.galerie.display.errorFormatInconnu,src:''},iframe:{markup:'<div class="mfp-iframe-scaler">'+'<div title="%title%" class="mfp-close"></div>'+'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+'<div class="mfp-bottom-bar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'</div>'+'</div>',titleSrc:function(item){var $link=$('.lanceur_media, .lien_externe').eq(item.index),title=$link.closest('div').find('[class*="media_titre"]').html();return title?title:'';},patterns:{youtube:{index:'youtube.com/',id:function(url){var m=url.match(/(youtube|youtu)\.(com|be)\/(watch\?v=(\w+)|v\/(\w+)|embed\/(\w+))/);if(m){if(m[4]){return m[4];}
4009if(m[5]){return m[5];}
4010if(m[6]){return m[6];}}
4011return null;},className:'video',src:'//www.youtube.com/embed/%id%?autoplay=1'},vimeo:{index:'vimeo.com/',id:'/',className:'video',src:'//player.vimeo.com/video/%id%?autoplay=1'},dailymotion:{index:'dailymotion.com',id:function(url){var m=url.match(/^.+dailymotion.com\/(video|hub|swf)\/([^_]+)[^#]*(#video=([^_&]+))?/);if(m!==null){if(m[4]!==undefined){return m[4];}
4012return m[2];}
4013return null;},className:'video',src:'http://www.dailymotion.com/embed/video/%id%'},doc:{index:function(url){var m=url.match(patterns['iframe']['doc']);if(m){return 0;}
4014return-1;},id:function(url){var m=url.match(/(.+)(\?.+)/);if(m&&m[1]){return m[1];}
4015return url;},className:'document',src:'http://docs.google.com/viewer?url=%id%&embedded=true'},audio:{index:function(url){var m=url.match(patterns['iframe']['audio']);if(m){return 0;}
4016return-1;},id:function(url){var m=url.match(/.+\?URL_MEDIA=(.+)/);if(m&&m[1]){return m[1];}
4017return url;},className:'audio',src:'/adminsite/utils/mediatheque/audio/audio.jsp?URL_MEDIA=%id%'},video:{index:function(url){var m=url.match(patterns['iframe']['video']);if(m){return 0;}
4018return-1;},id:function(url){var m=url.match(/.+\?URL_MEDIA=(.+)/),extension='&EXTENSION=';if(m&&m[1]){return m[1]+extension;}
4019return url+extension;},className:'video',src:'/adminsite/utils/mediatheque/video/video.jsp?URL_MEDIA=%id%'}},srcAction:'iframe_src',tError:LOCALE_FO.galerie.display.errorIFrame},tClose:LOCALE_FO.galerie.controls.close,tLoading:LOCALE_FO.galerie.display.loading,tClose:LOCALE_FO.galerie.controls.close,gallery:{enabled:true,navigateByImgClick:true,tPrev:LOCALE_FO.galerie.controls.previous,tNext:LOCALE_FO.galerie.controls.next,tCounter:'<span>%curr% '+LOCALE_FO.galerie.display.counter+' %total%</span>'}});})(jQuery.noConflict());(function($){var $oldVideos=$('div[flv_url]');$oldVideos.each(function(index){var $this=$(this),$divMedia=$('<div>').addClass('media'),$video=$('<video>');var loop=$this.attr('flv_loop')&&$this.attr('flv_loop')!=0;if(loop)$video.attr('loop','');$video.attr({'id':$this.attr('iddivplayer'),'style':$this.attr('style'),'poster':$this.attr('flv_imgurl'),'width':$this.attr('flv_width'),'height':$this.attr('flv_height'),'controls':''});$('<source>').attr({'src':$this.attr('flv_url'),'type':'video/flv'}).appendTo($video);var $flashObject=$('<object>').attr({'width':$this.attr('flv_width'),'height':$this.attr('flv_height'),'type':'application/x-shockwave-flash','data':window.location.origin+'/adminsite/scripts/libs/mediaElement/flashmediaelement.swf'});$('<param>').attr({'name':'movie','value':window.location.origin+'/adminsite/scripts/libs/mediaElement/flashmediaelement.swf'}).appendTo($flashObject);$('<param>').attr({'name':'flashvars','value':'controls=true&amp;file='+$this.attr('flv_url')}).appendTo($flashObject);$('<param>').attr({'name':'allowFullScreen','value':'true'}).appendTo($flashObject);$flashObject.appendTo($video);$video.appendTo($divMedia);$this.replaceWith($divMedia);});var $oldAudios=$('span[kaudio_span]');$oldAudios.each(function(index){var $this=$(this),$divMedia=$('<div>').addClass('media'),$audio=$('<audio>');var loop=$this.attr('_kaudio_autoreplay')&&$this.attr('_kaudio_autoreplay')!=0;if(loop)$audio.attr('loop','');$audio.attr({'id':$this.find('div').attr('id'),'controls':''});$('<source>').attr({'src':$this.attr('_kaudio_url'),'type':'audio/mpeg'}).appendTo($audio);$audio.appendTo($divMedia);$this.replaceWith($divMedia);});if(!$('html').is('.ie8')){$('video').mediaelementplayer({plugins:['flash','silverlight'],pauseOtherPlayers:true,pluginPath:window.location.origin+'/adminsite/scripts/libs/mediaElement/'});}
4020$('audio').mediaelementplayer({plugins:['flash','silverlight'],pauseOtherPlayers:true,features:['playpause','progress','current','duration','tracks','volume'],pluginPath:window.location.origin+'/adminsite/scripts/libs/mediaElement/',alwaysShowControls:true,defaultAudioWidth:'100%',defaultAudioHeight:30});})(jQuery.noConflict());(function($){var isHeadPageVisible=false,criticalPoint;$(window).load(function(){var $haut_page=$('#haut_page');$(window).scroll(onWindowScroll);var $link=$('a',$haut_page).html('').detach();$haut_page.children().remove();$('<span class="icon icon-arrow-up3">').appendTo($link);$link.appendTo($haut_page);$haut_page.transition({y:"+=100",opacity:"0"},function(){handleButton();});});function handleButton(){var $window=$(window),$hautPage=$('#haut_page'),criticalPoint=$('#page').position().top;if($window.scrollTop()>criticalPoint){if(!isHeadPageVisible){$hautPage.transition({y:"-=100",opacity:"1"});isHeadPageVisible=true;}}
4021if($window.scrollTop()>0&&$window.scrollTop()<criticalPoint){if(isHeadPageVisible){$hautPage.transition({y:"+=100",opacity:"0"});isHeadPageVisible=false;}}}
4022function onWindowScroll(){handleButton();}
4023$('#haut_page').click(function(){$(this).transition({y:"+=100",opacity:"0"});isHeadPageVisible=false;});})(jQuery.noConflict());(function($){var $items_tab=$('.onglets .onglets__item'),$buttons=$('.onglets-section .onglets-section__bouton'),$contentPanels=$('.onglets-section');$items_tab.click(function(e){e.preventDefault();e.stopImmediatePropagation();clearActives();setActives($(this));});$buttons.click(function(e){e.preventDefault();e.stopImmediatePropagation();var $ongletCourant=$('#'+$(this).parents('.onglets-section').attr('id'));var $contenuCourant=$ongletCourant.find(".onglets-section__contenu");$contenuCourant.slideToggle("slow",function(){$ongletCourant.toggleClass('onglets-section--actif',$contenuCourant.is(':visible'));$('[data-tab='+$ongletCourant.attr('id')+']').toggleClass('onglets__item--actif',$contenuCourant.is(':visible'));$('html, body').animate({scrollTop:$ongletCourant[0].offsetTop},0);});});function clearActives(){$items_tab.removeClass('onglets__item--actif');$buttons.removeClass('onglets-section__bouton--actif');$contentPanels.removeClass('onglets-section--actif');}
4024function setActives($element){var $contentPanel,$item;if($element.attr('data-tab')){$contentPanel=$('#'+$element.attr('data-tab'));$item=$('.onglets__item',$contentPanel);$contentPanel.addClass('onglets-section--actif');$element.addClass('onglets__item--actif');$item.addClass('onglets-section__bouton--actif');}else{$contentPanel=$element.closest('.onglets-section');$item=$('.onglets .onglets__item[data-tab="'+$contentPanel.attr('id')+'"]');$contentPanel.addClass('onglets-section--actif');$element.addClass('onglets-section__bouton--actif');$item.addClass('onglets__item--actif');}}})(jQuery.noConflict());(function($){'use strict';$('.aggregation-toggle').on('click',function(){$('#aggregation_search').toggleClass('aggregation_search--visible');});$('.item-list__show-more, .item-list__show-less').on('click',function(){$(this.parentElement).children('.item-list__show-more, .item-list__show-less').toggle();$(this.parentElement).children('.item-list__hidden').toggle();});$('.aggregation-item__aggregation-name').on('click',function(){$(this).parent('li').toggleClass('search-aggregation__aggregation-list__item--visible');});$('.js-search-aggregation-select').on('change',function(){if($(this).hasClass('js-nested-aggregation')){var input=$(this).find('.js-nested-aggregation-parent');
4024if(!input.prop('checked')){$(this).find('input:checkbox').prop('checked',input.prop('checked'));}}
4025var $form=$(this).closest('form');$form.submit();});})(jQuery.noConflict());(function($){'use strict';var $autoCompleteInputs=$('input[data-autocompleteurl]');function getDataValue(data){if(typeof data==='string'){return data;}else{if(data&&data.value){return data.value;}}}
4026if($autoCompleteInputs.length>0){$autoCompleteInputs.each(function(){var $this=$(this),width=$.parseInteger($this.data('width'));$this.autocomplete({serviceUrl:$this.data('autocompleteurl'),params:{'BEAN_AUTO_COMPLETION':$this.data('bean')},groupBy:$this.data('groupby')||'',position:$this.data('position')||'left',width:width!==0?width:'auto',minChars:3,noCache:true,deferRequestBy:400,showNoSuggestionNotice:$this.data('display-noresult')?$this.data('display-noresult'):true,noSuggestionNotice:LOCALE_BO.services.auto_complete.noresult,onSearchStart:function(){var $autocomplete=$(this).autocomplete();var $suggestions=$($autocomplete.suggestionsContainer);$suggestions.css({display:'block',height:'30px'});if($this.data('formparams')){var paramsForm=$this.closest('form').serializeArray();var params=$autocomplete.options.params;var paramsFormLength=paramsForm.length;for(var i=0;i<paramsFormLength;i++){var dataForm=paramsForm[i];params[dataForm.name]=dataForm.value;}
4027var beanKey=$this.data('beankey');if(!!beanKey&&beanKey!==''){params['beanKey']=beanKey;}}
4028$('<div>').addClass('throbber').appendTo($suggestions);$('<span>').addClass('message').html(LOCALE_BO.services.auto_complete.search).appendTo($suggestions);},onSearchComplete:function(){var $suggestions=$($(this).autocomplete().suggestionsContainer);$suggestions.css({display:'block',height:'auto'});$suggestions.find('.message, .throbber').remove();},onSelect:function(suggestion){var $form=$this.closest('form'),$hidden=$('input[type="hidden"][data-inputfor="'+$this.attr('id')+'"]'),ignoreValidation=$this.attr('data-ignorevalidation'),submitOnSelect=$this.attr('data-submitonselect');if($hidden.length>0){var value=getDataValue(suggestion.data)||'';$hidden.attr('data-selectedvalue',suggestion.value);$hidden.val(value);$hidden.trigger('change');}
4029if(ignoreValidation&&$form.validate){$this.addClass(ignoreValidation);$form.valid();$this.trigger('change');}
4030if(submitOnSelect===undefined||submitOnSelect==='true'){$form.submit();}}});$this.on('change keyup',function(){var $form=$this.closest('form');var $hidden=$('input[type="hidden"][data-inputfor="'+$this.attr('id')+'"]');if($hidden.length>0&&$hidden.attr('data-selectedvalue')!==$this.val()){$('input[type="hidden"][data-inputfor="'+$this.attr('id')+'"]').val($this.val());if($this.is('.'+$this.attr('data-ignorevalidation'))&&$form.validate){$this.removeClass($this.attr('data-ignorevalidation'));$form.valid();}}});});}})(jQuery.noConflict());var _paq=window._paq||[];_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);(function(){const idMatomo=document.head.querySelector('[name="id-site-matomo"]');if(idMatomo&&idMatomo.content){const urlMatomo='matomo.ulb.be/matomo';var u="//"+urlMatomo+"/";_paq.push(['setTrackerUrl',u+'matomo.php']);_paq.push(['setSiteId',idMatomo.content]);var d=document,g=d.createElement('script'),s=d.getElementsByTagName('script')[0];g.type='text/javascript';g.async=true;g.defer=true;g.src=u+'matomo.js';s.parentNode.insertBefore(g,s);}})();function CNILWrapper(params){function query(parent,selector,callback){[].forEach.call(parent.querySelectorAll(selector),callback);}
4031function isCallable(object){return typeof object===typeof Function;}
4032function merge(){var extended={};for(var i=0;i<arguments.length;++i){var obj=arguments[i];for(var prop in obj){if(obj.hasOwnProperty(prop)){extended[prop]=obj[prop];}}}
4033return extended;}
4034function setCookie(cname,cvalue,exdays){var d=new Date();d.setTime(d.getTime()+(exdays*24*60*60*1000));var expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+";"+expires+";path=/";}
4035function getCookie(cname){var name=cname+"=";var decodedCookie=decodeURIComponent(document.cookie);var ca=decodedCookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)===' '){c=c.substring(1);}
4036if(c.indexOf(name)===0){return c.substring(name.length,c.length);}}
4037return"";}
4038function deleteCookie(name){document.cookie=name+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';}
4039this.params={$element:null,forceDisplay:false,listenToClick:true,alwaysAllowStats:false,allowEvents:true,cookieID:'cnil-allow-stats',cookieAcceptedValue:'accepted',cookieRefusedValue:'refused',cookieExpiration:365+30,onAccepted:null,onRefused:null,onForget:null,onDisplay:null,onClose:null,launchStats:null,canLaunchStats:null,attrCloser:'data-cnil-close',attrAccepter:'data-cnil-accept',attrRefuser:'data-cnil-refuse',attrForgetter:'data-cnil-forget',eventAccept:'cnil-accept',eventRefuse:'cnil-refuse',eventForget:'cnil-forget',eventsElement:document.body};this.emit=function(eventName){var e=document.createEvent('Event');e.initEvent(eventName,true,true);this.params.eventsElement.dispatchEvent(e);};this.accept=function(preventDispatch){var self=this;var finish=function(preventDispatch){setCookie(self.params.cookieID,self.params.cookieAcceptedValue,self.params.cookieExpiration);if(!preventDispatch){self.emit(self.eventAccept);}
4040self.allowStats();};if(isCallable(self.params.onAccepted)){self.params.onAccepted.apply(self,[this.params.$element,function(){finish(preventDispatch);}]);}else{finish();}};this.refuse=function(preventDispatch){var self=this;var finish=function(preventDispatch){setCookie(self.params.cookieID,self.params.cookieRefusedValue,self.params.cookieExpiration);if(!preventDispatch){self.emit(self.eventRefuse);}};if(isCallable(self.params.onRefused)){self.params.onRefused.apply(self,[this.params.$element,function(){finish(preventDispatch);}]);}else{finish();}};this.forget=function(preventDispatch){var self=this;var finish=function(preventDispatch){deleteCookie(self.params.cookieID);if(!preventDispatch){self.emit(self.eventForget);}};if(isCallable(self.params.onForget)){self.params.onForget.apply(self,[this.params.$element,function(){finish(preventDispatch);}]);}else{finish();}};this.allowStats=function(){var self=this;var finish=function(){};if(isCallable(self.params.launchStats)){self.params.launchStats.apply(self,[this.params.$element,finish]);}else{finish();}};this.showPrompt=function(){var self=this;var finish=function(){};if(isCallable(self.params.onDisplay)){self.params.onDisplay.apply(self,[this.params.$element,finish]);}else{finish();}};this.hidePrompt=function(){var self=this;var finish=function(){};if(isCallable(self.params.onClose)){self.params.onClose.apply(self,[this.params.$element,finish]);}else{finish();}};this.canLaunchStats=function(){if(isCallable(this.params.canLaunchStats)){return this.params.canLaunchStats.apply(self);}else{return true;}};this.hasAccepted=function(){return getCookie(this.params.cookieID)===this.params.cookieAcceptedValue;};this.hasRefused=function(){return getCookie(this.params.cookieID)===this.params.cookieRefusedValue;};this.hasNeverAnswer=function(){var cookie=getCookie(this.params.cookieID);return cookie!==this.params.cookieAcceptedValue&&cookie!==this.params.cookieRefusedValue;};this.isDoNotTrack=function(){return(navigator.doNotTrack==='1');};this.bindEvents=function(){var self=this;query(this.params.$element,'['+this.params.attrCloser+']',function($close){$close.addEventListener('click',function(){self.hidePrompt();});});query(this.params.$element,'['+this.params.attrAccepter+']',function($accept){$accept.addEventListener('click',function(){self.accept();});});query(this.params.$element,'['+this.params.attrRefuser+']',function($refuse){$refuse.addEventListener('click',function(){self.refuse();});});query(this.params.$element,'['+this.params.attrForgetter+']',function($forget){$forget.addEventListener('click',function(){self.forget();});});};this.run=function(){var self=this;if(!(this.canLaunchStats())){return;}
4041if(self.params.allowEvents){self.params.eventsElement.addEventListener(self.params.eventAccept,function(){self.accept(true);});self.params.eventsElement.addEventListener(self.params.eventRefuse,function(){self.refuse(true);});self.params.eventsElement.addEventListener(self.params.eventForget,function(){self.forget(true);});}
4042if(self.params.forceDisplay){self.showPrompt();}
4043if(this.isDoNotTrack()){if(this.hasNeverAnswer()){self.refuse();self.showPrompt();}
4044return;}
4045if(self.params.alwaysAllowStats){if((self.hasNeverAnswer())){self.accept();self.showPrompt();}else{self.accept();}}else{if(self.hasAccepted()){self.allowStats();}else if(self.hasRefused()){}else{self.showPrompt();}
4046if(self.params.listenToClick&&self.hasNeverAnswer()){var clickHandler=function(event){if(self.hasNeverAnswer()){if(!(event.target.hasAttribute(self.attrRefuser))){self.accept();}}else{document.body.removeEventListener('click',clickHandler);}};document.body.addEventListener('click',clickHandler);}}};this.constructor=function(params){var self=this;this.params=merge(this.params,params);self.bindEvents();self.run();};if(params.$element!=null){this.constructor(params);}};window.addEventListener('load',function(){new CNILWrapper({$element:document.querySelector('.cnil-panel'),onDisplay:function($element,finish){$element.classList.add('cnil-panel--displayed');},onAccepted:function($element,finish){$element.classList.add('cnil-panel--accepted');finish();},onRefused:function($element,finish){if(this.isDoNotTrack()){$element.classList.add('cnil-panel--do-not-track');}else{$element.classList.add('cnil-panel--refused');}
4047finish();},onClose:function($element,finish){$element.classList.remove('cnil-panel--displayed');finish();},launchStats:function(){const gaCode=document.head.querySelector('[name="google-analytics"]');if(gaCode&&gaCode.content){ga('create',gaCode.content,'auto');02
4048ga('send','pageview');}
4049const idMatomo=document.head.querySelector('[name="id-site-matomo"]');if(idMatomo&&idMatomo.content){_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);}},canLaunchStats:function(){return!!ga||document.head.querySelector('[name="id-site-matomo"]');}});new CNILWrapper({$element:document.querySelector('.cnil-choice-maker'),forceDisplay:true,listenToClick:false,onDisplay:function($element,finish){if(this.isDoNotTrack()){$element.classList.add('cnil-choice-maker--do-not-track');}else{if(this.hasAccepted()){$element.classList.add('cnil-choice-maker--accepted');}else if(this.hasRefused()){$element.classList.add('cnil-choice-maker--refused');}}
4050finish();},onAccepted:function($element,finish){$element.classList.remove('cnil-choice-maker--refused');$element.classList.add('cnil-choice-maker--accepted');finish();},onRefused:function($element,finish){$element.classList.remove('cnil-choice-maker--accepted');$element.classList.add('cnil-choice-maker--refused');finish();},onForget:function($element,finish){$element.classList.remove('cnil-choice-maker--accepted');$element.classList.remove('cnil-choice-maker--refused');finish();},canLaunchStats:function(){return!!ga;}});});(function($){$('.owl-carrousel-slideshow').each(function(){var $t=$(this);var willBeAnimated=$t.find('.slideshow__item__wrapper').length>1;var isAutoplay=$t.attr("autoplay")&&willBeAnimated;var isAutoplayHoverPause=$t.attr("autoplayHoverPause");var autoplayTimeoutAttr=$t.attr("autoplayTimeout");if(isNaN(autoplayTimeoutAttr)){autoplayTimeoutAttr="5000";}
4051var smartSpeedAttr=$t.attr("smartSpeed");if(isNaN(smartSpeedAttr)){smartSpeedAttr="200";}
4052$t.owlCarousel({items:1,margin:0,loop:willBeAnimated,nav:false,autoplay:isAutoplay,mouseDrag:willBeAnimated,touchDrag:willBeAnimated,autoplayTimeout:autoplayTimeoutAttr,autoplayHoverPause:isAutoplayHoverPause,smartSpeed:smartSpeedAttr,dotsContainer:".nav_container"});$t.find('.owl-controls').prepend('<button class="owl-prev"></button>').append('<button class="owl-next"></button>');$t.find('.owl-controls .owl-prev').click(function(){$t.trigger('prev.owl.carousel');}).end().find('.owl-controls .owl-next').click(function(){$t.trigger('next.owl.carousel');});});})(jQuery.noConflict());(function($){var devicesList=[{"name":"iphone","label":RESPONSIVE_PREVISUALIZATION.messages.device_mobile_portrait,"width":"320","height":"480"},{"name":"iphone-l","label":RESPONSIVE_PREVISUALIZATION.messages.device_mobile_landscape,"width":"480","height":"320"},{"name":"ipad","label":RESPONSIVE_PREVISUALIZATION.messages.device_tablet_portrait,"width":"768","height":"1024"},{"name":"ipad-l","label":RESPONSIVE_PREVISUALIZATION.messages.device_tablet_landscape,"width":"1024","height":"768"},{"name":"desktop","label":RESPONSIVE_PREVISUALIZATION.messages.device_desktop,"width":"1200","height":"800"}];var message1=RESPONSIVE_PREVISUALIZATION.messages.resolution;var message2=RESPONSIVE_PREVISUALIZATION.messages.disclaimer;var defaultDeviceIndex=0;var modalId="responsive_modal";var wrapperId="responsive_wrapper";var iframeId="responsive_iframe";var viewportId="viewport";var tooltipId="responsive_tooltip";var devicesMenuId="devices_list";var deviceItemCssClass="device_item";var deviceActiveCssClass="active";var modalCssClass="has_modal";var closeItemCssClass="close_previsualization";var messageCssClass="viewport_message_intro";function loadResponsivePrevisualization(){var selectedDevice=devicesList[defaultDeviceIndex];var responsiveWrapper="<div id='"+modalId+"'><div id='"+wrapperId+"'></div></div>";var devicesMenu=$("<ul id='"+devicesMenuId+"'></ul>");var iframe="<div id='viewport_wrapper'><div class='viewport_content'><div id='viewport' class='"+selectedDevice.name+"'><iframe id='"+iframeId+"' name='responsiveframe' height='"+selectedDevice.height+"' width='"+selectedDevice.width+"' src=''></iframe></div><div class='device-detail'></div></div></div>";var tooltip="<div id='"+tooltipId+"'>
4052<span class='"+messageCssClass+"'></span><span class='viewport_message_disclaimer'>"+message2+"</span></div>";$(body).addClass(modalCssClass).prepend(responsiveWrapper);$(getId(wrapperId)).prepend(iframe).prepend(devicesMenu).prepend(tooltip);devicesMenu.append("<li class='"+closeItemCssClass+"'><button><span class='icon icon-close'></span><span>"+RESPONSIVE_PREVISUALIZATION.messages.close+"</span></button></li>");for(var i=0,l=devicesList.length;i<l;i++){var currentDevice=devicesList[i];devicesMenu.append("<li id='"+currentDevice.name+"' class='"+getItemCssClass(i)+" device'><button class='"+deviceItemCssClass+"' title='"+currentDevice.label+"' data-item='"+i+"'>"+currentDevice.name+"</button></li>");}
4053var currentUrl=window.location.href;var randomParameter="previsualisation="+new Date().getTime();if(currentUrl.indexOf('?')==-1){var currentUrl=currentUrl+"?"+randomParameter;}else{var currentUrl=currentUrl+"&"+randomParameter;}
4054$(getId(iframeId)).attr("src",currentUrl);updateTooltip(selectedDevice);$(getClass(deviceItemCssClass)).on('click',function(){var selectedDevice=devicesList[$(this).attr("data-item")];var devicesMenu=$(getId(devicesMenuId));$(devicesMenu).find("li").removeClass(deviceActiveCssClass);$(devicesMenu).find(getId(selectedDevice.name)).addClass(deviceActiveCssClass);$(getId(viewportId)).removeClass().addClass(selectedDevice.name);$(getId(iframeId)).attr("width",selectedDevice.width).attr("height",selectedDevice.height);updateTooltip(selectedDevice);});$(getClass(closeItemCssClass)).on('click',function(){$(getId(modalId)).remove();$(body).removeClass(modalCssClass)});}
4055function getItemCssClass(index){if(index===defaultDeviceIndex){return deviceActiveCssClass;}
4056return"";}
4057function getId(selector){return"#"+selector;}
4058function getClass(selector){return"."+selector;}
4059function updateTooltip(selectedDevice){var message=message1+" <b>"+selectedDevice.width+"</b> x <b>"+selectedDevice.height+"</b> ("+selectedDevice.label+")";$(getClass(messageCssClass)).html(message);}
4060$(".actions-fiche__item--responsive_previsualization").click(function(){loadResponsivePrevisualization();});})(jQuery.noConflict());;(function(window,document){'use strict';window.DataToggle=function(initSettings,directLoad){function objectValues(o){var values=[];for(var key in o){if(o.hasOwnProperty(key)){values.push(o[key]);}}
4061return values;}
4062function forEach(elements,callback){[].forEach.call(elements,callback);}
4063function extend(){for(var i=1;i<arguments.length;i++){for(var key in arguments[i]){if(arguments[i].hasOwnProperty(key)){arguments[0][key]=arguments[i][key];}}}
4064return arguments[0];}
4065function matches(el,selector){if(!el){return false;}
4066var matchesCallable=(el.matches||el.matchesSelector||el.msMatchesSelector||el.mozMatchesSelector||el.webkitMatchesSelector||el.oMatchesSelector);if(!matchesCallable){return false;}
4067return matchesCallable.call(el,selector);}
4068function filter(els,selector){var filtered=[];var test=typeof selector==='string'?function(a,b){return matches(a,b);}:function(a,b){return a===b;};forEach(els,function(el){if(test(el,selector)){filtered.push(el);}});return filtered;}
4069function triggerEvent(element,event,data){var e;if(window.CustomEvent){e=new CustomEvent(event,{detail:data});}else{e=document.createEvent('CustomEvent');e.initCustomEvent(event,true,true,data);}
4070element.dispatchEvent(e);}
4071function addClasses(elements,classes){forEach(elements,function(element){element.classList.add.apply(element.classList,classes);});}
4072function removeClasses(elements,classes){forEach(elements,function(element){element.classList.remove.apply(element.classList,classes);});}
4073function toggleClasses(elements,classes){forEach(elements,function(element){element.classList.toggle.apply(element.classList,classes);});}
4074var instance={binds:{},settings:{dataToggleElements:function(){return document.querySelectorAll('[data-toggle]');},dataToggleSameElements:function(toggleExpression){return document.querySelectorAll('[data-toggle="'+toggleExpression+'"]');},dataToggleGroupElements:function(group){return document.querySelectorAll('[data-toggle-group="'+group+'"]');},target:function(element){return element.getAttribute('data-toggle');},groups:function(element){return element.getAttribute('data-toggle-group');},events:function(element){return element.getAttribute('data-toggle-event');}
4074,classes:function(element){return element.getAttribute('data-toggle-class');},method:function(element){return element.getAttribute('data-toggle-method');},isBubble:function(element){return element.hasAttribute('data-toggle-bubble');},activeClasses:['active'],preventingCallback:function($element,$target,$el,options){return false;},triggerMethods:{button:{trigger:function(element,target,options,callback){var handleClick=function(event){return callback(event);};element.addEventListener('click',handleClick,false);return{click:handleClick};},preventingCallback:function($element,$target,$el,options){return false;}},check:{trigger:function(element,target,options,callback){var handleChange=function(event){var status=element.checked;return callback(event,{status:status,callback:function(el,elStatus){if(el.hasAttribute('type')&&(el.getAttribute('type')==='radio'||el.getAttribute('type')==='checkbox')){if(elStatus===true||elStatus===false){el.checked=elStatus;}else{el.checked=!el.checked;}}}});};element.addEventListener('change',handleChange,false);return{change:handleChange};},preventingCallback:function($element,$target,$el,options){if($el.tagName.toLowerCase()==='label'&&$el.hasAttribute('for')){var forElement=document.getElementById($el.getAttribute('for'));var dataToggles=options.dataToggleElements();if(filter(dataToggles,forElement).length>0){return true;}}
4075return false;}}},defaultTriggerMethod:'button'},dispatchEvents:function(events,element,status){for(var e=0;e<events.length;++e){triggerEvent(element,events[e],[status]);}},handleGroupedToggles:function($element,groups,classes,events,additional){var self=this;var dataToggleGroupElements=function(groupElement){if(groupElement!==$element){removeClasses([groupElement],classes);if(additional.hasOwnProperty('callback')){additional.callback(groupElement,false);}
4076forEach(document.querySelectorAll(self.settings.target(groupElement)),function(destinationElement){self.dispatchEvents(events,destinationElement,false);removeClasses([destinationElement],classes);});}};for(var g=0;g<groups.length;++g){forEach(self.settings.dataToggleGroupElements(groups[g]),dataToggleGroupElements);}},handleSameToggles:function($target,target,classes,events,additional){var self=this;forEach(self.settings.dataToggleSameElements(target),function(sameElement){var status=filter($target,'.'+classes.join(' ')).length>0;(status?addClasses:removeClasses)([sameElement],classes);if(additional.hasOwnProperty('callback')){additional.callback(sameElement,status);}
4077forEach($target,function(targetElement){self.dispatchEvents(events,targetElement,status);});});},handlePreventing:function($element,$el,$target,classes){if(filter(this.settings.dataToggleElements(),$el).length>0&&$element!==$el){return true;}
4078var preventingByTriggerType=false;for(var trigger in this.settings.triggerMethods){if(this.settings.triggerMethods.hasOwnProperty(trigger)&&!preventingByTriggerType){preventingByTriggerType=this.settings.triggerMethods[trigger].preventingCallback($element,$target,$el,this.settings);}}
4079return preventingByTriggerType||this.settings.preventingCallback($element,$target,$el,this.settings);},dataToggle:function(event,element,target,options,additional){var $el=event.target;var $element=typeof element==='string'?document.querySelectorAll(element):element;var $target=typeof target==='string'?document.querySelectorAll(target):target;var groups=(typeof options.groups==='string'?options.groups.split(' '):options.groups)||[];var events=(typeof options.events==='string'?options.events.split(' '):options.events)||[];var classes=(typeof options.classes==='string'?options.classes.split(' '):options.classes)||objectValues(this.settings.activeClasses);additional=additional||{};if(this.handlePreventing($element,$el,$target,classes)){return true;}
4080if(!(this.settings.isBubble($element))){event.preventDefault();}
4081this.handleGroupedToggles($element,groups,classes,events,additional);if(additional.hasOwnProperty('status')){(additional.status?addClasses:removeClasses)($target,classes);}else{toggleClasses($target,classes);}
4082this.handleSameToggles($target,target,classes,events,additional);return!(event.isDefaultPrevented);},storeBind:function(element,binds){if(this.binds[this.settings.target(element)]===undefined){this.binds[this.settings.target(element)]=[];}
4083this.binds[this.settings.target(element)].push({element:element,binds:binds});},bind:function(element,target,options){var self=this;options=options||{};var method=this.settings.triggerMethods[this.settings.triggerMethods.hasOwnProperty(options.method)?options.method:this.settings.defaultTr
4083iggerMethod].trigger;var binds=method(element,target,options,function(event,additional){if(!event.defaultPrevented){self.dataToggle.call(self,event,element,target,options,additional);}});self.storeBind(element,binds);},bindAll:function(){var self=this;forEach(this.settings.dataToggleElements(),function(element){var target=self.settings.target(element);var groups=self.settings.groups(element);var events=self.settings.events(element);var classes=self.settings.classes(element);var method=self.settings.method(element);self.bind(element,target,{groups:groups,events:events,classes:classes,method:method});});},unbind:function(toggleExpression){if(!this.binds.hasOwnProperty(toggleExpression)){return;}
4084var elementBinds=this.binds[toggleExpression];for(var i=0;i<elementBinds.length;++i){var eb=elementBinds[i];var element=eb.element;for(var eventName in eb.binds){if(eb.binds.hasOwnProperty(eventName)){var eventHandler=eb.binds[eventName];element.removeEventListener(eventName,eventHandler);}}}
4085delete this.binds[toggleExpression];},unbindAll:function(){for(var b in this.binds){if(this.binds.hasOwnProperty(b)){this.unbind(b);}}},refresh:function(){this.unbindAll();this.bindAll();},init:function(settings,loadDirect){var self=this;this.settings=extend({},self.settings,settings);if(!!loadDirect){self.bindAll();}else{window.addEventListener('load',function(){self.bindAll();},false);}
4086return self;}};return instance.init(initSettings,directLoad);};})(window,document);(function(document,window){(function(){if(!window.hasOwnProperty('CustomEvent')){var customEventPolyfill=function(event,params){params=params||{bubbles:false,cancelable:false,detail:undefined};var evt=document.createEvent('CustomEvent');evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt;};customEventPolyfill.prototype=window.Event.prototype;window.CustomEvent=customEventPolyfill;}})();function query(selector,iter){return queryOn(document,selector,iter);}
4087function queryOn(parent,selector,iter){if(!!iter){return[].forEach.call(parent.querySelectorAll(selector),iter);}else{return parent.querySelector(selector);}}
4088function indexOf(elements,el){return[].indexOf.call(elements,el);}
4089function isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length);}
4090function dispatchOn(element,event,data){var ev=new CustomEvent(event,data);element.dispatchEvent(ev);}
4091var focusableElementsSelector='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]';var modalVars={classes:{main:'modal',openState:'opened',body:'prevent-scroll-for-modal'},attributes:{main:'data-modal',open:'open',close:'close'},events:{main:'modal',open:'open',close:'close'}};function attrName(){[].unshift.call(arguments,modalVars.attributes.main);return[].join.call(arguments,'-');}
4092function attrSelector(){return'['+attrName.apply(attrName,arguments)+']';}
4093function attrSelectorValued(){var value=[].shift.call(arguments);return'['+attrName.apply(attrName,arguments)+'='+value+']';}
4094function eventName(){[].unshift.call(arguments,modalVars.events.main);return[].join.call(arguments,'.');}
4095function bemStatusClass(){[].unshift.call(arguments,modalVars.classes.main);return[].join.call(arguments,'--');}
4096function bemChildSelector(){[].unshift.call(arguments,modalVars.classes.main);return[].join.call(arguments,'__');}
4097window.addEventListener('load',function(){query(attrSelector(),function(element){var previousFocus=null;function trapKeys(ev){if(ev.which===27){dispatchOn(element,eventName(modalVars.events.close));}else if(ev.which===9){var focusables=element.querySelectorAll(focusableElementsSelector);var active=document.activeElement;var index=indexOf(focusables,active);var length=focusables.length;if(ev.shiftKey){if(index===0){focusables[length-1].focus();ev.preventDefault();}}else{if(index===length-1){focusables[0].focus();ev.preventDefault();}}}}
4098function focusOnFirstFocusable(){var first=null;queryOn(element,focusableElementsSelector,function(focusable){if(isVisible(focusable)&&!first){first=focusable;}});if(!!first){first.focus();}}
4099function refocusPrevious(){if(!!previousFocus){previousFocus.focus();previousFocus=null;}}
4100element.addEventListener(eventName(modalVars.events.open),function(){previousFocus=document.activeElement;document.body.classList.add(modalVars.classes.body);element.classList.add(bemStatusClass(modalVars.classes.openState));element.setAttribute('aria-hidden','false');element.addEventListener('keydown',trapKeys);focusOnFirstFocusable();});element.addEventListener(eventName(modalVars.events.close),function(){element.classList.remove(bemStatusClass(modalVars.classes.openState));document.body.classList.remove(modalVars.classes.body);element.setAttribute('aria-hidden','true');refocusPrevious();});});query(attrSelector(modalVars.attributes.open),function(control){control.addEventListener('click',function(ev){ev.preventDefault();var target=control.getAttribute(attrName(modalVars.attributes.open));
4100dispatchOn(query(attrSelectorValued(target)),eventName(modalVars.events.open));});});query(attrSelector(modalVars.attributes.close),function(control){control.addEventListener('click',function(ev){ev.preventDefault();var target=control.getAttribute(attrName(modalVars.attributes.close));dispatchOn(query(attrSelectorValued(target)),eventName(modalVars.events.close));});});});})(document,window);var animate=function(callback,from,to,duration,ease){duration=parseInt(duration,10);from=parseFloat(from);to=parseFloat(to);var efunc=ease instanceof Function?ease:function(currentTime,startValue,changeInValue,animationDuration){currentTime/=animationDuration/2;if(currentTime<1){return changeInValue/2*currentTime*currentTime*currentTime+startValue;}
4101currentTime-=2;return changeInValue/2*(currentTime*currentTime*currentTime+2)+startValue;};var raf=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(cb){window.setTimeout(cb,1000/60);};})();var scale=function(x,a,b,min,max){return((b-a)*(x-min))/(max-min)+a;};var start=+new Date;var routine=function(){var now=+new Date;var x=(now>start+duration)?1:efunc(now-start,0,1,duration);var currentValue=scale(x,from,to,0,1);callback(currentValue);if(x<1){raf(routine);}};raf(routine);};;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}
4102g.Clipboard=f()}})(function(){var define,module,exports;return(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}
4103var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}
4104return n[o].exports}
4105var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var DOCUMENT_NODE_TYPE=9;if(typeof Element!=='undefined'&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector;}
4106function closest(element,selector){while(element&&element.nodeType!==DOCUMENT_NODE_TYPE){if(element.matches(selector))return element;element=element.parentNode;}}
4107module.exports=closest;},{}],2:[function(require,module,exports){var closest=require('./closest');function delegate(element,selector,type,callback,useCapture){var listenerFn=listener.apply(this,arguments);element.addEventListener(type,listenerFn,useCapture);return{destroy:function(){element.removeEventListener(type,listenerFn,useCapture);}}}
4108function listener(element,selector,type,callback){return function(e){e.delegateTarget=closest(e.target,selector);if(e.delegateTarget){callback.call(element,e);}}}
4109module.exports=delegate;},{"./closest":1}],3:[function(require,module,exports){exports.node=function(value){return value!==undefined&&value instanceof HTMLElement&&value.nodeType===1;};exports.nodeList=function(value){var type=Object.prototype.toString.call(value);return value!==undefined&&(type==='[object NodeList]'||type==='[object HTMLCollection]')&&('length'in value)&&(value.length===0||exports.node(value[0]));};exports.string=function(value){return typeof value==='string'||value instanceof String;};exports.fn=function(value){var type=Object.prototype.toString.call(value);return type==='[object Function]';};},{}],4:[function(require,module,exports){var is=require('./is');var delegate=require('delegate');function listen(target,type,callback){if(!target&&!type&&!callback){throw new Error('Missing required arguments');}
4110if(!is.string(type)){throw new TypeError('Second argument must be a String');}
4111if(!is.fn(callback)){throw new TypeError('Third argument must be a Function');}
4112if(is.node(target)){return listenNode(target,type,callback);}
4113else if(is.nodeList(target)){return listenNodeList(target,type,callback);}
4114else if(is.string(target)){return listenSelector(target,type,callback);}
4115else{throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');}}
4116function listenNode(node,type,callback){node.addEventListener(type,callback);return{destroy:function(){node.removeEventListener(type,callback);}}}
4117function listenNodeList(nodeList,type,callback){Array.prototype.forEach.call(nodeList,function(node){node.addEventListener(type,callback);});return{destroy:function(){Array.prototype.forEach.call(nodeList,function(node){node.removeEventListener(type,callback);});}}}
4118function listenSelector(selector,type,callback){return delegate(document.body,selector,type,callback);}
4119module.exports=listen;},{"./is":3,"delegate":2}],5:[function(require,module,exports){function select(element){var selectedText;if(element.nodeName==='SELECT'){element.focus();selectedText=element.value;}
4120else if(element.nodeName==='INPUT'||element.nodeName==='TEXTAREA'){var isReadOnly=element.hasAttribute('readonly');if(!isReadOnly){element.setAttribute('readonly','');}
4121element.select();element.setSelectionRange(0,element.value.length);if(!isReadOnly){element.removeAttribute('readonly');}
4122selectedText=element.value;}
4123else{if(element.hasAttribute('contenteditable')){element.focus();}
4124var selection=window.getSelection();var range=document.createRange();range.selectNodeContents(element);selection.removeAllRanges();selection.addRange(range);selectedText=selection.toString();}
4125return selectedText;}
4126module.exports=select;},{}],6:[function(require,module,exports){function E(){}
4127E.prototype={on:function(name,callback,ctx){var e=this.e||(this.e={});(e[name]||(e[name]=[])).push({fn:callback,ctx:ctx});return this;},once:function(name,callback,ctx){var self=this;function listener(){self.off(name,listener);callback.apply(ctx,arguments);};listener._=callback
4128return this.on(name,listener,ctx);}
vendor: 5,730 bytes, lines 4128-4140
4128,emit:function(name){var data=[].slice.call(arguments,1);var evtArr=((this.e||(this.e={}))[name]||[]).slice();var i=0;var len=evtArr.length;for(i;i<len;i++){evtArr[i].fn.apply(evtArr[i].ctx,data);}
4129return this;},off:function(name,callback){var e=this.e||(this.e={});var evts=e[name];var liveEvents=[];if(evts&&callback){for(var i=0,len=evts.length;i<len;i++){if(evts[i].fn!==callback&&evts[i].fn._!==callback)
4130liveEvents.push(evts[i]);}}
4131(liveEvents.length)?e[name]=liveEvents:delete e[name];return this;}};module.exports=E;},{}],7:[function(require,module,exports){(function(global,factory){if(typeof define==="function"&&define.amd){define(['module','select'],factory);}else if(typeof exports!=="undefined"){factory(module,require('select'));}else{var mod={exports:{}};factory(mod,global.select);global.clipboardAction=mod.exports;}})(this,function(module,_select){'use strict';var _select2=_interopRequireDefault(_select);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}
4132var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
4133var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
4134return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var ClipboardAction=function(){function ClipboardAction(options){_classCallCheck(this,ClipboardAction);this.resolveOptions(options);this.initSelection();}
4135_createClass(ClipboardAction,[{key:'resolveOptions',value:function resolveOptions(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=options.action;this.emitter=options.emitter;this.target=options.target;this.text=options.text;this.trigger=options.trigger;this.selectedText='';}},{key:'initSelection',value:function initSelection(){if(this.text){this.selectFake();}else if(this.target){this.selectTarget();}}},{key:'selectFake',value:function selectFake(){var _this=this;var isRTL=document.documentElement.getAttribute('dir')=='rtl';this.removeFake();this.fakeHandlerCallback=function(){return _this.removeFake();};this.fakeHandler=document.body.addEventListener('click',this.fakeHandlerCallback)||true;this.fakeElem=document.createElement('textarea');this.fakeElem.style.fontSize='12pt';this.fakeElem.style.border='0';this.fakeElem.style.padding='0';this.fakeElem.style.margin='0';this.fakeElem.style.position='absolute';this.fakeElem.style[isRTL?'right':'left']='-9999px';var yPosition=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=yPosition+'px';this.fakeElem.setAttribute('readonly','');this.fakeElem.value=this.text;document.body.appendChild(this.fakeElem);this.selectedText=(0,_select2.default)(this.fakeElem);this.copyText();}},{key:'removeFake',value:function removeFake(){if(this.fakeHandler){document.body.removeEventListener('click',this.fakeHandlerCallback);this.fakeHandler=null;this.fakeHandlerCallback=null;}
4136if(this.fakeElem){document.body.removeChild(this.fakeElem);this.fakeElem=null;}}},{key:'selectTarget',value:function selectTarget(){this.selectedText=(0,_select2.default)(this.target);this.copyText();}},{key:'copyText',value:function copyText(){var succeeded=void 0;try{succeeded=document.execCommand(this.action);}catch(err){succeeded=false;}
4137this.handleResult(succeeded);}},{key:'handleResult',value:function handleResult(succeeded){this.emitter.emit(succeeded?'success':'error',{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)});}},{key:'clearSelection',value:function clearSelection(){if(this.target){this.target.blur();}
4138window.getSelection().removeAllRanges();}},{key:'destroy',value:function destroy(){this.removeFake();}},{key:'action',set:function set(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'copy';this._action=action;if(this._action!=='copy'&&this._action!=='cut'){throw new Error('Invalid "action" value, use either "copy" or "cut"');}},get:function get(){return this._action;}},{key:'target',set:function set(target){if(target!==undefined){if(target&&(typeof target==='undefined'?'undefined':_typeof(target))==='object'&&target.nodeType===1){if(this.action==='copy'&&target.hasAttribute('disabled')){throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');}
4139if(this.action==='cut'&&(target.hasAttribute('readonly')||target.hasAttribute('disabled'))){throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');}
4140this._target=target;}else{throw new Error('Invalid "target" value, use a valid Element');}}},get:function get(){return this._target;}}]);return ClipboardAction;}();module.exports=ClipboardAction;});},{"select":5}],8:[function(require,module,exports){(function(global,factory){if(typeof define==="function"&&define.amd){define(['module','./clipboard-action','tiny-emitter','good-listener'],factory);}else if(typeof exports!=="undefined"){factory(module,require('./clipboard-action'),require('tiny-emitter'),require('good-listener'));}else{var mod={exports:{}};
4140factory(mod,global.clipboardAction,global.tinyEmitter,global.goodListener);global.clipboard=mod.exports;}})(this,function(module,_clipboardAction,_tinyEmitter,_goodListener){'use strict';var _clipboardAction2=_interopRequireDefault(_clipboardAction);var _tinyEmitter2=_interopRequireDefault(_tinyEmitter);var _goodListener2=_interopRequireDefault(_goodListener);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}
4141function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
4142var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
4143return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}
4144return call&&(typeof call==="object"||typeof call==="function")?call:self;}
4145function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}
4146subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
4147var Clipboard=function(_Emitter){_inherits(Clipboard,_Emitter);function Clipboard(trigger,options){_classCallCheck(this,Clipboard);var _this=_possibleConstructorReturn(this,(Clipboard.__proto__||Object.getPrototypeOf(Clipboard)).call(this));_this.resolveOptions(options);_this.listenClick(trigger);return _this;}
4148_createClass(Clipboard,[{key:'resolveOptions',value:function resolveOptions(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=typeof options.action==='function'?options.action:this.defaultAction;this.target=typeof options.target==='function'?options.target:this.defaultTarget;this.text=typeof options.text==='function'?options.text:this.defaultText;}},{key:'listenClick',value:function listenClick(trigger){var _this2=this;this.listener=(0,_goodListener2.default)(trigger,'click',function(e){return _this2.onClick(e);});}},{key:'onClick',value:function onClick(e){var trigger=e.delegateTarget||e.currentTarget;if(this.clipboardAction){this.clipboardAction=null;}
4149this.clipboardAction=new _clipboardAction2.default({action:this.action(trigger),target:this.target(trigger),text:this.text(trigger),trigger:trigger,emitter:this});}},{key:'defaultAction',value:function defaultAction(trigger){return getAttributeValue('action',trigger);}},{key:'defaultTarget',value:function defaultTarget(trigger){var selector=getAttributeValue('target',trigger);if(selector){return document.querySelector(selector);}}},{key:'defaultText',value:function defaultText(trigger){return getAttributeValue('text',trigger);}},{key:'destroy',value:function destroy(){this.listener.destroy();if(this.clipboardAction){this.clipboardAction.destroy();this.clipboardAction=null;}}}],[{key:'isSupported',value:function isSupported(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:['copy','cut'];var actions=typeof action==='string'?[action]:action;var support=!!document.queryCommandSupported;actions.forEach(function(action){support=support&&!!document.queryCommandSupported(action);});return support;}}]);return Clipboard;}(_tinyEmitter2.default);function getAttributeValue(suffix,element){var attribute='data-clipboard-'+suffix;if(!element.hasAttribute(attribute)){return;}
4150return element.getAttribute(attribute);}
4151module.exports=Clipboard;});},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)});(function(window,document){function matches(el,selector){if(!el){return false;}
4152var matchesCallable=(el.matches||el.matchesSelector||el.msMatchesSelector||el.mozMatchesSelector||el.webkitMatchesSelector||el.oMatchesSelector);if(!matchesCallable){return false;}
4153return matchesCallable.call(el,selector);}
4154function closest(el,fn){return el&&(fn(el)?el:closest(el.parentNode,fn));}
4155function parentMatches(el,selector){return closest(el,function(e){return matches(e,selector);})!=null;}
4156function forEach(elements,callback){[].forEach.call(elements,callback);}
4157var dataToggleAttr='data-toggle-odf';var dataToggleInstance=new DataToggle({dataToggleElements:function(){return document.querySelectorAll('['+dataToggleAttr+']');},dataToggleSameElements:function(toggleExpression){return document.querySelectorAll('['+dataToggleAttr+'="'+toggleExpression+'"]');},dataToggleGroupElements:function(group){return document.querySelectorAll('['+dataToggleAttr+'-group="'+group+'"]');},target:function(element){return element.getAttribute(dataToggleAttr);},events:function(element){return element.getAttribute(dataToggleAttr+'-event');},groups:function(element){return element.getAttribute(dataToggleAttr+'-group');}
4157,preventingCallback:function($element,$target,$el){return(parentMatches($el,'.kTree')||parentMatches($el,'.ui-dialog')||parentMatches($el,'.plier-deplier')||parentMatches($el,'.kmultiselect-ltl')||(parentMatches($el,'[data-toggle-odf-target]')&&!matches($el,'[data-toggle]'))||matches($el,'[data-toggle-odf-target]'));},isBubble:function(element){return element.hasAttribute('data-toggle-bubble')||matches(element,'body.formation');}});[].forEach.call(document.querySelectorAll('[data-toggle-odf-event][aria-expanded]'),function(element){var targets=document.querySelectorAll(element.getAttribute(dataToggleAttr));[].forEach.call(targets,function(el){el.addEventListener('toggle-aria',function(event){var status=event.detail[0];element.setAttribute('aria-expanded',status?'true':'false');});});});if(document.body.classList.contains('formation')){dataToggleInstance.bind(document.body,'.cta.active',{});}
4158window.addEventListener('load',function(){var jumpsPosition=(function getOffsetTop(elem){var offsetTop=0;if(elem){do{if(!isNaN(elem.offsetTop)){offsetTop+=elem.offsetTop;}}while(elem=elem.offsetParent);}
4159return offsetTop;})(document.querySelector('#jumps'));window.addEventListener('scroll',function(){var actualPosition=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;if(actualPosition>jumpsPosition){document.body.classList.add('sticky-jumps');}else{document.body.classList.remove('sticky-jumps');}});var $ctaContact=document.getElementById('cta-contact');var contactSpamCount=1;if($ctaContact){$ctaContact.querySelector('.retry').addEventListener('click',function(){$ctaContact.querySelector('.confirmations').classList.remove('success');$ctaContact.querySelector('.confirmations').classList.remove('failed');$ctaContact.querySelector('.formulaire').style.display='block';});$ctaContact.addEventListener('submit',function(e){e.preventDefault();var query=function(method,url,params,success,error){params=(function(parameters){var members=[];for(var p in parameters){if(parameters.hasOwnProperty(p)){members.push(p+'='+encodeURIComponent(parameters[p]));}}
4160return members.join('&');})(params);var xhr=new XMLHttpRequest();xhr.addEventListener('readystatechange',function(){if(xhr.readyState===4&&xhr.status===200){if(xhr.responseText.trim()===''){success.apply(success,arguments);return;}
4161error.apply(error,arguments);}});xhr.open(method,url,false);if(method.toUpperCase()==='POST'){xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');}
4162window.setTimeout(function(){xhr.send(params);},2000);};$ctaContact.querySelector('.formulaire').style.display='none';document.querySelector('#call-to-actions').classList.add('focus');$ctaContact.querySelector('.wait').classList.add('waiting');query($ctaContact.getAttribute('method'),$ctaContact.getAttribute('action'),{email:$ctaContact.querySelector('[name=email]').value,you:$ctaContact.querySelector('[name=you]').value,question:$ctaContact.querySelector('[name=question]').value,CODE:$ctaContact.querySelector('[name=CODE]').value,LANGUE:$ctaContact.querySelector('[name=LANGUE]').value},function success(){contactSpamCount--;if(contactSpamCount<=0){$ctaContact.querySelector('.spam-prevention').style.display='block';}
4163$ctaContact.querySelector('.wait').classList.remove('waiting');$ctaContact.querySelector('.confirmations').classList.add('success');window.setTimeout(function(){document.querySelector('#call-to-actions').classList.remove('focus');},7000);},function failed(){$ctaContact.querySelector('.wait').classList.remove('waiting');$ctaContact.querySelector('.confirmations').classList.add('failed');window.setTimeout(function(){document.querySelector('#call-to-actions').classList.remove('focus');},7000);});return false;});}
4164function executeCounter(counter,value,duration){value=value.replace(/,/g,'.').replace(/\s*/g,'');var digitsAfterComma=value.indexOf('.')>=0?value.split('.')[1].length:0;animate(function(x){counter.innerHTML=x.toFixed(digitsAfterComma);},0,value,duration);}
4165[].forEach.call(document.querySelectorAll('[data-counter]'),function(counter){executeCounter(counter,counter.getAttribute('data-counter'),counter.getAttribute('data-counter-duration-ms'));});function executeRadial(radial,value,duration){value=value.replace(/,/g,'.').replace(/\s*/g,'');animate(function(x){var max=radial.querySelector('[stroke-dasharray]').getAttribute('stroke-dasharray');var offset=x*max/100;radial.querySelector('[stroke-dashoffset]').setAttribute('stroke-dashoffset',offset);},0,value,duration);}
4166[].forEach.call(document.querySelectorAll('[data-progress]'),function(progress){executeRadial(progress,progress.getAttribute('data-progress'),progress.getAttribute('data-progress-duration-ms'));});new Clipboard('[data-clipboard-target]');[].forEach.call(document.querySelectorAll('[data-autoselect]'),function(autoselect){autoselect.addEventListener(autoselect.getAttribute('data-autoselect')||'click',function(e){autoselect.select();});});});})(window,document);!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exp
vendor: 1,722 bytes, line 4166
4166orts.Orejime=t():e.Orejime=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){"use strict";n.r(t);var o=n(8),r=n.n(o),i=function(){},a={},s=[],l=[];function c(e,t){var n,o,r,c,u=l;for(c=arguments.length;c-->2;)s.push(arguments[c]);for(t&&null!=t.children&&(s.length||s.push(t.children),delete t.children);s.length;)if((o=s.pop())&&void 0!==o.pop)for(c=o.length;c--;)s.push(o[c]);else"boolean"==typeof o&&(o=null),(r="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(r=!1)),r&&n?u[u.length-1]+=o:u===l?u=[o]:u.push(o),n=r;var p=new i;return p.nodeName=e,p.children=u,p.attributes=null==t?void 0:t,p.key=null==t?void 0:t.key,void 0!==a.vnode&&a.vnode(p),p}function u(e,t){for(var n in t)e[n]=t[n];return e}var p="function"==typeof Promise?Promise.resolve().then.bind(Prom
vendor: 7,711 bytes, line 4166
4166ise.resolve()):setTimeout;function d(e,t){return c(e.nodeName,u(u({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,m=[];function h(e){!e._dirty&&(e._dirty=!0)&&1==m.push(e)&&(a.debounceRendering||p)(v)}function v(){var e,t=m;for(m=[];e=t.pop();)e._dirty&&R(e)}function y(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function g(e){var t=u({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function b(e){var t=e.parentNode;t&&t.removeChild(e)}function C(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var i in n)i in o||(e.style[i]="");for(var i in o)e.style[i]="number"==typeof o[i]&&!1===f.test(i)?o[i]+"px":o[i]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,O,a):e.removeEventListener(t,O,a),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e){try{e[t]=null==o?"":o}catch(e){}null!=o&&!1!==o||"spellcheck"==t||e.removeAttribute(t)}else{var s=r&&t!==(t=t.replace(/^xlink:?/,""));null==o||!1===o?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function O(e){return this._listeners[e.type](a.event&&a.event(e)||e)}var w=[],N=0,k=!1,_=!1;function E(){for(var e;e=w.pop();)a.afterMount&&a.afterMount(e),e.componentDidMount&&e.componentDidMount()}function S(e,t,n,o,r,i){N++||(k=null!=r&&void 0!==r.ownerSVGElement,_=null!=e&&!("__preactattr_"in e));var a=A(e,t,n,o,i);return r&&a.parentNode!==r&&r.appendChild(a),--N||(_=!1,i||E()),a}function A(e,t,n,o,r){var i=e,a=k;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),M(e,!0))),i.__preactattr_=!0,i;var s,l,c=t.nodeName;if("function"==typeof c)return function(e,t,n,o){var r=e&&e._component,i=r,a=e,s=r&&e._componentConstructor===t.nodeName,l=s,c=g(t);for(;r&&!l&&(r=r._parentComponent);)l=r.constructor===t.nodeName;r&&l&&(!o||r._component)?(T(r,c,3,n,o),e=r.base):(i&&!s&&(L(i),e=a=null),r=j(t.nodeName,c,n),e&&!r.nextBase&&(r.nextBase=e,a=null),T(r,c,1,n,o),e=r.base,a&&e!==a&&(a._component=null,M(a,!1)));return e}(e,t,n,o);if(k="svg"===c||"foreignObject"!==c&&k,c=String(c),(!e||!y(e,c))&&(s=c,(l=k?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,i=l,e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),M(e,!0)}var u=i.firstChild,p=i.__preactattr_,d=t.children;if(null==p){p=i.__preactattr_={};for(var f=i.attributes,m=f.length;m--;)p[f[m].name]=f[m].value}return!_&&d&&1===d.length&&"string"==typeof d[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=d[0]&&(u.nodeValue=d[0]):(d&&d.length||null!=u)&&function(e,t,n,o,r){var i,a,s,l,c,u=e.childNodes,p=[],d={},f=0,m=0,h=u.length,v=0,g=t?t.length:0;if(0!==h)for(var C=0;C<h;C++){var O=u[C],w=O.__preactattr_,N=g&&w?O._component?O._component.__key:w.key:null;null!=N?(f++,d[N]=O):(w||(void 0!==O.splitText?!r||O.nodeValue.trim():r))&&(p[v++]=O)}if(0!==g)for(var C=0;C<g;C++){l=t[C],c=null;var N=l.key;if(null!=N)f&&void 0!==d[N]&&(c=d[N],d[N]=void 0,f--);else if(m<v)for(i=m;i<v;i++)if(void 0!==p[i]&&(k=a=p[i],E=r,"string"==typeof(_=l)||"number"==typeof _?void 0!==k.splitText:"string"==typeof _.nodeName?!k._componentConstructor&&y(k,_.nodeName):E||k._componentConstructor===_.nodeName)){c=a,p[i]=void 0,i===v-1&&v--,i===m&&m++;break}c=A(c,l,n,o),s=u[C],c&&c!==e&&c!==s&&(null==s?e.appendChild(c):c===s.nextSibling?b(s):e.insertBefore(c,s))}var k,_,E;if(f)for(var C in d)void 0!==d[C]&&M(d[C],!1);for(;m<=v;)void 0!==(c=p[v--])&&M(c,!1)}(i,d,n,o,_||null!=p.dangerouslySetInnerHTML),function(e,t,n){var o;for(o in n)t&&null!=t[o]||null==n[o]||C(e,o,n[o],n[o]=void 0,k);for(o in t)"children"===o||"innerHTML"===o||o in n&&t[o]===("value"===o||"checked"===o?e[o]:n[o])||C(e,o,n[o],n[o]=t[o],k)}(i,t.attributes,p),k=a,i}function M(e,t){var n=e._component;n?L(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||b(e),x(e))}function x(e){for(e=e.lastChild;e;){var t=e.previousSibling;M(e,!0),e=t}}var P=[];function j(e,t,n){var o,r=P.length;for(e.prototype&&e.prototype.render?(o=new e(t,n),U.call(o,t,n)):((o=new U(t,n)).constructor=e,o.render=D);r--;)if(P[r].constructor===e)return o.nextBase=P[r].nextBase,P.splice(r,1),o;return o}function D(e,t,n){return this.constructor(e,n)}function T(e,t,n,o,r){e._disable||(e._disable=!0,e.__ref=t.ref,e.__key=t.key,delete t.ref,delete t.key,void 0===e.constructor.getDerivedStateFromProps&&(!e.base||r?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,o)),o&&o!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=o),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===a.syncComponentUpdates&&e.base?h(e):R(e,1,r)),e.__ref&&e.__ref(e))}function R(e,t,n,o){if(!e._disable){var r,i,s,l=e.props,c=e.state,p=e.context,d=e.prevProps||l,f=e.prevState||c,m=e.prevContext||p,h=e.base,v=e.nextBase,y=h||v,b=e._component,C=!1,O=m;if(e.constructor.getDerivedStateFromProps&&(c=u(u({},c),e.constructor.getDerivedStateFromProps(l,c)),e.state=c),h&&(e.props=d,e.state=f,e.context=m,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(l,c,p)?C=!0:e.componentWillUpdate&&e.componentWillUpdate(l,c,p),e.props=l,e.state=c,e.context=p),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!C){r=e.render(l,c,p),e.getChildContext&&(p=u(u({},p),e.getChildContext())),h&&e.getSnapshotBeforeUpdate&&(O=e.getSnapshotBeforeUpdate(d,f));var k,_,A=r&&r.nodeName;if("function"==typeof A){var x=g(r);(i=b)&&i.constructor===A&&x.key==i.__key?T(i,x,1,p,!1):(k=i,e._component=i=j(A,x,p),i.nextBase=i.nextBase||v,i._parentComponent=e,T(i,x,0,p,!1),R(i,1,n,!0)),_=i.base}else s=y,(k=b)&&(s=e._component=null),(y||1===t)&&(s&&(s._component=null),_=S(s,r,p,n||!h,y&&y.parentNode,!0));if(y&&_!==y&&i!==b){var P=y.parentNode;P&&_!==P&&(P.replaceChild(_,y),k||(y._component=null,M(y,!1)))}if(k&&L(k),e.base=_,_&&!o){for(var D=e,U=e;U=U._parentComponent;)(D=U).base=_;_._component=D,_._componentConstructor=D.constructor}}for(!h||n?w.unshift(e):C||(e.componentDidUpdate&&e.componentDidUpdate(d,f,O),a.afterUpdate&&a.afterUpdate(e));e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);N||o||E()}}function L(e){a.beforeUnmount&&a.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?L(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,b(t),P.push(e),x(t)),e.__ref&&e.__ref(null)}function U(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{},this._renderCallbacks=[]}function I(e,t,n){return S(n,e,{},!1,t,!1)}u(U.prototype,{setState:function(e,t){this.prevState||(this.prevState=this.state),this.state=u(u({},this.state),"function"==typeof e?e(this.state,this.props):e),t&&this._renderCallbacks.push(t),h(this)}
4166,forceUpdate:function(e){e&&this._renderCallbacks.push(e),R(this,2)},render:function(){}});n.d(t,"version",function(){return W}),n.d(t,"DOM",function(){return se}),n.d(t,"Children",function(){return ie}),n.d(t,"render",function(){return Y}),n.d(t,"createClass",function(){return be}),n.d(t,"createPortal",function(){return te}),n.d(t,"createFactory",function(){return ae}),n.d(t,"createElement",function(){return ue}),n.d(t,"cloneElement",function(){return de}),n.d(t,"isValidElement",function(){return fe}),n.d(t,"findDOMNode",function(){return ye}),n.d(t,"unmountComponentAtNode",function(){return ne}),n.d(t,"Component",function(){return Ee}),n.d(t,"PureComponent",function(){return Se}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return X}),n.d(t,"unstable_batchedUpdates",function(){return Ae}),n.d(t,"__spread",function(){return he}),n.d(t,"PropTypes",function(){return r.a});var W="15.1.0",B="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,q="undefined"!=typeof Symbol&&Symbol.for?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",F={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},H=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,V={},$=!1;try{$=!1}catch(e){}function G(){return null}var Z=c("a",null).constructor;Z.prototype.$$typeof=z,Z.prototype.preactCompatUpgraded=!1,Z.prototype.preactCompatNormalized=!1,Object.defineProperty(Z.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(Z.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var J=a.event;a.event=function(e){return J&&(e=J(e)),e.persist=Object,e.nativeEvent=e,e};var K=a.vnode;function Y(e,t,n){var o=t&&t._preactCompatRendered&&t._preactCompatRendered.base;o&&o.parentNode!==t&&(o=null),!o&&t&&(o=t.firstElementChild);for(var r=t.childNodes.length;r--;)t.childNodes[r]!==o&&t.removeChild(t.childNodes[r]);var i=I(e,t,o);return t&&(t._preactCompatRendered=i&&(i._component||{base:i})),"function"==typeof n&&n(),i&&i._component||i}a.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=null==e.attributes?{}:he({},e.attributes);"function"==typeof t?(!0===t[q]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||pe(e),function(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&he(e.attributes,t.defaultProps);n&&he(e.attributes,n)}(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),function(e,t){var n,o,r;if(t){for(r in t)if(n=H.test(r))break;if(n)for(r in o=e.attributes={},t)t.hasOwnProperty(r)&&(o[H.test(r)?r.replace(/([A-Z0-9])/,"-$1").toLowerCase():r]=t[r])}}(e,n))}K&&K(e)};var Q=function(){};function X(e,t,n,o){var r=Y(c(Q,{context:e.context},t),n),i=r._component||r.base;return o&&o.call(i,r),i}function ee(e){X(this,e.vnode,e.container)}function te(e,t){return c(ee,{vnode:e,container:t})}function ne(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(I(c(G),e,t),!0)}Q.prototype.getChildContext=function(){return this.props.context},Q.prototype.render=function(e){return e.children[0]};var oe,re=[],ie={map:function(e,t,n){return null==e?null:(e=ie.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))}
4166,forEach:function(e,t,n){if(null==e)return null;e=ie.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(1!==(e=ie.toArray(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:re.concat(e)}};function ae(e){return ue.bind(null,e)}for(var se={},le=B.length;le--;)se[B[le]]=ae(B[le]);function ce(e){var t,n=e[q];return n?!0===n?e:n:(n=be({displayName:(t=e).displayName||t.name,render:function(){return t(this.props,this.context)}}),Object.defineProperty(n,q,{configurable:!0,value:!0}),n.displayName=e.displayName,n.propTypes=e.propTypes,n.defaultProps=e.defaultProps,Object.defineProperty(e,q,{configurable:!0,value:n}),n)}function ue(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function e(t,n){for(var o=n||0;o<t.length;o++){var r=t[o];Array.isArray(r)?e(r):r&&"object"==typeof r&&!fe(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(t[o]=ue(r.type||r.nodeName,r.props||r.attributes,r.children))}}(e,2),pe(c.apply(void 0,e))}function pe(e){var t;e.preactCompatNormalized=!0,function(e){var t=e.attributes||(e.attributes={});me.enumerable="className"in t,t.className&&(t.class=t.className);Object.defineProperty(t,"className",me)}(e),"function"!=typeof(t=e.nodeName)||t.prototype&&t.prototype.render||(e.nodeName=ce(e.nodeName));var n,o,r=e.attributes.ref,i=r&&typeof r;return!oe||"string"!==i&&"number"!==i||(e.attributes.ref=(n=r,(o=oe)._refProxies[n]||(o._refProxies[n]=function(e){o&&o.refs&&(o.refs[n]=e,null===e&&(delete o._refProxies[n],o=null))}))),function(e){var t=e.nodeName,n=e.attributes;if(!n||"string"!=typeof t)return;var o={};for(var r in n)o[r.toLowerCase()]=r;o.ondoubleclick&&(n.ondblclick=n[o.ondoubleclick],delete n[o.ondoubleclick]);if(o.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=o.oninput||"oninput";n[i]||(n[i]=Oe([n[i],n[o.onchange]]),delete n[o.onchange])}}(e),e}function de(e,t){for(var n=[],o=arguments.length-2;o-->0;)n[o]=arguments[o+2];if(!fe(e))return e;var r=e.attributes||e.props,i=[c(e.nodeName||e.type,he({},r),e.children||r&&r.children),t];return n&&n.length?i.push(n):t&&t.children&&i.push(t.children),pe(d.apply(void 0,i))}function fe(e){return e&&(e instanceof Z||e.$$typeof===z)}var me={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};function he(e,t){for(var n=arguments,o=1,r=void 0;o<arguments.length;o++)if(r=n[o])for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i]);return e}function ve(e,t){for(var n in e)if(!(n in t))return!0;for(var o in t)if(e[o]!==t[o])return!0;return!1}function ye(e){return e&&(e.base||1===e.nodeType&&e)||null}function ge(){}function be(e){function t(e,t){!function(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||F.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}(this),Ee.call(this,e,t,V),we.call(this,e,t)}return(e=he({constructor:t},e)).mixins&&function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=Oe(t[n].concat(e[n]||re),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}(e,function(e){for(var t={},n=0;n<e.length;n++){var o=e[n];for(var r in o)o.hasOwnProperty(r)&&"function"==typeof o[r]&&(t[r]||(t[r]=[])).push(o[r])}return t}(e.mixins)),e.statics&&he(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps.call(t)),ge.prototype=Ee.prototype,t.prototype=he(new ge,e),t.displayName=e.displayName||"Component",t}function Ce(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function Oe(e,t){return function(){for(var n,o=arguments,r=0;r<e.length;r++){var i=Ce(this,e[r],o);if(t&&null!=i)for(var a in n||(n={}),i)i.hasOwnProperty(a)&&(n[a]=i[a]);else void 0!==i&&(n=i)}return n}}function we(e,t){Ne.call(this,e,t),this.componentWillReceiveProps=Oe([Ne,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=Oe([Ne,ke,this.render||"render",_e])}function Ne(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof Z)&&(e.children=n[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),$){var o="function"==typeof this?this:this.constructor,i=this.propTypes||o.propTypes,a=this.displayName||o.name;i&&r.a.checkPropTypes(i,e,"prop",a)}}}function ke(e){oe=this}function _e(){oe===this&&(oe=null)}function Ee(e,t,n){U.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==V&&we.call(this,e,t)}function Se(e,t){Ee.call(this,e,t)}function Ae(e){e()}he(Ee.prototype=new U,{constructor:Ee,isReactComponent:{},replaceState:function(e,t){for(var n in this.setState(e,t),this.state)n in e||delete this.state[n]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),ge.prototype=Ee.prototype,Se.prototype=new ge,Se.prototype.isPureReactComponent=!0,Se.prototype.shouldComponentUpdate=function(e,t){return ve(this.props,e)||ve(this.state,t)};var Me={version:W,DOM:se,PropTypes:r.a,Children:ie,render:Y,createClass:be,createPortal:te,createFactory:ae,createElement:ue,cloneElement:de,isValidElement:fe,findDOMNode:ye,unmountComponentAtNode:ne,Component:Ee,PureComponent:Se,unstable_renderSubtreeIntoContainer:X,unstable_batchedUpdates:Ae,__spread:he};t.default=Me},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var o=n(9),r=n(3);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?r(e):t}}
4166,function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var o=n(26);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){e.exports=n(21)()},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=o=function(e){return n(e)}:e.exports=o=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o(t)}e.exports=o},function(e,t,n){var o=n(27);e.exports=function(e,t){if(null==e)return{};var n,r,i=o(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=n(33);var i=((o=r)&&o.__esModule?o:{default:o}).default,a=i.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=i.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=i.canUseDOM?window.NodeList:{},t.canUseDOM=i.canUseDOM;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(28),i=(o=r)&&o.__esModule?o:{default:o};t.default=i.default,e.exports=t.default},function(e,t,n){var o=n(37),r=n(38),i=n(39);e.exports=function(e){return o(e)||r(e)||i()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(a)};var o=/input|select|textarea|button|object/;function r(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function i(e,t){var n=e.nodeName.toLowerCase();return(o.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(r(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&i(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=c,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=c(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var a=r.value;a.setAttribute("aria-hidden","true")}}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=c(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var a=r.value;a.removeAttribute("aria-hidden")}}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null},t.resetForTesting=function(){s=null};var o,r=n(32),i=(o=r)&&o.__esModule?o:{default:o},a=n(11);var s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},function(e,t,n){"use strict";
4166Object.defineProperty(t,"__esModule",{value:!0});var o=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach(function(n){return n(e,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]};t.default=o,e.exports=t.default},function(e,t,n){var o=n(23),r=n(24),i=n(25);e.exports=function(e,t){return o(e)||r(e,t)||i()}},function(e,t,n){e.exports=n(19)},function(e,t,n){n(20);var o=n(40);function r(){void 0!==window.orejimeConfig&&(void 0===window.orejime||window.orejime instanceof Element)&&(window.orejime=o.init(window.orejimeConfig))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",r):r(),e.exports=o},function(e,t,n){},function(e,t,n){"use strict";var o=n(22);function r(){}e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=m(i),s=m(n(0)),l=m(n(8)),c=m(n(29)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(15)),p=n(11),d=m(p),f=n(36);function m(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",g=p.canUseDOM&&void 0!==s.default.createPortal,b=function(){return g?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function C(e){return e()}var O=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,l=Array(i),u=0;u<i;u++)l[u]=arguments[u];return n=r=h(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.removePortal=function(){!g&&s.default.unmountComponentAtNode(r.node);var e=C(r.props.parentSelector);e&&e.contains(r.node)?e.removeChild(r.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},r.portalRef=function(e){r.portal=e},r.renderPortal=function(e){var n=b()(r,a.default.createElement(c.default,o({defaultStyles:t.defaultStyles},e)),r.node);r.portalRef(n)},h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
vendor: 4,225 bytes, line 4166
4166(t,i.Component),r(t,[{key:"componentDidMount",value:function(){p.canUseDOM&&(g||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName,C(this.props.parentSelector).appendChild(this.node),!g&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:C(e.parentSelector),nextParent:C(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(p.canUseDOM){var o=this.props,r=o.isOpen,i=o.portalClassName;e.portalClassName!==i&&(this.node.className=i);var a=n.prevParent,s=n.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||r)&&!g&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(p.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return p.canUseDOM&&g?(!this.node&&g&&(this.node=document.createElement("div")),b()(a.default.createElement(c.default,o({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){u.setElement(e)}}]),t}();O.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(d.default),l.default.instanceOf(p.SafeHTMLCollection),l.default.instanceOf(p.SafeNodeList),l.default.arrayOf(l.default.instanceOf(d.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},O.defaultProps={isOpen:!1,portalClassName:v,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},O.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,f.polyfill)(O),t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),s=v(n(8)),l=h(n(30)),c=v(n(31)),u=h(n(15)),p=h(n(34)),d=n(11),f=v(d),m=v(n(16));
vendor: 6,904 bytes, line 4166
4166function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function v(e){return e&&e.__esModule?e:{default:e}}n(35);var y={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},g=9,b=27,C=0,O=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,o=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&p.remove(document.body,i),r&&p.remove(document.getElementsByTagName("html")[0],r),o&&C>0&&0===(C-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())})},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===g&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&e.keyCode===b&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce(function(n,o){return n[e+"-"+o]=t[o],n},{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Component),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName;r&&p.add(document.body,r),o&&p.add(document.getElementsByTagName("html")[0],o),n&&(C+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,a=e.children,s=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),p=this.props.contentElement(u,a);return this.props.overlayElement(c,p)}}]),t}();O.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},O.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=O,e.exports=t.default},function(e,t,n){"use strict";
4166Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=c,t.handleFocus=u,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",u,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",u))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",u)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",u))};var o,r=n(14),i=(o=r)&&o.__esModule?o:{default:o};var a=[],s=null,l=!1;function c(){l=!0}function u(){if(l){if(l=!1,!s)return;setTimeout(function(){s.contains(document.activeElement)||((0,i.default)(s)[0]||s).focus()},0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.default)(e);if(!n.length)return void t.preventDefault();var o=void 0,r=t.shiftKey,a=n[0],s=n[n.length-1];if(e===document.activeElement){if(!r)return;o=s}s!==document.activeElement||r||(o=a);a===document.activeElement&&r&&(o=s);if(o)return t.preventDefault(),void o.focus();var l=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==l||"Chrome"==l[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var c=n.indexOf(document.activeElement);c>-1&&(c+=r?-1:1);if(void 0===(o=n[c]))return t.preventDefault(),void(o=r?s:a).focus();t.preventDefault(),o.focus()};var o,r=n(14),i=(o=r)&&o.__esModule?o:{default:o};e.exports=t.default},function(e,t,n){"use strict";var o=function(){};e.exports=o},function(e,t,n){var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var o={},r={};t.add=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?o:r,void t.split(" ").forEach(function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),n.add(e)});var n,i},t.remove=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?o:r,void t.split(" ").forEach(function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&n.remove(e)});var n,i}},function(e,t,n){"use strict";var o,r=n(16),i=(o=r)&&o.__esModule?o:{default:o};var a=void 0,s=void 0,l=[];function c(){0!==l.length&&l[l.length-1].focusContent()}i.default.subscribe(function(e,t){a&&s||((a=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",c),(s=a.cloneNode()).addEventListener("focus",c)),(l=t).length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))})},function(e,t,n){"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==a?"\n  "+a:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(17),i=n.n(r),a=n(1),s=n.n(a),l=n(2),c=n.n(l);function u(){for(var e=document.cookie.split(";"),t=[],n=new RegExp("^\\s*([^=]+)\\s*=\\s*(.*?)$"),o=0;o<e.length;o++){var r=e[o],i=n.exec(r);null!==i&&t.push({name:i[1],value:i[2]})}return t}function p(e,t){return"".concat(e,"=").concat(t)}function d(e,t,n){var o="".concat(e,"=; Max-Age=-99999999;").concat(void 0!==t?" path=".concat(t,";"):" path=/;");void 0===n?(document.cookie=o,document.cookie="".concat(o," domain=.").concat(location.hostname,";"),document.cookie="".concat(o," domain=.").concat(location.hostname.split(".").slice(-2).join("."),";")):document.cookie="".concat(o," domain=").concat(n,";")}var f=function(){function e(t){s()(this,e),this.config=t,this.consents=this.defaultConsents,this.confirmed=!1,this.changed=!1,this.states={},this.executedOnce={},this.watchers=new Set([]),this.loadConsents(),this.applyConsents()}return c()(e,[{key:"watch",value:function(e){this.watchers.has(e)||this.watchers.add(e)}},{key:"unwatch",value:function(e){this.watchers.has(e)&&this.watchers.delete(e)}},{key:"notify",value:function(e,t){var n=this;
4166this.watchers.forEach(function(o){o.update(n,e,t)})}},{key:"getApp",value:function(e){var t=this.config.apps.filter(function(t){return t.name==e});if(t.length>0)return t[0]}},{key:"getDefaultConsent",value:function(e){var t=e.default;return void 0===t&&(t=this.config.default),void 0===t&&(t=!1),t}},{key:"declineAll",value:function(){var e=this;this.config.apps.map(function(t){e.updateConsent(t,!1)})}},{key:"acceptAll",value:function(){var e=this;this.config.apps.map(function(t){e.updateConsent(t,!0)})}},{key:"updateConsent",value:function(e,t){e.required&&!t||(this.consents[e.name]=t,this.notify("consents",this.consents))}},{key:"resetConsent",value:function(){this.consents=this.defaultConsents,this.confirmed=!1,this.applyConsents(),d(this.cookieName),this.notify("consents",this.consents)}},{key:"getConsent",value:function(e){return this.consents[e]||!1}},{key:"_checkConsents",value:function(){var e=!0,t=this.config.apps.map(function(e){return e.name});Object.keys(this.consents).forEach(function(e){-1===t.indexOf(e)&&delete this.consents[e]}.bind(this)),this.config.apps.forEach(function(t){void 0===this.consents[t.name]&&(this.consents[t.name]=this.getDefaultConsent(t),e=!1)}.bind(this)),this.confirmed=e,e||(this.changed=!0)}},{key:"loadConsents",value:function(){var e=function(e){for(var t=u(),n=0;n<t.length;n++)if(t[n].name==e)return t[n];return null}(this.cookieName);return null!==e&&""!==e.value&&(this.consents=this.config.parseCookie(e.value),this._checkConsents(),this.notify("consents",this.consents)),this.consents}},{key:"saveAndApplyConsents",value:function(){this.saveConsents(),this.applyConsents()}},{key:"saveConsents",value:function(){null===this.consents&&d(this.cookieName);var e=this.config.stringifyCookie(this.consents);!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,r=[p(e,t)];if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),r.push(p("expires",i.toUTCString()))}o&&r.push(p("domain",o)),r.push(p("path","/")),document.cookie=r.join("; ")}(this.cookieName,e,this.config.cookieExpiresAfterDays||120,this.config.cookieDomain),this.confirmed=!0,this.changed=!1}},{key:"applyConsents",value:function(){for(var e=0;e<this.config.apps.length;e++){var t=this.config.apps[e],n=this.states[t.name],o=this.confirmed||(void 0!==t.optOut?t.optOut:this.config.optOut||!1),r=this.getConsent(t.name)&&o;n!==r&&(this.updateAppElements(t,r),this.updateAppCookies(t,r),void 0!==t.callback&&t.callback(r,t),this.states[t.name]=r)}}},{key:"applyConsentsOnce",value:function(e,t,n){for(var o=0;o<this.config.apps.length;o++){var r=this.config.apps[o];if(void 0===e||e===r.name){var i=this.states[r.name];this.confirmed||(void 0!==r.optOut?r.optOut:this.config.optOut);i!==t&&(void 0!==r.callback&&r.callback(t,r),this.states[r.name]=t,this.updateAppElements(r,t),n&&(this.updateAppCookies(r,t),this.updateConsent(r,t),this.saveConsents()))}}}},{key:"updateAppElements",value:function(e,t){if(t){if(e.onlyOnce&&this.executedOnce[e.name])return;this.executedOnce[e.name]=!0}for(var n=document.querySelectorAll("[data-name='"+e.name+"']"),o=0;o<n.length;o++){var r=n[o],i=r.parentElement,a=r.dataset,s=a.type,l=(a.name,["href","src"]);if("placeholder"!==s)if("SCRIPT"==r.tagName){for(var c=document.createElement("script"),u=Object.keys(a),p=0;p<u.length;p++){var d=u[p];c.dataset[d]=a[d]}c.type="opt-in",c.innerText=r.innerText,c.text=r.text,c.class=r.class,c.style.cssText=r.style,c.id=r.id,c.name=r.name,c.defer=r.defer,c.async=r.async,t&&(c.type=s,void 0!==a.src&&(c.src=a.src)),i.insertBefore(c,r),i.removeChild(r)}else if(t){for(var f=0;f<l.length;f++){var m=a[v=l[f]];void 0!==m&&(void 0===a["original"+v]&&(a["original"+v]=r[v]),r[v]=m)}void 0!==a.title&&(r.title=a.title),void 0!==a.originalDisplay?r.style.display=a.originalDisplay:r.style.display="initial"}else{void 0!==a.title&&r.removeAttribute("title"),"true"===a.hide&&(void 0===a.originalDisplay&&(a.originalDisplay=r.style.display),r.style.display="none");for(var h=0;h<l.length;h++){var v;void 0!==a[v=l[h]]&&(void 0!==a["original"+v]&&(r[v]=a["original"+v]))}}else t?(a.originaldisplay=r.style.display||"flex",r.style.display="none"):r.style.display=a.originaldisplay||"flex"}}},{key:"updateAppCookies",value:function(e,t){if(!t&&(void 0!==e.cookies&&e.cookies.length>0))for(var n=u(),o=0;o<e.cookies.length;o++){var r=e.cookies[o],a=void 0,s=void 0;if(r instanceof Array){var l=r,c=i()(l,3);r=c[0],a=c[1],s=c[2]}r instanceof RegExp||(r=new RegExp("^"+r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+"$"));for(var p=0;p<n.length;p++){var f=n[p];null!==r.exec(f.name)&&d(f.name,a,s)}}}},{key:"cookieName",get:function(){return this.config.cookieName||"orejime"}},{key:"defaultConsents",get:function(){for(var e={},t=0;t<this.config.apps.length;t++){var n=this.config.apps[t];e[n.name]=this.getDefaultConsent(n)}return e}}]),e}(),m={de:{consentModal:{title:"Informationen die wir sammeln",description:"Hier können Sie einsehen und anpassen, welche Information wir über Sie sammeln.\n",privacyPolicy:{name:"Datenschutzerklärung",text:"Bitte lesen Sie unsere {privacyPolicy} um weitere Details zu erfahren.\n"}},consentNotice:{changeDescription:"Es gab Änderungen seit Ihrem letzten Be
4166such, bitte aktualisieren Sie Ihre Auswahl.",description:"Wir speichern und verarbeiten Ihre personenbezogenen Informationen für folgende Zwecke: {purposes}.\n",learnMore:"Mehr erfahren"},save:"Speichern",decline:"Ablehnen",app:{optOut:{title:"(Opt-Out)",description:"Diese Anwendung wird standarmäßig gelanden (aber Sie können sie deaktivieren)"},required:{title:"(immer notwendig)",description:"Diese Anwendung wird immer benötigt"},purposes:"Zwecke",purpose:"Zweck"},poweredBy:"Realisiert mit Orejime"},en:{consentModal:{title:"Information that we collect",description:"Here you can see and customize the information that we collect about you.\n",privacyPolicy:{name:"privacy policy",text:"To learn more, please read our {privacyPolicy}.\n"}},consentNotice:{changeDescription:"There were changes since your last visit, please update your consent.",description:"We collect and process your personal information for the following purposes: {purposes}.\n",learnMore:"Learn more"},accept:"Accept",acceptTitle:"Accept cookies",acceptAll:"Accept all apps",save:"Save",saveData:"Save my configuration on collected information",decline:"Decline",declineAll:"Decline all apps",close:"Close",enabled:"Enabled",disabled:"Disabled",app:{optOut:{title:"(opt-out)",description:"This app is loaded by default (but you can opt out)"},required:{title:"(always required)",description:"This application is always required"},purposes:"Purposes",purpose:"Purpose"},poweredBy:"Powered by Orejime",newWindow:"new window"},fr:{consentModal:{title:"Les informations que nous collectons",description:"Ici, vous pouvez voir et personnaliser les informations que nous collectons sur vous.\n",privacyPolicy:{name:"politique de confidentialité",text:"Pour en savoir plus, merci de lire notre {privacyPolicy}.\n"}},consentNotice:{changeDescription:"Des modifications ont eu lieu depuis votre dernière visite, merci de mettre à jour votre consentement.",description:"Nous collectons et traitons vos informations personnelles dans le but suivant : {purposes}.\n",learnMore:"En savoir plus"},accept:"Accepter",acceptTitle:"Accepter les cookies",acceptAll:"Tout accepter",save:"Sauvegarder",saveData:"Sauvegarder ma configuration sur les informations collectées",decline:"Refuser",declineAll:"Tout refuser",close:"Fermer",enabled:"Activé",disabled:"Désactivé",app:{optOut:{title:"(opt-out)",description:"Cette application est chargée par défaut (mais vous pouvez la désactiver)"},required:{title:"(toujours requis)",description:"Cette application est toujours requise"},purposes:"Utilisations",purpose:"Utilisation"},poweredBy:"Propulsé par Orejime",newWindow:"nouvelle fenêtre"},hu:{consentModal:{title:"Információk, amiket gyűjtünk",description:"Itt láthatod és testreszabhatod az rólad gyűjtött információkat.\n",privacyPolicy:{name:"adatvédelmi irányelveinket",text:"További információért kérjük, olvassd el az {privacyPolicy}.\n"}},consentNotice:{changeDescription:"Az utolsó látogatás óta változások történtek, kérjük, frissítsd a hozzájárulásodat.",description:"Az személyes adataidat összegyűjtjük és feldolgozzuk az alábbi célokra: {purposes}.\n",learnMore:"Tudj meg többet"},save:"Mentés",decline:"Elvet",app:{optOut:{title:"(leiratkozás)",description:"Ez az alkalmazás alapértelmezés szerint betöltött (de ki lehet kapcsolni)"},required:{title:"(mindig kötelező)",description:"Ez az applikáció mindig kötelező"},purposes:"Célok",purpose:"Cél"},poweredBy:"Powered by Orejime"},it:{consentModal:{title:"Informazioni che raccogliamo",description:"Qui puoi vedere e scegliere le informazioni che raccogliamo su di te.\n",privacyPolicy:{name:"policy privacy",text:"Per saperne di più, leggi la nostra {privacyPolicy}.\n"}},consentNotice:{changeDescription:"Ci sono stati cambiamenti dalla tua ultima visita, aggiorna il tuo consenso.",description:"Raccogliamo ed elaboriamo le vostre informazioni personali per i seguenti scopi: {purposes}.\n",learnMore:"Scopri di più"},save:"Salva",decline:"Rifiuta",app:{optOut:{title:"(opt-out)",description:"Quest'applicazione è caricata di default (ma puoi disattivarla)"},required:{title:"(sempre richiesto)",description:"Quest'applicazione è sempre richiesta"},purposes:"Scopi",purpose:"Scopo"},poweredBy:"Realizzato da Orejime"},ro:{consentModal:{title:"Informațiile pe care le colectăm",description:"Aici puteți vedea și personaliza informațiile pe care le colectăm despre dvs.\n",privacyPolicy:{name:"politica privacy",text:"Pentru a afla mai multe, vă rugăm să citiți {privacyPolicy}.\n"}},consentNotice:{changeDescription:"Au existat modificări de la ultima vizită, vă rugăm să actualizați consimțământul.",description:"Colectăm și procesăm informațiile dvs. personale în următoarele scopuri: {purposes}.\n",learnMore:"Află mai multe"},save:"Salvează",decline:"Renunță",app:{optOut:{title:"(opt-out)",description:"Această aplicație este încărcată în mod implicit (dar puteț
4166i renunța)"},required:{title:"(întotdeauna necesar)",description:"Această aplicație este întotdeauna necesară"},purposes:"Scopuri",purpose:"Scop"},poweredBy:"Realizat de Orejime"},nb:{consentModal:{title:"Informasjon vi samler inn",description:"Her kan du se og velge hvilken informasjon vi samler inn om deg.\n",privacyPolicy:{name:"personvernerklæring",text:"For å lære mer, vennligst les vår {privacyPolicy}.\n"}},consentNotice:{changeDescription:"Det har skjedd endringer siden ditt siste besøk, vennligst oppdater ditt samtykke.",description:"Vi samler inn og prosesserer din personlige informasjon av følgende årsaker: {purposes}.\n",learnMore:"Lær mer"},save:"Opslaan",decline:"Avslå",app:{optOut:{title:"(opt-out)",description:"Denne appen er lastet som standard (men du kan skru det av)"},required:{title:"(alltid påkrevd)",description:"Denne applikasjonen er alltid påkrevd"},purposes:"Årsaker",purpose:"Årsak"},poweredBy:"Laget med Orejime"},nl:{consentModal:{title:"Informatie die we verzamelen",description:"Hier kunt u de informatie bekijken en aanpassen die we over u verzamelen.\n",privacyPolicy:{name:"privacybeleid",text:"Lees ons privacybeleid voor meer informatie {privacyPolicy}.\n"}},consentNotice:{changeDescription:"Er waren wijzigingen sinds uw laatste bezoek, werk uw voorkeuren bij.",description:"Wij verzamelen en verwerken uw persoonlijke gegevens voor de volgende doeleinden: {purposes}.\n",learnMore:"Lees meer"},accept:"Aanvaarden",acceptAll:"Alles aanvaarden",save:"Opslaan",saveData:"Mijn configuratie voor de informatievergaring opslaan",decline:"Afwijzen",declineAll:"Alles weigeren",close:"Sluiten",enabled:"Geactiveerd",disabled:"Gedesactiveerd",app:{optOut:{title:"(afmelden)",description:"Deze app is standaard geladen (maar je kunt je afmelden)"},required:{title:"(altijd verplicht)",description:"Deze applicatie is altijd vereist"},purposes:"Doeleinden",purpose:"Doeleinde"},poweredBy:"Aangedreven door Orejime",newWindow:"nieuw venster"}},h=n(4),v=n.n(h),y=n(5),g=n.n(y),b=n(6),C=n.n(b),O=n(3),w=n.n(O),N=n(7),k=n.n(N),_=n(10),E=n.n(_);var S=n(12),A=n.n(S);var M=function(e){function t(e){var n,r,i,a;return s()(this,t),n=v()(this,g()(t).call(this)),e.config.appElement&&A.a.setAppElement(e.config.appElement),n.scrollPosition=null,r=o.default.version.match(/(\d+)\.(\d+)*/),i=1*r[1],a=1*r[2],i<=15||16===i&&a<=2?n.componentWillUpdate=n.componentWillUpdateLifecycle:n.getSnapshotBeforeUpdate=n.getSnapshotBeforeUpdateLifecycle,n}return C()(t,e),c()(t,[{key:"componentWillUpdateLifecycle",value:function(e){e.isOpen&&!this.props.isOpen&&(this.scrollPosition=window.pageYOffset)}},{key:"getSnapshotBeforeUpdateLifecycle",value:function(e){return this.props.isOpen&&!e.isOpen&&(this.scrollPosition=window.pageYOffset),null}},{key:"componentDidUpdate",value:function(e){var t=this;!this.props.isOpen&&e.isOpen&&this.props.handleScrollPosition&&null!==this.scrollPosition&&setTimeout(function(){window.scrollTo(window.pageXOffset,t.scrollPosition),t.scrollPosition=null},0)}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.appElement,e.handleScrollPosition,e.config),r=E()(e,["children","appElement","handleScrollPosition","config"]);return o.default.createElement(A.a,k()({parentSelector:function(){return document.getElementById(n.elementID||"orejime")},htmlOpenClassName:"orejimeHtml-WithModalOpen",bodyOpenClassName:"orejimeBody-WithModalOpen"},r),t)}}]),t}(o.default.Component);M.defaultProps={handleScrollPosition:!0};var x=n(9),P=n.n(x),j=function(e){function t(){return s()(this,t),v()(this,g()(t).apply(this,arguments))}return C()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.config,n=e.manager,r=e.isModalVisible,i=e.isMandatory,a=e.t,s=e.ns,l=e.onSaveRequest,c=e.onDeclineRequest,u=e.onConfigRequest,p=function(e){for(var t=new Set([]),n=0;n<e.apps.length;n++)for(var o=e.apps[n].purposes||[],r=0;r<o.length;r++)t.add(o[r]);return Array.from(t)}(t).map(function(e){return a(["purposes",e])}).join(", "),d=a(["consentNotice","title"]);return o.default.createElement("div",{"aria-hidden":r,className:s("Notice".concat(i?" Notice--mandatory":""))},o.default.createElement("div",{className:s("Notice-body")},t.logo&&o.default.createElement("div",{className:s("Notice-logoContainer")},o.default.createElement("img",{src:"object"==P()(t.logo)?t.logo.src:t.logo,alt:"object"==P()(t.logo)&&t.logo.alt?t.logo.alt:"",className:s("Notice-logo")})),o.default.createElement("div",{className:s("Notice-text")},d&&o.default.createElement("h1",{className:s("Notice-title"),id:"orejime-notice-title"},d),o.default.createElement("p",{className:s("Notice-description")},a(["consentNotice","description"],{purposes:o.default.createElement("strong",{key:"purposes",className:s("Notice-purposes")},p)}),a(["consentNotice","privacyPolicy","text"],{privacyPolicy:o.default.createElement("a",{target:"_blank",key:"privacyPolicyLink",className:s("Notice-privacyPolicyLink"),href:a(["consentNotice","privacyPolicy","url"])},a(["consentNotice","privacyPolicy","name"]))}))),n.changed&&o.default.createElement("p",{className:s("Notice-changes")}
4166,a(["consentNotice","changeDescription"])),o.default.createElement("ul",{className:s("Notice-actions")},o.default.createElement("li",{className:s("Notice-actionItem Notice-actionItem--save")},o.default.createElement("button",{className:s("Button Button--save Notice-button Notice-saveButton"),type:"button",title:a(["acceptTitle"]),onClick:l},a(["accept"]))),o.default.createElement("li",{className:s("Notice-actionItem Notice-actionItem--decline")},o.default.createElement("button",{className:s("Button Button--decline Notice-button Notice-declineButton"),type:"button",onClick:c},a(["decline"]))),o.default.createElement("li",{className:s("Notice-actionItem Notice-actionItem--info")},o.default.createElement("button",{type:"button",className:s("Button Button--info Notice-learnMoreButton"),onClick:u},a(["consentNotice","learnMore"]))))))}}]),t}(o.default.Component),D=function(e){function t(){return s()(this,t),v()(this,g()(t).apply(this,arguments))}return C()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.isVisible,n=E()(e,["isVisible"]);if(!this.props.isMandatory&&!t)return null;var r=this.props.t(["consentNotice","title"])?{aria:{labelledby:"orejime-notice-title"}}:{};return this.props.isMandatory?o.default.createElement(M,k()({isOpen:t},r,{config:this.props.config,portalClassName:this.props.ns("NoticePortal"),overlayClassName:this.props.ns("NoticeOverlay"),className:this.props.ns("NoticeWrapper")}),o.default.createElement(j,n)):o.default.createElement(j,n)}}]),t}(o.default.Component),T=function(e){var t=e.t,n=e.ns;return o.default.createElement("svg",{role:"img",className:n("CloseIcon"),"aria-label":t(["close"]),width:"12",height:"12",viewport:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("title",null,t(["close"])),o.default.createElement("line",{x1:"1",y1:"11",x2:"11",y2:"1",strokeWidth:"1"}),o.default.createElement("line",{x1:"1",y1:"1",x2:"11",y2:"11",strokeWidth:"1"}))},R=function(e){function t(){return s()(this,t),v()(this,g()(t).apply(this,arguments))}return C()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.checked,n=e.onToggle,r=e.name,i=e.title,a=e.description,s=e.t,l=e.ns,c=this.props.required||!1,u=this.props.optOut||!1,p=this.props.purposes||[],d="orejime-app-item-".concat(r),f=t||c,m=p.map(function(e){return s(["purposes",e])}).join(", "),h=u?o.default.createElement("span",{className:l("AppItem-optOut"),title:s(["app","optOut","description"])},s(["app","optOut","title"])):"",v=c?o.default.createElement("span",{className:l("AppItem-required"),title:s(["app","required","description"])},s(["app","required","title"])):"",y=p.length>0?o.default.createElement("p",{className:l("AppItem-purposes")},s(["app",p.length>1?"purposes":"purpose"]),": ",m):null,g=f?"enabled":"disabled";return o.default.createElement("div",{className:l("AppItem")},o.default.createElement("span",{className:l("AppItem-arrow")}),o.default.createElement("input",{id:d,className:l("AppItem-input"),"aria-describedby":"".concat(d,"-description"),disabled:c,checked:f,type:"checkbox",onChange:function(e){n(e.target.checked)}}),o.default.createElement("label",k()({htmlFor:d,className:l("AppItem-label")},c?{tabIndex:"0"}:{}),o.default.createElement("span",{className:l("AppItem-title")},s([r,"title"])||i),v,h,o.default.createElement("span",{className:l("AppItem-switch ".concat(c?"AppItem-switch--disabled":""))},o.default.createElement("div",{className:l("AppItem-slider")}),o.default.createElement("div",{"aria-hidden":"true",className:l("AppItem-switchLabel")},s(g)))),o.default.createElement("div",{id:"".concat(d,"-description"),className:l("AppItem-fullDescription")},o.default.createElement("p",{className:l("AppItem-description"),dangerouslySetInnerHTML:{__html:s([r,"description"])||a}}),y))}}]),t}(o.default.Component),L=function(e){var t=e.t,n=e.ns,r=e.apps,i=e.consents,a=e.onToggle;return o.default.createElement("ul",{className:n("AppList")},r.map(function(e){var r=i[e.name];return o.default.createElement("li",{key:"app-".concat(e.name),className:n("AppList-item AppList-item--".concat(e.name))},o.default.createElement(R,k()({checked:r||e.required,onToggle:function(t){return a(e,t)},t:t,ns:n},e)))}))},U=function(e,t){return t.map(function(t){return e.find(function(e){return e.name===t})})},I=function(e){var t=e.t,n=e.ns,r=e.categories,i=e.apps,a=e.consents,s=e.onToggle;return o.default.createElement("ul",{className:n("CategorizedAppList")},r.map(function(e){var r=e.name,l=e.apps;return o.default.createElement("li",{className:n("CategorizedAppList-item")+" "+n("CategorizedAppList-item")+"-"+r},o.default.createElement("div",{className:n("CategorizedAppList-header")},o.default.createElement("h2",{className:n("CategorizedAppList-title"),dangerouslySetInnerHTML:{__html:t([r,"title"])}}),o.default.createElement("span",{className:n("CategorizedAppList-details"),dangerouslySetInnerHTML:{__html:t([r,"details"])}}),o.default.createElement("p",{className:n("CategorizedAppList-description"),dangerouslySetInnerHTML:{__html:t([r,"description"])}})),o.default.createElement("div",{className:n("CategorizedAppList-apps")},o.default.createElement(L,{t:t,ns:n,apps:U(i,l),consents:a,onToggle:s})))}))},W=function(e){function t(e,n){var o;return s()(this,t),o=v()(this,g()(t).call(this,e,n)),e.manager.watch(w()(w()(o))),o.state={consents:e.manager.consents},o}
4166return C()(t,e),c()(t,[{key:"componentWillUnmount",value:function(){this.props.manager.unwatch(this)}},{key:"update",value:function(e,t,n){e==this.props.manager&&"consents"==t&&this.setState({consents:n})}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.t,r=e.ns,i=e.manager,a=this.state.consents,s=t.apps,l=t.categories,c=function(e){s.map(function(t){i.updateConsent(t,e)})},u=0===s.filter(function(e){return!e.required&&a[e.name]}).length,p=s.filter(function(e){return a[e.name]}).length===s.length,d=s.some(function(e){return!e.required});return o.default.createElement("div",null,d?o.default.createElement("div",{className:r("AppToggles")},o.default.createElement("button",{type:"button",className:r("Button Button--info AppToggles-button AppToggles-enableAll"),disabled:p,onClick:function(){return c(!0)}},n(["acceptAll"])),o.default.createElement("button",{type:"button",className:r("Button Button--info AppToggles-button AppToggles-disableAll"),disabled:u,onClick:function(){return c(!1)}},n(["declineAll"]))):null,l?o.default.createElement(I,{t:n,ns:r,categories:l,apps:s,consents:a,onToggle:i.updateConsent.bind(i)}):o.default.createElement(L,{t:n,ns:r,apps:s,consents:a,onToggle:i.updateConsent.bind(i)}))}}]),t}(o.default.Component),B=function(e){function t(){return s()(this,t),v()(this,g()(t).apply(this,arguments))}return C()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.isOpen,n=e.onHideRequest,r=e.onSaveRequest,i=e.config,a=e.manager,s=e.t,l=e.ns,c=i.mustConsent&&(!a.confirmed||a.changed);return o.default.createElement(M,{isOpen:t,aria:{labelledby:"orejime-modal-title"},portalClassName:l("ModalPortal"),overlayClassName:l("ModalOverlay"),className:l("ModalWrapper"),config:i,onRequestClose:n,role:c?"alertdialog":"dialog"},o.default.createElement("div",{className:l("Modal")},o.default.createElement("div",{className:l("Modal-header")},!c&&o.default.createElement("button",{title:s(["close"]),className:l("Modal-closeButton"),type:"button",onClick:n},o.default.createElement(T,{t:s,ns:l})),o.default.createElement("h1",{className:l("Modal-title"),id:"orejime-modal-title"},s(["consentModal","title"])),o.default.createElement("p",{className:l("Modal-description")},a.changed&&(i.mustConsent||i.noNotice)&&o.default.createElement("p",{className:l("Modal-description")},o.default.createElement("strong",{className:l("Modal-changes")},s(["consentNotice","changeDescription"]))),o.default.createElement("p",{dangerouslySetInnerHTML:{__html:s(["consentModal","description"])}})," ",s(["consentModal","privacyPolicy","text"],{privacyPolicy:o.default.createElement("a",{target:"_blank",key:"privacyPolicyLink",className:l("Modal-privacyPolicyLink"),onClick:function(e){n()},href:i.privacyPolicy},s(["consentModal","privacyPolicy","name"]))}))),o.default.createElement("form",{className:l("Modal-form")},o.default.createElement("div",{className:l("Modal-body")},o.default.createElement(W,{t:s,ns:l,config:i,manager:a})),o.default.createElement("div",{className:l("Modal-footer")},o.default.createElement("button",{className:l("Button Button--save Modal-saveButton"),onClick:r,title:s(["saveData"])},s(["save"])),o.default.createElement("a",{target:"_blank",className:l("Modal-poweredByLink"),href:i.poweredBy||"https://orejime.empreintedigitale.fr",title:"".concat(s(["poweredBy"])," (").concat(s(["newWindow"]),")")},s(["poweredBy"]))))))}}]),t}(o.default.Component),z=function(e){function t(e){var n;return s()(this,t),(n=v()(this,g()(t).call(this,e))).state={isModalVisible:n.isModalVisible()},n.showModal=n.showModal.bind(w()(w()(n))),n.hideModal=n.hideModal.bind(w()(w()(n))),n.saveAndHideAll=n.saveAndHideAll.bind(w()(w()(n))),n.declineAndHideAll=n.declineAndHideAll.bind(w()(w()(n))),n.acceptAndHideAll=n.acceptAndHideAll.bind(w()(w()(n))),n}return C()(t,e),c()(t,[{key:"isModalVisible",value:function(e){var t=this.props,n=t.config,o=t.manager;return!!e||!(!n.mustConsent||o.confirmed&&!o.changed)}},{key:"isNoticeVisible",value:function(){var e=this.props,t=e.config,n=e.manager;return!t.mustConsent&&!t.noNotice&&!(n.confirmed&&!n.changed)}},{key:"showModal",value:function(e){void 0!==e&&e.preventDefault(),this.setState({isModalVisible:this.isModalVisible(!0)})}},{key:"hideModal",value:function(e){void 0!==e&&e.preventDefault(),this.setState({isModalVisible:this.isModalVisible(!1)})}},{key:"saveAndHideAll",value:function(e){void 0!==e&&e.preventDefault(),this.props.manager.saveAndApplyConsents(),this.setState({isModalVisible:this.isModalVisible(!1)})}},{key:"declineAndHideAll",value:function(e){this.props.manager.declineAll(),this.props.manager.saveAndApplyConsents(),this.setState({isModalVisible:this.isModalVisible(!1)})}},{key:"acceptAndHideAll",value:function(e){this.props.manager.acceptAll(),this.props.manager.saveAndApplyConsents(),this.setState({isModalVisible:this.isModalVisible(!1)})}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.t,r=e.manager,i=e.ns,a=this.isNoticeVisible();return o.default.createElement("div",{className:i("Main")},o.default.createElement(D,{key:"notice",t:n,ns:i,isVisible:a,isMandatory:t.mustNotice||!1,isModalVisible:this.state.isModalVisible,config:t,manager:r,onSaveRequest:this.acceptAndHideAll,onDeclineRequest:this.declineAndHideAll,onConfigRequest:this.showModal}),o.default.createElement(B,{key:"modal",isOpen:this.state.isModalVisible,t:n,ns:i,config:t,onHideRequest:this.hideModal,onSaveRequest:this.saveAndHideAll,manager:r}))}}]),t}(o.default.Component);function q(e){for(var t=new Map([]),n=Object.keys(e),o=0;o<n.length;o++){var r=n[o],i=e[r];"string"==typeof r&&("string"==typeof i?t.set(r,i):t.set(r,q(i)))}return t}function F(e,t,n,o){var r=function(e,t,n){if(n instanceof Map){var o=new Map([]);F(o,n,!0,!1),e.set(t,o)}else e.set(t,n)};if(!(t instanceof Map&&e instanceof Map))throw"Parameters are not maps!";void 0===n&&(n=!0),void 0===o&&(o=!1),o&&(e=new e.constructor(e));var i=!0,a=!1,s=void 0;try{for(var l,c=t.keys()[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var u=l.value,p=t.get(u),d=e.get(u);if(e.has(u))if(p instanceof Map&&d instanceof Map)e.set(u,F(d,p,n,o));else{if(!n)continue;r(e,u,p)}else r(e,u,p)}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}return e}var H=n(13),V=n.n(H);function $(e,t,n,o){var r=o;Array.isArray(r)||(r=[r]);var i=function(e,t,n){var o=t;Array.isArray(o)||(o=[o]);for(var r=e,i=0;i<o.length;i++){if(void 0===r)return n;r=r instanceof Map?r.get(o[i]):r[o[i]]}return void 0===r?n:r}(e,[t].concat(V()(r)));if(void 0===i)return n&&console.log("[missing translation: {lang}/{key}]".format({key:r.join("/"),lang:t}).join("")),!1;var a=Array.prototype.slice.call(arguments,4);return a.length>0?i.format.apply(i,V()(a)):i}String.prototype.format=function(){var e,t=this.toString(),n=P()(arguments[0]);e=0==arguments.length?{}
4166:"string"===n||"number"===n?Array.prototype.slice.call(arguments):arguments[0];for(var o=[],r=t;r.length>0;){var i=r.match(/\{(?!\{)([\w\d]+)\}(?!\})/);if(null!==i){var a=r.substr(0,i.index);r.substr(i.index,i[0].length);r=r.substr(i.index+i[0].length);var s=parseInt(i[1]);o.push(a),s!=s?o.push(e[i[1]]):o.push(e[s])}else o.push(r),r=""}return o};var G=function(e){var t=e.manager,n=e.style,r=e.config,i=e.t,a=e.lang,s=e.service;var l=r.additionalClass,c=(r.embedded,r.stylePrefix),u=$(s.translations||{},a,"zz",["!","title"])||i(["!",s.name,"title?"])||s.name.split("-").map(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)}).join(" ");return o.default.createElement("div",{lang:a,className:(c||"orejime")+(void 0!==l?" "+l:"")+" cm-as-context-notice"},o.default.createElement("div",{className:"context-notice"+(void 0!==n?" cm-".concat(n):"")},o.default.createElement("p",null,i(["contextualConsent","description"],{title:u})),o.default.createElement("p",{className:"cm-buttons"},o.default.createElement("button",{className:"cm-btn cm-btn-success-var",type:"button",onClick:function(){t.confirmed?(t.saveConsents(),t.applyConsentsOnce(s.name,!0,!0)):t.applyConsentsOnce(s.name,!0,!1)}},i(["contextualConsent","acceptAlways"])))))};n.d(t,"defaultConfig",function(){return J}),n.d(t,"init",function(){return K});var Z={};var J={elementID:"orejime",appElement:void 0,stylePrefix:"orejime",cookieName:"orejime",cookieExpiresAfterDays:365,cookieDomain:void 0,stringifyCookie:JSON.stringify.bind(JSON),parseCookie:JSON.parse.bind(JSON),privacyPolicy:"",default:!0,mustConsent:!1,mustNotice:!1,logo:!1,lang:window.language||document.documentElement.lang||"en",translations:{},apps:{},debug:!1};function K(e){var t=Object.assign({},J,e),n=[];if(Object.keys(t.apps).length||n.push("  - you must define `apps` to manage"),t.privacyPolicy.length||n.push("  - you must define a `privacyPolicy` url"),n.length)return n.unshift("Orejime config error:"),void console.error(n.join("\n"));var r,i=function(e){var t=e.elementID,n=e.stylePrefix,o=document.getElementById(t);null===o&&((o=document.createElement("div")).id=t,document.body.insertBefore(o,document.body.firstChild));var r=document.querySelector(".".concat(n,"-AppContainer"));return null===r&&((r=document.createElement("div")).className="".concat(n,"-AppContainer"),o.appendChild(r)),document.querySelector(".".concat(n,"-AppContainer"))}(t),a=function(e){var t=new Map([]);return F(t,q(m)),F(t,q(e.translations)),t}(t),s=function(e){var t=e.elementID;return void 0===Z[t]&&(Z[t]=new f(e)),Z[t]}(t),l=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return $.apply(void 0,[a,t.lang,t.debug].concat(n))},c=Object(o.render)(o.default.createElement(z,{t:l,ns:(r=t.stylePrefix,function(e){return e.split(" ").filter(function(e){return e.length>0}).map(function(e){return"".concat(r,"-").concat(e)}).join(" ")}),manager:s,config:t}),i);return function(e,t,n,r){var i=[],a=!0,s=!1,l=void 0;try{for(var c,d=r.apps[Symbol.iterator]();!(a=(c=d.next()).done);a=!0){var f=c.value,m=e.getConsent(f.name)&&e.confirmed,h=document.querySelectorAll("[data-name='"+f.name+"']"),v=!0,y=!1,g=void 0;try{for(var b,C=h[Symbol.iterator]();!(v=(b=C.next()).done);v=!0){var O=b.value,w=u(O);if("placeholder"!==w.type&&("IFRAME"===O.tagName||"DIV"===O.tagName)){var N=O.previousElementSibling;if(null!==N){var k=u(N);"placeholder"===k.type&&k.name===f.name||(N=null)}if(null===N){(N=document.createElement("DIV")).style.maxWidth=O.width+"px",N.style.height=O.height+"px",N.classList.add("orejime-content__context-notice"),N.classList.add("orejime-content__context-notice--"+f.name),p({type:"placeholder",name:f.name},N),m&&(N.style.display="none"),O.parentElement.insertBefore(N,O);var _=Object(o.render)(o.default.createElement(G,{t:t,lang:n,manager:e,config:r,service:f,style:w.style,api:w.style}),N);i.push(_)}"IFRAME"===O.tagName&&(w.src=O.src),void 0===w["modified-by-orejime"]&&void 0===O.style.display&&(w["original-display"]=O.style.display),w["modified-by-orejime"]="yes",p(w,O),m||(O.removeAttribute("src"),O.style.display="none")}}}catch(e){y=!0,g=e}finally{try{v||null==C.return||C.return()}finally{if(y)throw g}}}}catch(e){s=!0,l=e}finally{try{a||null==d.return||d.return()}finally{if(s)throw l}}}(s,l,t.lang,t),{show:c.showModal.bind(c),internals:{react:c,manager:s,config:t}};function u(e){for(var t={},n=0;n<e.attributes.length;n++){var o=e.attributes[n];o.name.startsWith("data-")&&(t[o.name.slice(5)]=o.value)}return t}function p(e,t){for(var n=Object.keys(e),o=0;o<n.length;o++){var r=n[o],i=e[r];t[r]!==i&&t.setAttribute("data-"+r,i)}}}t.default={init:K,defaultConfig:J}}])});'use strict';const orejimeConfig={cookieExpiresAfterDays:355,mustConsent:false,mustNotice:false,privacyPolicy:"/mentions-legales/",debug:false,save:"Confirmer votre choix",translations:{fr:{accept:"Tout accepter",decline:"Tout refuser",consentModal:{title:"Personnalisation des cookies",description:"Qu'est-ce qu'un cookie, quels cookies utilisons-nous et pourquoi? <br/><a target=\"_blank\" href=\"https://www.ulb.be/fr/mentions-legales/politique-de-protection-des-donnees-a-lulb\">➜ Consultez notre politique en matière de protection des données.</a>"+"<br/><br/> En autorisant les services énumérés ci-dessous, vous acceptez le dépôt et la lecture de cookies, ainsi que l'utilisation de technologies de suivi nécessaires au bon fonctionnement de ces services.",privacyPolicy:{name:"",text:""}}
4166,consentNotice:{title:"Ce site utilise des cookies",changeDescription:"",description:"➜ ",privacyPolicy:{name:"Consultez notre politique en matière de protection des données.",text:"{privacyPolicy}",url:"https://www.ulb.be/fr/mentions-legales/politique-de-protection-des-donnees-a-lulb"},learnMore:"Personnaliser"},contextualConsent:{description:"{title} est désactivé.",acceptAlways:"Afficher et accepter les cookies"},"app":{"required":{"title":"Toujours actif","description":"Ces cookies sont toujours actifs"},"optional":{"title":"(optionnels)","description":"Ces cookies sont optionnels"}},"essentials_cookies":{title:"Cookies essentiels et fonctionnels",description:"Ces cookies sont nécessaires pour des raisons purement techniques afin d'assurer une visite normale des sites de l’ULB (ex: cookies de login, d’enregistrement, de préférences de langue). Au vu de leur nécessité technique, ces cookies sont automatiquement activés lorsque vous accédez aux sites de l’Université (seule une obligation d'information s'applique).",},"analytics_cookies":{title:"Cookies analytiques",description:"L'ULB utilise l’outil d’analyse Matomo.\n"+"Ces cookies nous servent à mieux comprendre votre parcours de navigation sur nos sites dans le but d’en faire évoluer le contenu en accord avec vos attentes. Les données recueillies préservent votre anonymat, ne sont pas cédées à des tiers et restent hébergées sur les serveurs de l'ULB. Même si les informations collectées ne présentent aucun risque pour votre vie privée, ces cookies ne seront placés que si vous en donnez l'autorisation.",},"third_party_cookies":{title:"Cookies d'analyse de service tiers",description:"Lors de certains événements ou d’initiatives ciblées, l'ULB pourrait être amenée à utiliser des cookies fournis par des tiers (collaborateurs et partenaires de l’Université) à des fins d'analyse de votre parcours de navigation. Même si l’ULB s’assurera que les informations collectées ne présentent aucun risque pour votre vie privée, ces cookies tiers ne seront placés que si vous en donnez l'autorisation."},"cookies_reseaux_sociaux":{title:"Cookies de réseaux sociaux",description:"Les réseaux sociaux peuvent déposer des cookies afin de permettre de visualiser des contenus sur les sites de l’ULB ou de partager ceux de l’ULB. Via ces cookies, ils collectent et utilisent vos données de navigation pour des finalités qui leur sont propres, conformément à leur politique de confidentialité.  Si vous n'acceptez pas ces cookies, vous ne pourrez pas visualiser les contenus partagés et utiliser les fonctionnalités associées.",},"twitter":{title:"Twitter",description:"Consulter <a href=\"https://gdpr.twitter.com/fr.html\" target=\"_blank\">la politique de confidentialité de Twitter</a>",},"instagram":{title:"Instagram",description:"Consulter <a href=\"https://help.instagram.com/1896641480634370\" target=\"_blank\"> la politique de confidentialité d'Instagram</a>",},"facebook":{title:"Facebook",description:"Consulter <a href=\"https://www.facebook.com/policies/cookies/\" target=\"_blank\">la politique de confidentialité de Facebook</a>",},"youtube":{title:"YouTube",description:"Consulter <a href=\"https://policies.google.com/technologies/cookies?hl=fr&utm_source=ucb\" target=\"_blank\">la politique de confidentialité de Youtube</a>",},"linkedin":{title:"Linkedin",description:"Consulter <a href=\"https://fr.linkedin.com/legal/cookie-policy\" target=\"_blank\">la politique de confidentialité de Linkedin</a>",},"general":{title:"",description:""},"social":{title:"Cookies de réseaux sociaux",details:"Détails...",description:"Les réseaux sociaux peuvent déposer des cookies afin de permettre de visualiser des contenus sur les sites de l’ULB ou de partager ceux de l’ULB.  <br/>Via ces cookies, ils collectent et utilisent vos données de navigation pour des finalités qui leur sont propres, conformément à leur politique de confidentialité. <br/> Si vous n'acceptez pas ces cookies, vous ne pourrez pas visualiser les contenus partagés et utiliser les fonctionnalités associées."}},en:{accept:"Accept all",decline:"Reject all",acceptAll:"Accept all",declineAll:"Reject all",consentModal:{title:"Cookie customisation",description:"What is a cookie, what cookies do we use, and why? <br/>
4166<a href=\"https://www.ulb.be/en/legal-notice/data-protection-policy-at-ulb\" target=\"_blank\">➜ See our data protection policy.</a>"+"<br/><br/>By authorising the services listed below, you agree to the placement and use of cookies, and the use of other tracking technologies necessary for the proper functioning of these services.",privacyPolicy:{name:"",text:""}},consentNotice:{title:"This website uses cookies",changeDescription:"",description:"➜ ","privacyPolicy":{name:"See our data protection policy.",url:"https://www.ulb.be/en/legal-notice/data-protection-policy-at-ulb",text:"{privacyPolicy}"},learnMore:"Customize all"},contextualConsent:{description:"{title} is disabled.",acceptAlways:"Display and accept cookies"},"app":{"required":{"title":"Always active","description":"These cookies are always active"},"optional":{"title":"(optionnels)","description":"Ces cookies sont optionnels"}},"essentials_cookies":{title:"Essential and functional cookies",description:"These cookies are necessary for purely technical reasons to ensure a normal visit to the ULB’s websites (e.g. login, registration, language preference cookies). Considering their technical necessity, these cookies are automatically activated when you access the University website (only an information obligation applies).",}
4166,"analytics_cookies":{title:"Analytical cookies",description:"ULB uses the Matomo analysis tool.\n"+"These cookies help us better understand your browsing experience on our websites  to develop the content in line with your expectations. The data collected preserves your anonymity, is not transferred to third parties, and remains hosted on ULB servers. While the information collected ensures no infringement of privacy, these cookies will only be placed if you give your consent.",},"third_party_cookies":{title:"Third-party service analysis cookies",description:"During certain events or targeted initiatives, ULB may use cookies provided by third parties (collaborators and partners of the University) to analyse your browsing experience. While ULB will ensure that the information collected poses no infringement of privacy, these third-party cookies will only be placed if you give your consent."},"cookies_reseaux_sociaux":{title:"Social media cookies",description:"Social networks may place cookies to allow users to view content on the ULB websites  or to share ULB content. They collect and use your browsing data via these cookies for their purposes, in compliance with their privacy policy. If you do not accept these cookies, you will not be able to view the shared content and use the associated features"},"twitter":{title:"Twitter",description:"View <a href=\"https://help.twitter.com/en/rules-and-policies/twitter-cookies\" target=\"_blank\">Twitter's privacy policy</a>",},"instagram":{title:"Instagram",description:"View <a href=\"https://www.facebook.com/help/instagram/1896641480634370\" target=\"_blank\">Instagram's privacy policy</a>",},"facebook":{title:"Facebook",description:"View <a href=\"https://www.facebook.com/policies/cookies\" target=\"_blank\">Facebook's privacy policy</a>",},"youtube":{title:"YouTube",description:"View <a href=\"https://policies.google.com/technologies/cookies\" target=\"_blank\">YouTube’s privacy policy</a>",},"linkedin":{title:"Linkedin",description:"View <a href=\"https://www.linkedin.com/legal/cookie-policy\" target=\"_blank\">Linkedin’s privacy policy</a>",},"general":{title:"",description:""},"social":{title:"Social media cookies",details:"Details...",description:"Social networks may place cookies to allow users to view content on the ULB websites or to share ULB content.<br/> They collect and use your browsing data via these cookies for their purposes, in compliance with their privacy policy.<br/> If you do not accept these cookies, you will not be able to view the shared content and use the associated features."}}},apps:[{name:"essentials_cookies",title:"Cookies essentiels et fonctionnels",cookies:[],required:true},{name:"analytics_cookies",title:"Cookies analytics",cookies:[],default:false},{name:"third_party_cookies",title:"Cookies d'analyse de service tiers",cookies:[],default:false},{name:"twitter",title:"Twitter",cookies:["twitter"],default:false},{name:"instagram",title:"Instagram",cookies:["instagram"],default:false},{name:"facebook",title:"Facebook",cookies:["facebook"],default:false},{name:"youtube",title:"YouTube",cookies:["youtube"],default:false},{name:"linkedin",title:"Linkedin",cookies:["linkedin"],default:false}],categories:[{name:'general',apps:['essentials_cookies','analytics_cookies','third_party_cookies']},{name:'social',apps:['twitter','instagram','facebook','youtube','linkedin']}]};const orejime=Orejime.init(orejimeConfig);window.addEventListener("DOMContentLoaded",(event)=>{document.querySelector('.eprivacy-consent-modal-button').addEventListener('click',function(){if(!!orejime){orejime.show();setTimeout(eventModalOpened,300);}},false);let learnMoreButton=document.querySelector('.orejime-Notice-learnMoreButton');if(learnMoreButton!==null){learnMoreButton.addEventListener('click',eventModalOpened,false);}
4167function eventModalOpened(){let allArrows=document.querySelectorAll('.orejime-AppItem-arrow');for(let i=0;i<allArrows.length;i++){let arrowElement=allArrows[i];arrowElement.onclick=function(){this.parentNode.classList.toggle('active');};}
4168let allDetailsCat=document.querySelectorAll('.orejime-CategorizedAppList-item-social .orejime-CategorizedAppList-header .orejime-CategorizedAppList-details');for(let i=0;i<allDetailsCat.length;i++){let detailsCatElement=allDetailsCat[i];detailsCatElement.onclick=function(){this.parentNode.classList.toggle('activesocial');};}}});
4168LOCALE_ULB_FO={api:{error:"Une erreur est survenue lors du chargement du contenu. Veuillez réessayer ultérieurement. ",wait:"Veuillez patienter. Le contenu est en cours de chargement..."}};(function($){function loadCarrouselPrincipal(){$('.owl-carrousel-accueil').each(function(){var $t=$(this);var willBeAnimated=$t.find('.carrouselCard__item').length>1;var isAutoplay=$t.attr("autoplay")&&willBeAnimated;var isAutoplayHoverPause=$t.attr("autoplayHoverPause");var autoplayTimeoutAttr=$t.attr("autoplayTimeout");if(isNaN(autoplayTimeoutAttr)){autoplayTimeoutAttr="5000";}
4169var smartSpeedAttr=$t.attr("smartSpeed");if(isNaN(smartSpeedAttr)){smartSpeedAttr="200";}
4170$t.owlCarousel({items:1,margin:0,stagePadding:0,loop:willBeAnimated,nav:false,autoplay:isAutoplay,mouseDrag:willBeAnimated,touchDrag:willBeAnimated,autoplayTimeout:autoplayTimeoutAttr,autoplayHoverPause:isAutoplayHoverPause,smartSpeed:smartSpeedAttr,lazyloading:true});$t.on('translate.owl.carousel',function(property){$t.addClass("translate");})
4171$t.on('translated.owl.carousel',function(property){$t.removeClass("translate");})
4172$t.find('.owl-controls').prepend('<button class="owl-prev"></button>').append('<button class="owl-next"></button>');$t.find('.owl-controls .owl-prev').click(function(){$t.trigger('prev.owl.carousel');}).end().find('.owl-controls .owl-next').click(function(){$t.trigger('next.owl.carousel');});});}
4173function isMobile(){return $('.check-media').is(':visible');}
4174var carrouselAccueilSelector=".accueil-carrousel";var carrouselActuSelector=".actualitesCard__actualites";function loadCarrouselActu(){$(carrouselActuSelector).each(function(){var $t=$(this);var willBeAnimated=$t.find('[class*="actualitesCard__actualite"]').length>1;$t.owlCarousel({items:1,margin:0,stagePadding:0,loop:willBeAnimated,nav:false,autoplay:false,mouseDrag:willBeAnimated,touchDrag:willBeAnimated,lazyloading:true,autoWidth:false,responsiveRefreshRate:50,responsive:{768:{autoWidth:true,items:3}}});$t.find('.owl-controls').prepend('<button class="owl-prev"></button>').append('<button class="owl-next"></button>');$t.find('.owl-controls .owl-prev').click(function(){$t.trigger('prev.owl.carousel');}).end().find('.owl-controls .owl-next').click(function(){$t.trigger('next.owl.carousel');});});}
4175function forceMenuMobileOuvert(){if(!isMobile()&&!$(body).hasClass("show-menu")&&$("body").hasClass("siteintranet")&&!$("body").hasClass("ficheaccueil")){$("body").addClass("show-menu");$(".menu__toggle").addClass("show-menu");}}
4176function resetCarrousels(){$(carrouselAccueilSelector).trigger('destroy.owl.carousel').removeClass('owl-carousel owl-loaded');$(carrouselAccueilSelector).find('.owl-stage-outer').children().unwrap();loadCarrouselActu();loadCarrouselPrincipal();}
4177function calcResponsiveClass(){if(!isMobile()){$("body").addClass("isdesktop");}else{$("body").removeClass("isdesktop");}}
4178document.body.addEventListener('menu-mobile-toggle',function(event){resetCarrousels();});$(window).resize(function(){resetCarrousels();forceMenuMobileOuvert();calcResponsiveClass();});loadCarrouselActu();loadCarrouselPrincipal();forceMenuMobileOuvert();calcResponsiveClass();$(document).ready(function(){$(html).removeClass("loading");loadMenuPrincipalHover();loadLienExterne();});function loadMenuPrincipalHover(){var selector=".no-touchevents .sitepublic.isdesktop ";var cursorOnMenu=false;$(selector+".item__control-level-0").on("mouseover mouseenter",function(){cursorOnMenu=true;if(!$(this).hasClass("active")){$(this).trigger("click",["fakeClick"]);}});$(selector+".item__control-level-0").on('click',function(event,param){if(param!="fakeClick"){var targetLink=$(this).prev("a.item__control").attr("href");if(!!targetLink){window.location.href=targetLink;}}});function closeMenu(){cursorOnMenu=false;setTimeout(function(){if(!cursorOnMenu){$("#menu .active").removeClass("active");}},500);}
4179$(selector+".menu__level--0,"+selector+".menu__level--1").mouseleave(function(){closeMenu();});$(selector+".menu__level--0,"+selector+".menu__level--1").mouseenter(function(){cursorOnMenu=true;});$(selector+".menu__level--0 > * > * > * > .item__control").not(".item__control-level-0").on("mouseover mouseenter",function(){closeMenu();});}
4180function loadLienExterne(){$('.lien_externe').click(function(){window.open(this.href);return false;});}
4181var dateDebutActu=$('#DATE_EVENEMENT');var dateDebutAgenda=$('#AGENDAEVT_DATE_DEBUT');
4181var dateFinActu=$('#DATE_FIN_EVENEMENT');var dateFinAgenda=$('#AGENDAEVT_DATE_FIN');if(dateDebutActu&&dateFinActu){dateDebutActu.datepicker().on('change',function(){mapAgenda();});dateFinActu.datepicker().on('change',function(){mapAgenda();});}
4182function mapAgenda(){if(dateDebutActu&&dateDebutAgenda){var valueDateDebut=dateDebutActu.datepicker("getDate");if(valueDateDebut){dateDebutAgenda.datepicker("setDate",valueDateDebut);}}
4183if(dateFinActu&&dateFinAgenda){var valueDateFin=dateFinActu.datepicker("getDate");if(valueDateFin){dateFinAgenda.datepicker("setDate",valueDateFin);}}}})(jQuery.noConflict());!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";"undefined"!=typeof document&&function(e){var t;function n(){t||(t=!0,e())}"complete"===document.readyState?e():(t=!1,document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1))}(function(){var e=!0,t=!1,n=null,o={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function d(e){return!(!e||e===document||"HTML"===e.nodeName||"BODY"===e.nodeName)}function i(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function u(t){e=!1}function s(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(t){"html"!==t.target.nodeName.toLowerCase()&&(e=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(t){d(document.activeElement)&&i(document.activeElement),e=!0},!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("focus",function(t){var n,u,s;d(t.target)&&(e||(n=t.target,u=n.type,"INPUT"==(s=n.tagName)&&o[u]&&!n.readonly||"TEXTAREA"==s&&!n.readonly||"true"==n.contentEditable))&&(i(t.target),e=!1)},!0),document.addEventListener("blur",function(e){var o;d(e.target)&&e.target.classList.contains("focus-visible")&&(t=!0,window.clearTimeout(n),n=window.setTimeout(function(){t=!1,window.clearTimeout(n)},100),(o=e.target).hasAttribute("data-focus-visible-added")&&(o.classList.remove("focus-visible"),o.removeAttribute("data-focus-visible-added")))},!0),document.addEventListener("visibilitychange",function(n){"hidden"==document.visibilityState&&(t&&(e=!0),s())},!0),s(),document.body.classList.add("js-focus-visible")})});!function(e,n,t){function r(e){var n=_.className,t=Modernizr._config.classPrefix||"";if(b&&(n=n.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(n+=" "+t+e.join(" "+t),b?_.className.baseVal=n:_.className=n)}function o(e,n){return typeof e===n}function s(){var e,n,t,r,s,i,a;for(var f in x)if(x.hasOwnProperty(f)){if(e=[],n=x[f],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(r=o(n.fn,"function")?n.fn():n.fn,s=0;s<e.length;s++)i=e[s],a=i.split("."),1===a.length?Modernizr[a[0]]=r:(!Modernizr[a[0]]||Modernizr[a[0]]instanceof Boolean||(Modernizr[a[0]]=new Boolean(Modernizr[a[0]])),Modernizr[a[0]][a[1]]=r),g.push((r?"":"no-")+a.join("-"))}}function i(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):b?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function a(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function f(){var e=n.body;return e||(e=i(b?"svg":"body"),e.fake=!0),e}function l(e,t,r,o){var s,a,l,u,c="modernizr",d=i("div"),p=f();if(parseInt(r,10))for(;r--;)l=i("div"),l.id=o?o[r]:c+(r+1),d.appendChild(l);return s=i("style"),s.type="text/css",s.id="s"+c,(p.fake?p:d).appendChild(s),p.appendChild(d),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(n.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",u=_.style.overflow,_.style.overflow="hidden",_.appendChild(p)),a=t(d,e),p.fake?(p.parentNode.removeChild(p),_.style.overflow=u,_.offsetHeight):d.parentNode.removeChild(d),!!a}function u(e,n){return!!~(""+e).indexOf(n)}function c(e,n){return function(){return e.apply(n,arguments)}}function d(e,n,t){var r;for(var s in e)if(e[s]in n)return t===!1?e[s]:(r=n[e[s]],o(r,"function")?c(r,t||n):r);return!1}function p(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(n,r){var o=n.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(p(n[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var s=[];o--;)s.push("("+p(n[o])+":"+r+")");return s=s.join(" or "),l("@supports ("+s+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return t}
4183function h(e,n,r,s){function f(){c&&(delete k.style,delete k.modElem)}if(s=o(s,"undefined")?!1:s,!o(r,"undefined")){var l=m(e,r);if(!o(l,"undefined"))return l}for(var c,d,p,h,v,y=["modernizr","tspan","samp"];!k.style&&y.length;)c=!0,k.modElem=i(y.shift()),k.style=k.modElem.style;for(p=e.length,d=0;p>d;d++)if(h=e[d],v=k.style[h],u(h,"-")&&(h=a(h)),k.style[h]!==t){if(s||o(r,"undefined"))return f(),"pfx"==n?h:!0;try{k.style[h]=r}catch(g){}if(k.style[h]!=v)return f(),"pfx"==n?h:!0}return f(),!1}function v(e,n,t,r,s){var i=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+j.join(i+" ")+i).split(" ");return o(n,"string")||o(n,"undefined")?h(a,n,r,s):(a=(e+" "+E.join(i+" ")+i).split(" "),d(a,n,t))}function y(e,n,r){return v(e,t,t,n,r)}var g=[],x=[],C={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){x.push({name:e,fn:n,options:t})},addAsyncTest:function(e){x.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=C,Modernizr=new Modernizr;var _=n.documentElement,b="svg"===_.nodeName.toLowerCase(),w=C._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];C._prefixes=w,Modernizr.addTest("csscalc",function(){var e="width:",n="calc(10px);",t=i("a");return t.style.cssText=e+w.join(n+e),!!t.style.length});var S=C.testStyles=l;Modernizr.addTest("touchevents",function(){var t;if("ontouchstart"in e||e.DocumentTouch&&n instanceof DocumentTouch)t=!0;else{var r=["@media (",w.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");S(r,function(e){t=9===e.offsetTop})}return t});var T="Moz O ms Webkit",j=C._config.usePrefixes?T.split(" "):[];C._cssomPrefixes=j;var z=function(n){var r,o=w.length,s=e.CSSRule;if("undefined"==typeof s)return t;if(!n)return!1;if(n=n.replace(/^@/,""),r=n.replace(/-/g,"_").toUpperCase()+"_RULE",r in s)return"@"+n;for(var i=0;o>i;i++){var a=w[i],f=a.toUpperCase()+"_"+r;if(f in s)return"@-"+a.toLowerCase()+"-"+n}return!1};C.atRule=z;var E=C._config.usePrefixes?T.toLowerCase().split(" "):[];C._domPrefixes=E;var P={elem:i("modernizr")};Modernizr._q.push(function(){delete P.elem});var k={style:P.elem.style};Modernizr._q.unshift(function(){delete k.style}),C.testAllProps=v;var N=C.prefixed=function(e,n,t){return 0===e.indexOf("@")?z(e):(-1!=e.indexOf("-")&&(e=a(e)),n?v(e,n,t):v(e,"pfx"))};Modernizr.addTest("backgroundblendmode",N("backgroundBlendMode","text")),Modernizr.addTest("objectfit",!!N("objectFit"),{aliases:["object-fit"]}),C.testAllProps=y,Modernizr.addTest("flexbox",y("flexBasis","1px",!0)),s(),r(g),delete C.addTest,delete C.addAsyncTest;for(var L=0;L<Modernizr._q.length;L++)Modernizr._q[L]();e.Modernizr=Modernizr}(window,document);(function($){'use strict';jQuery.fn.reverse=[].reverse;function uuidv4(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=='x'?r:(r&0x3|0x8);return v.toString(16);});}
4184$(function(){$('.ckeditor-tabs').each(function initTabCkeditor(){var $tabs=$(this);var $dt=$('> dt',$tabs);var $dd=$('> dd',$tabs);$dt.addClass("tabs_toggler");$dd.addClass("tabs_wrapper");$dt.first().addClass('active');$dd.first().addClass('active');$dt.each(function initTabCkeditorDt(){var uuid="a"+uuidv4();var toggler='<button class="tabs_toggler__btn" target="'+uuid+'"></button>';$(this).addClass(uuid).wrapInner(toggler);$(this).next().attr('id',uuid);});$dt.reverse().each(function initTogglerDesktop(){$(this).parent().prepend($(this).clone().addClass("desktop-only"));});$('.tabs_toggler__btn',$tabs).on('click',function(){var target=$(this).attr('target');$('.tabs_toggler, .tabs_wrapper',$tabs).removeClass('active');$("#"+target+", ."+target).addClass('active');});});});})(jQuery.noConflict());(function($){'use strict';$(function(){function uuidv4(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=='x'?r:(r&0x3|0x8);return v.toString(16);});}
4185$('.ckeditor-accordion').each(function initAccordionCkeditor(){var $accordion=$(this);var $dt=$('> dt',$accordion);var $dd=$('> dd',$accordion);$dt.addClass("accordion_toggler");$dd.addClass("accordion_wrapper");$dt.each(function initAccordionCkeditorDt(){var uuid="a"+uuidv4();$(this).wrapInner('<button class="accordion_toggler__btn" target="#'+uuid+'"></button>');$(this).next().attr('id',uuid);});$('.accordion_toggler__btn',$accordion).on('click',function(){var target=$(this).attr('target');$(this).parent('.accordion_toggler').toggleClass('active');$(target).toggleClass('active');});});});})(jQuery.noConflict());(function($){function tagWS(){var $divFormationXml=$('.js-formation-ulb');var maxRetry=20;$divFormationXml.each(function(){var $item=$(this);function recursively_ajax(retry){$.ajax({method:'GET',url:'/api/formation',data:{path:$item.data().attributeUrl},beforeSend:function(){$item.html('<div class="api__formation__wait api__formation__wait--'+(maxRetry-retry)+'"><span>'+LOCALE_ULB_FO.api.wait+'</span></div>');return true;},timeout:30000,cache:false}).always(function(){$item.remove('.api__formation__wait');}).done(function callback(response){if(response.status===200){$item.html(response.html);
4185if(!!response.json){var callbackMethod=$item.data().callbackMethod;if(!!callbackMethod&&!!window[callbackMethod]){window[callbackMethod](response.json);}}}}).fail(function callback(response,textStatus){var me=this;if(response.status===500||response.status===503||textStatus==='timeout'){if(retry){if(response.status===503){var retryAfter=response.getResponseHeader('Retry-After');if(!!retryAfter){setTimeout(function(){recursively_ajax(retry-1);},1000*parseInt(retryAfter,10));return;}else{recursively_ajax(retry-1);return;}}else{recursively_ajax(retry-1);return;}}else{$item.html('<div class="api__formation__erreur api__formation__erreur--maxretry"><span>'+LOCALE_ULB_FO.api.error+'</span></div>');return;}}else{$item.html('<div class="api__formation__erreur"><span>'+LOCALE_ULB_FO.api.error+'</span></div>');return;}});}
4186recursively_ajax(maxRetry);});}
4187function formationAnchorTrigger(){var anchor=window.location.hash;if($(body).hasClass("formation")&&anchor){$('.jumps-trigger[href='+anchor+']').trigger("click");}}
4188$(document).ready(function(){tagWS();formationAnchorTrigger();$(".jumps-trigger").click(function(){$(".jumps-trigger").removeClass("current");$(this).addClass("current");var linktarget=$(this).attr("data-target");if(linktarget){$(".panel-switch").removeClass("active");$(linktarget).addClass("active");}});});})(jQuery.noConflict());(function($){'use strict';$('.js-search-tri-select').on('change',function(){document.getElementById('input_tri').value=$('.js-search-tri-select').val();var $form=$('#search_query_input');$form.submit();});var divRadioSearch=document.querySelector('.js-radio-search');if(divRadioSearch){var radioSearch=divRadioSearch.querySelectorAll('input[type="radio"]');[].forEach.call(radioSearch,function(radio){radio.addEventListener('change',checkFormationSelected);});}
4189function checkFormationSelected(){if(this&&this.checked&&this.value==='beanKeyRechercheFormation'){updateStateAutoComplete(true,'.js-search-header');}else{checkStateAutoComplete('.js-value-autocomplete-header-disallow','.js-search-header');}}
4190function checkStateAutoComplete(selector,selectorInputSearch){var inputAutocompleteDisallow=document.querySelector(selector)
4191if(inputAutocompleteDisallow&&inputAutocompleteDisallow.value=="true"){updateStateAutoComplete(false,selectorInputSearch);}else{updateStateAutoComplete(true,selectorInputSearch);}}
4192function updateStateAutoComplete(enable,selectorSearch){var searchInput=$(selectorSearch);if(searchInput){if(enable){searchInput.autocomplete("enable");}else{searchInput.autocomplete("disable");}}}
4193checkStateAutoComplete('.js-value-autocomplete-header-disallow','.js-search-header');checkStateAutoComplete('.js-value-autocomplete-metadata-disallow','.js-search-metadata');})(jQuery.noConflict());(function(){const listeTypeEvaluation=document.getElementById('methodes_evaluation'),elementExamenEcritOption=document.getElementById("kmultiselectexamen_ecrit_option"),elementExamenEcritQuestion=document.getElementById("kmultiselectexamen_ecrit_question"),elementExamenOralOption=document.getElementById("kmultiselectexamen_oral_option"),elementExamenOralQuestion=document.getElementById("kmultiselectexamen_oral_question"),elementExamenPratiqueOption=document.getElementById("kmultiselectexamen_pratique_option"),elementExamenPratiqueQuestion=document.getElementById("kmultiselectexamen_pratique_question");initTypeEvaluation();toggleTypeEvaluation();if(listeTypeEvaluation){listeTypeEvaluation.addEventListener("change",toggleTypeEvaluation);}
4194function toggleTypeEvaluation(){if(listeTypeEvaluation){let elementTypeEvaluation=listeTypeEvaluation.value.split(";");if(elementTypeEvaluation.includes("ecrit")){elementExamenEcritOption.parentElement.classList.remove("hide");elementExamenEcritQuestion.parentElement.classList.remove("hide");}else{elementExamenEcritOption.parentElement.classList.add("hide");elementExamenEcritQuestion.parentElement.classList.add("hide");}
4195if(elementTypeEvaluation.includes("oral")){elementExamenOralOption.parentElement.classList.remove("hide");elementExamenOralQuestion.parentElement.classList.remove("hide");}else{elementExamenOralOption.parentElement.classList.add("hide");elementExamenOralQuestion.parentElement.classList.add("hide");}
4196if(elementTypeEvaluation.includes("pratexam")){elementExamenPratiqueOption.parentElement.classList.remove("hide");elementExamenPratiqueQuestion.parentElement.classList.remove("hide");}else{elementExamenPratiqueOption.parentElement.classList.add("hide");elementExamenPratiqueQuestion.parentElement.classList.add("hide");}}}
4197function initTypeEvaluation(){if(elementExamenEcritOption){elementExamenEcritOption.parentElement.classList.toggle("hide");}
4198if(elementExamenEcritQuestion){elementExamenEcritQuestion.parentElement.classList.toggle("hide");}
4199if(elementExamenOralOption){elementExamenOralOption.parentElement.classList.toggle("hide");}
4200if(elementExamenOralQuestion){elementExamenOralQuestion.parentElement.classList.toggle("hide");}
4201if(elementExamenPratiqueOption){elementExamenPratiqueOption.parentElement.classList.toggle("hide");}
4202if(elementExamenPratiqueQuestion){elementExamenPratiqueQuestion.parentElement.classList.toggle("hide");}}
4203const toggleEncarts=document.querySelectorAll('.toggle-encart-aide');for(const encart of toggleEncarts){encart.classList.toggle('hide');}
4204const buttons=document.querySelectorAll('.toggle-button');for(const b of buttons){const idEncart=b.dataset.toggleEncart;b.addEventListener('click',function(){const encart=document.getElementById(idEncart);encart.classList.toggle('hide');});}})();(function(){'use strict';function initValidationCheckbox(){var forms=document.querySelectorAll('.js-form-redacteur');if(forms){[].forEach.call(forms,function(form){form.addEventListener('submit',function(evt){controlCheckbox(evt,form);});});}}
4205function controlCheckbox(event,form){var groupsCheckbox=form.querySelectorAll('.js-checkbox-mandatory');if(groupsCheckbox){[].forEach.call(groupsCheckbox,function(group){if(group.querySelectorAll('input[type="checkbox"]:checked').length<1){event.preventDefault();createMessageError(group,form);}});}}
4206function createMessageError(group,form){var allErrorForm=document.querySelectorAll('.js-erreur-form');[].forEach.call(allErrorForm,function(elem){if(elem.parentNode){elem.parentNode.removeChild(elem);}});if(form){var elementError=document.createElement('p');elementError.className='erreur js-erreur-form';var libelle=group.dataset.libelle;elementError.appendChild(document.createTextNode(LOCALE_BO.formulaire.erreurZone+' '+libelle+' '+LOCALE_BO.formulaire.erreurZoneObligatoire));form.parentNode.insertBefore(elementError,form);}}
4207initValidationCheckbox();})();jQuery.extend(true,LOCALE_BO,{formulaire:{erreurZone:"La zone",erreurZoneObligatoire:"est obligatoire"}});(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define('jquery-bridget/jquery-bridget',['jquery'],function(jQuery){factory(window,jQuery);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('jquery'));}else{window.jQueryBridget=factory(window,window.jQuery);}}(window,function factory(window,jQuery){'use strict';var arraySlice=Array.prototype.slice;var console=window.console;var logError=typeof console=='undefined'?function(){}:function(message){console.error(message);};function jQueryBridget(namespace,PluginClass,$){$=$||jQuery||window.jQuery;if(!$){return;}
4208if(!PluginClass.prototype.option){PluginClass.prototype.option=function(opts){if(!$.isPlainObject(opts)){return;}
4209this.options=$.extend(true,this.options,opts);};}
4210$.fn[namespace]=function(arg0){if(typeof arg0=='string'){var args=arraySlice.call(arguments,1);return methodCall(this,arg0,args);}
4211plainCall(this,arg0);return this;};function methodCall($elems,methodName,args){var returnValue;var pluginMethodStr='$().'+namespace+'("'+methodName+'")';$elems.each(function(i,elem){var instance=$.data(elem,namespace);if(!instance){logError(namespace+' not initialized. Cannot call methods, i.e. '+
4212pluginMethodStr);return;}
4213var method=instance[methodName];if(!method||methodName.charAt(0)=='_'){logError(pluginMethodStr+' is not a valid method');return;}
4214var value=method.apply(instance,args);returnValue=returnValue===undefined?value:returnValue;});return returnValue!==undefined?returnValue:$elems;}
4215function plainCall($elems,options){$elems.each(function(i,elem){var instance=$.data(elem,namespace);if(instance){instance.option(options);instance._init();}else{instance=new PluginClass(elem,options);$.data(elem,namespace,instance);}});}
4216updateJQuery($);}
4217function updateJQuery($){if(!$||($&&$.bridget)){return;}
4218$.bridget=jQueryBridget;}
4219updateJQuery(jQuery||window.jQuery);return jQueryBridget;}));(function(global,factory){if(typeof define=='function'&&define.amd){define('ev-emitter/ev-emitter',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{global.EvEmitter=factory();}}(this,function(){function EvEmitter(){}
4220var proto=EvEmitter.prototype;proto.on=function(eventName,listener){if(!eventName||!listener){return;}
4221var events=this._events=this._events||{};var listeners=events[eventName]=events[eventName]||[];if(listeners.indexOf(listener)==-1){listeners.push(listener);}
4222return this;};proto.once=function(eventName,listener){if(!eventName||!listener){return;}
4223this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{};var onceListeners=onceEvents[eventName]=onceEvents[eventName]||[];onceListeners[listener]=true;return this;};proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;}
4224var index=listeners.indexOf(listener);if(index!=-1){listeners.splice(index,1);}
4225return this;};proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;}
4226var i=0;var listener=listeners[i];args=args||[];var onceListeners=this._onceEvents&&this._onceEvents[eventName];while(listener){var isOnce=onceListeners&&onceListeners[listener];if(isOnce){this.off(eventName,listener);delete onceListeners[listener];}
4227listener.apply(this,args);i+=isOnce?0:1;listener=listeners[i];}
4228return this;};return EvEmitter;}));(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define('get-size/get-size',[],function(){return factory();});}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{window.getSize=factory();}})(window,function factory(){'use strict';function getStyleSize(value){var num=parseFloat(value);var isValid=value.indexOf('%')==-1&&!isNaN(num);return isValid&&num;}
4229function noop(){}
4230var logError=typeof console=='undefined'?noop:function(message){console.error(message);};var measurements=['paddingLeft','paddingRight','paddingTop','paddingBottom','marginLeft','marginRight','marginTop','marginBottom','borderLeftWidth','borderRightWidth','borderTopWidth','borderBottomWidth'];var measurementsLength=measurements.length;function getZeroSize(){var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<measurementsLength;i++){var measurement=measurements[i];size[measurement]=0;}
4231return size;}
4232function getStyle(elem){var style=getComputedStyle(elem);if(!style){logError('Style returned '+style+'. Are you running this code in a hidden iframe on Firefox? '+'See http://bit.ly/getsizebug1');}
4233return style;}
4234var isSetup=false;var isBoxSizeOuter;function setup(){if(isSetup){return;}
4235isSetup=true;var div=document.createElement('div');div.style.width='200px';div.style.padding='1px 2px 3px 4px';div.style.borderStyle='solid';div.style.borderWidth='1px 2px 3px 4px';div.style.boxSizing='border-box';var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);getSize.isBoxSizeOuter=isBoxSizeOuter=getStyleSize(style.width)==200;body.removeChild(div);}
4236function getSize(elem){setup();if(typeof elem=='string'){elem=document.querySelector(elem);}
4237if(!elem||typeof elem!='object'||!elem.nodeType){return;}
4238var style=getStyle(elem);if(style.display=='none'){return getZeroSize();}
4239var size={};size.width=elem.offsetWidth;size.height=elem.offsetHeight;var isBorderBox=size.isBorderBox=style.boxSizing=='border-box';for(var i=0;i<measurementsLength;i++){var measurement=measurements[i];var value=style[measurement];var num=parseFloat(value);size[measurement]=!isNaN(num)?num:0;}
4240var paddingWidth=size.paddingLeft+size.paddingRight;var paddingHeight=size.paddingTop+size.paddingBottom;var marginWidth=size.marginLeft+size.marginRight;var marginHeight=size.marginTop+size.marginBottom;var borderWidth=size.borderLeftWidth+size.borderRightWidth;var borderHeight=size.borderTopWidth+size.borderBottomWidth;var isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter;var styleWidth=getStyleSize(style.width);if(styleWidth!==false){size.width=styleWidth+
4241(isBorderBoxSizeOuter?0:paddingWidth+borderWidth);}
4242var styleHeight=getStyleSize(style.height);if(styleHeight!==false){size.height=styleHeight+
4243(isBorderBoxSizeOuter?0:paddingHeight+borderHeight);}
4244size.innerWidth=size.width-(paddingWidth+borderWidth);
vendor: 13,786 bytes, lines 4244-4279
4244size.innerHeight=size.height-(paddingHeight+borderHeight);size.outerWidth=size.width+marginWidth;size.outerHeight=size.height+marginHeight;return size;}
4245return getSize;});(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define('matches-selector/matches-selector',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{window.matchesSelector=factory();}}(window,function factory(){'use strict';var matchesMethod=(function(){var ElemProto=Element.prototype;if(ElemProto.matches){return'matches';}
4246if(ElemProto.matchesSelector){return'matchesSelector';}
4247var prefixes=['webkit','moz','ms','o'];for(var i=0;i<prefixes.length;i++){var prefix=prefixes[i];var method=prefix+'MatchesSelector';if(ElemProto[method]){return method;}}})();return function matchesSelector(elem,selector){return elem[matchesMethod](selector);};}));(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define('fizzy-ui-utils/utils',['matches-selector/matches-selector'],function(matchesSelector){return factory(window,matchesSelector);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('desandro-matches-selector'));}else{window.fizzyUIUtils=factory(window,window.matchesSelector);}}(window,function factory(window,matchesSelector){var utils={};utils.extend=function(a,b){for(var prop in b){a[prop]=b[prop];}
4248return a;};utils.modulo=function(num,div){return((num%div)+div)%div;};utils.makeArray=function(obj){var ary=[];if(Array.isArray(obj)){ary=obj;}else if(obj&&typeof obj.length=='number'){for(var i=0;i<obj.length;i++){ary.push(obj[i]);}}else{ary.push(obj);}
4249return ary;};utils.removeFrom=function(ary,obj){var index=ary.indexOf(obj);if(index!=-1){ary.splice(index,1);}};utils.getParent=function(elem,selector){while(elem!=document.body){elem=elem.parentNode;if(matchesSelector(elem,selector)){return elem;}}};utils.getQueryElement=function(elem){if(typeof elem=='string'){return document.querySelector(elem);}
4250return elem;};utils.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};utils.filterFindElements=function(elems,selector){elems=utils.makeArray(elems);var ffElems=[];elems.forEach(function(elem){if(!(elem instanceof HTMLElement)){return;}
4251if(!selector){ffElems.push(elem);return;}
4252if(matchesSelector(elem,selector)){ffElems.push(elem);}
4253var childElems=elem.querySelectorAll(selector);for(var i=0;i<childElems.length;i++){ffElems.push(childElems[i]);}});return ffElems;};utils.debounceMethod=function(_class,methodName,threshold){var method=_class.prototype[methodName];var timeoutName=methodName+'Timeout';_class.prototype[methodName]=function(){var timeout=this[timeoutName];if(timeout){clearTimeout(timeout);}
4254var args=arguments;var _this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args);delete _this[timeoutName];},threshold||100);};};utils.docReady=function(callback){if(document.readyState=='complete'){callback();}else{document.addEventListener('DOMContentLoaded',callback);}};utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+'-'+$2;}).toLowerCase();};var console=window.console;utils.htmlInit=function(WidgetClass,namespace){utils.docReady(function(){var dashedNamespace=utils.toDashed(namespace);var dataAttr='data-'+dashedNamespace;var dataAttrElems=document.querySelectorAll('['+dataAttr+']');var jsDashElems=document.querySelectorAll('.js-'+dashedNamespace);var elems=utils.makeArray(dataAttrElems).concat(utils.makeArray(jsDashElems));var dataOptionsAttr=dataAttr+'-options';var jQuery=window.jQuery;elems.forEach(function(elem){var attr=elem.getAttribute(dataAttr)||elem.getAttribute(dataOptionsAttr);var options;try{options=attr&&JSON.parse(attr);}catch(error){if(console){console.error('Error parsing '+dataAttr+' on '+elem.className+': '+error);}
4255return;}
4256var instance=new WidgetClass(elem,options);if(jQuery){jQuery.data(elem,namespace,instance);}});});};return utils;}));(function(window,factory){if(typeof define=='function'&&define.amd){define('outlayer/item',['ev-emitter/ev-emitter','get-size/get-size'],function(EvEmitter,getSize){return factory(window,EvEmitter,getSize);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('ev-emitter'),require('get-size'));}else{window.Outlayer={};window.Outlayer.Item=factory(window,window.EvEmitter,window.getSize);}}(window,function factory(window,EvEmitter,getSize){'use strict';function isEmptyObj(obj){for(var prop in obj){return false;}
4257prop=null;return true;}
4258var docElemStyle=document.documentElement.style;var transitionProperty=typeof docElemStyle.transition=='string'?'transition':'WebkitTransition';var transformProperty=typeof docElemStyle.transform=='string'?'transform':'WebkitTransform';var transitionEndEvent={WebkitTransition:'webkitTransitionEnd',transition:'transitionend'}[transitionProperty];var vendorProperties=[transformProperty,transitionProperty,transitionProperty+'Duration',transitionProperty+'Property'];function Item(element,layout){if(!element){return;}
4259this.element=element;this.layout=layout;this.position={x:0,y:0};this._create();}
4260var proto=Item.prototype=Object.create(EvEmitter.prototype);proto.constructor=Item;proto._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:'absolute'});};proto.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};proto.getSize=function(){this.size=getSize(this.element);};proto.css=function(style){var elemStyle=this.element.style;for(var prop in style){var supportedProp=vendorProperties[prop]||prop;elemStyle[supportedProp]=style[prop];}};proto.getPosition=function(){var style=getComputedStyle(this.element);var isOriginLeft=this.layout._getOption('originLeft');var isOriginTop=this.layout._getOption('originTop');var xValue=style[isOriginLeft?'left':'right'];var yValue=style[isOriginTop?'top':'bottom'];var layoutSize=this.layout.size;var x=xValue.indexOf('%')!=-1?(parseFloat(xValue)/100)*layoutSize.width:parseInt(xValue,10);var y=yValue.indexOf('%')!=-1?(parseFloat(yValue)/100)*layoutSize.height:parseInt(yValue,10);x=isNaN(x)?0:x;y=isNaN(y)?0:y;x-=isOriginLeft?layoutSize.paddingLeft:layoutSize.paddingRight;y-=isOriginTop?layoutSize.paddingTop:layoutSize.paddingBottom;this.position.x=x;this.position.y=y;};proto.layoutPosition=function(){var layoutSize=this.layout.size;var style={};var isOriginLeft=this.layout._getOption('originLeft');var isOriginTop=this.layout._getOption('originTop');var xPadding=isOriginLeft?'paddingLeft':'paddingRight';var xProperty=isOriginLeft?'left':'right';var xResetProperty=isOriginLeft?'right':'left';var x=this.position.x+layoutSize[xPadding];style[xProperty]=this.getXValue(x);style[xResetProperty]='';var yPadding=isOriginTop?'paddingTop':'paddingBottom';var yProperty=isOriginTop?'top':'bottom';var yResetProperty=isOriginTop?'bottom':'top';var y=this.position.y+layoutSize[yPadding];style[yProperty]=this.getYValue(y);style[yResetProperty]='';this.css(style);this.emitEvent('layout',[this]);};proto.getXValue=function(x){var isHorizontal=this.layout._getOption('horizontal');return this.layout.options.percentPosition&&!isHorizontal?((x/this.layout.size.width)*100)+'%':x+'px';};proto.getYValue=function(y){var isHorizontal=this.layout._getOption('horizontal');return this.layout.options.percentPosition&&isHorizontal?((y/this.layout.size.height)*100)+'%':y+'px';};proto._transitionTo=function(x,y){this.getPosition();var curX=this.position.x;var curY=this.position.y;var compareX=parseInt(x,10);var compareY=parseInt(y,10);var didNotMove=compareX===this.position.x&&compareY===this.position.y;this.setPosition(x,y);if(didNotMove&&!this.isTransitioning){this.layoutPosition();return;}
4261var transX=x-curX;var transY=y-curY;var transitionStyle={};transitionStyle.transform=this.getTranslate(transX,transY);this.transition({to:transitionStyle,onTransitionEnd:{transform:this.layoutPosition},isCleaning:true});};proto.getTranslate=function(x,y){var isOriginLeft=this.layout._getOption('originLeft');var isOriginTop=this.layout._getOption('originTop');x=isOriginLeft?x:-x;y=isOriginTop?y:-y;return'translate3d('+x+'px, '+y+'px, 0)';};proto.goTo=function(x,y){this.setPosition(x,y);this.layoutPosition();};proto.moveTo=proto._transitionTo;proto.setPosition=function(x,y){this.position.x=parseInt(x,10);this.position.y=parseInt(y,10);};proto._nonTransition=function(args){this.css(args.to);if(args.isCleaning){this._removeStyles(args.to);}
4262for(var prop in args.onTransitionEnd){args.onTransitionEnd[prop].call(this);}};proto._transition=function(args){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(args);return;}
4263var _transition=this._transn;for(var prop in args.onTransitionEnd){_transition.onEnd[prop]=args.onTransitionEnd[prop];}
4264for(prop in args.to){_transition.ingProperties[prop]=true;if(args.isCleaning){_transition.clean[prop]=true;}}
4265if(args.from){this.css(args.from);var h=this.element.offsetHeight;h=null;}
4266this.enableTransition(args.to);this.css(args.to);this.isTransitioning=true;};function toDashedAll(str){return str.replace(/([A-Z])/g,function($1){return'-'+$1.toLowerCase();});}
4267var transitionProps='opacity,'+
4268toDashedAll(vendorProperties.transform||'transform');proto.enableTransition=function(){if(this.isTransitioning){return;}
4269this.css({transitionProperty:transitionProps,transitionDuration:this.layout.options.transitionDuration});this.element.addEventListener(transitionEndEvent,this,false);};proto.transition=Item.prototype[transitionProperty?'_transition':'_nonTransition'];proto.onwebkitTransitionEnd=function(event){this.ontransitionend(event);};proto.onotransitionend=function(event){this.ontransitionend(event);};var dashedVendorProperties={'-webkit-transform':'transform'};proto.ontransitionend=function(event){if(event.target!==this.element){return;}
4270var _transition=this._transn;var propertyName=dashedVendorProperties[event.propertyName]||event.propertyName;delete _transition.ingProperties[propertyName];if(isEmptyObj(_transition.ingProperties)){this.disableTransition();}
4271if(propertyName in _transition.clean){this.element.style[event.propertyName]='';delete _transition.clean[propertyName];}
4272if(propertyName in _transition.onEnd){var onTransitionEnd=_transition.onEnd[propertyName];onTransitionEnd.call(this);delete _transition.onEnd[propertyName];}
4273this.emitEvent('transitionEnd',[this]);};proto.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(transitionEndEvent,this,false);this.isTransitioning=false;};proto._removeStyles=function(style){var cleanStyle={};for(var prop in style){cleanStyle[prop]='';}
4274this.css(cleanStyle);};var cleanTransitionStyle={transitionProperty:'',transitionDuration:''};proto.removeTransitionStyles=function(){this.css(cleanTransitionStyle);};proto.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:''});this.emitEvent('remove',[this]);};proto.remove=function(){if(!transitionProperty||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return;}
4275this.once('transitionEnd',function(){this.removeElem();});this.hide();};proto.reveal=function(){delete this.isHidden;this.css({display:''});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty('visibleStyle');onTransitionEnd[transitionEndProperty]=this.onRevealTransitionEnd;this.transition({from:options.hiddenStyle,to:options.visibleStyle,isCleaning:true,onTransitionEnd:onTransitionEnd});};proto.onRevealTransitionEnd=function(){if(!this.isHidden){this.emitEvent('reveal');}};proto.getHideRevealTransitionEndProperty=function(styleProperty){var optionStyle=this.layout.options[styleProperty];if(optionStyle.opacity){return'opacity';}
4276for(var prop in optionStyle){return prop;}};proto.hide=function(){this.isHidden=true;this.css({display:''});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty('hiddenStyle');onTransitionEnd[transitionEndProperty]=this.onHideTransitionEnd;this.transition({from:options.visibleStyle,to:options.hiddenStyle,isCleaning:true,onTransitionEnd:onTransitionEnd});};proto.onHideTransitionEnd=function(){if(this.isHidden){this.css({display:'none'});this.emitEvent('hide');}};proto.destroy=function(){this.css({position:'',left:'',right:'',top:'',bottom:'',transition:'',transform:''});};return Item;}));(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define('outlayer/outlayer',['ev-emitter/ev-emitter','get-size/get-size','fizzy-ui-utils/utils','./item'],function(EvEmitter,getSize,utils,Item){return factory(window,EvEmitter,getSize,utils,Item);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('ev-emitter'),require('get-size'),require('fizzy-ui-utils'),require('./item'));}else{window.Outlayer=factory(window,window.EvEmitter,window.getSize,window.fizzyUIUtils,window.Outlayer.Item);}}(window,function factory(window,EvEmitter,getSize,utils,Item){'use strict';var console=window.console;var jQuery=window.jQuery;var noop=function(){};var GUID=0;var instances={};function Outlayer(element,options){var queryElement=utils.getQueryElement(element);if(!queryElement){if(console){console.error('Bad element for '+this.constructor.namespace+': '+(queryElement||element));}
4277return;}
4278this.element=queryElement;if(jQuery){this.$element=jQuery(this.element);}
4279this.options=utils.extend({},this.constructor.defaults);this.option(options);var id=++GUID;this.element.outlayerGUID=id;instances[id]=this;this._create();var isInitLayout=this._getOption('initLayout');if(isInitLayout){this.layout();}}
vendor: 7,626 bytes, lines 4279-4301
4279
4280Outlayer.namespace='outlayer';Outlayer.Item=Item;Outlayer.defaults={containerStyle:{position:'relative'},initLayout:true,originLeft:true,originTop:true,resize:true,resizeContainer:true,transitionDuration:'0.4s',hiddenStyle:{opacity:0,transform:'scale(0.001)'},visibleStyle:{opacity:1,transform:'scale(1)'}};var proto=Outlayer.prototype;utils.extend(proto,EvEmitter.prototype);proto.option=function(opts){utils.extend(this.options,opts);};proto._getOption=function(option){var oldOption=this.constructor.compatOptions[option];return oldOption&&this.options[oldOption]!==undefined?this.options[oldOption]:this.options[option];};Outlayer.compatOptions={initLayout:'isInitLayout',horizontal:'isHorizontal',layoutInstant:'isLayoutInstant',originLeft:'isOriginLeft',originTop:'isOriginTop',resize:'isResizeBound',resizeContainer:'isResizingContainer'};proto._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);utils.extend(this.element.style,this.options.containerStyle);var canBindResize=this._getOption('resize');if(canBindResize){this.bindResize();}};proto.reloadItems=function(){this.items=this._itemize(this.element.children);};proto._itemize=function(elems){var itemElems=this._filterFindItemElements(elems);var Item=this.constructor.Item;var items=[];for(var i=0;i<itemElems.length;i++){var elem=itemElems[i];var item=new Item(elem,this);items.push(item);}
4281return items;};proto._filterFindItemElements=function(elems){return utils.filterFindElements(elems,this.options.itemSelector);};proto.getItemElements=function(){return this.items.map(function(item){return item.element;});};proto.layout=function(){this._resetLayout();this._manageStamps();var layoutInstant=this._getOption('layoutInstant');var isInstant=layoutInstant!==undefined?layoutInstant:!this._isLayoutInited;this.layoutItems(this.items,isInstant);this._isLayoutInited=true;};proto._init=proto.layout;proto._resetLayout=function(){this.getSize();};proto.getSize=function(){this.size=getSize(this.element);};proto._getMeasurement=function(measurement,size){var option=this.options[measurement];var elem;if(!option){this[measurement]=0;}else{if(typeof option=='string'){elem=this.element.querySelector(option);}else if(option instanceof HTMLElement){elem=option;}
4282this[measurement]=elem?getSize(elem)[size]:option;}};proto.layoutItems=function(items,isInstant){items=this._getItemsForLayout(items);this._layoutItems(items,isInstant);this._postLayout();};proto._getItemsForLayout=function(items){return items.filter(function(item){return!item.isIgnored;});};proto._layoutItems=function(items,isInstant){this._emitCompleteOnItems('layout',items);if(!items||!items.length){return;}
4283var queue=[];items.forEach(function(item){var position=this._getItemLayoutPosition(item);position.item=item;position.isInstant=isInstant||item.isLayoutInstant;queue.push(position);},this);this._processLayoutQueue(queue);};proto._getItemLayoutPosition=function(){return{x:0,y:0};};proto._processLayoutQueue=function(queue){queue.forEach(function(obj){this._positionItem(obj.item,obj.x,obj.y,obj.isInstant);},this);};proto._positionItem=function(item,x,y,isInstant){if(isInstant){item.goTo(x,y);}else{item.moveTo(x,y);}};proto._postLayout=function(){this.resizeContainer();};proto.resizeContainer=function(){var isResizingContainer=this._getOption('resizeContainer');if(!isResizingContainer){return;}
4284var size=this._getContainerSize();if(size){this._setContainerMeasure(size.width,true);this._setContainerMeasure(size.height,false);}};proto._getContainerSize=noop;proto._setContainerMeasure=function(measure,isWidth){if(measure===undefined){return;}
4285var elemSize=this.size;if(elemSize.isBorderBox){measure+=isWidth?elemSize.paddingLeft+elemSize.paddingRight+
4286elemSize.borderLeftWidth+elemSize.borderRightWidth:elemSize.paddingBottom+elemSize.paddingTop+
4287elemSize.borderTopWidth+elemSize.borderBottomWidth;}
4288measure=Math.max(measure,0);this.element.style[isWidth?'width':'height']=measure+'px';};proto._emitCompleteOnItems=function(eventName,items){var _this=this;function onComplete(){_this.dispatchEvent(eventName+'Complete',null,[items]);}
4289var count=items.length;if(!items||!count){onComplete();return;}
4290var doneCount=0;function tick(){doneCount++;if(doneCount==count){onComplete();}}
4291items.forEach(function(item){item.once(eventName,tick);});};proto.dispatchEvent=function(type,event,args){var emitArgs=event?[event].concat(args):args;this.emitEvent(type,emitArgs);if(jQuery){this.$element=this.$element||jQuery(this.element);if(event){var $event=jQuery.Event(event);$event.type=type;this.$element.trigger($event,args);}else{this.$element.trigger(type,args);}}};proto.ignore=function(elem){var item=this.getItem(elem);if(item){item.isIgnored=true;}};proto.unignore=function(elem){var item=this.getItem(elem);if(item){delete item.isIgnored;}};proto.stamp=function(elems){elems=this._find(elems);if(!elems){return;}
4292this.stamps=this.stamps.concat(elems);elems.forEach(this.ignore,this);};proto.unstamp=function(elems){elems=this._find(elems);if(!elems){return;}
4293elems.forEach(function(elem){utils.removeFrom(this.stamps,elem);this.unignore(elem);},this);};proto._find=function(elems){if(!elems){return;}
4294if(typeof elems=='string'){elems=this.element.querySelectorAll(elems);}
4295elems=utils.makeArray(elems);return elems;};proto._manageStamps=function(){if(!this.stamps||!this.stamps.length){return;}
4296this._getBoundingRect();this.stamps.forEach(this._manageStamp,this);};proto._getBoundingRect=function(){var boundingRect=this.element.getBoundingClientRect();var size=this.size;this._boundingRect={left:boundingRect.left+size.paddingLeft+size.borderLeftWidth,top:boundingRect.top+size.paddingTop+size.borderTopWidth,right:boundingRect.right-(size.paddingRight+size.borderRightWidth),bottom:boundingRect.bottom-(size.paddingBottom+size.borderBottomWidth)};};proto._manageStamp=noop;proto._getElementOffset=function(elem){var boundingRect=elem.getBoundingClientRect();var thisRect=this._boundingRect;var size=getSize(elem);var offset={left:boundingRect.left-thisRect.left-size.marginLeft,top:boundingRect.top-thisRect.top-size.marginTop,right:thisRect.right-boundingRect.right-size.marginRight,bottom:thisRect.bottom-boundingRect.bottom-size.marginBottom};return offset;};proto.handleEvent=utils.handleEvent;proto.bindResize=function(){window.addEventListener('resize',this);this.isResizeBound=true;};proto.unbindResize=function(){window.removeEventListener('resize',this);this.isResizeBound=false;};proto.onresize=function(){this.resize();};utils.debounceMethod(Outlayer,'onresize',100);proto.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout()){return;}
4297this.layout();};proto.needsResizeLayout=function(){var size=getSize(this.element);var hasSizes=this.size&&size;return hasSizes&&size.innerWidth!==this.size.innerWidth;};proto.addItems=function(elems){var items=this._itemize(elems);if(items.length){this.items=this.items.concat(items);}
4298return items;};proto.appended=function(elems){var items=this.addItems(elems);if(!items.length){return;}
4299this.layoutItems(items,true);this.reveal(items);};proto.prepended=function(elems){var items=this._itemize(elems);if(!items.length){return;}
4300var previousItems=this.items.slice(0);this.items=items.concat(previousItems);this._resetLayout();this._manageStamps();this.layoutItems(items,true);this.reveal(items);this.layoutItems(previousItems);};proto.reveal=function(items){this._emitCompleteOnItems('reveal',items);if(!items||!items.length){return;}
4301items.forEach(function(item){item.reveal();});};proto.hide=function(items){this._emitCompleteOnItems('hide',items);if(!items||!items.length){return;}
vendor: 4,618 bytes, lines 4302-4311
4302items.forEach(function(item){item.hide();});};proto.revealItemElements=function(elems){var items=this.getItems(elems);this.reveal(items);};proto.hideItemElements=function(elems){var items=this.getItems(elems);this.hide(items);};proto.getItem=function(elem){for(var i=0;i<this.items.length;i++){var item=this.items[i];if(item.element==elem){return item;}}};proto.getItems=function(elems){elems=utils.makeArray(elems);var items=[];elems.forEach(function(elem){var item=this.getItem(elem);if(item){items.push(item);}},this);return items;};proto.remove=function(elems){var removeItems=this.getItems(elems);this._emitCompleteOnItems('remove',removeItems);if(!removeItems||!removeItems.length){return;}
4303removeItems.forEach(function(item){item.remove();utils.removeFrom(this.items,item);},this);};proto.destroy=function(){var style=this.element.style;style.height='';style.position='';style.width='';this.items.forEach(function(item){item.destroy();});this.unbindResize();var id=this.element.outlayerGUID;delete instances[id];delete this.element.outlayerGUID;if(jQuery){jQuery.removeData(this.element,this.constructor.namespace);}};Outlayer.data=function(elem){elem=utils.getQueryElement(elem);var id=elem&&elem.outlayerGUID;return id&&instances[id];};Outlayer.create=function(namespace,options){var Layout=subclass(Outlayer);Layout.defaults=utils.extend({},Outlayer.defaults);utils.extend(Layout.defaults,options);Layout.compatOptions=utils.extend({},Outlayer.compatOptions);Layout.namespace=namespace;Layout.data=Outlayer.data;Layout.Item=subclass(Item);utils.htmlInit(Layout,namespace);if(jQuery&&jQuery.bridget){jQuery.bridget(namespace,Layout);}
4304return Layout;};function subclass(Parent){function SubClass(){Parent.apply(this,arguments);}
4305SubClass.prototype=Object.create(Parent.prototype);SubClass.prototype.constructor=SubClass;return SubClass;}
4306Outlayer.Item=Item;return Outlayer;}));(function(window,factory){if(typeof define=='function'&&define.amd){define(['outlayer/outlayer','get-size/get-size'],factory);}else if(typeof module=='object'&&module.exports){module.exports=factory(require('outlayer'),require('get-size'));}else{window.Masonry=factory(window.Outlayer,window.getSize);}}(window,function factory(Outlayer,getSize){var Masonry=Outlayer.create('masonry');Masonry.compatOptions.fitWidth='isFitWidth';Masonry.prototype._resetLayout=function(){this.getSize();this._getMeasurement('columnWidth','outerWidth');this._getMeasurement('gutter','outerWidth');this.measureColumns();this.colYs=[];for(var i=0;i<this.cols;i++){this.colYs.push(0);}
4307this.maxY=0;};Masonry.prototype.measureColumns=function(){this.getContainerWidth();if(!this.columnWidth){var firstItem=this.items[0];var firstItemElem=firstItem&&firstItem.element;this.columnWidth=firstItemElem&&getSize(firstItemElem).outerWidth||this.containerWidth;}
4308var columnWidth=this.columnWidth+=this.gutter;var containerWidth=this.containerWidth+this.gutter;var cols=containerWidth/columnWidth;var excess=columnWidth-containerWidth%columnWidth;var mathMethod=excess&&excess<1?'round':'floor';cols=Math[mathMethod](cols);this.cols=Math.max(cols,1);};Masonry.prototype.getContainerWidth=function(){var isFitWidth=this._getOption('fitWidth');var container=isFitWidth?this.element.parentNode:this.element;var size=getSize(container);this.containerWidth=size&&size.innerWidth;};Masonry.prototype._getItemLayoutPosition=function(item){item.getSize();var remainder=item.size.outerWidth%this.columnWidth;var mathMethod=remainder&&remainder<1?'round':'ceil';var colSpan=Math[mathMethod](item.size.outerWidth/this.columnWidth);colSpan=Math.min(colSpan,this.cols);var colGroup=this._getColGroup(colSpan);var minimumY=Math.min.apply(Math,colGroup);var shortColIndex=colGroup.indexOf(minimumY);var position={x:this.columnWidth*shortColIndex,y:minimumY};var setHeight=minimumY+item.size.outerHeight;var setSpan=this.cols+1-colGroup.length;for(var i=0;i<setSpan;i++){this.colYs[shortColIndex+i]=setHeight;}
4309return position;};Masonry.prototype._getColGroup=function(colSpan){if(colSpan<2){return this.colYs;}
4310var colGroup=[];var groupCount=this.cols+1-colSpan;for(var i=0;i<groupCount;i++){var groupColYs=this.colYs.slice(i,i+colSpan);colGroup[i]=Math.max.apply(Math,groupColYs);}
4311return colGroup;};Masonry.prototype._manageStamp=function(stamp){var stampSize=getSize(stamp);var offset=this._getElementOffset(stamp);var isOriginLeft=this._getOption('originLeft');var firstX=isOriginLeft?offset.left:offset.right;var lastX=firstX+stampSize.outerWidth;var firstCol=Math.floor(firstX/this.columnWidth);firstCol=Math.max(0,firstCol);var lastCol=Math.floor(lastX/this.columnWidth);
4311lastCol-=lastX%this.columnWidth?0:1;lastCol=Math.min(this.cols-1,lastCol);var isOriginTop=this._getOption('originTop');var stampMaxY=(isOriginTop?offset.top:offset.bottom)+
4312stampSize.outerHeight;for(var i=firstCol;i<=lastCol;i++){this.colYs[i]=Math.max(stampMaxY,this.colYs[i]);}};Masonry.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var size={height:this.maxY};if(this._getOption('fitWidth')){size.width=this._getContainerFitWidth();}
4313return size;};Masonry.prototype._getContainerFitWidth=function(){var unusedCols=0;var i=this.cols;while(--i){if(this.colYs[i]!==0){break;}
4314unusedCols++;}
4315return(this.cols-unusedCols)*this.columnWidth-this.gutter;};Masonry.prototype.needsResizeLayout=function(){var previousWidth=this.containerWidth;this.getContainerWidth();return previousWidth!=this.containerWidth;};return Masonry;}));(function(global,factory){if(typeof define=='function'&&define.amd){define('ev-emitter/ev-emitter',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{global.EvEmitter=factory();}}(this,function(){function EvEmitter(){}
4316var proto=EvEmitter.prototype;proto.on=function(eventName,listener){if(!eventName||!listener){return;}
4317var events=this._events=this._events||{};var listeners=events[eventName]=events[eventName]||[];if(listeners.indexOf(listener)==-1){listeners.push(listener);}
4318return this;};proto.once=function(eventName,listener){if(!eventName||!listener){return;}
4319this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{};var onceListeners=onceEvents[eventName]=onceEvents[eventName]||[];onceListeners[listener]=true;return this;};proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;}
4320var index=listeners.indexOf(listener);if(index!=-1){listeners.splice(index,1);}
4321return this;};proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;}
4322var i=0;var listener=listeners[i];args=args||[];var onceListeners=this._onceEvents&&this._onceEvents[eventName];while(listener){var isOnce=onceListeners&&onceListeners[listener];if(isOnce){this.off(eventName,listener);delete onceListeners[listener];}
4323listener.apply(this,args);i+=isOnce?0:1;listener=listeners[i];}
4324return this;};return EvEmitter;}));(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['ev-emitter/ev-emitter'],function(EvEmitter){return factory(window,EvEmitter);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('ev-emitter'));}else{window.imagesLoaded=factory(window,window.EvEmitter);}})(window,function factory(window,EvEmitter){var $=window.jQuery;var console=window.console;function extend(a,b){for(var prop in b){a[prop]=b[prop];}
4325return a;}
4326function makeArray(obj){var ary=[];if(Array.isArray(obj)){ary=obj;}else if(typeof obj.length=='number'){for(var i=0;i<obj.length;i++){ary.push(obj[i]);}}else{ary.push(obj);}
4327return ary;}
4328function ImagesLoaded(elem,options,onAlways){if(!(this instanceof ImagesLoaded)){return new ImagesLoaded(elem,options,onAlways);}
4329if(typeof elem=='string'){elem=document.querySelectorAll(elem);}
4330this.elements=makeArray(elem);this.options=extend({},this.options);if(typeof options=='function'){onAlways=options;}else{extend(this.options,options);}
4331if(onAlways){this.on('always',onAlways);}
4332this.getImages();if($){this.jqDeferred=new $.Deferred();}
4333setTimeout(function(){this.check();}.bind(this));}
4334ImagesLoaded.prototype=Object.create(EvEmitter.prototype);ImagesLoaded.prototype.options={};ImagesLoaded.prototype.getImages=function(){this.images=[];this.elements.forEach(this.addElementImages,this);};ImagesLoaded.prototype.addElementImages=function(elem){if(elem.nodeName=='IMG'){this.addImage(elem);}
4335if(this.options.background===true){this.addElementBackgroundImages(elem);}
4336var nodeType=elem.nodeType;if(!nodeType||!elementNodeTypes[nodeType]){return;}
4337var childImgs=elem.querySelectorAll('img');for(var i=0;i<childImgs.length;i++){var img=childImgs[i];this.addImage(img);}
4338if(typeof this.options.background=='string'){var children=elem.querySelectorAll(this.options.background);for(i=0;i<children.length;i++){var child=children[i];
4338this.addElementBackgroundImages(child);}}};var elementNodeTypes={1:true,9:true,11:true};ImagesLoaded.prototype.addElementBackgroundImages=function(elem){var style=getComputedStyle(elem);if(!style){return;}
4339var reURL=/url\((['"])?(.*?)\1\)/gi;var matches=reURL.exec(style.backgroundImage);while(matches!==null){var url=matches&&matches[2];if(url){this.addBackground(url,elem);}
4340matches=reURL.exec(style.backgroundImage);}};ImagesLoaded.prototype.addImage=function(img){var loadingImage=new LoadingImage(img);this.images.push(loadingImage);};ImagesLoaded.prototype.addBackground=function(url,elem){var background=new Background(url,elem);this.images.push(background);};ImagesLoaded.prototype.check=function(){var _this=this;this.progressedCount=0;this.hasAnyBroken=false;if(!this.images.length){this.complete();return;}
4341function onProgress(image,elem,message){setTimeout(function(){_this.progress(image,elem,message);});}
4342this.images.forEach(function(loadingImage){loadingImage.once('progress',onProgress);loadingImage.check();});};ImagesLoaded.prototype.progress=function(image,elem,message){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!image.isLoaded;this.emitEvent('progress',[this,image,elem]);if(this.jqDeferred&&this.jqDeferred.notify){this.jqDeferred.notify(this,image);}
4343if(this.progressedCount==this.images.length){this.complete();}
4344if(this.options.debug&&console){console.log('progress: '+message,image,elem);}};ImagesLoaded.prototype.complete=function(){var eventName=this.hasAnyBroken?'fail':'done';this.isComplete=true;this.emitEvent(eventName,[this]);this.emitEvent('always',[this]);if(this.jqDeferred){var jqMethod=this.hasAnyBroken?'reject':'resolve';this.jqDeferred[jqMethod](this);}};function LoadingImage(img){this.img=img;}
4345LoadingImage.prototype=Object.create(EvEmitter.prototype);LoadingImage.prototype.check=function(){var isComplete=this.getIsImageComplete();if(isComplete){this.confirm(this.img.naturalWidth!==0,'naturalWidth');return;}
4346this.proxyImage=new Image();this.proxyImage.addEventListener('load',this);this.proxyImage.addEventListener('error',this);this.img.addEventListener('load',this);this.img.addEventListener('error',this);this.proxyImage.src=this.img.src;};LoadingImage.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth!==undefined;};LoadingImage.prototype.confirm=function(isLoaded,message){this.isLoaded=isLoaded;this.emitEvent('progress',[this,this.img,message]);};LoadingImage.prototype.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};LoadingImage.prototype.onload=function(){this.confirm(true,'onload');this.unbindEvents();};LoadingImage.prototype.onerror=function(){this.confirm(false,'onerror');this.unbindEvents();};LoadingImage.prototype.unbindEvents=function(){this.proxyImage.removeEventListener('load',this);this.proxyImage.removeEventListener('error',this);this.img.removeEventListener('load',this);this.img.removeEventListener('error',this);};function Background(url,element){this.url=url;this.element=element;this.img=new Image();}
4347Background.prototype=Object.create(LoadingImage.prototype);Background.prototype.check=function(){this.img.addEventListener('load',this);this.img.addEventListener('error',this);this.img.src=this.url;var isComplete=this.getIsImageComplete();if(isComplete){this.confirm(this.img.naturalWidth!==0,'naturalWidth');this.unbindEvents();}};Background.prototype.unbindEvents=function(){this.img.removeEventListener('load',this);this.img.removeEventListener('error',this);};Background.prototype.confirm=function(isLoaded,message){this.isLoaded=isLoaded;this.emitEvent('progress',[this,this.element,message]);};ImagesLoaded.makeJQueryPlugin=function(jQuery){jQuery=jQuery||window.jQuery;if(!jQuery){return;}
4348$=jQuery;$.fn.imagesLoaded=function(options,callback){var instance=new ImagesLoaded(this,options,callback);return instance.jqDeferred.promise($(this));};};ImagesLoaded.makeJQueryPlugin();return ImagesLoaded;});(function($){'use strict';$(window).load(function(){var $grid=$('.js-grid');var $items=$('.js-grid-item');var transitionDuration=250;var transitionDelay=10;$items.sort(function(a,b){var atime=+new Date($(a).find('time').attr('datetime'));var btime=+new Date($(b).find('time').attr('datetime'));return btime-atime;});$grid.empty().html('<div class="grid-sizer js-grid-sizer"></div>').append($items);$grid.imagesLoaded(function(){$grid.masonry({itemSelector:'.js-grid-item',columnWidth:'.js-grid-sizer',percentPosition:true});});var getFilters=function(){var filters={};$('[data-filter-for]').each(function(){var filtersFor=$(this).data('filter-for');if($(this).is(':checked')){for(var key in filtersFor){var value=filtersFor[key];if(!filters.hasOwnProperty(key)){filters[key]=[];}
4349if(filters[key].indexOf(value)<0){filters[key].push(value);}}}});return filters;};$('[name="filter"]').on('change',function(e){var value=$('[name="filter"]:checked').val();$('[data-social-filter]').attr('data-social-filter',value);});$('[data-filter-for]').on('click',function(e){var filters=getFilters();var actions=$('[data-filter]').map(function(i){var filter=$(this).data('filter');var currentStatus=$(this).is(':visible');var isVisible=true;for(var key in filters){if(filter.hasOwnProperty(key)){var values=filters[key];if(values.indexOf(filter[key])<0){isVisible=false;}}}
4350return{$el:$(this),now:isVisible,before:currentStatus};});$.each(actions,function(i,item){if(item.now){item.$el.css('display','block');$grid.masonry('layout');}});var animated=0;$.each(actions,function(i,item){if(item.now!=item.before){item.$el.delay(animated*transitionDelay).animate({opacity:item.now?'1.0':'0.0',transform:item.now?'scale(1)':'scale(0.5)'},{queue:true,duration:transitionDuration,complete:function(){if(!item.now){item.$el.css('display','none');}}});animated++;}
4351if(i+1==$('[data-filter]').length){window.setTimeout(function(){$grid.masonry('layout');},(animated+1)*transitionDelay+transitionDuration);}});});});})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.