PageSourceSearch

https://apmep.fr/local/cache-js/03ffa3bb3410e2078448758b4985a1ae.js?1790237502

js apmep.fr collected 2026-09-24 09:37:33 UTC 657,619 bytes, 26,571 lines download raw bytes

vendor: 145,430 bytes, lines 1-6646
1/* compact [
2	prive/javascript/jquery.js?1790084230
3	prive/javascript/jquery.form.js?1790084230
4	prive/javascript/jquery.autosave.js?1790084230
5	prive/javascript/jquery.placeholder-label.js?1790084230
6	prive/javascript/ajaxCallback.js?1790084230
7	prive/javascript/js.cookie.js?1790084230
8	plugins/auto/jqueryui/v1.15.5/prive/javascript/ui/jquery-ui.js?1730750360
9	plugins-dist/mediabox/lib/lity/lity.js?1790084230
10	plugins-dist/mediabox/lity/js/lity.mediabox.js?1790084230
11	plugins-dist/mediabox/javascript/spip.mediabox.js?1790084230
12	plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1790084230
13	plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1790084230
14	local/cache-js/jsdyn-javascript_porte_plume_start_js-53e35563.js?1790190082
15	prive/javascript/js.cookie.js?1790084230
16	local/cache-js/jsdyn-socialtags_js-623152f1.js?1790190082
17	plugins/auto/image_cliquable/v3.2.0/images-rwd/image-map-rwd.js?1740554348
18	plugins/auto/image_cliquable/v3.2.0/maphilight/jquery.maphilight.min.js?1740554348
19	plugins/auto/blocsdepliables/v1.4.2/js/blocs.js?1750452818
20	plugins/auto/mathjax/v2.2.0/js/mathjax-start.js?1727708170
21	local/cache-js/jsdyn-_js_cibloc_js-16ddeed9.js?1790237502
22	plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-collapse.js
23	plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-dropdown.js
24	plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-carousel.js
25	plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-transition.js
26	plugins/spipr-dane/js/menu.dropdown.js
27	plugins/spipr-dane/js/spipr-dane.js
28	plugins/spipr-dane/js/dyslexie.js
29] 61% */
30
31/* prive/javascript/jquery.js?1790084230 */
32
33(function(global,factory){
34"use strict";
35if(typeof module==="object"&&typeof module.exports==="object"){
36module.exports=global.document?
37factory(global,true):
38function(w){
39if(!w.document){
40throw new Error("jQuery requires a window with a document");
41}
42return factory(w);
43};
44}else{
45factory(global);
46}
47})(typeof window!=="undefined"?window:this,function(window,noGlobal){
48"use strict";
49var arr=[];
50var getProto=Object.getPrototypeOf;
51var slice=arr.slice;
52var flat=arr.flat?function(array){
53return arr.flat.call(array);
54}:function(array){
55return arr.concat.apply([],array);
56};
57var push=arr.push;
58var indexOf=arr.indexOf;
59var class2type={};
60var toString=class2type.toString;
61var hasOwn=class2type.hasOwnProperty;
62var fnToString=hasOwn.toString;
63var ObjectFunctionString=fnToString.call(Object);
64var support={};
65var isFunction=function isFunction(obj){
66return typeof obj==="function"&&typeof obj.nodeType!=="number"&&
67typeof obj.item!=="function";
68};
69var isWindow=function isWindow(obj){
70return obj!=null&&obj===obj.window;
71};
72var document=window.document;
73var preservedScriptAttributes={
74type:true,
75src:true,
76nonce:true,
77noModule:true
78};
79function DOMEval(code,node,doc){
80doc=doc||document;
81var i,val,
82script=doc.createElement("script");
83script.text=code;
84if(node){
85for(i in preservedScriptAttributes){
86val=node[i]||node.getAttribute&&node.getAttribute(i);
87if(val){
88script.setAttribute(i,val);
89}
90}
91}
92doc.head.appendChild(script).parentNode.removeChild(script);
93}
94function toType(obj){
95if(obj==null){
96return obj+"";
97}
98return typeof obj==="object"||typeof obj==="function"?
99class2type[toString.call(obj)]||"object":
100typeof obj;
101}
102var version="3.7.1",
103rhtmlSuffix=/HTML$/i,
104jQuery=function(selector,context){
105return new jQuery.fn.init(selector,context);
106};
107jQuery.fn=jQuery.prototype={
108jquery:version,
109constructor:jQuery,
110length:0,
111toArray:function(){
112return slice.call(this);
113},
114get:function(num){
115if(num==null){
116return slice.call(this);
117}
118return num<0?this[num+this.length]:this[num];
119},
120pushStack:function(elems){
121var ret=jQuery.merge(this.constructor(),elems);
122ret.prevObject=this;
123return ret;
124},
125each:function(callback){
126return jQuery.each(this,callback);
127},
128map:function(callback){
129return this.pushStack(jQuery.map(this,function(elem,i){
130return callback.call(elem,i,elem);
131}));
132},
133slice:function(){
134return this.pushStack(slice.apply(this,arguments));
135},
136first:function(){
137return this.eq(0);
138},
139last:function(){
140return this.eq(-1);
141},
142even:function(){
143return this.pushStack(jQuery.grep(this,function(_elem,i){
144return(i+1)%2;
145}));
146},
147odd:function(){
148return this.pushStack(jQuery.grep(this,function(_elem,i){
149return i%2;
150}));
151},
152eq:function(i){
153var len=this.length,
154j=+i+(i<0?len:0);
155return this.pushStack(j>=0&&j<len?[this[j]]:[]);
156},
157end:function(){
158return this.prevObject||this.constructor();
159},
160push:push,
161sort:arr.sort,
162splice:arr.splice
163};
164jQuery.extend=jQuery.fn.extend=function(){
165var options,name,src,copy,copyIsArray,clone,
166target=arguments[0]||{},
167i=1,
168length=arguments.length,
169deep=false;
170if(typeof target==="boolean"){
171deep=target;
172target=arguments[i]||{};
173i++;
174}
175if(typeof target!=="object"&&!isFunction(target)){
176target={};
177}
178if(i===length){
179target=this;
180i--;
181}
182for(;i<length;i++){
183if((options=arguments[i])!=null){
184for(name in options){
185copy=options[name];
186if(name==="__proto__"||target===copy){
187continue;
188}
189if(deep&&copy&&(jQuery.isPlainObject(copy)||
190(copyIsArray=Array.isArray(copy)))){
191src=target[name];
192if(copyIsArray&&!Array.isArray(src)){
193clone=[];
194}else if(!copyIsArray&&!jQuery.isPlainObject(src)){
195clone={};
196}else{
197clone=src;
198}
199copyIsArray=false;
200target[name]=jQuery.extend(deep,clone,copy);
201}else if(copy!==undefined){
202target[name]=copy;
203}
204}
205}
206}
207return target;
208};
209jQuery.extend({
210expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),
211isReady:true,
212error:function(msg){
213throw new Error(msg);
214},
215noop:function(){},
216isPlainObject:function(obj){
217var proto,Ctor;
218if(!obj||toString.call(obj)!=="[object Object]"){
219return false;
220}
221proto=getProto(obj);
222if(!proto){
223return true;
224}
225Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;
226return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;
227},
228isEmptyObject:function(obj){
229var name;
230for(name in obj){
231return false;
232}
233return true;
234},
235globalEval:function(code,options,doc){
236DOMEval(code,{nonce:options&&options.nonce},doc);
237},
238each:function(obj,callback){
239var length,i=0;
240if(isArrayLike(obj)){
241length=obj.length;
242for(;i<length;i++){
243if(callback.call(obj[i],i,obj[i])===false){
244break;
245}
246}
247}else{
248for(i in obj){
249if(callback.call(obj[i],i,obj[i])===false){
250break;
251}
252}
253}
254return obj;
255},
256text:function(elem){
257var node,
258ret="",
259i=0,
260nodeType=elem.nodeType;
261if(!nodeType){
262while((node=elem[i++])){
263ret+=jQuery.text(node);
264}
265}
266if(nodeType===1||nodeType===11){
267return elem.textContent;
268}
269if(nodeType===9){
270return elem.documentElement.textContent;
271}
272if(nodeType===3||nodeType===4){
273return elem.nodeValue;
274}
275return ret;
276},
277makeArray:function(arr,results){
278var ret=results||[];
279if(arr!=null){
280if(isArrayLike(Object(arr))){
281jQuery.merge(ret,
282typeof arr==="string"?
283[arr]:arr
284);
285}else{
286push.call(ret,arr);
287}
288}
289return ret;
290},
291inArray:function(elem,arr,i){
292return arr==null?-1:indexOf.call(arr,elem,i);
293},
294isXMLDoc:function(elem){
295var namespace=elem&&elem.namespaceURI,
296docElem=elem&&(elem.ownerDocument||elem).documentElement;
297return!rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML");
298},
299merge:function(first,second){
300var len=+second.length,
301j=0,
302i=first.length;
303for(;j<len;j++){
304first[i++]=second[j];
305}
306first.length=i;
307return first;
308},
309grep:function(elems,callback,invert){
310var callbackInverse,
311matches=[],
312i=0,
313length=elems.length,
314callbackExpect=!invert;
315for(;i<length;i++){
316callbackInverse=!callback(elems[i],i);
317if(callbackInverse!==callbackExpect){
318matches.push(elems[i]);
319}
320}
321return matches;
322},
323map:function(elems,callback,arg){
324var length,value,
325i=0,
326ret=[];
327if(isArrayLike(elems)){
328length=elems.length;
329for(;i<length;i++){
330value=callback(elems[i],i,arg);
331if(value!=null){
332ret.push(value);
333}
334}
335}else{
336for(i in elems){
337value=callback(elems[i],i,arg);
338if(value!=null){
339ret.push(value);
340}
341}
342}
343return flat(ret);
344},
345guid:1,
346support:support
347});
348if(typeof Symbol==="function"){
349jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];
350}
351jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
352function(_i,name){
353class2type["[object "+name+"]"]=name.toLowerCase();
354});
355function isArrayLike(obj){
356var length=!!obj&&"length"in obj&&obj.length,
357type=toType(obj);
358if(isFunction(obj)||isWindow(obj)){
359return false;
360}
361return type==="array"||length===0||
362typeof length==="number"&&length>0&&(length-1)in obj;
363}
364function nodeName(elem,name){
365return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();
366}
367var pop=arr.pop;
368var sort=arr.sort;
369var splice=arr.splice;
370var whitespace="[\\x20\\t\\r\\n\\f]";
371var rtrimCSS=new RegExp(
372"^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$",
373"g"
374);
375jQuery.contains=function(a,b){
376var bup=b&&b.parentNode;
377return a===bup||!!(bup&&bup.nodeType===1&&(
378a.contains?
379a.contains(bup):
380a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16
381));
382};
383var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
384function fcssescape(ch,asCodePoint){
385if(asCodePoint){
386if(ch==="\0"){
387return"\uFFFD";
388}
389return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";
390}
391return"\\"+ch;
392}
393jQuery.escapeSelector=function(sel){
394return(sel+"").replace(rcssescape,fcssescape);
395};
396var preferredDoc=document,
397pushNative=push;
398(function(){
399var i,
400Expr,
401outermostContext,
402sortInput,
403hasDuplicate,
404push=pushNative,
405document,
406documentElement,
407documentIsHTML,
408rbuggyQSA,
409matches,
410expando=jQuery.expando,
411dirruns=0,
412done=0,
413classCache=createCache(),
414tokenCache=createCache(),
415compilerCache=createCache(),
416nonnativeSelectorCache=createCache(),
417sortOrder=function(a,b){
418if(a===b){
419hasDuplicate=true;
420}
421return 0;
422},
423booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+
424"loop|multiple|open|readonly|required|scoped",
425identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+
426"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
427attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+
428"*([*^$|!~]?=)"+whitespace+
429"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+
430whitespace+"*\\]",
431pseudos=":("+identifier+")(?:\\(("+
432"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+
433"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+
434".*"+
435")\\)|)",
436rwhitespace=new RegExp(whitespace+"+","g"),
437rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),
438rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+
439whitespace+"*"),
440rdescend=new RegExp(whitespace+"|>"),
441rpseudo=new RegExp(pseudos),
442ridentifier=new RegExp("^"+identifier+"$"),
443matchExpr={
444ID:new RegExp("^#("+identifier+")"),
445CLASS:new RegExp("^\\.("+identifier+")"),
446TAG:new RegExp("^("+identifier+"|[*])"),
447ATTR:new RegExp("^"+attributes),
448PSEUDO:new RegExp("^"+pseudos),
449CHILD:new RegExp(
450"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+
451whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+
452whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),
453bool:new RegExp("^(?:"+booleans+")$","i"),
454needsContext:new RegExp("^"+whitespace+
455"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+
456"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")
457},
458rinputs=/^(?:input|select|textarea|button)$/i,
459rheader=/^h\d$/i,
460rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
461rsibling=/[+~]/,
462runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+
463"?|\\\\([^\\r\\n\\f])","g"),
464funescape=function(escape,nonHex){
465var high="0x"+escape.slice(1)-0x10000;
466if(nonHex){
467return nonHex;
468}
469return high<0?
470String.fromCharCode(high+0x10000):
471String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);
472},
473unloadHandler=function(){
474setDocument();
475},
476inDisabledFieldset=addCombinator(
477function(elem){
478return elem.disabled===true&&nodeName(elem,"fieldset");
479},
480{dir:"parentNode",next:"legend"}
481);
482function safeActiveElement(){
483try{
484return document.activeElement;
485}catch(err){}
486}
487try{
488push.apply(
489(arr=slice.call(preferredDoc.childNodes)),
490preferredDoc.childNodes
491);
492arr[preferredDoc.childNodes.length].nodeType;
493}catch(e){
494push={
495apply:function(target,els){
496pushNative.apply(target,slice.call(els));
497},
498call:function(target){
499pushNative.apply(target,slice.call(arguments,1));
500}
501};
502}
503function find(selector,context,results,seed){
504var m,i,elem,nid,match,groups,newSelector,
505newContext=context&&context.ownerDocument,
506nodeType=context?context.nodeType:9;
507results=results||[];
508if(typeof selector!=="string"||!selector||
509nodeType!==1&&nodeType!==9&&nodeType!==11){
510return results;
511}
512if(!seed){
513setDocument(context);
514context=context||document;
515if(documentIsHTML){
516if(nodeType!==11&&(match=rquickExpr.exec(selector))){
517if((m=match[1])){
518if(nodeType===9){
519if((elem=context.getElementById(m))){
520if(elem.id===m){
521push.call(results,elem);
522return results;
523}
524}else{
525return results;
526}
527}else{
528if(newContext&&(elem=newContext.getElementById(m))&&
529find.contains(context,elem)&&
530elem.id===m){
531push.call(results,elem);
532return results;
533}
534}
535}else if(match[2]){
536push.apply(results,context.getElementsByTagName(selector));
537return results;
538}else if((m=match[3])&&context.getElementsByClassName){
539push.apply(results,context.getElementsByClassName(m));
540return results;
541}
542}
543if(!nonnativeSelectorCache[selector+" "]&&
544(!rbuggyQSA||!rbuggyQSA.test(selector))){
545newSelector=selector;
546newContext=context;
547if(nodeType===1&&
548(rdescend.test(selector)||rleadingCombinator.test(selector))){
549newContext=rsibling.test(selector)&&testContext(context.parentNode)||
550context;
551if(newContext!=context||!support.scope){
552if((nid=context.getAttribute("id"))){
553nid=jQuery.escapeSelector(nid);
554}else{
555context.setAttribute("id",(nid=expando));
556}
557}
558groups=tokenize(selector);
559i=groups.length;
560while(i--){
561groups[i]=(nid?"#"+nid:":scope")+" "+
562toSelector(groups[i]);
563}
564newSelector=groups.join(",");
565}
566try{
567push.apply(results,
568newContext.querySelectorAll(newSelector)
569);
570return results;
571}catch(qsaError){
572nonnativeSelectorCache(selector,true);
573}finally{
574if(nid===expando){
575context.removeAttribute("id");
576}
577}
578}
579}
580}
581return select(selector.replace(rtrimCSS,"$1"),context,results,seed);
582}
583function createCache(){
584var keys=[];
585function cache(key,value){
586if(keys.push(key+" ")>Expr.cacheLength){
587delete cache[keys.shift()];
588}
589return(cache[key+" "]=value);
590}
591return cache;
592}
593function markFunction(fn){
594fn[expando]=true;
595return fn;
596}
597function assert(fn){
598var el=document.createElement("fieldset");
599try{
600return!!fn(el);
601}catch(e){
602return false;
603}finally{
604if(el.parentNode){
605el.parentNode.removeChild(el);
606}
607el=null;
608}
609}
610function createInputPseudo(type){
611return function(elem){
612return nodeName(elem,"input")&&elem.type===type;
613};
614}
615function createButtonPseudo(type){
616return function(elem){
617return(nodeName(elem,"input")||nodeName(elem,"button"))&&
618elem.type===type;
619};
620}
621function createDisabledPseudo(disabled){
622return function(elem){
623if("form"in elem){
624if(elem.parentNode&&elem.disabled===false){
625if("label"in elem){
626if("label"in elem.parentNode){
627return elem.parentNode.disabled===disabled;
628}else{
629return elem.disabled===disabled;
630}
631}
632return elem.isDisabled===disabled||
633elem.isDisabled!==!disabled&&
634inDisabledFieldset(elem)===disabled;
635}
636return elem.disabled===disabled;
637}else if("label"in elem){
638return elem.disabled===disabled;
639}
640return false;
641};
642}
643function createPositionalPseudo(fn){
644return markFunction(function(argument){
645argument=+argument;
646return markFunction(function(seed,matches){
647var j,
648matchIndexes=fn([],seed.length,argument),
649i=matchIndexes.length;
650while(i--){
651if(seed[(j=matchIndexes[i])]){
652seed[j]=!(matches[j]=seed[j]);
653}
654}
655});
656});
657}
658function testContext(context){
659return context&&typeof context.getElementsByTagName!=="undefined"&&context;
660}
661function setDocument(node){
662var subWindow,
663doc=node?node.ownerDocument||node:preferredDoc;
664if(doc==document||doc.nodeType!==9||!doc.documentElement){
665return document;
666}
667document=doc;
668documentElement=document.documentElement;
669documentIsHTML=!jQuery.isXMLDoc(document);
670matches=documentElement.matches||
671documentElement.webkitMatchesSelector||
672documentElement.msMatchesSelector;
673if(documentElement.msMatchesSelector&&
674preferredDoc!=document&&
675(subWindow=document.defaultView)&&subWindow.top!==subWindow){
676subWindow.addEventListener("unload",unloadHandler);
677}
678support.getById=assert(function(el){
679documentElement.appendChild(el).id=jQuery.expando;
680return!document.getElementsByName||
681!document.getElementsByName(jQuery.expando).length;
682});
683support.disconnectedMatch=assert(function(el){
684return matches.call(el,"*");
685});
686support.scope=assert(function(){
687return document.querySelectorAll(":scope");
688});
689support.cssHas=assert(function(){
690try{
691document.querySelector(":has(*,:jqfake)");
692return false;
693}catch(e){
694return true;
695}
696});
697if(support.getById){
698Expr.filter.ID=function(id){
699var attrId=id.replace(runescape,funescape);
700return function(elem){
701return elem.getAttribute("id")===attrId;
702};
703};
704Expr.find.ID=function(id,context){
705if(typeof context.getElementById!=="undefined"&&documentIsHTML){
706var elem=context.getElementById(id);
707return elem?[elem]:[];
708}
709};
710}else{
711Expr.filter.ID=function(id){
712var attrId=id.replace(runescape,funescape);
713return function(elem){
714var node=typeof elem.getAttributeNode!=="undefined"&&
715elem.getAttributeNode("id");
716return node&&node.value===attrId;
717};
718};
719Expr.find.ID=function(id,context){
720if(typeof context.getElementById!=="undefined"&&documentIsHTML){
721var node,i,elems,
722elem=context.getElementById(id);
723if(elem){
724node=elem.getAttributeNode("id");
725if(node&&node.value===id){
726return[elem];
727}
728elems=context.getElementsByName(id);
729i=0;
730while((elem=elems[i++])){
731node=elem.getAttributeNode("id");
732if(node&&node.value===id){
733return[elem];
734}
735}
736}
737return[];
738}
739};
740}
741Expr.find.TAG=function(tag,context){
742if(typeof context.getElementsByTagName!=="undefined"){
743return context.getElementsByTagName(tag);
744}else{
745return context.querySelectorAll(tag);
746}
747};
748Expr.find.CLASS=function(className,context){
749if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){
750return context.getElementsByClassName(className);
751}
752};
753rbuggyQSA=[];
754assert(function(el){
755var input;
756documentElement.appendChild(el).innerHTML=
757"<a id='"+expando+"' href='' disabled='disabled'></a>"+
758"<select id='"+expando+"-\r\\' disabled='disabled'>"+
759"<option selected=''></option></select>";
760if(!el.querySelectorAll("[selected]").length){
761rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");
762}
763if(!el.querySelectorAll("[id~="+expando+"-]").length){
764rbuggyQSA.push("~=");
765}
766if(!el.querySelectorAll("a#"+expando+"+*").length){
767rbuggyQSA.push(".#.+[+~]");
768}
769if(!el.querySelectorAll(":checked").length){
770rbuggyQSA.push(":checked");
771}
772input=document.createElement("input");
773input.setAttribute("type","hidden");
774el.appendChild(input).setAttribute("name","D");
775documentElement.appendChild(el).disabled=true;
776if(el.querySelectorAll(":disabled").length!==2){
777rbuggyQSA.push(":enabled",":disabled");
778}
779input=document.createElement("input");
780input.setAttribute("name","");
781el.appendChild(input);
782if(!el.querySelectorAll("[name='']").length){
783rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+
784whitespace+"*(?:''|\"\")");
785}
786});
787if(!support.cssHas){
788rbuggyQSA.push(":has");
789}
790rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));
791sortOrder=function(a,b){
792if(a===b){
793hasDuplicate=true;
794return 0;
795}
796var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;
797if(compare){
798return compare;
799}
800compare=(a.ownerDocument||a)==(b.ownerDocument||b)?
801a.compareDocumentPosition(b):
8021;
803if(compare&1||
804(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){
805if(a===document||a.ownerDocument==preferredDoc&&
806find.contains(preferredDoc,a)){
807return-1;
808}
809if(b===document||b.ownerDocument==preferredDoc&&
810find.contains(preferredDoc,b)){
811return 1;
812}
813return sortInput?
814(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):
8150;
816}
817return compare&4?-1:1;
818};
819return document;
820}
821find.matches=function(expr,elements){
822return find(expr,null,null,elements);
823};
824find.matchesSelector=function(elem,expr){
825setDocument(elem);
826if(documentIsHTML&&
827!nonnativeSelectorCache[expr+" "]&&
828(!rbuggyQSA||!rbuggyQSA.test(expr))){
829try{
830var ret=matches.call(elem,expr);
831if(ret||support.disconnectedMatch||
832elem.document&&elem.document.nodeType!==11){
833return ret;
834}
835}catch(e){
836nonnativeSelectorCache(expr,true);
837}
838}
839return find(expr,document,null,[elem]).length>0;
840};
841find.contains=function(context,elem){
842if((context.ownerDocument||context)!=document){
843setDocument(context);
844}
845return jQuery.contains(context,elem);
846};
847find.attr=function(elem,name){
848if((elem.ownerDocument||elem)!=document){
849setDocument(elem);
850}
851var fn=Expr.attrHandle[name.toLowerCase()],
852val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?
853fn(elem,name,!documentIsHTML):
854undefined;
855if(val!==undefined){
856return val;
857}
858return elem.getAttribute(name);
859};
860find.error=function(msg){
861throw new Error("Syntax error, unrecognized expression: "+msg);
862};
863jQuery.uniqueSort=function(results){
864var elem,
865duplicates=[],
866j=0,
867i=0;
868hasDuplicate=!support.sortStable;
869sortInput=!support.sortStable&&slice.call(results,0);
870sort.call(results,sortOrder);
871if(hasDuplicate){
872while((elem=results[i++])){
873if(elem===results[i]){
874j=duplicates.push(i);
875}
876}
877while(j--){
878splice.call(results,duplicates[j],1);
879}
880}
881sortInput=null;
882return results;
883};
884jQuery.fn.uniqueSort=function(){
885return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
886};
887Expr=jQuery.expr={
888cacheLength:50,
889createPseudo:markFunction,
890match:matchExpr,
891attrHandle:{},
892find:{},
893relative:{
894">":{dir:"parentNode",first:true},
895" ":{dir:"parentNode"},
896"+":{dir:"previousSibling",first:true},
897"~":{dir:"previousSibling"}
898},
899preFilter:{
900ATTR:function(match){
901match[1]=match[1].replace(runescape,funescape);
902match[3]=(match[3]||match[4]||match[5]||"")
903.replace(runescape,funescape);
904if(match[2]==="~="){
905match[3]=" "+match[3]+" ";
906}
907return match.slice(0,4);
908},
909CHILD:function(match){
910match[1]=match[1].toLowerCase();
911if(match[1].slice(0,3)==="nth"){
912if(!match[3]){
913find.error(match[0]);
914}
915match[4]=+(match[4]?
916match[5]+(match[6]||1):
9172*(match[3]==="even"||match[3]==="odd")
918);
919match[5]=+((match[7]+match[8])||match[3]==="odd");
920}else if(match[3]){
921find.error(match[0]);
922}
923return match;
924},
925PSEUDO:function(match){
926var excess,
927unquoted=!match[6]&&match[2];
928if(matchExpr.CHILD.test(match[0])){
929return null;
930}
931if(match[3]){
932match[2]=match[4]||match[5]||"";
933}else if(unquoted&&rpseudo.test(unquoted)&&
934(excess=tokenize(unquoted,true))&&
935(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){
936match[0]=match[0].slice(0,excess);
937match[2]=unquoted.slice(0,excess);
938}
939return match.slice(0,3);
940}
941},
942filter:{
943TAG:function(nodeNameSelector){
944var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();
945return nodeNameSelector==="*"?
946function(){
947return true;
948}:
949function(elem){
950return nodeName(elem,expectedNodeName);
951};
952},
953CLASS:function(className){
954var pattern=classCache[className+" "];
955return pattern||
956(pattern=new RegExp("(^|"+whitespace+")"+className+
957"("+whitespace+"|$)"))&&
958classCache(className,function(elem){
959return pattern.test(
960typeof elem.className==="string"&&elem.className||
961typeof elem.getAttribute!=="undefined"&&
962elem.getAttribute("class")||
963""
964);
965});
966},
967ATTR:function(name,operator,check){
968return function(elem){
969var result=find.attr(elem,name);
970if(result==null){
971return operator==="!=";
972}
973if(!operator){
974return true;
975}
976result+="";
977if(operator==="="){
978return result===check;
979}
980if(operator==="!="){
981return result!==check;
982}
983if(operator==="^="){
984return check&&result.indexOf(check)===0;
985}
986if(operator==="*="){
987return check&&result.indexOf(check)>-1;
988}
989if(operator==="$="){
990return check&&result.slice(-check.length)===check;
991}
992if(operator==="~="){
993return(" "+result.replace(rwhitespace," ")+" ")
994.indexOf(check)>-1;
995}
996if(operator==="|="){
997return result===check||result.slice(0,check.length+1)===check+"-";
998}
999return false;
1000};
1001},
1002CHILD:function(type,what,_argument,first,last){
1003var simple=type.slice(0,3)!=="nth",
1004forward=type.slice(-4)!=="last",
1005ofType=what==="of-type";
1006return first===1&&last===0?
1007function(elem){
1008return!!elem.parentNode;
1009}:
1010function(elem,_context,xml){
1011var cache,outerCache,node,nodeIndex,start,
1012dir=simple!==forward?"nextSibling":"previousSibling",
1013parent=elem.parentNode,
1014name=ofType&&elem.nodeName.toLowerCase(),
1015useCache=!xml&&!ofType,
1016diff=false;
1017if(parent){
1018if(simple){
1019while(dir){
1020node=elem;
1021while((node=node[dir])){
1022if(ofType?
1023nodeName(node,name):
1024node.nodeType===1){
1025return false;
1026}
1027}
1028start=dir=type==="only"&&!start&&"nextSibling";
1029}
1030return true;
1031}
1032start=[forward?parent.firstChild:parent.lastChild];
1033if(forward&&useCache){
1034outerCache=parent[expando]||(parent[expando]={});
1035cache=outerCache[type]||[];
1036nodeIndex=cache[0]===dirruns&&cache[1];
1037diff=nodeIndex&&cache[2];
1038node=nodeIndex&&parent.childNodes[nodeIndex];
1039while((node=++nodeIndex&&node&&node[dir]||
1040(diff=nodeIndex=0)||start.pop())){
1041if(node.nodeType===1&&++diff&&node===elem){
1042outerCache[type]=[dirruns,nodeIndex,diff];
1043break;
1044}
1045}
1046}else{
1047if(useCache){
1048outerCache=elem[expando]||(elem[expando]={});
1049cache=outerCache[type]||[];
1050nodeIndex=cache[0]===dirruns&&cache[1];
1051diff=nodeIndex;
1052}
1053if(diff===false){
1054while((node=++nodeIndex&&node&&node[dir]||
1055(diff=nodeIndex=0)||start.pop())){
1056if((ofType?
1057nodeName(node,name):
1058node.nodeType===1)&&
1059++diff){
1060if(useCache){
1061outerCache=node[expando]||
1062(node[expando]={});
1063outerCache[type]=[dirruns,diff];
1064}
1065if(node===elem){
1066break;
1067}
1068}
1069}
1070}
1071}
1072diff-=last;
1073return diff===first||(diff%first===0&&diff/first>=0);
1074}
1075};
1076},
1077PSEUDO:function(pseudo,argument){
1078var args,
1079fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||
1080find.error("unsupported pseudo: "+pseudo);
1081if(fn[expando]){
1082return fn(argument);
1083}
1084if(fn.length>1){
1085args=[pseudo,pseudo,"",argument];
1086return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?
1087markFunction(function(seed,matches){
1088var idx,
1089matched=fn(seed,argument),
1090i=matched.length;
1091while(i--){
1092idx=indexOf.call(seed,matched[i]);
1093seed[idx]=!(matches[idx]=matched[i]);
1094}
1095}):
1096function(elem){
1097return fn(elem,0,args);
1098};
1099}
1100return fn;
1101}
1102},
1103pseudos:{
1104not:markFunction(function(selector){
1105var input=[],
1106results=[],
1107matcher=compile(selector.replace(rtrimCSS,"$1"));
1108return matcher[expando]?
1109markFunction(function(seed,matches,_context,xml){
1110var elem,
1111unmatched=matcher(seed,null,xml,[]),
1112i=seed.length;
1113while(i--){
1114if((elem=unmatched[i])){
1115seed[i]=!(matches[i]=elem);
1116}
1117}
1118}):
1119function(elem,_context,xml){
1120input[0]=elem;
1121matcher(input,null,xml,results);
1122input[0]=null;
1123return!results.pop();
1124};
1125}),
1126has:markFunction(function(selector){
1127return function(elem){
1128return find(selector,elem).length>0;
1129};
1130}),
1131contains:markFunction(function(text){
1132text=text.replace(runescape,funescape);
1133return function(elem){
1134return(elem.textContent||jQuery.text(elem)).indexOf(text)>-1;
1135};
1136}),
1137lang:markFunction(function(lang){
1138if(!ridentifier.test(lang||"")){
1139find.error("unsupported lang: "+lang);
1140}
1141lang=lang.replace(runescape,funescape).toLowerCase();
1142return function(elem){
1143var elemLang;
1144do{
1145if((elemLang=documentIsHTML?
1146elem.lang:
1147elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){
1148elemLang=elemLang.toLowerCase();
1149return elemLang===lang||elemLang.indexOf(lang+"-")===0;
1150}
1151}while((elem=elem.parentNode)&&elem.nodeType===1);
1152return false;
1153};
1154}),
1155target:function(elem){
1156var hash=window.location&&window.location.hash;
1157return hash&&hash.slice(1)===elem.id;
1158},
1159root:function(elem){
1160return elem===documentElement;
1161},
1162focus:function(elem){
1163return elem===safeActiveElement()&&
1164document.hasFocus()&&
1165!!(elem.type||elem.href||~elem.tabIndex);
1166},
1167enabled:createDisabledPseudo(false),
1168disabled:createDisabledPseudo(true),
1169checked:function(elem){
1170return(nodeName(elem,"input")&&!!elem.checked)||
1171(nodeName(elem,"option")&&!!elem.selected);
1172},
1173selected:function(elem){
1174if(elem.parentNode){
1175elem.parentNode.selectedIndex;
1176}
1177return elem.selected===true;
1178},
1179empty:function(elem){
1180for(elem=elem.firstChild;elem;elem=elem.nextSibling){
1181if(elem.nodeType<6){
1182return false;
1183}
1184}
1185return true;
1186},
1187parent:function(elem){
1188return!Expr.pseudos.empty(elem);
1189},
1190header:function(elem){
1191return rheader.test(elem.nodeName);
1192},
1193input:function(elem){
1194return rinputs.test(elem.nodeName);
1195},
1196button:function(elem){
1197return nodeName(elem,"input")&&elem.type==="button"||
1198nodeName(elem,"button");
1199},
1200text:function(elem){
1201var attr;
1202return nodeName(elem,"input")&&elem.type==="text"&&
1203((attr=elem.getAttribute("type"))==null||
1204attr.toLowerCase()==="text");
1205},
1206first:createPositionalPseudo(function(){
1207return[0];
1208}),
1209last:createPositionalPseudo(function(_matchIndexes,length){
1210return[length-1];
1211}),
1212eq:createPositionalPseudo(function(_matchIndexes,length,argument){
1213return[argument<0?argument+length:argument];
1214}),
1215even:createPositionalPseudo(function(matchIndexes,length){
1216var i=0;
1217for(;i<length;i+=2){
1218matchIndexes.push(i);
1219}
1220return matchIndexes;
1221}),
1222odd:createPositionalPseudo(function(matchIndexes,length){
1223var i=1;
1224for(;i<length;i+=2){
1225matchIndexes.push(i);
1226}
1227return matchIndexes;
1228}),
1229lt:createPositionalPseudo(function(matchIndexes,length,argument){
1230var i;
1231if(argument<0){
1232i=argument+length;
1233}else if(argument>length){
1234i=length;
1235}else{
1236i=argument;
1237}
1238for(;--i>=0;){
1239matchIndexes.push(i);
1240}
1241return matchIndexes;
1242}),
1243gt:createPositionalPseudo(function(matchIndexes,length,argument){
1244var i=argument<0?argument+length:argument;
1245for(;++i<length;){
1246matchIndexes.push(i);
1247}
1248return matchIndexes;
1249})
1250}
1251};
1252Expr.pseudos.nth=Expr.pseudos.eq;
1253for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){
1254Expr.pseudos[i]=createInputPseudo(i);
1255}
1256for(i in{submit:true,reset:true}){
1257Expr.pseudos[i]=createButtonPseudo(i);
1258}
1259function setFilters(){}
1260setFilters.prototype=Expr.filters=Expr.pseudos;
1261Expr.setFilters=new setFilters();
1262function tokenize(selector,parseOnly){
1263var matched,match,tokens,type,
1264soFar,groups,preFilters,
1265cached=tokenCache[selector+" "];
1266if(cached){
1267return parseOnly?0:cached.slice(0);
1268}
1269soFar=selector;
1270groups=[];
1271preFilters=Expr.preFilter;
1272while(soFar){
1273if(!matched||(match=rcomma.exec(soFar))){
1274if(match){
1275soFar=soFar.slice(match[0].length)||soFar;
1276}
1277groups.push((tokens=[]));
1278}
1279matched=false;
1280if((match=rleadingCombinator.exec(soFar))){
1281matched=match.shift();
1282tokens.push({
1283value:matched,
1284type:match[0].replace(rtrimCSS," ")
1285});
1286soFar=soFar.slice(matched.length);
1287}
1288for(type in Expr.filter){
1289if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||
1290(match=preFilters[type](match)))){
1291matched=match.shift();
1292tokens.push({
1293value:matched,
1294type:type,
1295matches:match
1296});
1297soFar=soFar.slice(matched.length);
1298}
1299}
1300if(!matched){
1301break;
1302}
1303}
1304if(parseOnly){
1305return soFar.length;
1306}
1307return soFar?
1308find.error(selector):
1309tokenCache(selector,groups).slice(0);
1310}
1311function toSelector(tokens){
1312var i=0,
1313len=tokens.length,
1314selector="";
1315for(;i<len;i++){
1316selector+=tokens[i].value;
1317}
1318return selector;
1319}
1320function addCombinator(matcher,combinator,base){
1321var dir=combinator.dir,
1322skip=combinator.next,
1323key=skip||dir,
1324checkNonElements=base&&key==="parentNode",
1325doneName=done++;
1326return combinator.first?
1327function(elem,context,xml){
1328while((elem=elem[dir])){
1329if(elem.nodeType===1||checkNonElements){
1330return matcher(elem,context,xml);
1331}
1332}
1333return false;
1334}:
1335function(elem,context,xml){
1336var oldCache,outerCache,
1337newCache=[dirruns,doneName];
1338if(xml){
1339while((elem=elem[dir])){
1340if(elem.nodeType===1||checkNonElements){
1341if(matcher(elem,context,xml)){
1342return true;
1343}
1344}
1345}
1346}else{
1347while((elem=elem[dir])){
1348if(elem.nodeType===1||checkNonElements){
1349outerCache=elem[expando]||(elem[expando]={});
1350if(skip&&nodeName(elem,skip)){
1351elem=elem[dir]||elem;
1352}else if((oldCache=outerCache[key])&&
1353oldCache[0]===dirruns&&oldCache[1]===doneName){
1354return(newCache[2]=oldCache[2]);
1355}else{
1356outerCache[key]=newCache;
1357if((newCache[2]=matcher(elem,context,xml))){
1358return true;
1359}
1360}
1361}
1362}
1363}
1364return false;
1365};
1366}
1367function elementMatcher(matchers){
1368return matchers.length>1?
1369function(elem,context,xml){
1370var i=matchers.length;
1371while(i--){
1372if(!matchers[i](elem,context,xml)){
1373return false;
1374}
1375}
1376return true;
1377}:
1378matchers[0];
1379}
1380function multipleContexts(selector,contexts,results){
1381var i=0,
1382len=contexts.length;
1383for(;i<len;i++){
1384find(selector,contexts[i],results);
1385}
1386return results;
1387}
1388function condense(unmatched,map,filter,context,xml){
1389var elem,
1390newUnmatched=[],
1391i=0,
1392len=unmatched.length,
1393mapped=map!=null;
1394for(;i<len;i++){
1395if((elem=unmatched[i])){
1396if(!filter||filter(elem,context,xml)){
1397newUnmatched.push(elem);
1398if(mapped){
1399map.push(i);
1400}
1401}
1402}
1403}
1404return newUnmatched;
1405}
1406function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){
1407if(postFilter&&!postFilter[expando]){
1408postFilter=setMatcher(postFilter);
1409}
1410if(postFinder&&!postFinder[expando]){
1411postFinder=setMatcher(postFinder,postSelector);
1412}
1413return markFunction(function(seed,results,context,xml){
1414var temp,i,elem,matcherOut,
1415preMap=[],
1416postMap=[],
1417preexisting=results.length,
1418elems=seed||
1419multipleContexts(selector||"*",
1420context.nodeType?[context]:context,[]),
1421matcherIn=preFilter&&(seed||!selector)?
1422condense(elems,preMap,preFilter,context,xml):
1423elems;
1424if(matcher){
1425matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)?
1426[]:
1427results;
1428matcher(matcherIn,matcherOut,context,xml);
1429}else{
1430matcherOut=matcherIn;
1431}
1432if(postFilter){
1433temp=condense(matcherOut,postMap);
1434postFilter(temp,[],context,xml);
1435i=temp.length;
1436while(i--){
1437if((elem=temp[i])){
1438matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);
1439}
1440}
1441}
1442if(seed){
1443if(postFinder||preFilter){
1444if(postFinder){
1445temp=[];
1446i=matcherOut.length;
1447while(i--){
1448if((elem=matcherOut[i])){
1449temp.push((matcherIn[i]=elem));
1450}
1451}
1452postFinder(null,(matcherOut=[]),temp,xml);
1453}
1454i=matcherOut.length;
1455while(i--){
1456if((elem=matcherOut[i])&&
1457(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){
1458seed[temp]=!(results[temp]=elem);
1459}
1460}
1461}
1462}else{
1463matcherOut=condense(
1464matcherOut===results?
1465matcherOut.splice(preexisting,matcherOut.length):
1466matcherOut
1467);
1468if(postFinder){
1469postFinder(null,results,matcherOut,xml);
1470}else{
1471push.apply(results,matcherOut);
1472}
1473}
1474});
1475}
1476function matcherFromTokens(tokens){
1477var checkContext,matcher,j,
1478len=tokens.length,
1479leadingRelative=Expr.relative[tokens[0].type],
1480implicitRelative=leadingRelative||Expr.relative[" "],
1481i=leadingRelative?1:0,
1482matchContext=addCombinator(function(elem){
1483return elem===checkContext;
1484},implicitRelative,true),
1485matchAnyContext=addCombinator(function(elem){
1486return indexOf.call(checkContext,elem)>-1;
1487},implicitRelative,true),
1488matchers=[function(elem,context,xml){
1489var ret=(!leadingRelative&&(xml||context!=outermostContext))||(
1490(checkContext=context).nodeType?
1491matchContext(elem,context,xml):
1492matchAnyContext(elem,context,xml));
1493checkContext=null;
1494return ret;
1495}];
1496for(;i<len;i++){
1497if((matcher=Expr.relative[tokens[i].type])){
1498matchers=[addCombinator(elementMatcher(matchers),matcher)];
1499}else{
1500matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);
1501if(matcher[expando]){
1502j=++i;
1503for(;j<len;j++){
1504if(Expr.relative[tokens[j].type]){
1505break;
1506}
1507}
1508return setMatcher(
1509i>1&&elementMatcher(matchers),
1510i>1&&toSelector(
1511tokens.slice(0,i-1)
1512.concat({value:tokens[i-2].type===" "?"*":""})
1513).replace(rtrimCSS,"$1"),
1514matcher,
1515i<j&&matcherFromTokens(tokens.slice(i,j)),
1516j<len&&matcherFromTokens((tokens=tokens.slice(j))),
1517j<len&&toSelector(tokens)
1518);
1519}
1520matchers.push(matcher);
1521}
1522}
1523return elementMatcher(matchers);
1524}
1525function matcherFromGroupMatchers(elementMatchers,setMatchers){
1526var bySet=setMatchers.length>0,
1527byElement=elementMatchers.length>0,
1528superMatcher=function(seed,context,xml,results,outermost){
1529var elem,j,matcher,
1530matchedCount=0,
1531i="0",
1532unmatched=seed&&[],
1533setMatched=[],
1534contextBackup=outermostContext,
1535elems=seed||byElement&&Expr.find.TAG("*",outermost),
1536dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),
1537len=elems.length;
1538if(outermost){
1539outermostContext=context==document||context||outermost;
1540}
1541for(;i!==len&&(elem=elems[i])!=null;i++){
1542if(byElement&&elem){
1543j=0;
1544if(!context&&elem.ownerDocument!=document){
1545setDocument(elem);
1546xml=!documentIsHTML;
1547}
1548while((matcher=elementMatchers[j++])){
1549if(matcher(elem,context||document,xml)){
1550push.call(results,elem);
1551break;
1552}
1553}
1554if(outermost){
1555dirruns=dirrunsUnique;
1556}
1557}
1558if(bySet){
1559if((elem=!matcher&&elem)){
1560matchedCount--;
1561}
1562if(seed){
1563unmatched.push(elem);
1564}
1565}
1566}
1567matchedCount+=i;
1568if(bySet&&i!==matchedCount){
1569j=0;
1570while((matcher=setMatchers[j++])){
1571matcher(unmatched,setMatched,context,xml);
1572}
1573if(seed){
1574if(matchedCount>0){
1575while(i--){
1576if(!(unmatched[i]||setMatched[i])){
1577setMatched[i]=pop.call(results);
1578}
1579}
1580}
1581setMatched=condense(setMatched);
1582}
1583push.apply(results,setMatched);
1584if(outermost&&!seed&&setMatched.length>0&&
1585(matchedCount+setMatchers.length)>1){
1586jQuery.uniqueSort(results);
1587}
1588}
1589if(outermost){
1590dirruns=dirrunsUnique;
1591outermostContext=contextBackup;
1592}
1593return unmatched;
1594};
1595return bySet?
1596markFunction(superMatcher):
1597superMatcher;
1598}
1599function compile(selector,match){
1600var i,
1601setMatchers=[],
1602elementMatchers=[],
1603cached=compilerCache[selector+" "];
1604if(!cached){
1605if(!match){
1606match=tokenize(selector);
1607}
1608i=match.length;
1609while(i--){
1610cached=matcherFromTokens(match[i]);
1611if(cached[expando]){
1612setMatchers.push(cached);
1613}else{
1614elementMatchers.push(cached);
1615}
1616}
1617cached=compilerCache(selector,
1618matcherFromGroupMatchers(elementMatchers,setMatchers));
1619cached.selector=selector;
1620}
1621return cached;
1622}
1623function select(selector,context,results,seed){
1624var i,tokens,token,type,find,
1625compiled=typeof selector==="function"&&selector,
1626match=!seed&&tokenize((selector=compiled.selector||selector));
1627results=results||[];
1628if(match.length===1){
1629tokens=match[0]=match[0].slice(0);
1630if(tokens.length>2&&(token=tokens[0]).type==="ID"&&
1631context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){
1632context=(Expr.find.ID(
1633token.matches[0].replace(runescape,funescape),
1634context
1635)||[])[0];
1636if(!context){
1637return results;
1638}else if(compiled){
1639context=context.parentNode;
1640}
1641selector=selector.slice(tokens.shift().value.length);
1642}
1643i=matchExpr.needsContext.test(selector)?0:tokens.length;
1644while(i--){
1645token=tokens[i];
1646if(Expr.relative[(type=token.type)]){
1647break;
1648}
1649if((find=Expr.find[type])){
1650if((seed=find(
1651token.matches[0].replace(runescape,funescape),
1652rsibling.test(tokens[0].type)&&
1653testContext(context.parentNode)||context
1654))){
1655tokens.splice(i,1);
1656selector=seed.length&&toSelector(tokens);
1657if(!selector){
1658push.apply(results,seed);
1659return results;
1660}
1661break;
1662}
1663}
1664}
1665}
1666(compiled||compile(selector,match))(
1667seed,
1668context,
1669!documentIsHTML,
1670results,
1671!context||rsibling.test(selector)&&testContext(context.parentNode)||context
1672);
1673return results;
1674}
1675support.sortStable=expando.split("").sort(sortOrder).join("")===expando;
1676setDocument();
1677support.sortDetached=assert(function(el){
1678return el.compareDocumentPosition(document.createElement("fieldset"))&1;
1679});
1680jQuery.find=find;
1681jQuery.expr[":"]=jQuery.expr.pseudos;
1682jQuery.unique=jQuery.uniqueSort;
1683find.compile=compile;
1684find.select=select;
1685find.setDocument=setDocument;
1686find.tokenize=tokenize;
1687find.escape=jQuery.escapeSelector;
1688find.getText=jQuery.text;
1689find.isXML=jQuery.isXMLDoc;
1690find.selectors=jQuery.expr;
1691find.support=jQuery.support;
1692find.uniqueSort=jQuery.uniqueSort;
1693})();
1694var dir=function(elem,dir,until){
1695var matched=[],
1696truncate=until!==undefined;
1697while((elem=elem[dir])&&elem.nodeType!==9){
1698if(elem.nodeType===1){
1699if(truncate&&jQuery(elem).is(until)){
1700break;
1701}
1702matched.push(elem);
1703}
1704}
1705return matched;
1706};
1707var siblings=function(n,elem){
1708var matched=[];
1709for(;n;n=n.nextSibling){
1710if(n.nodeType===1&&n!==elem){
1711matched.push(n);
1712}
1713}
1714return matched;
1715};
1716var rneedsContext=jQuery.expr.match.needsContext;
1717var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);
1718function winnow(elements,qualifier,not){
1719if(isFunction(qualifier)){
1720return jQuery.grep(elements,function(elem,i){
1721return!!qualifier.call(elem,i,elem)!==not;
1722});
1723}
1724if(qualifier.nodeType){
1725return jQuery.grep(elements,function(elem){
1726return(elem===qualifier)!==not;
1727});
1728}
1729if(typeof qualifier!=="string"){
1730return jQuery.grep(elements,function(elem){
1731return(indexOf.call(qualifier,elem)>-1)!==not;
1732});
1733}
1734return jQuery.filter(qualifier,elements,not);
1735}
1736jQuery.filter=function(expr,elems,not){
1737var elem=elems[0];
1738if(not){
1739expr=":not("+expr+")";
1740}
1741if(elems.length===1&&elem.nodeType===1){
1742return jQuery.find.matchesSelector(elem,expr)?[elem]:[];
1743}
1744return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){
1745return elem.nodeType===1;
1746}));
1747};
1748jQuery.fn.extend({
1749find:function(selector){
1750var i,ret,
1751len=this.length,
1752self=this;
1753if(typeof selector!=="string"){
1754return this.pushStack(jQuery(selector).filter(function(){
1755for(i=0;i<len;i++){
1756if(jQuery.contains(self[i],this)){
1757return true;
1758}
1759}
1760}));
1761}
1762ret=this.pushStack([]);
1763for(i=0;i<len;i++){
1764jQuery.find(selector,self[i],ret);
1765}
1766return len>1?jQuery.uniqueSort(ret):ret;
1767},
1768filter:function(selector){
1769return this.pushStack(winnow(this,selector||[],false));
1770},
1771not:function(selector){
1772return this.pushStack(winnow(this,selector||[],true));
1773},
1774is:function(selector){
1775return!!winnow(
1776this,
1777typeof selector==="string"&&rneedsContext.test(selector)?
1778jQuery(selector):
1779selector||[],
1780false
1781).length;
1782}
1783});
1784var rootjQuery,
1785rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
1786init=jQuery.fn.init=function(selector,context,root){
1787var match,elem;
1788if(!selector){
1789return this;
1790}
1791root=root||rootjQuery;
1792if(typeof selector==="string"){
1793if(selector[0]==="<"&&
1794selector[selector.length-1]===">"&&
1795selector.length>=3){
1796match=[null,selector,null];
1797}else{
1798match=rquickExpr.exec(selector);
1799}
1800if(match&&(match[1]||!context)){
1801if(match[1]){
1802context=context instanceof jQuery?context[0]:context;
1803jQuery.merge(this,jQuery.parseHTML(
1804match[1],
1805context&&context.nodeType?context.ownerDocument||context:document,
1806true
1807));
1808if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){
1809for(match in context){
1810if(isFunction(this[match])){
1811this[match](context[match]);
1812}else{
1813this.attr(match,context[match]);
1814}
1815}
1816}
1817return this;
1818}else{
1819elem=document.getElementById(match[2]);
1820if(elem){
1821this[0]=elem;
1822this.length=1;
1823}
1824return this;
1825}
1826}else if(!context||context.jquery){
1827return(context||root).find(selector);
1828}else{
1829return this.constructor(context).find(selector);
1830}
1831}else if(selector.nodeType){
1832this[0]=selector;
1833this.length=1;
1834return this;
1835}else if(isFunction(selector)){
1836return root.ready!==undefined?
1837root.ready(selector):
1838selector(jQuery);
1839}
1840return jQuery.makeArray(selector,this);
1841};
1842init.prototype=jQuery.fn;
1843rootjQuery=jQuery(document);
1844var rparentsprev=/^(?:parents|prev(?:Until|All))/,
1845guaranteedUnique={
1846children:true,
1847contents:true,
1848next:true,
1849prev:true
1850};
1851jQuery.fn.extend({
1852has:function(target){
1853var targets=jQuery(target,this),
1854l=targets.length;
1855return this.filter(function(){
1856var i=0;
1857for(;i<l;i++){
1858if(jQuery.contains(this,targets[i])){
1859return true;
1860}
1861}
1862});
1863},
1864closest:function(selectors,context){
1865var cur,
1866i=0,
1867l=this.length,
1868matched=[],
1869targets=typeof selectors!=="string"&&jQuery(selectors);
1870if(!rneedsContext.test(selectors)){
1871for(;i<l;i++){
1872for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){
1873if(cur.nodeType<11&&(targets?
1874targets.index(cur)>-1:
1875cur.nodeType===1&&
1876jQuery.find.matchesSelector(cur,selectors))){
1877matched.push(cur);
1878break;
1879}
1880}
1881}
1882}
1883return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);
1884},
1885index:function(elem){
1886if(!elem){
1887return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;
1888}
1889if(typeof elem==="string"){
1890return indexOf.call(jQuery(elem),this[0]);
1891}
1892return indexOf.call(this,
1893elem.jquery?elem[0]:elem
1894);
1895},
1896add:function(selector,context){
1897return this.pushStack(
1898jQuery.uniqueSort(
1899jQuery.merge(this.get(),jQuery(selector,context))
1900)
1901);
1902},
1903addBack:function(selector){
1904return this.add(selector==null?
1905this.prevObject:this.prevObject.filter(selector)
1906);
1907}
1908});
1909function sibling(cur,dir){
1910while((cur=cur[dir])&&cur.nodeType!==1){}
1911return cur;
1912}
1913jQuery.each({
1914parent:function(elem){
1915var parent=elem.parentNode;
1916return parent&&parent.nodeType!==11?parent:null;
1917},
1918parents:function(elem){
1919return dir(elem,"parentNode");
1920},
1921parentsUntil:function(elem,_i,until){
1922return dir(elem,"parentNode",until);
1923},
1924next:function(elem){
1925return sibling(elem,"nextSibling");
1926},
1927prev:function(elem){
1928return sibling(elem,"previousSibling");
1929},
1930nextAll:function(elem){
1931return dir(elem,"nextSibling");
1932},
1933prevAll:function(elem){
1934return dir(elem,"previousSibling");
1935},
1936nextUntil:function(elem,_i,until){
1937return dir(elem,"nextSibling",until);
1938},
1939prevUntil:function(elem,_i,until){
1940return dir(elem,"previousSibling",until);
1941},
1942siblings:function(elem){
1943return siblings((elem.parentNode||{}).firstChild,elem);
1944},
1945children:function(elem){
1946return siblings(elem.firstChild);
1947},
1948contents:function(elem){
1949if(elem.contentDocument!=null&&
1950getProto(elem.contentDocument)){
1951return elem.contentDocument;
1952}
1953if(nodeName(elem,"template")){
1954elem=elem.content||elem;
1955}
1956return jQuery.merge([],elem.childNodes);
1957}
1958},function(name,fn){
1959jQuery.fn[name]=function(until,selector){
1960var matched=jQuery.map(this,fn,until);
1961if(name.slice(-5)!=="Until"){
1962selector=until;
1963}
1964if(selector&&typeof selector==="string"){
1965matched=jQuery.filter(selector,matched);
1966}
1967if(this.length>1){
1968if(!guaranteedUnique[name]){
1969jQuery.uniqueSort(matched);
1970}
1971if(rparentsprev.test(name)){
1972matched.reverse();
1973}
1974}
1975return this.pushStack(matched);
1976};
1977});
1978var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);
1979function createOptions(options){
1980var object={};
1981jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){
1982object[flag]=true;
1983});
1984return object;
1985}
1986jQuery.Callbacks=function(options){
1987options=typeof options==="string"?
1988createOptions(options):
1989jQuery.extend({},options);
1990var
1991firing,
1992memory,
1993fired,
1994locked,
1995list=[],
1996queue=[],
1997firingIndex=-1,
1998fire=function(){
1999locked=locked||options.once;
2000fired=firing=true;
2001for(;queue.length;firingIndex=-1){
2002memory=queue.shift();
2003while(++firingIndex<list.length){
2004if(list[firingIndex].apply(memory[0],memory[1])===false&&
2005options.stopOnFalse){
2006firingIndex=list.length;
2007memory=false;
2008}
2009}
2010}
2011if(!options.memory){
2012memory=false;
2013}
2014firing=false;
2015if(locked){
2016if(memory){
2017list=[];
2018}else{
2019list="";
2020}
2021}
2022},
2023self={
2024add:function(){
2025if(list){
2026if(memory&&!firing){
2027firingIndex=list.length-1;
2028queue.push(memory);
2029}
2030(function add(args){
2031jQuery.each(args,function(_,arg){
2032if(isFunction(arg)){
2033if(!options.unique||!self.has(arg)){
2034list.push(arg);
2035}
2036}else if(arg&&arg.length&&toType(arg)!=="string"){
2037add(arg);
2038}
2039});
2040})(arguments);
2041if(memory&&!firing){
2042fire();
2043}
2044}
2045return this;
2046},
2047remove:function(){
2048jQuery.each(arguments,function(_,arg){
2049var index;
2050while((index=jQuery.inArray(arg,list,index))>-1){
2051list.splice(index,1);
2052if(index<=firingIndex){
2053firingIndex--;
2054}
2055}
2056});
2057return this;
2058},
2059has:function(fn){
2060return fn?
2061jQuery.inArray(fn,list)>-1:
2062list.length>0;
2063},
2064empty:function(){
2065if(list){
2066list=[];
2067}
2068return this;
2069},
2070disable:function(){
2071locked=queue=[];
2072list=memory="";
2073return this;
2074},
2075disabled:function(){
2076return!list;
2077},
2078lock:function(){
2079locked=queue=[];
2080if(!memory&&!firing){
2081list=memory="";
2082}
2083return this;
2084},
2085locked:function(){
2086return!!locked;
2087},
2088fireWith:function(context,args){
2089if(!locked){
2090args=args||[];
2091args=[context,args.slice?args.slice():args];
2092queue.push(args);
2093if(!firing){
2094fire();
2095}
2096}
2097return this;
2098},
2099fire:function(){
2100self.fireWith(this,arguments);
2101return this;
2102},
2103fired:function(){
2104return!!fired;
2105}
2106};
2107return self;
2108};
2109function Identity(v){
2110return v;
2111}
2112function Thrower(ex){
2113throw ex;
2114}
2115function adoptValue(value,resolve,reject,noValue){
2116var method;
2117try{
2118if(value&&isFunction((method=value.promise))){
2119method.call(value).done(resolve).fail(reject);
2120}else if(value&&isFunction((method=value.then))){
2121method.call(value,resolve,reject);
2122}else{
2123resolve.apply(undefined,[value].slice(noValue));
2124}
2125}catch(value){
2126reject.apply(undefined,[value]);
2127}
2128}
2129jQuery.extend({
2130Deferred:function(func){
2131var tuples=[
2132["notify","progress",jQuery.Callbacks("memory"),
2133jQuery.Callbacks("memory"),2],
2134["resolve","done",jQuery.Callbacks("once memory"),
2135jQuery.Callbacks("once memory"),0,"resolved"],
2136["reject","fail",jQuery.Callbacks("once memory"),
2137jQuery.Callbacks("once memory"),1,"rejected"]
2138],
2139state="pending",
2140promise={
2141state:function(){
2142return state;
2143},
2144always:function(){
2145deferred.done(arguments).fail(arguments);
2146return this;
2147},
2148"catch":function(fn){
2149return promise.then(null,fn);
2150},
2151pipe:function(){
2152var fns=arguments;
2153return jQuery.Deferred(function(newDefer){
2154jQuery.each(tuples,function(_i,tuple){
2155var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];
2156deferred[tuple[1]](function(){
2157var returned=fn&&fn.apply(this,arguments);
2158if(returned&&isFunction(returned.promise)){
2159returned.promise()
2160.progress(newDefer.notify)
2161.done(newDefer.resolve)
2162.fail(newDefer.reject);
2163}else{
2164newDefer[tuple[0]+"With"](
2165this,
2166fn?[returned]:arguments
2167);
2168}
2169});
2170});
2171fns=null;
2172}).promise();
2173},
2174then:function(onFulfilled,onRejected,onProgress){
2175var maxDepth=0;
2176function resolve(depth,deferred,handler,special){
2177return function(){
2178var that=this,
2179args=arguments,
2180mightThrow=function(){
2181var returned,then;
2182if(depth<maxDepth){
2183return;
2184}
2185returned=handler.apply(that,args);
2186if(returned===deferred.promise()){
2187throw new TypeError("Thenable self-resolution");
2188}
2189then=returned&&
2190(typeof returned==="object"||
2191typeof returned==="function")&&
2192returned.then;
2193if(isFunction(then)){
2194if(special){
2195then.call(
2196returned,
2197resolve(maxDepth,deferred,Identity,special),
2198resolve(maxDepth,deferred,Thrower,special)
2199);
2200}else{
2201maxDepth++;
2202then.call(
2203returned,
2204resolve(maxDepth,deferred,Identity,special),
2205resolve(maxDepth,deferred,Thrower,special),
2206resolve(maxDepth,deferred,Identity,
2207deferred.notifyWith)
2208);
2209}
2210}else{
2211if(handler!==Identity){
2212that=undefined;
2213args=[returned];
2214}
2215(special||deferred.resolveWith)(that,args);
2216}
2217},
2218process=special?
2219mightThrow:
2220function(){
2221try{
2222mightThrow();
2223}catch(e){
2224if(jQuery.Deferred.exceptionHook){
2225jQuery.Deferred.exceptionHook(e,
2226process.error);
2227}
2228if(depth+1>=maxDepth){
2229if(handler!==Thrower){
2230that=undefined;
2231args=[e];
2232}
2233deferred.rejectWith(that,args);
2234}
2235}
2236};
2237if(depth){
2238process();
2239}else{
2240if(jQuery.Deferred.getErrorHook){
2241process.error=jQuery.Deferred.getErrorHook();
2242}else if(jQuery.Deferred.getStackHook){
2243process.error=jQuery.Deferred.getStackHook();
2244}
2245window.setTimeout(process);
2246}
2247};
2248}
2249return jQuery.Deferred(function(newDefer){
2250tuples[0][3].add(
2251resolve(
22520,
2253newDefer,
2254isFunction(onProgress)?
2255onProgress:
2256Identity,
2257newDefer.notifyWith
2258)
2259);
2260tuples[1][3].add(
2261resolve(
22620,
2263newDefer,
2264isFunction(onFulfilled)?
2265onFulfilled:
2266Identity
2267)
2268);
2269tuples[2][3].add(
2270resolve(
22710,
2272newDefer,
2273isFunction(onRejected)?
2274onRejected:
2275Thrower
2276)
2277);
2278}).promise();
2279},
2280promise:function(obj){
2281return obj!=null?jQuery.extend(obj,promise):promise;
2282}
2283},
2284deferred={};
2285jQuery.each(tuples,function(i,tuple){
2286var list=tuple[2],
2287stateString=tuple[5];
2288promise[tuple[1]]=list.add;
2289if(stateString){
2290list.add(
2291function(){
2292state=stateString;
2293},
2294tuples[3-i][2].disable,
2295tuples[3-i][3].disable,
2296tuples[0][2].lock,
2297tuples[0][3].lock
2298);
2299}
2300list.add(tuple[3].fire);
2301deferred[tuple[0]]=function(){
2302deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);
2303return this;
2304};
2305deferred[tuple[0]+"With"]=list.fireWith;
2306});
2307promise.promise(deferred);
2308if(func){
2309func.call(deferred,deferred);
2310}
2311return deferred;
2312},
2313when:function(singleValue){
2314var
2315remaining=arguments.length,
2316i=remaining,
2317resolveContexts=Array(i),
2318resolveValues=slice.call(arguments),
2319primary=jQuery.Deferred(),
2320updateFunc=function(i){
2321return function(value){
2322resolveContexts[i]=this;
2323resolveValues[i]=arguments.length>1?slice.call(arguments):value;
2324if(!(--remaining)){
2325primary.resolveWith(resolveContexts,resolveValues);
2326}
2327};
2328};
2329if(remaining<=1){
2330adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject,
2331!remaining);
2332if(primary.state()==="pending"||
2333isFunction(resolveValues[i]&&resolveValues[i].then)){
2334return primary.then();
2335}
2336}
2337while(i--){
2338adoptValue(resolveValues[i],updateFunc(i),primary.reject);
2339}
2340return primary.promise();
2341}
2342});
2343var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
2344jQuery.Deferred.exceptionHook=function(error,asyncError){
2345if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){
2346window.console.warn("jQuery.Deferred exception: "+error.message,
2347error.stack,asyncError);
2348}
2349};
2350jQuery.readyException=function(error){
2351window.setTimeout(function(){
2352throw error;
2353});
2354};
2355var readyList=jQuery.Deferred();
2356jQuery.fn.ready=function(fn){
2357readyList
2358.then(fn)
2359.catch(function(error){
2360jQuery.readyException(error);
2361});
2362return this;
2363};
2364jQuery.extend({
2365isReady:false,
2366readyWait:1,
2367ready:function(wait){
2368if(wait===true?--jQuery.readyWait:jQuery.isReady){
2369return;
2370}
2371jQuery.isReady=true;
2372if(wait!==true&&--jQuery.readyWait>0){
2373return;
2374}
2375readyList.resolveWith(document,[jQuery]);
2376}
2377});
2378jQuery.ready.then=readyList.then;
2379function completed(){
2380document.removeEventListener("DOMContentLoaded",completed);
2381window.removeEventListener("load",completed);
2382jQuery.ready();
2383}
2384if(document.readyState==="complete"||
2385(document.readyState!=="loading"&&!document.documentElement.doScroll)){
2386window.setTimeout(jQuery.ready);
2387}else{
2388document.addEventListener("DOMContentLoaded",completed);
2389window.addEventListener("load",completed);
2390}
2391var access=function(elems,fn,key,value,chainable,emptyGet,raw){
2392var i=0,
2393len=elems.length,
2394bulk=key==null;
2395if(toType(key)==="object"){
2396chainable=true;
2397for(i in key){
2398access(elems,fn,i,key[i],true,emptyGet,raw);
2399}
2400}else if(value!==undefined){
2401chainable=true;
2402if(!isFunction(value)){
2403raw=true;
2404}
2405if(bulk){
2406if(raw){
2407fn.call(elems,value);
2408fn=null;
2409}else{
2410bulk=fn;
2411fn=function(elem,_key,value){
2412return bulk.call(jQuery(elem),value);
2413};
2414}
2415}
2416if(fn){
2417for(;i<len;i++){
2418fn(
2419elems[i],key,raw?
2420value:
2421value.call(elems[i],i,fn(elems[i],key))
2422);
2423}
2424}
2425}
2426if(chainable){
2427return elems;
2428}
2429if(bulk){
2430return fn.call(elems);
2431}
2432return len?fn(elems[0],key):emptyGet;
2433};
2434var rmsPrefix=/^-ms-/,
2435rdashAlpha=/-([a-z])/g;
2436function fcamelCase(_all,letter){
2437return letter.toUpperCase();
2438}
2439function camelCase(string){
2440return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);
2441}
2442var acceptData=function(owner){
2443return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType);
2444};
2445function Data(){
2446this.expando=jQuery.expando+Data.uid++;
2447}
2448Data.uid=1;
2449Data.prototype={
2450cache:function(owner){
2451var value=owner[this.expando];
2452if(!value){
2453value={};
2454if(acceptData(owner)){
2455if(owner.nodeType){
2456owner[this.expando]=value;
2457}else{
2458Object.defineProperty(owner,this.expando,{
2459value:value,
2460configurable:true
2461});
2462}
2463}
2464}
2465return value;
2466},
2467set:function(owner,data,value){
2468var prop,
2469cache=this.cache(owner);
2470if(typeof data==="string"){
2471cache[camelCase(data)]=value;
2472}else{
2473for(prop in data){
2474cache[camelCase(prop)]=data[prop];
2475}
2476}
2477return cache;
2478},
2479get:function(owner,key){
2480return key===undefined?
2481this.cache(owner):
2482owner[this.expando]&&owner[this.expando][camelCase(key)];
2483},
2484access:function(owner,key,value){
2485if(key===undefined||
2486((key&&typeof key==="string")&&value===undefined)){
2487return this.get(owner,key);
2488}
2489this.set(owner,key,value);
2490return value!==undefined?value:key;
2491},
2492remove:function(owner,key){
2493var i,
2494cache=owner[this.expando];
2495if(cache===undefined){
2496return;
2497}
2498if(key!==undefined){
2499if(Array.isArray(key)){
2500key=key.map(camelCase);
2501}else{
2502key=camelCase(key);
2503key=key in cache?
2504[key]:
2505(key.match(rnothtmlwhite)||[]);
2506}
2507i=key.length;
2508while(i--){
2509delete cache[key[i]];
2510}
2511}
2512if(key===undefined||jQuery.isEmptyObject(cache)){
2513if(owner.nodeType){
2514owner[this.expando]=undefined;
2515}else{
2516delete owner[this.expando];
2517}
2518}
2519},
2520hasData:function(owner){
2521var cache=owner[this.expando];
2522return cache!==undefined&&!jQuery.isEmptyObject(cache);
2523}
2524};
2525var dataPriv=new Data();
2526var dataUser=new Data();
2527var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
2528rmultiDash=/[A-Z]/g;
2529function getData(data){
2530if(data==="true"){
2531return true;
2532}
2533if(data==="false"){
2534return false;
2535}
2536if(data==="null"){
2537return null;
2538}
2539if(data===+data+""){
2540return+data;
2541}
2542if(rbrace.test(data)){
2543return JSON.parse(data);
2544}
2545return data;
2546}
2547function dataAttr(elem,key,data){
2548var name;
2549if(data===undefined&&elem.nodeType===1){
2550name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();
2551data=elem.getAttribute(name);
2552if(typeof data==="string"){
2553try{
2554data=getData(data);
2555}catch(e){}
2556dataUser.set(elem,key,data);
2557}else{
2558data=undefined;
2559}
2560}
2561return data;
2562}
2563jQuery.extend({
2564hasData:function(elem){
2565return dataUser.hasData(elem)||dataPriv.hasData(elem);
2566},
2567data:function(elem,name,data){
2568return dataUser.access(elem,name,data);
2569},
2570removeData:function(elem,name){
2571dataUser.remove(elem,name);
2572},
2573_data:function(elem,name,data){
2574return dataPriv.access(elem,name,data);
2575},
2576_removeData:function(elem,name){
2577dataPriv.remove(elem,name);
2578}
2579});
2580jQuery.fn.extend({
2581data:function(key,value){
2582var i,name,data,
2583elem=this[0],
2584attrs=elem&&elem.attributes;
2585if(key===undefined){
2586if(this.length){
2587data=dataUser.get(elem);
2588if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){
2589i=attrs.length;
2590while(i--){
2591if(attrs[i]){
2592name=attrs[i].name;
2593if(name.indexOf("data-")===0){
2594name=camelCase(name.slice(5));
2595dataAttr(elem,name,data[name]);
2596}
2597}
2598}
2599dataPriv.set(elem,"hasDataAttrs",true);
2600}
2601}
2602return data;
2603}
2604if(typeof key==="object"){
2605return this.each(function(){
2606dataUser.set(this,key);
2607});
2608}
2609return access(this,function(value){
2610var data;
2611if(elem&&value===undefined){
2612data=dataUser.get(elem,key);
2613if(data!==undefined){
2614return data;
2615}
2616data=dataAttr(elem,key);
2617if(data!==undefined){
2618return data;
2619}
2620return;
2621}
2622this.each(function(){
2623dataUser.set(this,key,value);
2624});
2625},null,value,arguments.length>1,null,true);
2626},
2627removeData:function(key){
2628return this.each(function(){
2629dataUser.remove(this,key);
2630});
2631}
2632});
2633jQuery.extend({
2634queue:function(elem,type,data){
2635var queue;
2636if(elem){
2637type=(type||"fx")+"queue";
2638queue=dataPriv.get(elem,type);
2639if(data){
2640if(!queue||Array.isArray(data)){
2641queue=dataPriv.access(elem,type,jQuery.makeArray(data));
2642}else{
2643queue.push(data);
2644}
2645}
2646return queue||[];
2647}
2648},
2649dequeue:function(elem,type){
2650type=type||"fx";
2651var queue=jQuery.queue(elem,type),
2652startLength=queue.length,
2653fn=queue.shift(),
2654hooks=jQuery._queueHooks(elem,type),
2655next=function(){
2656jQuery.dequeue(elem,type);
2657};
2658if(fn==="inprogress"){
2659fn=queue.shift();
2660startLength--;
2661}
2662if(fn){
2663if(type==="fx"){
2664queue.unshift("inprogress");
2665}
2666delete hooks.stop;
2667fn.call(elem,next,hooks);
2668}
2669if(!startLength&&hooks){
2670hooks.empty.fire();
2671}
2672},
2673_queueHooks:function(elem,type){
2674var key=type+"queueHooks";
2675return dataPriv.get(elem,key)||dataPriv.access(elem,key,{
2676empty:jQuery.Callbacks("once memory").add(function(){
2677dataPriv.remove(elem,[type+"queue",key]);
2678})
2679});
2680}
2681});
2682jQuery.fn.extend({
2683queue:function(type,data){
2684var setter=2;
2685if(typeof type!=="string"){
2686data=type;
2687type="fx";
2688setter--;
2689}
2690if(arguments.length<setter){
2691return jQuery.queue(this[0],type);
2692}
2693return data===undefined?
2694this:
2695this.each(function(){
2696var queue=jQuery.queue(this,type,data);
2697jQuery._queueHooks(this,type);
2698if(type==="fx"&&queue[0]!=="inprogress"){
2699jQuery.dequeue(this,type);
2700}
2701});
2702},
2703dequeue:function(type){
2704return this.each(function(){
2705jQuery.dequeue(this,type);
2706});
2707},
2708clearQueue:function(type){
2709return this.queue(type||"fx",[]);
2710},
2711promise:function(type,obj){
2712var tmp,
2713count=1,
2714defer=jQuery.Deferred(),
2715elements=this,
2716i=this.length,
2717resolve=function(){
2718if(!(--count)){
2719defer.resolveWith(elements,[elements]);
2720}
2721};
2722if(typeof type!=="string"){
2723obj=type;
2724type=undefined;
2725}
2726type=type||"fx";
2727while(i--){
2728tmp=dataPriv.get(elements[i],type+"queueHooks");
2729if(tmp&&tmp.empty){
2730count++;
2731tmp.empty.add(resolve);
2732}
2733}
2734resolve();
2735return defer.promise(obj);
2736}
2737});
2738var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
2739var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");
2740var cssExpand=["Top","Right","Bottom","Left"];
2741var documentElement=document.documentElement;
2742var isAttached=function(elem){
2743return jQuery.contains(elem.ownerDocument,elem);
2744},
2745composed={composed:true};
2746if(documentElement.getRootNode){
2747isAttached=function(elem){
2748return jQuery.contains(elem.ownerDocument,elem)||
2749elem.getRootNode(composed)===elem.ownerDocument;
2750};
2751}
2752var isHiddenWithinTree=function(elem,el){
2753elem=el||elem;
2754return elem.style.display==="none"||
2755elem.style.display===""&&
2756isAttached(elem)&&
2757jQuery.css(elem,"display")==="none";
2758};
2759function adjustCSS(elem,prop,valueParts,tween){
2760var adjusted,scale,
2761maxIterations=20,
2762currentValue=tween?
2763function(){
2764return tween.cur();
2765}:
2766function(){
2767return jQuery.css(elem,prop,"");
2768},
2769initial=currentValue(),
2770unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),
2771initialInUnit=elem.nodeType&&
2772(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&
2773rcssNum.exec(jQuery.css(elem,prop));
2774if(initialInUnit&&initialInUnit[3]!==unit){
2775initial=initial/2;
2776unit=unit||initialInUnit[3];
2777initialInUnit=+initial||1;
2778while(maxIterations--){
2779jQuery.style(elem,prop,initialInUnit+unit);
2780if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){
2781maxIterations=0;
2782}
2783initialInUnit=initialInUnit/scale;
2784}
2785initialInUnit=initialInUnit*2;
2786jQuery.style(elem,prop,initialInUnit+unit);
2787valueParts=valueParts||[];
2788}
2789if(valueParts){
2790initialInUnit=+initialInUnit||+initial||0;
2791adjusted=valueParts[1]?
2792initialInUnit+(valueParts[1]+1)*valueParts[2]:
2793+valueParts[2];
2794if(tween){
2795tween.unit=unit;
2796tween.start=initialInUnit;
2797tween.end=adjusted;
2798}
2799}
2800return adjusted;
2801}
2802var defaultDisplayMap={};
2803function getDefaultDisplay(elem){
2804var temp,
2805doc=elem.ownerDocument,
2806nodeName=elem.nodeName,
2807display=defaultDisplayMap[nodeName];
2808if(display){
2809return display;
2810}
2811temp=doc.body.appendChild(doc.createElement(nodeName));
2812display=jQuery.css(temp,"display");
2813temp.parentNode.removeChild(temp);
2814if(display==="none"){
2815display="block";
2816}
2817defaultDisplayMap[nodeName]=display;
2818return display;
2819}
2820function showHide(elements,show){
2821var display,elem,
2822values=[],
2823index=0,
2824length=elements.length;
2825for(;index<length;index++){
2826elem=elements[index];
2827if(!elem.style){
2828continue;
2829}
2830display=elem.style.display;
2831if(show){
2832if(display==="none"){
2833values[index]=dataPriv.get(elem,"display")||null;
2834if(!values[index]){
2835elem.style.display="";
2836}
2837}
2838if(elem.style.display===""&&isHiddenWithinTree(elem)){
2839values[index]=getDefaultDisplay(elem);
2840}
2841}else{
2842if(display!=="none"){
2843values[index]="none";
2844dataPriv.set(elem,"display",display);
2845}
2846}
2847}
2848for(index=0;index<length;index++){
2849if(values[index]!=null){
2850elements[index].style.display=values[index];
2851}
2852}
2853return elements;
2854}
2855jQuery.fn.extend({
2856show:function(){
2857return showHide(this,true);
2858},
2859hide:function(){
2860return showHide(this);
2861},
2862toggle:function(state){
2863if(typeof state==="boolean"){
2864return state?this.show():this.hide();
2865}
2866return this.each(function(){
2867if(isHiddenWithinTree(this)){
2868jQuery(this).show();
2869}else{
2870jQuery(this).hide();
2871}
2872});
2873}
2874});
2875var rcheckableType=(/^(?:checkbox|radio)$/i);
2876var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]*)/i);
2877var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i);
2878(function(){
2879var fragment=document.createDocumentFragment(),
2880div=fragment.appendChild(document.createElement("div")),
2881input=document.createElement("input");
2882input.setAttribute("type","radio");
2883input.setAttribute("checked","checked");
2884input.setAttribute("name","t");
2885div.appendChild(input);
2886support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;
2887div.innerHTML="<textarea>x</textarea>";
2888support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;
2889div.innerHTML="<option></option>";
2890support.option=!!div.lastChild;
2891})();
2892var wrapMap={
2893thead:[1,"<table>","</table>"],
2894col:[2,"<table><colgroup>","</colgroup></table>"],
2895tr:[2,"<table><tbody>","</tbody></table>"],
2896td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
2897_default:[0,"",""]
2898};
2899wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;
2900wrapMap.th=wrapMap.td;
2901if(!support.option){
2902wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"];
2903}
2904function getAll(context,tag){
2905var ret;
2906if(typeof context.getElementsByTagName!=="undefined"){
2907ret=context.getElementsByTagName(tag||"*");
2908}else if(typeof context.querySelectorAll!=="undefined"){
2909ret=context.querySelectorAll(tag||"*");
2910}else{
2911ret=[];
2912}
2913if(tag===undefined||tag&&nodeName(context,tag)){
2914return jQuery.merge([context],ret);
2915}
2916return ret;
2917}
2918function setGlobalEval(elems,refElements){
2919var i=0,
2920l=elems.length;
2921for(;i<l;i++){
2922dataPriv.set(
2923elems[i],
2924"globalEval",
2925!refElements||dataPriv.get(refElements[i],"globalEval")
2926);
2927}
2928}
2929var rhtml=/<|&#?\w+;/;
2930function buildFragment(elems,context,scripts,selection,ignored){
2931var elem,tmp,tag,wrap,attached,j,
2932fragment=context.createDocumentFragment(),
2933nodes=[],
2934i=0,
2935l=elems.length;
2936for(;i<l;i++){
2937elem=elems[i];
2938if(elem||elem===0){
2939if(toType(elem)==="object"){
2940jQuery.merge(nodes,elem.nodeType?[elem]:elem);
2941}else if(!rhtml.test(elem)){
2942nodes.push(context.createTextNode(elem));
2943}else{
2944tmp=tmp||fragment.appendChild(context.createElement("div"));
2945tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();
2946wrap=wrapMap[tag]||wrapMap._default;
2947tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];
2948j=wrap[0];
2949while(j--){
2950tmp=tmp.lastChild;
2951}
2952jQuery.merge(nodes,tmp.childNodes);
2953tmp=fragment.firstChild;
2954tmp.textContent="";
2955}
2956}
2957}
2958fragment.textContent="";
2959i=0;
2960while((elem=nodes[i++])){
2961if(selection&&jQuery.inArray(elem,selection)>-1){
2962if(ignored){
2963ignored.push(elem);
2964}
2965continue;
2966}
2967attached=isAttached(elem);
2968tmp=getAll(fragment.appendChild(elem),"script");
2969if(attached){
2970setGlobalEval(tmp);
2971}
2972if(scripts){
2973j=0;
2974while((elem=tmp[j++])){
2975if(rscriptType.test(elem.type||"")){
2976scripts.push(elem);
2977}
2978}
2979}
2980}
2981return fragment;
2982}
2983var rtypenamespace=/^([^.]*)(?:\.(.+)|)/;
2984function returnTrue(){
2985return true;
2986}
2987function returnFalse(){
2988return false;
2989}
2990function on(elem,types,selector,data,fn,one){
2991var origFn,type;
2992if(typeof types==="object"){
2993if(typeof selector!=="string"){
2994data=data||selector;
2995selector=undefined;
2996}
2997for(type in types){
2998on(elem,type,selector,data,types[type],one);
2999}
3000return elem;
3001}
3002if(data==null&&fn==null){
3003fn=selector;
3004data=selector=undefined;
3005}else if(fn==null){
3006if(typeof selector==="string"){
3007fn=data;
3008data=undefined;
3009}else{
3010fn=data;
3011data=selector;
3012selector=undefined;
3013}
3014}
3015if(fn===false){
3016fn=returnFalse;
3017}else if(!fn){
3018return elem;
3019}
3020if(one===1){
3021origFn=fn;
3022fn=function(event){
3023jQuery().off(event);
3024return origFn.apply(this,arguments);
3025};
3026fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);
3027}
3028return elem.each(function(){
3029jQuery.event.add(this,types,fn,data,selector);
3030});
3031}
3032jQuery.event={
3033global:{},
3034add:function(elem,types,handler,data,selector){
3035var handleObjIn,eventHandle,tmp,
3036events,t,handleObj,
3037special,handlers,type,namespaces,origType,
3038elemData=dataPriv.get(elem);
3039if(!acceptData(elem)){
3040return;
3041}
3042if(handler.handler){
3043handleObjIn=handler;
3044handler=handleObjIn.handler;
3045selector=handleObjIn.selector;
3046}
3047if(selector){
3048jQuery.find.matchesSelector(documentElement,selector);
3049}
3050if(!handler.guid){
3051handler.guid=jQuery.guid++;
3052}
3053if(!(events=elemData.events)){
3054events=elemData.events=Object.create(null);
3055}
3056if(!(eventHandle=elemData.handle)){
3057eventHandle=elemData.handle=function(e){
3058return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?
3059jQuery.event.dispatch.apply(elem,arguments):undefined;
3060};
3061}
3062types=(types||"").match(rnothtmlwhite)||[""];
3063t=types.length;
3064while(t--){
3065tmp=rtypenamespace.exec(types[t])||[];
3066type=origType=tmp[1];
3067namespaces=(tmp[2]||"").split(".").sort();
3068if(!type){
3069continue;
3070}
3071special=jQuery.event.special[type]||{};
3072type=(selector?special.delegateType:special.bindType)||type;
3073special=jQuery.event.special[type]||{};
3074handleObj=jQuery.extend({
3075type:type,
3076origType:origType,
3077data:data,
3078handler:handler,
3079guid:handler.guid,
3080selector:selector,
3081needsContext:selector&&jQuery.expr.match.needsContext.test(selector),
3082namespace:namespaces.join(".")
3083},handleObjIn);
3084if(!(handlers=events[type])){
3085handlers=events[type]=[];
3086handlers.delegateCount=0;
3087if(!special.setup||
3088special.setup.call(elem,data,namespaces,eventHandle)===false){
3089if(elem.addEventListener){
3090elem.addEventListener(type,eventHandle);
3091}
3092}
3093}
3094if(special.add){
3095special.add.call(elem,handleObj);
3096if(!handleObj.handler.guid){
3097handleObj.handler.guid=handler.guid;
3098}
3099}
3100if(selector){
3101handlers.splice(handlers.delegateCount++,0,handleObj);
3102}else{
3103handlers.push(handleObj);
3104}
3105jQuery.event.global[type]=true;
3106}
3107},
3108remove:function(elem,types,handler,selector,mappedTypes){
3109var j,origCount,tmp,
3110events,t,handleObj,
3111special,handlers,type,namespaces,origType,
3112elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);
3113if(!elemData||!(events=elemData.events)){
3114return;
3115}
3116types=(types||"").match(rnothtmlwhite)||[""];
3117t=types.length;
3118while(t--){
3119tmp=rtypenamespace.exec(types[t])||[];
3120type=origType=tmp[1];
3121namespaces=(tmp[2]||"").split(".").sort();
3122if(!type){
3123for(type in events){
3124jQuery.event.remove(elem,type+types[t],handler,selector,true);
3125}
3126continue;
3127}
3128special=jQuery.event.special[type]||{};
3129type=(selector?special.delegateType:special.bindType)||type;
3130handlers=events[type]||[];
3131tmp=tmp[2]&&
3132new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");
3133origCount=j=handlers.length;
3134while(j--){
3135handleObj=handlers[j];
3136if((mappedTypes||origType===handleObj.origType)&&
3137(!handler||handler.guid===handleObj.guid)&&
3138(!tmp||tmp.test(handleObj.namespace))&&
3139(!selector||selector===handleObj.selector||
3140selector==="**"&&handleObj.selector)){
3141handlers.splice(j,1);
3142if(handleObj.selector){
3143handlers.delegateCount--;
3144}
3145if(special.remove){
3146special.remove.call(elem,handleObj);
3147}
3148}
3149}
3150if(origCount&&!handlers.length){
3151if(!special.teardown||
3152special.teardown.call(elem,namespaces,elemData.handle)===false){
3153jQuery.removeEvent(elem,type,elemData.handle);
3154}
3155delete events[type];
3156}
3157}
3158if(jQuery.isEmptyObject(events)){
3159dataPriv.remove(elem,"handle events");
3160}
3161},
3162dispatch:function(nativeEvent){
3163var i,j,ret,matched,handleObj,handlerQueue,
3164args=new Array(arguments.length),
3165event=jQuery.event.fix(nativeEvent),
3166handlers=(
3167dataPriv.get(this,"events")||Object.create(null)
3168)[event.type]||[],
3169special=jQuery.event.special[event.type]||{};
3170args[0]=event;
3171for(i=1;i<arguments.length;i++){
3172args[i]=arguments[i];
3173}
3174event.delegateTarget=this;
3175if(special.preDispatch&&special.preDispatch.call(this,event)===false){
3176return;
3177}
3178handlerQueue=jQuery.event.handlers.call(this,event,handlers);
3179i=0;
3180while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){
3181event.currentTarget=matched.elem;
3182j=0;
3183while((handleObj=matched.handlers[j++])&&
3184!event.isImmediatePropagationStopped()){
3185if(!event.rnamespace||handleObj.namespace===false||
3186event.rnamespace.test(handleObj.namespace)){
3187event.handleObj=handleObj;
3188event.data=handleObj.data;
3189ret=((jQuery.event.special[handleObj.origType]||{}).handle||
3190handleObj.handler).apply(matched.elem,args);
3191if(ret!==undefined){
3192if((event.result=ret)===false){
3193event.preventDefault();
3194event.stopPropagation();
3195}
3196}
3197}
3198}
3199}
3200if(special.postDispatch){
3201special.postDispatch.call(this,event);
3202}
3203return event.result;
3204},
3205handlers:function(event,handlers){
3206var i,handleObj,sel,matchedHandlers,matchedSelectors,
3207handlerQueue=[],
3208delegateCount=handlers.delegateCount,
3209cur=event.target;
3210if(delegateCount&&
3211cur.nodeType&&
3212!(event.type==="click"&&event.button>=1)){
3213for(;cur!==this;cur=cur.parentNode||this){
3214if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){
3215matchedHandlers=[];
3216matchedSelectors={};
3217for(i=0;i<delegateCount;i++){
3218handleObj=handlers[i];
3219sel=handleObj.selector+" ";
3220if(matchedSelectors[sel]===undefined){
3221matchedSelectors[sel]=handleObj.needsContext?
3222jQuery(sel,this).index(cur)>-1:
3223jQuery.find(sel,this,null,[cur]).length;
3224}
3225if(matchedSelectors[sel]){
3226matchedHandlers.push(handleObj);
3227}
3228}
3229if(matchedHandlers.length){
3230handlerQueue.push({elem:cur,handlers:matchedHandlers});
3231}
3232}
3233}
3234}
3235cur=this;
3236if(delegateCount<handlers.length){
3237handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)});
3238}
3239return handlerQueue;
3240},
3241addProp:function(name,hook){
3242Object.defineProperty(jQuery.Event.prototype,name,{
3243enumerable:true,
3244configurable:true,
3245get:isFunction(hook)?
3246function(){
3247if(this.originalEvent){
3248return hook(this.originalEvent);
3249}
3250}:
3251function(){
3252if(this.originalEvent){
3253return this.originalEvent[name];
3254}
3255},
3256set:function(value){
3257Object.defineProperty(this,name,{
3258enumerable:true,
3259configurable:true,
3260writable:true,
3261value:value
3262});
3263}
3264});
3265},
3266fix:function(originalEvent){
3267return originalEvent[jQuery.expando]?
3268originalEvent:
3269new jQuery.Event(originalEvent);
3270},
3271special:{
3272load:{
3273noBubble:true
3274},
3275click:{
3276setup:function(data){
3277var el=this||data;
3278if(rcheckableType.test(el.type)&&
3279el.click&&nodeName(el,"input")){
3280leverageNative(el,"click",true);
3281}
3282return false;
3283},
3284trigger:function(data){
3285var el=this||data;
3286if(rcheckableType.test(el.type)&&
3287el.click&&nodeName(el,"input")){
3288leverageNative(el,"click");
3289}
3290return true;
3291},
3292_default:function(event){
3293var target=event.target;
3294return rcheckableType.test(target.type)&&
3295target.click&&nodeName(target,"input")&&
3296dataPriv.get(target,"click")||
3297nodeName(target,"a");
3298}
3299},
3300beforeunload:{
3301postDispatch:function(event){
3302if(event.result!==undefined&&event.originalEvent){
3303event.originalEvent.returnValue=event.result;
3304}
3305}
3306}
3307}
3308};
3309function leverageNative(el,type,isSetup){
3310if(!isSetup){
3311if(dataPriv.get(el,type)===undefined){
3312jQuery.event.add(el,type,returnTrue);
3313}
3314return;
3315}
3316dataPriv.set(el,type,false);
3317jQuery.event.add(el,type,{
3318namespace:false,
3319handler:function(event){
3320var result,
3321saved=dataPriv.get(this,type);
3322if((event.isTrigger&1)&&this[type]){
3323if(!saved){
3324saved=slice.call(arguments);
3325dataPriv.set(this,type,saved);
3326this[type]();
3327result=dataPriv.get(this,type);
3328dataPriv.set(this,type,false);
3329if(saved!==result){
3330event.stopImmediatePropagation();
3331event.preventDefault();
3332return result;
3333}
3334}else if((jQuery.event.special[type]||{}).delegateType){
3335event.stopPropagation();
3336}
3337}else if(saved){
3338dataPriv.set(this,type,jQuery.event.trigger(
3339saved[0],
3340saved.slice(1),
3341this
3342));
3343event.stopPropagation();
3344event.isImmediatePropagationStopped=returnTrue;
3345}
3346}
3347});
3348}
3349jQuery.removeEvent=function(elem,type,handle){
3350if(elem.removeEventListener){
3351elem.removeEventListener(type,handle);
3352}
3353};
3354jQuery.Event=function(src,props){
3355if(!(this instanceof jQuery.Event)){
3356return new jQuery.Event(src,props);
3357}
3358if(src&&src.type){
3359this.originalEvent=src;
3360this.type=src.type;
3361this.isDefaultPrevented=src.defaultPrevented||
3362src.defaultPrevented===undefined&&
3363src.returnValue===false?
3364returnTrue:
3365returnFalse;
3366this.target=(src.target&&src.target.nodeType===3)?
3367src.target.parentNode:
3368src.target;
3369this.currentTarget=src.currentTarget;
3370this.relatedTarget=src.relatedTarget;
3371}else{
3372this.type=src;
3373}
3374if(props){
3375jQuery.extend(this,props);
3376}
3377this.timeStamp=src&&src.timeStamp||Date.now();
3378this[jQuery.expando]=true;
3379};
3380jQuery.Event.prototype={
3381constructor:jQuery.Event,
3382isDefaultPrevented:returnFalse,
3383isPropagationStopped:returnFalse,
3384isImmediatePropagationStopped:returnFalse,
3385isSimulated:false,
3386preventDefault:function(){
3387var e=this.originalEvent;
3388this.isDefaultPrevented=returnTrue;
3389if(e&&!this.isSimulated){
3390e.preventDefault();
3391}
3392},
3393stopPropagation:function(){
3394var e=this.originalEvent;
3395this.isPropagationStopped=returnTrue;
3396if(e&&!this.isSimulated){
3397e.stopPropagation();
3398}
3399},
3400stopImmediatePropagation:function(){
3401var e=this.originalEvent;
3402this.isImmediatePropagationStopped=returnTrue;
3403if(e&&!this.isSimulated){
3404e.stopImmediatePropagation();
3405}
3406this.stopPropagation();
3407}
3408};
3409jQuery.each({
3410altKey:true,
3411bubbles:true,
3412cancelable:true,
3413changedTouches:true,
3414ctrlKey:true,
3415detail:true,
3416eventPhase:true,
3417metaKey:true,
3418pageX:true,
3419pageY:true,
3420shiftKey:true,
3421view:true,
3422"char":true,
3423code:true,
3424charCode:true,
3425key:true,
3426keyCode:true,
3427button:true,
3428buttons:true,
3429clientX:true,
3430clientY:true,
3431offsetX:true,
3432offsetY:true,
3433pointerId:true,
3434pointerType:true,
3435screenX:true,
3436screenY:true,
3437targetTouches:true,
3438toElement:true,
3439touches:true,
3440which:true
3441},jQuery.event.addProp);
3442jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){
3443function focusMappedHandler(nativeEvent){
3444if(document.documentMode){
3445var handle=dataPriv.get(this,"handle"),
3446event=jQuery.event.fix(nativeEvent);
3447event.type=nativeEvent.type==="focusin"?"focus":"blur";
3448event.isSimulated=true;
3449handle(nativeEvent);
3450if(event.target===event.currentTarget){
3451handle(event);
3452}
3453}else{
3454jQuery.event.simulate(delegateType,nativeEvent.target,
3455jQuery.event.fix(nativeEvent));
3456}
3457}
3458jQuery.event.special[type]={
3459setup:function(){
3460var attaches;
3461leverageNative(this,type,true);
3462if(document.documentMode){
3463attaches=dataPriv.get(this,delegateType);
3464if(!attaches){
3465this.addEventListener(delegateType,focusMappedHandler);
3466}
3467dataPriv.set(this,delegateType,(attaches||0)+1);
3468}else{
3469return false;
3470}
3471},
3472trigger:function(){
3473leverageNative(this,type);
3474return true;
3475},
3476teardown:function(){
3477var attaches;
3478if(document.documentMode){
3479attaches=dataPriv.get(this,delegateType)-1;
3480if(!attaches){
3481this.removeEventListener(delegateType,focusMappedHandler);
3482dataPriv.remove(this,delegateType);
3483}else{
3484dataPriv.set(this,delegateType,attaches);
3485}
3486}else{
3487return false;
3488}
3489},
3490_default:function(event){
3491return dataPriv.get(event.target,type);
3492},
3493delegateType:delegateType
3494};
3495jQuery.event.special[delegateType]={
3496setup:function(){
3497var doc=this.ownerDocument||this.document||this,
3498dataHolder=document.documentMode?this:doc,
3499attaches=dataPriv.get(dataHolder,delegateType);
3500if(!attaches){
3501if(document.documentMode){
3502this.addEventListener(delegateType,focusMappedHandler);
3503}else{
3504doc.addEventListener(type,focusMappedHandler,true);
3505}
3506}
3507dataPriv.set(dataHolder,delegateType,(attaches||0)+1);
3508},
3509teardown:function(){
3510var doc=this.ownerDocument||this.document||this,
3511dataHolder=document.documentMode?this:doc,
3512attaches=dataPriv.get(dataHolder,delegateType)-1;
3513if(!attaches){
3514if(document.documentMode){
3515this.removeEventListener(delegateType,focusMappedHandler);
3516}else{
3517doc.removeEventListener(type,focusMappedHandler,true);
3518}
3519dataPriv.remove(dataHolder,delegateType);
3520}else{
3521dataPriv.set(dataHolder,delegateType,attaches);
3522}
3523}
3524};
3525});
3526jQuery.each({
3527mouseenter:"mouseover",
3528mouseleave:"mouseout",
3529pointerenter:"pointerover",
3530pointerleave:"pointerout"
3531},function(orig,fix){
3532jQuery.event.special[orig]={
3533delegateType:fix,
3534bindType:fix,
3535handle:function(event){
3536var ret,
3537target=this,
3538related=event.relatedTarget,
3539handleObj=event.handleObj;
3540if(!related||(related!==target&&!jQuery.contains(target,related))){
3541event.type=handleObj.origType;
3542ret=handleObj.handler.apply(this,arguments);
3543event.type=fix;
3544}
3545return ret;
3546}
3547};
3548});
3549jQuery.fn.extend({
3550on:function(types,selector,data,fn){
3551return on(this,types,selector,data,fn);
3552},
3553one:function(types,selector,data,fn){
3554return on(this,types,selector,data,fn,1);
3555},
3556off:function(types,selector,fn){
3557var handleObj,type;
3558if(types&&types.preventDefault&&types.handleObj){
3559handleObj=types.handleObj;
3560jQuery(types.delegateTarget).off(
3561handleObj.namespace?
3562handleObj.origType+"."+handleObj.namespace:
3563handleObj.origType,
3564handleObj.selector,
3565handleObj.handler
3566);
3567return this;
3568}
3569if(typeof types==="object"){
3570for(type in types){
3571this.off(type,selector,types[type]);
3572}
3573return this;
3574}
3575if(selector===false||typeof selector==="function"){
3576fn=selector;
3577selector=undefined;
3578}
3579if(fn===false){
3580fn=returnFalse;
3581}
3582return this.each(function(){
3583jQuery.event.remove(this,types,fn,selector);
3584});
3585}
3586});
3587var
3588rnoInnerhtml=/<script|<style|<link/i,
3589rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,
3590rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g;
3591function manipulationTarget(elem,content){
3592if(nodeName(elem,"table")&&
3593nodeName(content.nodeType!==11?content:content.firstChild,"tr")){
3594return jQuery(elem).children("tbody")[0]||elem;
3595}
3596return elem;
3597}
3598function disableScript(elem){
3599elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;
3600return elem;
3601}
3602function restoreScript(elem){
3603if((elem.type||"").slice(0,5)==="true/"){
3604elem.type=elem.type.slice(5);
3605}else{
3606elem.removeAttribute("type");
3607}
3608return elem;
3609}
3610function cloneCopyEvent(src,dest){
3611var i,l,type,pdataOld,udataOld,udataCur,events;
3612if(dest.nodeType!==1){
3613return;
3614}
3615if(dataPriv.hasData(src)){
3616pdataOld=dataPriv.get(src);
3617events=pdataOld.events;
3618if(events){
3619dataPriv.remove(dest,"handle events");
3620for(type in events){
3621for(i=0,l=events[type].length;i<l;i++){
3622jQuery.event.add(dest,type,events[type][i]);
3623}
3624}
3625}
3626}
3627if(dataUser.hasData(src)){
3628udataOld=dataUser.access(src);
3629udataCur=jQuery.extend({},udataOld);
3630dataUser.set(dest,udataCur);
3631}
3632}
3633function fixInput(src,dest){
3634var nodeName=dest.nodeName.toLowerCase();
3635if(nodeName==="input"&&rcheckableType.test(src.type)){
3636dest.checked=src.checked;
3637}else if(nodeName==="input"||nodeName==="textarea"){
3638dest.defaultValue=src.defaultValue;
3639}
3640}
3641function domManip(collection,args,callback,ignored){
3642args=flat(args);
3643var fragment,first,scripts,hasScripts,node,doc,
3644i=0,
3645l=collection.length,
3646iNoClone=l-1,
3647value=args[0],
3648valueIsFunction=isFunction(value);
3649if(valueIsFunction||
3650(l>1&&typeof value==="string"&&
3651!support.checkClone&&rchecked.test(value))){
3652return collection.each(function(index){
3653var self=collection.eq(index);
3654if(valueIsFunction){
3655args[0]=value.call(this,index,self.html());
3656}
3657domManip(self,args,callback,ignored);
3658});
3659}
3660if(l){
3661fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);
3662first=fragment.firstChild;
3663if(fragment.childNodes.length===1){
3664fragment=first;
3665}
3666if(first||ignored){
3667scripts=jQuery.map(getAll(fragment,"script"),disableScript);
3668hasScripts=scripts.length;
3669for(;i<l;i++){
3670node=fragment;
3671if(i!==iNoClone){
3672node=jQuery.clone(node,true,true);
3673if(hasScripts){
3674jQuery.merge(scripts,getAll(node,"script"));
3675}
3676}
3677callback.call(collection[i],node,i);
3678}
3679if(hasScripts){
3680doc=scripts[scripts.length-1].ownerDocument;
3681jQuery.map(scripts,restoreScript);
3682for(i=0;i<hasScripts;i++){
3683node=scripts[i];
3684if(rscriptType.test(node.type||"")&&
3685!dataPriv.access(node,"globalEval")&&
3686jQuery.contains(doc,node)){
3687if(node.src&&(node.type||"").toLowerCase()!=="module"){
3688if(jQuery._evalUrl&&!node.noModule){
3689jQuery._evalUrl(node.src,{
3690nonce:node.nonce||node.getAttribute("nonce")
3691},doc);
3692}
3693}else{
3694DOMEval(node.textContent.replace(rcleanScript,""),node,doc);
3695}
3696}
3697}
3698}
3699}
3700}
3701return collection;
3702}
3703function remove(elem,selector,keepData){
3704var node,
3705nodes=selector?jQuery.filter(selector,elem):elem,
3706i=0;
3707for(;(node=nodes[i])!=null;i++){
3708if(!keepData&&node.nodeType===1){
3709jQuery.cleanData(getAll(node));
3710}
3711if(node.parentNode){
3712if(keepData&&isAttached(node)){
3713setGlobalEval(getAll(node,"script"));
3714}
3715node.parentNode.removeChild(node);
3716}
3717}
3718return elem;
3719}
3720jQuery.extend({
3721htmlPrefilter:function(html){
3722return html;
3723},
3724clone:function(elem,dataAndEvents,deepDataAndEvents){
3725var i,l,srcElements,destElements,
3726clone=elem.cloneNode(true),
3727inPage=isAttached(elem);
3728if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&
3729!jQuery.isXMLDoc(elem)){
3730destElements=getAll(clone);
3731srcElements=getAll(elem);
3732for(i=0,l=srcElements.length;i<l;i++){
3733fixInput(srcElements[i],destElements[i]);
3734}
3735}
3736if(dataAndEvents){
3737if(deepDataAndEvents){
3738srcElements=srcElements||getAll(elem);
3739destElements=destElements||getAll(clone);
3740for(i=0,l=srcElements.length;i<l;i++){
3741cloneCopyEvent(srcElements[i],destElements[i]);
3742}
3743}else{
3744cloneCopyEvent(elem,clone);
3745}
3746}
3747destElements=getAll(clone,"script");
3748if(destElements.length>0){
3749setGlobalEval(destElements,!inPage&&getAll(elem,"script"));
3750}
3751return clone;
3752},
3753cleanData:function(elems){
3754var data,elem,type,
3755special=jQuery.event.special,
3756i=0;
3757for(;(elem=elems[i])!==undefined;i++){
3758if(acceptData(elem)){
3759if((data=elem[dataPriv.expando])){
3760if(data.events){
3761for(type in data.events){
3762if(special[type]){
3763jQuery.event.remove(elem,type);
3764}else{
3765jQuery.removeEvent(elem,type,data.handle);
3766}
3767}
3768}
3769elem[dataPriv.expando]=undefined;
3770}
3771if(elem[dataUser.expando]){
3772elem[dataUser.expando]=undefined;
3773}
3774}
3775}
3776}
3777});
3778jQuery.fn.extend({
3779detach:function(selector){
3780return remove(this,selector,true);
3781},
3782remove:function(selector){
3783return remove(this,selector);
3784},
3785text:function(value){
3786return access(this,function(value){
3787return value===undefined?
3788jQuery.text(this):
3789this.empty().each(function(){
3790if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3791this.textContent=value;
3792}
3793});
3794},null,value,arguments.length);
3795},
3796append:function(){
3797return domManip(this,arguments,function(elem){
3798if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3799var target=manipulationTarget(this,elem);
3800target.appendChild(elem);
3801}
3802});
3803},
3804prepend:function(){
3805return domManip(this,arguments,function(elem){
3806if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3807var target=manipulationTarget(this,elem);
3808target.insertBefore(elem,target.firstChild);
3809}
3810});
3811},
3812before:function(){
3813return domManip(this,arguments,function(elem){
3814if(this.parentNode){
3815this.parentNode.insertBefore(elem,this);
3816}
3817});
3818},
3819after:function(){
3820return domManip(this,arguments,function(elem){
3821if(this.parentNode){
3822this.parentNode.insertBefore(elem,this.nextSibling);
3823}
3824});
3825},
3826empty:function(){
3827var elem,
3828i=0;
3829for(;(elem=this[i])!=null;i++){
3830if(elem.nodeType===1){
3831jQuery.cleanData(getAll(elem,false));
3832elem.textContent="";
3833}
3834}
3835return this;
3836},
3837clone:function(dataAndEvents,deepDataAndEvents){
3838dataAndEvents=dataAndEvents==null?false:dataAndEvents;
3839deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;
3840return this.map(function(){
3841return jQuery.clone(this,dataAndEvents,deepDataAndEvents);
3842});
3843},
3844html:function(value){
3845return access(this,function(value){
3846var elem=this[0]||{},
3847i=0,
3848l=this.length;
3849if(value===undefined&&elem.nodeType===1){
3850return elem.innerHTML;
3851}
3852if(typeof value==="string"&&!rnoInnerhtml.test(value)&&
3853!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){
3854value=jQuery.htmlPrefilter(value);
3855try{
3856for(;i<l;i++){
3857elem=this[i]||{};
3858if(elem.nodeType===1){
3859jQuery.cleanData(getAll(elem,false));
3860elem.innerHTML=value;
3861}
3862}
3863elem=0;
3864}catch(e){}
3865}
3866if(elem){
3867this.empty().append(value);
3868}
3869},null,value,arguments.length);
3870},
3871replaceWith:function(){
3872var ignored=[];
3873return domManip(this,arguments,function(elem){
3874var parent=this.parentNode;
3875if(jQuery.inArray(this,ignored)<0){
3876jQuery.cleanData(getAll(this));
3877if(parent){
3878parent.replaceChild(elem,this);
3879}
3880}
3881},ignored);
3882}
3883});
3884jQuery.each({
3885appendTo:"append",
3886prependTo:"prepend",
3887insertBefore:"before",
3888insertAfter:"after",
3889replaceAll:"replaceWith"
3890},function(name,original){
3891jQuery.fn[name]=function(selector){
3892var elems,
3893ret=[],
3894insert=jQuery(selector),
3895last=insert.length-1,
3896i=0;
3897for(;i<=last;i++){
3898elems=i===last?this:this.clone(true);
3899jQuery(insert[i])[original](elems);
3900push.apply(ret,elems.get());
3901}
3902return this.pushStack(ret);
3903};
3904});
3905var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");
3906var rcustomProp=/^--/;
3907var getStyles=function(elem){
3908var view=elem.ownerDocument.defaultView;
3909if(!view||!view.opener){
3910view=window;
3911}
3912return view.getComputedStyle(elem);
3913};
3914var swap=function(elem,options,callback){
3915var ret,name,
3916old={};
3917for(name in options){
3918old[name]=elem.style[name];
3919elem.style[name]=options[name];
3920}
3921ret=callback.call(elem);
3922for(name in options){
3923elem.style[name]=old[name];
3924}
3925return ret;
3926};
3927var rboxStyle=new RegExp(cssExpand.join("|"),"i");
3928(function(){
3929function computeStyleTests(){
3930if(!div){
3931return;
3932}
3933container.style.cssText="position:absolute;left:-11111px;width:60px;"+
3934"margin-top:1px;padding:0;border:0";
3935div.style.cssText=
3936"position:relative;display:block;box-sizing:border-box;overflow:scroll;"+
3937"margin:auto;border:1px;padding:1px;"+
3938"width:60%;top:1%";
3939documentElement.appendChild(container).appendChild(div);
3940var divStyle=window.getComputedStyle(div);
3941pixelPositionVal=divStyle.top!=="1%";
3942reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;
3943div.style.right="60%";
3944pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;
3945boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;
3946div.style.position="absolute";
3947scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12;
3948documentElement.removeChild(container);
3949div=null;
3950}
3951function roundPixelMeasures(measure){
3952return Math.round(parseFloat(measure));
3953}
3954var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,
3955reliableTrDimensionsVal,reliableMarginLeftVal,
3956container=document.createElement("div"),
3957div=document.createElement("div");
3958if(!div.style){
3959return;
3960}
3961div.style.backgroundClip="content-box";
3962div.cloneNode(true).style.backgroundClip="";
3963support.clearCloneStyle=div.style.backgroundClip==="content-box";
3964jQuery.extend(support,{
3965boxSizingReliable:function(){
3966computeStyleTests();
3967return boxSizingReliableVal;
3968},
3969pixelBoxStyles:function(){
3970computeStyleTests();
3971return pixelBoxStylesVal;
3972},
3973pixelPosition:function(){
3974computeStyleTests();
3975return pixelPositionVal;
3976},
3977reliableMarginLeft:function(){
3978computeStyleTests();
3979return reliableMarginLeftVal;
3980},
3981scrollboxSize:function(){
3982computeStyleTests();
3983return scrollboxSizeVal;
3984},
3985reliableTrDimensions:function(){
3986var table,tr,trChild,trStyle;
3987if(reliableTrDimensionsVal==null){
3988table=document.createElement("table");
3989tr=document.createElement("tr");
3990trChild=document.createElement("div");
3991table.style.cssText="position:absolute;left:-11111px;border-collapse:separate";
3992tr.style.cssText="box-sizing:content-box;border:1px solid";
3993tr.style.height="1px";
3994trChild.style.height="9px";
3995trChild.style.display="block";
3996documentElement
3997.appendChild(table)
3998.appendChild(tr)
3999.appendChild(trChild);
4000trStyle=window.getComputedStyle(tr);
4001reliableTrDimensionsVal=(parseInt(trStyle.height,10)+
4002parseInt(trStyle.borderTopWidth,10)+
4003parseInt(trStyle.borderBottomWidth,10))===tr.offsetHeight;
4004documentElement.removeChild(table);
4005}
4006return reliableTrDimensionsVal;
4007}
4008});
4009})();
4010function curCSS(elem,name,computed){
4011var width,minWidth,maxWidth,ret,
4012isCustomProp=rcustomProp.test(name),
4013style=elem.style;
4014computed=computed||getStyles(elem);
4015if(computed){
4016ret=computed.getPropertyValue(name)||computed[name];
4017if(isCustomProp&&ret){
4018ret=ret.replace(rtrimCSS,"$1")||undefined;
4019}
4020if(ret===""&&!isAttached(elem)){
4021ret=jQuery.style(elem,name);
4022}
4023if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){
4024width=style.width;
4025minWidth=style.minWidth;
4026maxWidth=style.maxWidth;
4027style.minWidth=style.maxWidth=style.width=ret;
4028ret=computed.width;
4029style.width=width;
4030style.minWidth=minWidth;
4031style.maxWidth=maxWidth;
4032}
4033}
4034return ret!==undefined?
4035ret+"":
4036ret;
4037}
4038function addGetHookIf(conditionFn,hookFn){
4039return{
4040get:function(){
4041if(conditionFn()){
4042delete this.get;
4043return;
4044}
4045return(this.get=hookFn).apply(this,arguments);
4046}
4047};
4048}
4049var cssPrefixes=["Webkit","Moz","ms"],
4050emptyStyle=document.createElement("div").style,
4051vendorProps={};
4052function vendorPropName(name){
4053var capName=name[0].toUpperCase()+name.slice(1),
4054i=cssPrefixes.length;
4055while(i--){
4056name=cssPrefixes[i]+capName;
4057if(name in emptyStyle){
4058return name;
4059}
4060}
4061}
4062function finalPropName(name){
4063var final=jQuery.cssProps[name]||vendorProps[name];
4064if(final){
4065return final;
4066}
4067if(name in emptyStyle){
4068return name;
4069}
4070return vendorProps[name]=vendorPropName(name)||name;
4071}
4072var
4073rdisplayswap=/^(none|table(?!-c[ea]).+)/,
4074cssShow={position:"absolute",visibility:"hidden",display:"block"},
4075cssNormalTransform={
4076letterSpacing:"0",
4077fontWeight:"400"
4078};
4079function setPositiveNumber(_elem,value,subtract){
4080var matches=rcssNum.exec(value);
4081return matches?
4082Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):
4083value;
4084}
4085function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){
4086var i=dimension==="width"?1:0,
4087extra=0,
4088delta=0,
4089marginDelta=0;
4090if(box===(isBorderBox?"border":"content")){
4091return 0;
4092}
4093for(;i<4;i+=2){
4094if(box==="margin"){
4095marginDelta+=jQuery.css(elem,box+cssExpand[i],true,styles);
4096}
4097if(!isBorderBox){
4098delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
4099if(box!=="padding"){
4100delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4101}else{
4102extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4103}
4104}else{
4105if(box==="content"){
4106delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
4107}
4108if(box!=="margin"){
4109delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4110}
4111}
4112}
4113if(!isBorderBox&&computedVal>=0){
4114delta+=Math.max(0,Math.ceil(
4115elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
4116computedVal-
4117delta-
4118extra-
41190.5
4120))||0;
4121}
4122return delta+marginDelta;
4123}
4124function getWidthOrHeight(elem,dimension,extra){
4125var styles=getStyles(elem),
4126boxSizingNeeded=!support.boxSizingReliable()||extra,
4127isBorderBox=boxSizingNeeded&&
4128jQuery.css(elem,"boxSizing",false,styles)==="border-box",
4129valueIsBorderBox=isBorderBox,
4130val=curCSS(elem,dimension,styles),
4131offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);
4132if(rnumnonpx.test(val)){
4133if(!extra){
4134return val;
4135}
4136val="auto";
4137}
4138if((!support.boxSizingReliable()&&isBorderBox||
4139!support.reliableTrDimensions()&&nodeName(elem,"tr")||
4140val==="auto"||
4141!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline")&&
4142elem.getClientRects().length){
4143isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";
4144valueIsBorderBox=offsetProp in elem;
4145if(valueIsBorderBox){
4146val=elem[offsetProp];
4147}
4148}
4149val=parseFloat(val)||0;
4150return(val+
4151boxModelAdjustment(
4152elem,
4153dimension,
4154extra||(isBorderBox?"border":"content"),
4155valueIsBorderBox,
4156styles,
4157val
4158)
4159)+"px";
4160}
4161jQuery.extend({
4162cssHooks:{
4163opacity:{
4164get:function(elem,computed){
4165if(computed){
4166var ret=curCSS(elem,"opacity");
4167return ret===""?"1":ret;
4168}
4169}
4170}
4171},
4172cssNumber:{
4173animationIterationCount:true,
4174aspectRatio:true,
4175borderImageSlice:true,
4176columnCount:true,
4177flexGrow:true,
4178flexShrink:true,
4179fontWeight:true,
4180gridArea:true,
4181gridColumn:true,
4182gridColumnEnd:true,
4183gridColumnStart:true,
4184gridRow:true,
4185gridRowEnd:true,
4186gridRowStart:true,
4187lineHeight:true,
4188opacity:true,
4189order:true,
4190orphans:true,
4191scale:true,
4192widows:true,
4193zIndex:true,
4194zoom:true,
4195fillOpacity:true,
4196floodOpacity:true,
4197stopOpacity:true,
4198strokeMiterlimit:true,
4199strokeOpacity:true
4200},
4201cssProps:{},
4202style:function(elem,name,value,extra){
4203if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){
4204return;
4205}
4206var ret,type,hooks,
4207origName=camelCase(name),
4208isCustomProp=rcustomProp.test(name),
4209style=elem.style;
4210if(!isCustomProp){
4211name=finalPropName(origName);
4212}
4213hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
4214if(value!==undefined){
4215type=typeof value;
4216if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){
4217value=adjustCSS(elem,name,ret);
4218type="number";
4219}
4220if(value==null||value!==value){
4221return;
4222}
4223if(type==="number"&&!isCustomProp){
4224value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");
4225}
4226if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){
4227style[name]="inherit";
4228}
4229if(!hooks||!("set"in hooks)||
4230(value=hooks.set(elem,value,extra))!==undefined){
4231if(isCustomProp){
4232style.setProperty(name,value);
4233}else{
4234style[name]=value;
4235}
4236}
4237}else{
4238if(hooks&&"get"in hooks&&
4239(ret=hooks.get(elem,false,extra))!==undefined){
4240return ret;
4241}
4242return style[name];
4243}
4244},
4245css:function(elem,name,extra,styles){
4246var val,num,hooks,
4247origName=camelCase(name),
4248isCustomProp=rcustomProp.test(name);
4249if(!isCustomProp){
4250name=finalPropName(origName);
4251}
4252hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
4253if(hooks&&"get"in hooks){
4254val=hooks.get(elem,true,extra);
4255}
4256if(val===undefined){
4257val=curCSS(elem,name,styles);
4258}
4259if(val==="normal"&&name in cssNormalTransform){
4260val=cssNormalTransform[name];
4261}
4262if(extra===""||extra){
4263num=parseFloat(val);
4264return extra===true||isFinite(num)?num||0:val;
4265}
4266return val;
4267}
4268});
4269jQuery.each(["height","width"],function(_i,dimension){
4270jQuery.cssHooks[dimension]={
4271get:function(elem,computed,extra){
4272if(computed){
4273return rdisplayswap.test(jQuery.css(elem,"display"))&&
4274(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?
4275swap(elem,cssShow,function(){
4276return getWidthOrHeight(elem,dimension,extra);
4277}):
4278getWidthOrHeight(elem,dimension,extra);
4279}
4280},
4281set:function(elem,value,extra){
4282var matches,
4283styles=getStyles(elem),
4284scrollboxSizeBuggy=!support.scrollboxSize()&&
4285styles.position==="absolute",
4286boxSizingNeeded=scrollboxSizeBuggy||extra,
4287isBorderBox=boxSizingNeeded&&
4288jQuery.css(elem,"boxSizing",false,styles)==="border-box",
4289subtract=extra?
4290boxModelAdjustment(
4291elem,
4292dimension,
4293extra,
4294isBorderBox,
4295styles
4296):
42970;
4298if(isBorderBox&&scrollboxSizeBuggy){
4299subtract-=Math.ceil(
4300elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
4301parseFloat(styles[dimension])-
4302boxModelAdjustment(elem,dimension,"border",false,styles)-
43030.5
4304);
4305}
4306if(subtract&&(matches=rcssNum.exec(value))&&
4307(matches[3]||"px")!=="px"){
4308elem.style[dimension]=value;
4309value=jQuery.css(elem,dimension);
4310}
4311return setPositiveNumber(elem,value,subtract);
4312}
4313};
4314});
4315jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,
4316function(elem,computed){
4317if(computed){
4318return(parseFloat(curCSS(elem,"marginLeft"))||
4319elem.getBoundingClientRect().left-
4320swap(elem,{marginLeft:0},function(){
4321return elem.getBoundingClientRect().left;
4322})
4323)+"px";
4324}
4325}
4326);
4327jQuery.each({
4328margin:"",
4329padding:"",
4330border:"Width"
4331},function(prefix,suffix){
4332jQuery.cssHooks[prefix+suffix]={
4333expand:function(value){
4334var i=0,
4335expanded={},
4336parts=typeof value==="string"?value.split(" "):[value];
4337for(;i<4;i++){
4338expanded[prefix+cssExpand[i]+suffix]=
4339parts[i]||parts[i-2]||parts[0];
4340}
4341return expanded;
4342}
4343};
4344if(prefix!=="margin"){
4345jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;
4346}
4347});
4348jQuery.fn.extend({
4349css:function(name,value){
4350return access(this,function(elem,name,value){
4351var styles,len,
4352map={},
4353i=0;
4354if(Array.isArray(name)){
4355styles=getStyles(elem);
4356len=name.length;
4357for(;i<len;i++){
4358map[name[i]]=jQuery.css(elem,name[i],false,styles);
4359}
4360return map;
4361}
4362return value!==undefined?
4363jQuery.style(elem,name,value):
4364jQuery.css(elem,name);
4365},name,value,arguments.length>1);
4366}
4367});
4368function Tween(elem,options,prop,end,easing){
4369return new Tween.prototype.init(elem,options,prop,end,easing);
4370}
4371jQuery.Tween=Tween;
4372Tween.prototype={
4373constructor:Tween,
4374init:function(elem,options,prop,end,easing,unit){
4375this.elem=elem;
4376this.prop=prop;
4377this.easing=easing||jQuery.easing._default;
4378this.options=options;
4379this.start=this.now=this.cur();
4380this.end=end;
4381this.unit=unit||(jQuery.cssNumber[prop]?"":"px");
4382},
4383cur:function(){
4384var hooks=Tween.propHooks[this.prop];
4385return hooks&&hooks.get?
4386hooks.get(this):
4387Tween.propHooks._default.get(this);
4388},
4389run:function(percent){
4390var eased,
4391hooks=Tween.propHooks[this.prop];
4392if(this.options.duration){
4393this.pos=eased=jQuery.easing[this.easing](
4394percent,this.options.duration*percent,0,1,this.options.duration
4395);
4396}else{
4397this.pos=eased=percent;
4398}
4399this.now=(this.end-this.start)*eased+this.start;
4400if(this.options.step){
4401this.options.step.call(this.elem,this.now,this);
4402}
4403if(hooks&&hooks.set){
4404hooks.set(this);
4405}else{
4406Tween.propHooks._default.set(this);
4407}
4408return this;
4409}
4410};
4411Tween.prototype.init.prototype=Tween.prototype;
4412Tween.propHooks={
4413_default:{
4414get:function(tween){
4415var result;
4416if(tween.elem.nodeType!==1||
4417tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){
4418return tween.elem[tween.prop];
4419}
4420result=jQuery.css(tween.elem,tween.prop,"");
4421return!result||result==="auto"?0:result;
4422},
4423set:function(tween){
4424if(jQuery.fx.step[tween.prop]){
4425jQuery.fx.step[tween.prop](tween);
4426}else if(tween.elem.nodeType===1&&(
4427jQuery.cssHooks[tween.prop]||
4428tween.elem.style[finalPropName(tween.prop)]!=null)){
4429jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);
4430}else{
4431tween.elem[tween.prop]=tween.now;
4432}
4433}
4434}
4435};
4436Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={
4437set:function(tween){
4438if(tween.elem.nodeType&&tween.elem.parentNode){
4439tween.elem[tween.prop]=tween.now;
4440}
4441}
4442};
4443jQuery.easing={
4444linear:function(p){
4445return p;
4446},
4447swing:function(p){
4448return 0.5-Math.cos(p*Math.PI)/2;
4449},
4450_default:"swing"
4451};
4452jQuery.fx=Tween.prototype.init;
4453jQuery.fx.step={};
4454var
4455fxNow,inProgress,
4456rfxtypes=/^(?:toggle|show|hide)$/,
4457rrun=/queueHooks$/;
4458function schedule(){
4459if(inProgress){
4460if(document.hidden===false&&window.requestAnimationFrame){
4461window.requestAnimationFrame(schedule);
4462}else{
4463window.setTimeout(schedule,jQuery.fx.interval);
4464}
4465jQuery.fx.tick();
4466}
4467}
4468function createFxNow(){
4469window.setTimeout(function(){
4470fxNow=undefined;
4471});
4472return(fxNow=Date.now());
4473}
4474function genFx(type,includeWidth){
4475var which,
4476i=0,
4477attrs={height:type};
4478includeWidth=includeWidth?1:0;
4479for(;i<4;i+=2-includeWidth){
4480which=cssExpand[i];
4481attrs["margin"+which]=attrs["padding"+which]=type;
4482}
4483if(includeWidth){
4484attrs.opacity=attrs.width=type;
4485}
4486return attrs;
4487}
4488function createTween(value,prop,animation){
4489var tween,
4490collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),
4491index=0,
4492length=collection.length;
4493for(;index<length;index++){
4494if((tween=collection[index].call(animation,prop,value))){
4495return tween;
4496}
4497}
4498}
4499function defaultPrefilter(elem,props,opts){
4500var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,
4501isBox="width"in props||"height"in props,
4502anim=this,
4503orig={},
4504style=elem.style,
4505hidden=elem.nodeType&&isHiddenWithinTree(elem),
4506dataShow=dataPriv.get(elem,"fxshow");
4507if(!opts.queue){
4508hooks=jQuery._queueHooks(elem,"fx");
4509if(hooks.unqueued==null){
4510hooks.unqueued=0;
4511oldfire=hooks.empty.fire;
4512hooks.empty.fire=function(){
4513if(!hooks.unqueued){
4514oldfire();
4515}
4516};
4517}
4518hooks.unqueued++;
4519anim.always(function(){
4520anim.always(function(){
4521hooks.unqueued--;
4522if(!jQuery.queue(elem,"fx").length){
4523hooks.empty.fire();
4524}
4525});
4526});
4527}
4528for(prop in props){
4529value=props[prop];
4530if(rfxtypes.test(value)){
4531delete props[prop];
4532toggle=toggle||value==="toggle";
4533if(value===(hidden?"hide":"show")){
4534if(value==="show"&&dataShow&&dataShow[prop]!==undefined){
4535hidden=true;
4536}else{
4537continue;
4538}
4539}
4540orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);
4541}
4542}
4543propTween=!jQuery.isEmptyObject(props);
4544if(!propTween&&jQuery.isEmptyObject(orig)){
4545return;
4546}
4547if(isBox&&elem.nodeType===1){
4548opts.overflow=[style.overflow,style.overflowX,style.overflowY];
4549restoreDisplay=dataShow&&dataShow.display;
4550if(restoreDisplay==null){
4551restoreDisplay=dataPriv.get(elem,"display");
4552}
4553display=jQuery.css(elem,"display");
4554if(display==="none"){
4555if(restoreDisplay){
4556display=restoreDisplay;
4557}else{
4558showHide([elem],true);
4559restoreDisplay=elem.style.display||restoreDisplay;
4560display=jQuery.css(elem,"display");
4561showHide([elem]);
4562}
4563}
4564if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){
4565if(jQuery.css(elem,"float")==="none"){
4566if(!propTween){
4567anim.done(function(){
4568style.display=restoreDisplay;
4569});
4570if(restoreDisplay==null){
4571display=style.display;
4572restoreDisplay=display==="none"?"":display;
4573}
4574}
4575style.display="inline-block";
4576}
4577}
4578}
4579if(opts.overflow){
4580style.overflow="hidden";
4581anim.always(function(){
4582style.overflow=opts.overflow[0];
4583style.overflowX=opts.overflow[1];
4584style.overflowY=opts.overflow[2];
4585});
4586}
4587propTween=false;
4588for(prop in orig){
4589if(!propTween){
4590if(dataShow){
4591if("hidden"in dataShow){
4592hidden=dataShow.hidden;
4593}
4594}else{
4595dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});
4596}
4597if(toggle){
4598dataShow.hidden=!hidden;
4599}
4600if(hidden){
4601showHide([elem],true);
4602}
4603anim.done(function(){
4604if(!hidden){
4605showHide([elem]);
4606}
4607dataPriv.remove(elem,"fxshow");
4608for(prop in orig){
4609jQuery.style(elem,prop,orig[prop]);
4610}
4611});
4612}
4613propTween=createTween(hidden?dataShow[prop]:0,prop,anim);
4614if(!(prop in dataShow)){
4615dataShow[prop]=propTween.start;
4616if(hidden){
4617propTween.end=propTween.start;
4618propTween.start=0;
4619}
4620}
4621}
4622}
4623function propFilter(props,specialEasing){
4624var index,name,easing,value,hooks;
4625for(index in props){
4626name=camelCase(index);
4627easing=specialEasing[name];
4628value=props[index];
4629if(Array.isArray(value)){
4630easing=value[1];
4631value=props[index]=value[0];
4632}
4633if(index!==name){
4634props[name]=value;
4635delete props[index];
4636}
4637hooks=jQuery.cssHooks[name];
4638if(hooks&&"expand"in hooks){
4639value=hooks.expand(value);
4640delete props[name];
4641for(index in value){
4642if(!(index in props)){
4643props[index]=value[index];
4644specialEasing[index]=easing;
4645}
4646}
4647}else{
4648specialEasing[name]=easing;
4649}
4650}
4651}
4652function Animation(elem,properties,options){
4653var result,
4654stopped,
4655index=0,
4656length=Animation.prefilters.length,
4657deferred=jQuery.Deferred().always(function(){
4658delete tick.elem;
4659}),
4660tick=function(){
4661if(stopped){
4662return false;
4663}
4664var currentTime=fxNow||createFxNow(),
4665remaining=Math.max(0,animation.startTime+animation.duration-currentTime),
4666temp=remaining/animation.duration||0,
4667percent=1-temp,
4668index=0,
4669length=animation.tweens.length;
4670for(;index<length;index++){
4671animation.tweens[index].run(percent);
4672}
4673deferred.notifyWith(elem,[animation,percent,remaining]);
4674if(percent<1&&length){
4675return remaining;
4676}
4677if(!length){
4678deferred.notifyWith(elem,[animation,1,0]);
4679}
4680deferred.resolveWith(elem,[animation]);
4681return false;
4682},
4683animation=deferred.promise({
4684elem:elem,
4685props:jQuery.extend({},properties),
4686opts:jQuery.extend(true,{
4687specialEasing:{},
4688easing:jQuery.easing._default
4689},options),
4690originalProperties:properties,
4691originalOptions:options,
4692startTime:fxNow||createFxNow(),
4693duration:options.duration,
4694tweens:[],
4695createTween:function(prop,end){
4696var tween=jQuery.Tween(elem,animation.opts,prop,end,
4697animation.opts.specialEasing[prop]||animation.opts.easing);
4698animation.tweens.push(tween);
4699return tween;
4700},
4701stop:function(gotoEnd){
4702var index=0,
4703length=gotoEnd?animation.tweens.length:0;
4704if(stopped){
4705return this;
4706}
4707stopped=true;
4708for(;index<length;index++){
4709animation.tweens[index].run(1);
4710}
4711if(gotoEnd){
4712deferred.notifyWith(elem,[animation,1,0]);
4713deferred.resolveWith(elem,[animation,gotoEnd]);
4714}else{
4715deferred.rejectWith(elem,[animation,gotoEnd]);
4716}
4717return this;
4718}
4719}),
4720props=animation.props;
4721propFilter(props,animation.opts.specialEasing);
4722for(;index<length;index++){
4723result=Animation.prefilters[index].call(animation,elem,props,animation.opts);
4724if(result){
4725if(isFunction(result.stop)){
4726jQuery._queueHooks(animation.elem,animation.opts.queue).stop=
4727result.stop.bind(result);
4728}
4729return result;
4730}
4731}
4732jQuery.map(props,createTween,animation);
4733if(isFunction(animation.opts.start)){
4734animation.opts.start.call(elem,animation);
4735}
4736animation
4737.progress(animation.opts.progress)
4738.done(animation.opts.done,animation.opts.complete)
4739.fail(animation.opts.fail)
4740.always(animation.opts.always);
4741jQuery.fx.timer(
4742jQuery.extend(tick,{
4743elem:elem,
4744anim:animation,
4745queue:animation.opts.queue
4746})
4747);
4748return animation;
4749}
4750jQuery.Animation=jQuery.extend(Animation,{
4751tweeners:{
4752"*":[function(prop,value){
4753var tween=this.createTween(prop,value);
4754adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);
4755return tween;
4756}]
4757},
4758tweener:function(props,callback){
4759if(isFunction(props)){
4760callback=props;
4761props=["*"];
4762}else{
4763props=props.match(rnothtmlwhite);
4764}
4765var prop,
4766index=0,
4767length=props.length;
4768for(;index<length;index++){
4769prop=props[index];
4770Animation.tweeners[prop]=Animation.tweeners[prop]||[];
4771Animation.tweeners[prop].unshift(callback);
4772}
4773},
4774prefilters:[defaultPrefilter],
4775prefilter:function(callback,prepend){
4776if(prepend){
4777Animation.prefilters.unshift(callback);
4778}else{
4779Animation.prefilters.push(callback);
4780}
4781}
4782});
4783jQuery.speed=function(speed,easing,fn){
4784var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{
4785complete:fn||!fn&&easing||
4786isFunction(speed)&&speed,
4787duration:speed,
4788easing:fn&&easing||easing&&!isFunction(easing)&&easing
4789};
4790if(jQuery.fx.off){
4791opt.duration=0;
4792}else{
4793if(typeof opt.duration!=="number"){
4794if(opt.duration in jQuery.fx.speeds){
4795opt.duration=jQuery.fx.speeds[opt.duration];
4796}else{
4797opt.duration=jQuery.fx.speeds._default;
4798}
4799}
4800}
4801if(opt.queue==null||opt.queue===true){
4802opt.queue="fx";
4803}
4804opt.old=opt.complete;
4805opt.complete=function(){
4806if(isFunction(opt.old)){
4807opt.old.call(this);
4808}
4809if(opt.queue){
4810jQuery.dequeue(this,opt.queue);
4811}
4812};
4813return opt;
4814};
4815jQuery.fn.extend({
4816fadeTo:function(speed,to,easing,callback){
4817return this.filter(isHiddenWithinTree).css("opacity",0).show()
4818.end().animate({opacity:to},speed,easing,callback);
4819},
4820animate:function(prop,speed,easing,callback){
4821var empty=jQuery.isEmptyObject(prop),
4822optall=jQuery.speed(speed,easing,callback),
4823doAnimation=function(){
4824var anim=Animation(this,jQuery.extend({},prop),optall);
4825if(empty||dataPriv.get(this,"finish")){
4826anim.stop(true);
4827}
4828};
4829doAnimation.finish=doAnimation;
4830return empty||optall.queue===false?
4831this.each(doAnimation):
4832this.queue(optall.queue,doAnimation);
4833},
4834stop:function(type,clearQueue,gotoEnd){
4835var stopQueue=function(hooks){
4836var stop=hooks.stop;
4837delete hooks.stop;
4838stop(gotoEnd);
4839};
4840if(typeof type!=="string"){
4841gotoEnd=clearQueue;
4842clearQueue=type;
4843type=undefined;
4844}
4845if(clearQueue){
4846this.queue(type||"fx",[]);
4847}
4848return this.each(function(){
4849var dequeue=true,
4850index=type!=null&&type+"queueHooks",
4851timers=jQuery.timers,
4852data=dataPriv.get(this);
4853if(index){
4854if(data[index]&&data[index].stop){
4855stopQueue(data[index]);
4856}
4857}else{
4858for(index in data){
4859if(data[index]&&data[index].stop&&rrun.test(index)){
4860stopQueue(data[index]);
4861}
4862}
4863}
4864for(index=timers.length;index--;){
4865if(timers[index].elem===this&&
4866(type==null||timers[index].queue===type)){
4867timers[index].anim.stop(gotoEnd);
4868dequeue=false;
4869timers.splice(index,1);
4870}
4871}
4872if(dequeue||!gotoEnd){
4873jQuery.dequeue(this,type);
4874}
4875});
4876},
4877finish:function(type){
4878if(type!==false){
4879type=type||"fx";
4880}
4881return this.each(function(){
4882var index,
4883data=dataPriv.get(this),
4884queue=data[type+"queue"],
4885hooks=data[type+"queueHooks"],
4886timers=jQuery.timers,
4887length=queue?queue.length:0;
4888data.finish=true;
4889jQuery.queue(this,type,[]);
4890if(hooks&&hooks.stop){
4891hooks.stop.call(this,true);
4892}
4893for(index=timers.length;index--;){
4894if(timers[index].elem===this&&timers[index].queue===type){
4895timers[index].anim.stop(true);
4896timers.splice(index,1);
4897}
4898}
4899for(index=0;index<length;index++){
4900if(queue[index]&&queue[index].finish){
4901queue[index].finish.call(this);
4902}
4903}
4904delete data.finish;
4905});
4906}
4907});
4908jQuery.each(["toggle","show","hide"],function(_i,name){
4909var cssFn=jQuery.fn[name];
4910jQuery.fn[name]=function(speed,easing,callback){
4911return speed==null||typeof speed==="boolean"?
4912cssFn.apply(this,arguments):
4913this.animate(genFx(name,true),speed,easing,callback);
4914};
4915});
4916jQuery.each({
4917slideDown:genFx("show"),
4918slideUp:genFx("hide"),
4919slideToggle:genFx("toggle"),
4920fadeIn:{opacity:"show"},
4921fadeOut:{opacity:"hide"},
4922fadeToggle:{opacity:"toggle"}
4923},function(name,props){
4924jQuery.fn[name]=function(speed,easing,callback){
4925return this.animate(props,speed,easing,callback);
4926};
4927});
4928jQuery.timers=[];
4929jQuery.fx.tick=function(){
4930var timer,
4931i=0,
4932timers=jQuery.timers;
4933fxNow=Date.now();
4934for(;i<timers.length;i++){
4935timer=timers[i];
4936if(!timer()&&timers[i]===timer){
4937timers.splice(i--,1);
4938}
4939}
4940if(!timers.length){
4941jQuery.fx.stop();
4942}
4943fxNow=undefined;
4944};
4945jQuery.fx.timer=function(timer){
4946jQuery.timers.push(timer);
4947jQuery.fx.start();
4948};
4949jQuery.fx.interval=13;
4950jQuery.fx.start=function(){
4951if(inProgress){
4952return;
4953}
4954inProgress=true;
4955schedule();
4956};
4957jQuery.fx.stop=function(){
4958inProgress=null;
4959};
4960jQuery.fx.speeds={
4961slow:600,
4962fast:200,
4963_default:400
4964};
4965jQuery.fn.delay=function(time,type){
4966time=jQuery.fx?jQuery.fx.speeds[time]||time:time;
4967type=type||"fx";
4968return this.queue(type,function(next,hooks){
4969var timeout=window.setTimeout(next,time);
4970hooks.stop=function(){
4971window.clearTimeout(timeout);
4972};
4973});
4974};
4975(function(){
4976var input=document.createElement("input"),
4977select=document.createElement("select"),
4978opt=select.appendChild(document.createElement("option"));
4979input.type="checkbox";
4980support.checkOn=input.value!=="";
4981support.optSelected=opt.selected;
4982input=document.createElement("input");
4983input.value="t";
4984input.type="radio";
4985support.radioValue=input.value==="t";
4986})();
4987var boolHook,
4988attrHandle=jQuery.expr.attrHandle;
4989jQuery.fn.extend({
4990attr:function(name,value){
4991return access(this,jQuery.attr,name,value,arguments.length>1);
4992},
4993removeAttr:function(name){
4994return this.each(function(){
4995jQuery.removeAttr(this,name);
4996});
4997}
4998});
4999jQuery.extend({
5000attr:function(elem,name,value){
5001var ret,hooks,
5002nType=elem.nodeType;
5003if(nType===3||nType===8||nType===2){
5004return;
5005}
5006if(typeof elem.getAttribute==="undefined"){
5007return jQuery.prop(elem,name,value);
5008}
5009if(nType!==1||!jQuery.isXMLDoc(elem)){
5010hooks=jQuery.attrHooks[name.toLowerCase()]||
5011(jQuery.expr.match.bool.test(name)?boolHook:undefined);
5012}
5013if(value!==undefined){
5014if(value===null){
5015jQuery.removeAttr(elem,name);
5016return;
5017}
5018if(hooks&&"set"in hooks&&
5019(ret=hooks.set(elem,value,name))!==undefined){
5020return ret;
5021}
5022elem.setAttribute(name,value+"");
5023return value;
5024}
5025if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
5026return ret;
5027}
5028ret=jQuery.find.attr(elem,name);
5029return ret==null?undefined:ret;
5030},
5031attrHooks:{
5032type:{
5033set:function(elem,value){
5034if(!support.radioValue&&value==="radio"&&
5035nodeName(elem,"input")){
5036var val=elem.value;
5037elem.setAttribute("type",value);
5038if(val){
5039elem.value=val;
5040}
5041return value;
5042}
5043}
5044}
5045},
5046removeAttr:function(elem,value){
5047var name,
5048i=0,
5049attrNames=value&&value.match(rnothtmlwhite);
5050if(attrNames&&elem.nodeType===1){
5051while((name=attrNames[i++])){
5052elem.removeAttribute(name);
5053}
5054}
5055}
5056});
5057boolHook={
5058set:function(elem,value,name){
5059if(value===false){
5060jQuery.removeAttr(elem,name);
5061}else{
5062elem.setAttribute(name,name);
5063}
5064return name;
5065}
5066};
5067jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){
5068var getter=attrHandle[name]||jQuery.find.attr;
5069attrHandle[name]=function(elem,name,isXML){
5070var ret,handle,
5071lowercaseName=name.toLowerCase();
5072if(!isXML){
5073handle=attrHandle[lowercaseName];
5074attrHandle[lowercaseName]=ret;
5075ret=getter(elem,name,isXML)!=null?
5076lowercaseName:
5077null;
5078attrHandle[lowercaseName]=handle;
5079}
5080return ret;
5081};
5082});
5083var rfocusable=/^(?:input|select|textarea|button)$/i,
5084rclickable=/^(?:a|area)$/i;
5085jQuery.fn.extend({
5086prop:function(name,value){
5087return access(this,jQuery.prop,name,value,arguments.length>1);
5088},
5089removeProp:function(name){
5090return this.each(function(){
5091delete this[jQuery.propFix[name]||name];
5092});
5093}
5094});
5095jQuery.extend({
5096prop:function(elem,name,value){
5097var ret,hooks,
5098nType=elem.nodeType;
5099if(nType===3||nType===8||nType===2){
5100return;
5101}
5102if(nType!==1||!jQuery.isXMLDoc(elem)){
5103name=jQuery.propFix[name]||name;
5104hooks=jQuery.propHooks[name];
5105}
5106if(value!==undefined){
5107if(hooks&&"set"in hooks&&
5108(ret=hooks.set(elem,value,name))!==undefined){
5109return ret;
5110}
5111return(elem[name]=value);
5112}
5113if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
5114return ret;
5115}
5116return elem[name];
5117},
5118propHooks:{
5119tabIndex:{
5120get:function(elem){
5121var tabindex=jQuery.find.attr(elem,"tabindex");
5122if(tabindex){
5123return parseInt(tabindex,10);
5124}
5125if(
5126rfocusable.test(elem.nodeName)||
5127rclickable.test(elem.nodeName)&&
5128elem.href
5129){
5130return 0;
5131}
5132return-1;
5133}
5134}
5135},
5136propFix:{
5137"for":"htmlFor",
5138"class":"className"
5139}
5140});
5141if(!support.optSelected){
5142jQuery.propHooks.selected={
5143get:function(elem){
5144var parent=elem.parentNode;
5145if(parent&&parent.parentNode){
5146parent.parentNode.selectedIndex;
5147}
5148return null;
5149},
5150set:function(elem){
5151var parent=elem.parentNode;
5152if(parent){
5153parent.selectedIndex;
5154if(parent.parentNode){
5155parent.parentNode.selectedIndex;
5156}
5157}
5158}
5159};
5160}
5161jQuery.each([
5162"tabIndex",
5163"readOnly",
5164"maxLength",
5165"cellSpacing",
5166"cellPadding",
5167"rowSpan",
5168"colSpan",
5169"useMap",
5170"frameBorder",
5171"contentEditable"
5172],function(){
5173jQuery.propFix[this.toLowerCase()]=this;
5174});
5175function stripAndCollapse(value){
5176var tokens=value.match(rnothtmlwhite)||[];
5177return tokens.join(" ");
5178}
5179function getClass(elem){
5180return elem.getAttribute&&elem.getAttribute("class")||"";
5181}
5182function classesToArray(value){
5183if(Array.isArray(value)){
5184return value;
5185}
5186if(typeof value==="string"){
5187return value.match(rnothtmlwhite)||[];
5188}
5189return[];
5190}
5191jQuery.fn.extend({
5192addClass:function(value){
5193var classNames,cur,curValue,className,i,finalValue;
5194if(isFunction(value)){
5195return this.each(function(j){
5196jQuery(this).addClass(value.call(this,j,getClass(this)));
5197});
5198}
5199classNames=classesToArray(value);
5200if(classNames.length){
5201return this.each(function(){
5202curValue=getClass(this);
5203cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
5204if(cur){
5205for(i=0;i<classNames.length;i++){
5206className=classNames[i];
5207if(cur.indexOf(" "+className+" ")<0){
5208cur+=className+" ";
5209}
5210}
5211finalValue=stripAndCollapse(cur);
5212if(curValue!==finalValue){
5213this.setAttribute("class",finalValue);
5214}
5215}
5216});
5217}
5218return this;
5219},
5220removeClass:function(value){
5221var classNames,cur,curValue,className,i,finalValue;
5222if(isFunction(value)){
5223return this.each(function(j){
5224jQuery(this).removeClass(value.call(this,j,getClass(this)));
5225});
5226}
5227if(!arguments.length){
5228return this.attr("class","");
5229}
5230classNames=classesToArray(value);
5231if(classNames.length){
5232return this.each(function(){
5233curValue=getClass(this);
5234cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
5235if(cur){
5236for(i=0;i<classNames.length;i++){
5237className=classNames[i];
5238while(cur.indexOf(" "+className+" ")>-1){
5239cur=cur.replace(" "+className+" "," ");
5240}
5241}
5242finalValue=stripAndCollapse(cur);
5243if(curValue!==finalValue){
5244this.setAttribute("class",finalValue);
5245}
5246}
5247});
5248}
5249return this;
5250},
5251toggleClass:function(value,stateVal){
5252var classNames,className,i,self,
5253type=typeof value,
5254isValidValue=type==="string"||Array.isArray(value);
5255if(isFunction(value)){
5256return this.each(function(i){
5257jQuery(this).toggleClass(
5258value.call(this,i,getClass(this),stateVal),
5259stateVal
5260);
5261});
5262}
5263if(typeof stateVal==="boolean"&&isValidValue){
5264return stateVal?this.addClass(value):this.removeClass(value);
5265}
5266classNames=classesToArray(value);
5267return this.each(function(){
5268if(isValidValue){
5269self=jQuery(this);
5270for(i=0;i<classNames.length;i++){
5271className=classNames[i];
5272if(self.hasClass(className)){
5273self.removeClass(className);
5274}else{
5275self.addClass(className);
5276}
5277}
5278}else if(value===undefined||type==="boolean"){
5279className=getClass(this);
5280if(className){
5281dataPriv.set(this,"__className__",className);
5282}
5283if(this.setAttribute){
5284this.setAttribute("class",
5285className||value===false?
5286"":
5287dataPriv.get(this,"__className__")||""
5288);
5289}
5290}
5291});
5292},
5293hasClass:function(selector){
5294var className,elem,
5295i=0;
5296className=" "+selector+" ";
5297while((elem=this[i++])){
5298if(elem.nodeType===1&&
5299(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){
5300return true;
5301}
5302}
5303return false;
5304}
5305});
5306var rreturn=/\r/g;
5307jQuery.fn.extend({
5308val:function(value){
5309var hooks,ret,valueIsFunction,
5310elem=this[0];
5311if(!arguments.length){
5312if(elem){
5313hooks=jQuery.valHooks[elem.type]||
5314jQuery.valHooks[elem.nodeName.toLowerCase()];
5315if(hooks&&
5316"get"in hooks&&
5317(ret=hooks.get(elem,"value"))!==undefined
5318){
5319return ret;
5320}
5321ret=elem.value;
5322if(typeof ret==="string"){
5323return ret.replace(rreturn,"");
5324}
5325return ret==null?"":ret;
5326}
5327return;
5328}
5329valueIsFunction=isFunction(value);
5330return this.each(function(i){
5331var val;
5332if(this.nodeType!==1){
5333return;
5334}
5335if(valueIsFunction){
5336val=value.call(this,i,jQuery(this).val());
5337}else{
5338val=value;
5339}
5340if(val==null){
5341val="";
5342}else if(typeof val==="number"){
5343val+="";
5344}else if(Array.isArray(val)){
5345val=jQuery.map(val,function(value){
5346return value==null?"":value+"";
5347});
5348}
5349hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];
5350if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){
5351this.value=val;
5352}
5353});
5354}
5355});
5356jQuery.extend({
5357valHooks:{
5358option:{
5359get:function(elem){
5360var val=jQuery.find.attr(elem,"value");
5361return val!=null?
5362val:
5363stripAndCollapse(jQuery.text(elem));
5364}
5365},
5366select:{
5367get:function(elem){
5368var value,option,i,
5369options=elem.options,
5370index=elem.selectedIndex,
5371one=elem.type==="select-one",
5372values=one?null:[],
5373max=one?index+1:options.length;
5374if(index<0){
5375i=max;
5376}else{
5377i=one?index:0;
5378}
5379for(;i<max;i++){
5380option=options[i];
5381if((option.selected||i===index)&&
5382!option.disabled&&
5383(!option.parentNode.disabled||
5384!nodeName(option.parentNode,"optgroup"))){
5385value=jQuery(option).val();
5386if(one){
5387return value;
5388}
5389values.push(value);
5390}
5391}
5392return values;
5393},
5394set:function(elem,value){
5395var optionSet,option,
5396options=elem.options,
5397values=jQuery.makeArray(value),
5398i=options.length;
5399while(i--){
5400option=options[i];
5401if(option.selected=
5402jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1
5403){
5404optionSet=true;
5405}
5406}
5407if(!optionSet){
5408elem.selectedIndex=-1;
5409}
5410return values;
5411}
5412}
5413}
5414});
5415jQuery.each(["radio","checkbox"],function(){
5416jQuery.valHooks[this]={
5417set:function(elem,value){
5418if(Array.isArray(value)){
5419return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);
5420}
5421}
5422};
5423if(!support.checkOn){
5424jQuery.valHooks[this].get=function(elem){
5425return elem.getAttribute("value")===null?"on":elem.value;
5426};
5427}
5428});
5429var location=window.location;
5430var nonce={guid:Date.now()};
5431var rquery=(/\?/);
5432jQuery.parseXML=function(data){
5433var xml,parserErrorElem;
5434if(!data||typeof data!=="string"){
5435return null;
5436}
5437try{
5438xml=(new window.DOMParser()).parseFromString(data,"text/xml");
5439}catch(e){}
5440parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0];
5441if(!xml||parserErrorElem){
5442jQuery.error("Invalid XML: "+(
5443parserErrorElem?
5444jQuery.map(parserErrorElem.childNodes,function(el){
5445return el.textContent;
5446}).join("\n"):
5447data
5448));
5449}
5450return xml;
5451};
5452var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,
5453stopPropagationCallback=function(e){
5454e.stopPropagation();
5455};
5456jQuery.extend(jQuery.event,{
5457trigger:function(event,data,elem,onlyHandlers){
5458var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,
5459eventPath=[elem||document],
5460type=hasOwn.call(event,"type")?event.type:event,
5461namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];
5462cur=lastElement=tmp=elem=elem||document;
5463if(elem.nodeType===3||elem.nodeType===8){
5464return;
5465}
5466if(rfocusMorph.test(type+jQuery.event.triggered)){
5467return;
5468}
5469if(type.indexOf(".")>-1){
5470namespaces=type.split(".");
5471type=namespaces.shift();
5472namespaces.sort();
5473}
5474ontype=type.indexOf(":")<0&&"on"+type;
5475event=event[jQuery.expando]?
5476event:
5477new jQuery.Event(type,typeof event==="object"&&event);
5478event.isTrigger=onlyHandlers?2:3;
5479event.namespace=namespaces.join(".");
5480event.rnamespace=event.namespace?
5481new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):
5482null;
5483event.result=undefined;
5484if(!event.target){
5485event.target=elem;
5486}
5487data=data==null?
5488[event]:
5489jQuery.makeArray(data,[event]);
5490special=jQuery.event.special[type]||{};
5491if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){
5492return;
5493}
5494if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){
5495bubbleType=special.delegateType||type;
5496if(!rfocusMorph.test(bubbleType+type)){
5497cur=cur.parentNode;
5498}
5499for(;cur;cur=cur.parentNode){
5500eventPath.push(cur);
5501tmp=cur;
5502}
5503if(tmp===(elem.ownerDocument||document)){
5504eventPath.push(tmp.defaultView||tmp.parentWindow||window);
5505}
5506}
5507i=0;
5508while((cur=eventPath[i++])&&!event.isPropagationStopped()){
5509lastElement=cur;
5510event.type=i>1?
5511bubbleType:
5512special.bindType||type;
5513handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&
5514dataPriv.get(cur,"handle");
5515if(handle){
5516handle.apply(cur,data);
5517}
5518handle=ontype&&cur[ontype];
5519if(handle&&handle.apply&&acceptData(cur)){
5520event.result=handle.apply(cur,data);
5521if(event.result===false){
5522event.preventDefault();
5523}
5524}
5525}
5526event.type=type;
5527if(!onlyHandlers&&!event.isDefaultPrevented()){
5528if((!special._default||
5529special._default.apply(eventPath.pop(),data)===false)&&
5530acceptData(elem)){
5531if(ontype&&isFunction(elem[type])&&!isWindow(elem)){
5532tmp=elem[ontype];
5533if(tmp){
5534elem[ontype]=null;
5535}
5536jQuery.event.triggered=type;
5537if(event.isPropagationStopped()){
5538lastElement.addEventListener(type,stopPropagationCallback);
5539}
5540elem[type]();
5541if(event.isPropagationStopped()){
5542lastElement.removeEventListener(type,stopPropagationCallback);
5543}
5544jQuery.event.triggered=undefined;
5545if(tmp){
5546elem[ontype]=tmp;
5547}
5548}
5549}
5550}
5551return event.result;
5552},
5553simulate:function(type,elem,event){
5554var e=jQuery.extend(
5555new jQuery.Event(),
5556event,
5557{
5558type:type,
5559isSimulated:true
5560}
5561);
5562jQuery.event.trigger(e,null,elem);
5563}
5564});
5565jQuery.fn.extend({
5566trigger:function(type,data){
5567return this.each(function(){
5568jQuery.event.trigger(type,data,this);
5569});
5570},
5571triggerHandler:function(type,data){
5572var elem=this[0];
5573if(elem){
5574return jQuery.event.trigger(type,data,elem,true);
5575}
5576}
5577});
5578var
5579rbracket=/\[\]$/,
5580rCRLF=/\r?\n/g,
5581rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,
5582rsubmittable=/^(?:input|select|textarea|keygen)/i;
5583function buildParams(prefix,obj,traditional,add){
5584var name;
5585if(Array.isArray(obj)){
5586jQuery.each(obj,function(i,v){
5587if(traditional||rbracket.test(prefix)){
5588add(prefix,v);
5589}else{
5590buildParams(
5591prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",
5592v,
5593traditional,
5594add
5595);
5596}
5597});
5598}else if(!traditional&&toType(obj)==="object"){
5599for(name in obj){
5600buildParams(prefix+"["+name+"]",obj[name],traditional,add);
5601}
5602}else{
5603add(prefix,obj);
5604}
5605}
5606jQuery.param=function(a,traditional){
5607var prefix,
5608s=[],
5609add=function(key,valueOrFunction){
5610var value=isFunction(valueOrFunction)?
5611valueOrFunction():
5612valueOrFunction;
5613s[s.length]=encodeURIComponent(key)+"="+
5614encodeURIComponent(value==null?"":value);
5615};
5616if(a==null){
5617return"";
5618}
5619if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){
5620jQuery.each(a,function(){
5621add(this.name,this.value);
5622});
5623}else{
5624for(prefix in a){
5625buildParams(prefix,a[prefix],traditional,add);
5626}
5627}
5628return s.join("&");
5629};
5630jQuery.fn.extend({
5631serialize:function(){
5632return jQuery.param(this.serializeArray());
5633},
5634serializeArray:function(){
5635return this.map(function(){
5636var elements=jQuery.prop(this,"elements");
5637return elements?jQuery.makeArray(elements):this;
5638}).filter(function(){
5639var type=this.type;
5640return this.name&&!jQuery(this).is(":disabled")&&
5641rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&
5642(this.checked||!rcheckableType.test(type));
5643}).map(function(_i,elem){
5644var val=jQuery(this).val();
5645if(val==null){
5646return null;
5647}
5648if(Array.isArray(val)){
5649return jQuery.map(val,function(val){
5650return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
5651});
5652}
5653return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
5654}).get();
5655}
5656});
5657var
5658r20=/%20/g,
5659rhash=/#.*$/,
5660rantiCache=/([?&])_=[^&]*/,
5661rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,
5662rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
5663rnoContent=/^(?:GET|HEAD)$/,
5664rprotocol=/^\/\//,
5665prefilters={},
5666transports={},
5667allTypes="*/".concat("*"),
5668originAnchor=document.createElement("a");
5669originAnchor.href=location.href;
5670function addToPrefiltersOrTransports(structure){
5671return function(dataTypeExpression,func){
5672if(typeof dataTypeExpression!=="string"){
5673func=dataTypeExpression;
5674dataTypeExpression="*";
5675}
5676var dataType,
5677i=0,
5678dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];
5679if(isFunction(func)){
5680while((dataType=dataTypes[i++])){
5681if(dataType[0]==="+"){
5682dataType=dataType.slice(1)||"*";
5683(structure[dataType]=structure[dataType]||[]).unshift(func);
5684}else{
5685(structure[dataType]=structure[dataType]||[]).push(func);
5686}
5687}
5688}
5689};
5690}
5691function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){
5692var inspected={},
5693seekingTransport=(structure===transports);
5694function inspect(dataType){
5695var selected;
5696inspected[dataType]=true;
5697jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){
5698var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);
5699if(typeof dataTypeOrTransport==="string"&&
5700!seekingTransport&&!inspected[dataTypeOrTransport]){
5701options.dataTypes.unshift(dataTypeOrTransport);
5702inspect(dataTypeOrTransport);
5703return false;
5704}else if(seekingTransport){
5705return!(selected=dataTypeOrTransport);
5706}
5707});
5708return selected;
5709}
5710return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");
5711}
5712function ajaxExtend(target,src){
5713var key,deep,
5714flatOptions=jQuery.ajaxSettings.flatOptions||{};
5715for(key in src){
5716if(src[key]!==undefined){
5717(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];
5718}
5719}
5720if(deep){
5721jQuery.extend(true,target,deep);
5722}
5723return target;
5724}
5725function ajaxHandleResponses(s,jqXHR,responses){
5726var ct,type,finalDataType,firstDataType,
5727contents=s.contents,
5728dataTypes=s.dataTypes;
5729while(dataTypes[0]==="*"){
5730dataTypes.shift();
5731if(ct===undefined){
5732ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");
5733}
5734}
5735if(ct){
5736for(type in contents){
5737if(contents[type]&&contents[type].test(ct)){
5738dataTypes.unshift(type);
5739break;
5740}
5741}
5742}
5743if(dataTypes[0]in responses){
5744finalDataType=dataTypes[0];
5745}else{
5746for(type in responses){
5747if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){
5748finalDataType=type;
5749break;
5750}
5751if(!firstDataType){
5752firstDataType=type;
5753}
5754}
5755finalDataType=finalDataType||firstDataType;
5756}
5757if(finalDataType){
5758if(finalDataType!==dataTypes[0]){
5759dataTypes.unshift(finalDataType);
5760}
5761return responses[finalDataType];
5762}
5763}
5764function ajaxConvert(s,response,jqXHR,isSuccess){
5765var conv2,current,conv,tmp,prev,
5766converters={},
5767dataTypes=s.dataTypes.slice();
5768if(dataTypes[1]){
5769for(conv in s.converters){
5770converters[conv.toLowerCase()]=s.converters[conv];
5771}
5772}
5773current=dataTypes.shift();
5774while(current){
5775if(s.responseFields[current]){
5776jqXHR[s.responseFields[current]]=response;
5777}
5778if(!prev&&isSuccess&&s.dataFilter){
5779response=s.dataFilter(response,s.dataType);
5780}
5781prev=current;
5782current=dataTypes.shift();
5783if(current){
5784if(current==="*"){
5785current=prev;
5786}else if(prev!=="*"&&prev!==current){
5787conv=converters[prev+" "+current]||converters["* "+current];
5788if(!conv){
5789for(conv2 in converters){
5790tmp=conv2.split(" ");
5791if(tmp[1]===current){
5792conv=converters[prev+" "+tmp[0]]||
5793converters["* "+tmp[0]];
5794if(conv){
5795if(conv===true){
5796conv=converters[conv2];
5797}else if(converters[conv2]!==true){
5798current=tmp[0];
5799dataTypes.unshift(tmp[1]);
5800}
5801break;
5802}
5803}
5804}
5805}
5806if(conv!==true){
5807if(conv&&s.throws){
5808response=conv(response);
5809}else{
5810try{
5811response=conv(response);
5812}catch(e){
5813return{
5814state:"parsererror",
5815error:conv?e:"No conversion from "+prev+" to "+current
5816};
5817}
5818}
5819}
5820}
5821}
5822}
5823return{state:"success",data:response};
5824}
5825jQuery.extend({
5826active:0,
5827lastModified:{},
5828etag:{},
5829ajaxSettings:{
5830url:location.href,
5831type:"GET",
5832isLocal:rlocalProtocol.test(location.protocol),
5833global:true,
5834processData:true,
5835async:true,
5836contentType:"application/x-www-form-urlencoded; charset=UTF-8",
5837accepts:{
5838"*":allTypes,
5839text:"text/plain",
5840html:"text/html",
5841xml:"application/xml, text/xml",
5842json:"application/json, text/javascript"
5843},
5844contents:{
5845xml:/\bxml\b/,
5846html:/\bhtml/,
5847json:/\bjson\b/
5848},
5849responseFields:{
5850xml:"responseXML",
5851text:"responseText",
5852json:"responseJSON"
5853},
5854converters:{
5855"* text":String,
5856"text html":true,
5857"text json":JSON.parse,
5858"text xml":jQuery.parseXML
5859},
5860flatOptions:{
5861url:true,
5862context:true
5863}
5864},
5865ajaxSetup:function(target,settings){
5866return settings?
5867ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):
5868ajaxExtend(jQuery.ajaxSettings,target);
5869},
5870ajaxPrefilter:addToPrefiltersOrTransports(prefilters),
5871ajaxTransport:addToPrefiltersOrTransports(transports),
5872ajax:function(url,options){
5873if(typeof url==="object"){
5874options=url;
5875url=undefined;
5876}
5877options=options||{};
5878var transport,
5879cacheURL,
5880responseHeadersString,
5881responseHeaders,
5882timeoutTimer,
5883urlAnchor,
5884completed,
5885fireGlobals,
5886i,
5887uncached,
5888s=jQuery.ajaxSetup({},options),
5889callbackContext=s.context||s,
5890globalEventContext=s.context&&
5891(callbackContext.nodeType||callbackContext.jquery)?
5892jQuery(callbackContext):
5893jQuery.event,
5894deferred=jQuery.Deferred(),
5895completeDeferred=jQuery.Callbacks("once memory"),
5896statusCode=s.statusCode||{},
5897requestHeaders={},
5898requestHeadersNames={},
5899strAbort="canceled",
5900jqXHR={
5901readyState:0,
5902getResponseHeader:function(key){
5903var match;
5904if(completed){
5905if(!responseHeaders){
5906responseHeaders={};
5907while((match=rheaders.exec(responseHeadersString))){
5908responseHeaders[match[1].toLowerCase()+" "]=
5909(responseHeaders[match[1].toLowerCase()+" "]||[])
5910.concat(match[2]);
5911}
5912}
5913match=responseHeaders[key.toLowerCase()+" "];
5914}
5915return match==null?null:match.join(", ");
5916},
5917getAllResponseHeaders:function(){
5918return completed?responseHeadersString:null;
5919},
5920setRequestHeader:function(name,value){
5921if(completed==null){
5922name=requestHeadersNames[name.toLowerCase()]=
5923requestHeadersNames[name.toLowerCase()]||name;
5924requestHeaders[name]=value;
5925}
5926return this;
5927},
5928overrideMimeType:function(type){
5929if(completed==null){
5930s.mimeType=type;
5931}
5932return this;
5933},
5934statusCode:function(map){
5935var code;
5936if(map){
5937if(completed){
5938jqXHR.always(map[jqXHR.status]);
5939}else{
5940for(code in map){
5941statusCode[code]=[statusCode[code],map[code]];
5942}
5943}
5944}
5945return this;
5946},
5947abort:function(statusText){
5948var finalText=statusText||strAbort;
5949if(transport){
5950transport.abort(finalText);
5951}
5952done(0,finalText);
5953return this;
5954}
5955};
5956deferred.promise(jqXHR);
5957s.url=((url||s.url||location.href)+"")
5958.replace(rprotocol,location.protocol+"//");
5959s.type=options.method||options.type||s.method||s.type;
5960s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];
5961if(s.crossDomain==null){
5962urlAnchor=document.createElement("a");
5963try{
5964urlAnchor.href=s.url;
5965urlAnchor.href=urlAnchor.href;
5966s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==
5967urlAnchor.protocol+"//"+urlAnchor.host;
5968}catch(e){
5969s.crossDomain=true;
5970}
5971}
5972if(s.data&&s.processData&&typeof s.data!=="string"){
5973s.data=jQuery.param(s.data,s.traditional);
5974}
5975inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);
5976if(completed){
5977return jqXHR;
5978}
5979fireGlobals=jQuery.event&&s.global;
5980if(fireGlobals&&jQuery.active++===0){
5981jQuery.event.trigger("ajaxStart");
5982}
5983s.type=s.type.toUpperCase();
5984s.hasContent=!rnoContent.test(s.type);
5985cacheURL=s.url.replace(rhash,"");
5986if(!s.hasContent){
5987uncached=s.url.slice(cacheURL.length);
5988if(s.data&&(s.processData||typeof s.data==="string")){
5989cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;
5990delete s.data;
5991}
5992if(s.cache===false){
5993cacheURL=cacheURL.replace(rantiCache,"$1");
5994uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce.guid++)+
5995uncached;
5996}
5997s.url=cacheURL+uncached;
5998}else if(s.data&&s.processData&&
5999(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){
6000s.data=s.data.replace(r20,"+");
6001}
6002if(s.ifModified){
6003if(jQuery.lastModified[cacheURL]){
6004jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);
6005}
6006if(jQuery.etag[cacheURL]){
6007jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);
6008}
6009}
6010if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){
6011jqXHR.setRequestHeader("Content-Type",s.contentType);
6012}
6013jqXHR.setRequestHeader(
6014"Accept",
6015s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?
6016s.accepts[s.dataTypes[0]]+
6017(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):
6018s.accepts["*"]
6019);
6020for(i in s.headers){
6021jqXHR.setRequestHeader(i,s.headers[i]);
6022}
6023if(s.beforeSend&&
6024(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){
6025return jqXHR.abort();
6026}
6027strAbort="abort";
6028completeDeferred.add(s.complete);
6029jqXHR.done(s.success);
6030jqXHR.fail(s.error);
6031transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);
6032if(!transport){
6033done(-1,"No Transport");
6034}else{
6035jqXHR.readyState=1;
6036if(fireGlobals){
6037globalEventContext.trigger("ajaxSend",[jqXHR,s]);
6038}
6039if(completed){
6040return jqXHR;
6041}
6042if(s.async&&s.timeout>0){
6043timeoutTimer=window.setTimeout(function(){
6044jqXHR.abort("timeout");
6045},s.timeout);
6046}
6047try{
6048completed=false;
6049transport.send(requestHeaders,done);
6050}catch(e){
6051if(completed){
6052throw e;
6053}
6054done(-1,e);
6055}
6056}
6057function done(status,nativeStatusText,responses,headers){
6058var isSuccess,success,error,response,modified,
6059statusText=nativeStatusText;
6060if(completed){
6061return;
6062}
6063completed=true;
6064if(timeoutTimer){
6065window.clearTimeout(timeoutTimer);
6066}
6067transport=undefined;
6068responseHeadersString=headers||"";
6069jqXHR.readyState=status>0?4:0;
6070isSuccess=status>=200&&status<300||status===304;
6071if(responses){
6072response=ajaxHandleResponses(s,jqXHR,responses);
6073}
6074if(!isSuccess&&
6075jQuery.inArray("script",s.dataTypes)>-1&&
6076jQuery.inArray("json",s.dataTypes)<0){
6077s.converters["text script"]=function(){};
6078}
6079response=ajaxConvert(s,response,jqXHR,isSuccess);
6080if(isSuccess){
6081if(s.ifModified){
6082modified=jqXHR.getResponseHeader("Last-Modified");
6083if(modified){
6084jQuery.lastModified[cacheURL]=modified;
6085}
6086modified=jqXHR.getResponseHeader("etag");
6087if(modified){
6088jQuery.etag[cacheURL]=modified;
6089}
6090}
6091if(status===204||s.type==="HEAD"){
6092statusText="nocontent";
6093}else if(status===304){
6094statusText="notmodified";
6095}else{
6096statusText=response.state;
6097success=response.data;
6098error=response.error;
6099isSuccess=!error;
6100}
6101}else{
6102error=statusText;
6103if(status||!statusText){
6104statusText="error";
6105if(status<0){
6106status=0;
6107}
6108}
6109}
6110jqXHR.status=status;
6111jqXHR.statusText=(nativeStatusText||statusText)+"";
6112if(isSuccess){
6113deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);
6114}else{
6115deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);
6116}
6117jqXHR.statusCode(statusCode);
6118statusCode=undefined;
6119if(fireGlobals){
6120globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",
6121[jqXHR,s,isSuccess?success:error]);
6122}
6123completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);
6124if(fireGlobals){
6125globalEventContext.trigger("ajaxComplete",[jqXHR,s]);
6126if(!(--jQuery.active)){
6127jQuery.event.trigger("ajaxStop");
6128}
6129}
6130}
6131return jqXHR;
6132},
6133getJSON:function(url,data,callback){
6134return jQuery.get(url,data,callback,"json");
6135},
6136getScript:function(url,callback){
6137return jQuery.get(url,undefined,callback,"script");
6138}
6139});
6140jQuery.each(["get","post"],function(_i,method){
6141jQuery[method]=function(url,data,callback,type){
6142if(isFunction(data)){
6143type=type||callback;
6144callback=data;
6145data=undefined;
6146}
6147return jQuery.ajax(jQuery.extend({
6148url:url,
6149type:method,
6150dataType:type,
6151data:data,
6152success:callback
6153},jQuery.isPlainObject(url)&&url));
6154};
6155});
6156jQuery.ajaxPrefilter(function(s){
6157var i;
6158for(i in s.headers){
6159if(i.toLowerCase()==="content-type"){
6160s.contentType=s.headers[i]||"";
6161}
6162}
6163});
6164jQuery._evalUrl=function(url,options,doc){
6165return jQuery.ajax({
6166url:url,
6167type:"GET",
6168dataType:"script",
6169cache:true,
6170async:false,
6171global:false,
6172converters:{
6173"text script":function(){}
6174},
6175dataFilter:function(response){
6176jQuery.globalEval(response,options,doc);
6177}
6178});
6179};
6180jQuery.fn.extend({
6181wrapAll:function(html){
6182var wrap;
6183if(this[0]){
6184if(isFunction(html)){
6185html=html.call(this[0]);
6186}
6187wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);
6188if(this[0].parentNode){
6189wrap.insertBefore(this[0]);
6190}
6191wrap.map(function(){
6192var elem=this;
6193while(elem.firstElementChild){
6194elem=elem.firstElementChild;
6195}
6196return elem;
6197}).append(this);
6198}
6199return this;
6200},
6201wrapInner:function(html){
6202if(isFunction(html)){
6203return this.each(function(i){
6204jQuery(this).wrapInner(html.call(this,i));
6205});
6206}
6207return this.each(function(){
6208var self=jQuery(this),
6209contents=self.contents();
6210if(contents.length){
6211contents.wrapAll(html);
6212}else{
6213self.append(html);
6214}
6215});
6216},
6217wrap:function(html){
6218var htmlIsFunction=isFunction(html);
6219return this.each(function(i){
6220jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);
6221});
6222},
6223unwrap:function(selector){
6224this.parent(selector).not("body").each(function(){
6225jQuery(this).replaceWith(this.childNodes);
6226});
6227return this;
6228}
6229});
6230jQuery.expr.pseudos.hidden=function(elem){
6231return!jQuery.expr.pseudos.visible(elem);
6232};
6233jQuery.expr.pseudos.visible=function(elem){
6234return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);
6235};
6236jQuery.ajaxSettings.xhr=function(){
6237try{
6238return new window.XMLHttpRequest();
6239}catch(e){}
6240};
6241var xhrSuccessStatus={
62420:200,
62431223:204
6244},
6245xhrSupported=jQuery.ajaxSettings.xhr();
6246support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);
6247support.ajax=xhrSupported=!!xhrSupported;
6248jQuery.ajaxTransport(function(options){
6249var callback,errorCallback;
6250if(support.cors||xhrSupported&&!options.crossDomain){
6251return{
6252send:function(headers,complete){
6253var i,
6254xhr=options.xhr();
6255xhr.open(
6256options.type,
6257options.url,
6258options.async,
6259options.username,
6260options.password
6261);
6262if(options.xhrFields){
6263for(i in options.xhrFields){
6264xhr[i]=options.xhrFields[i];
6265}
6266}
6267if(options.mimeType&&xhr.overrideMimeType){
6268xhr.overrideMimeType(options.mimeType);
6269}
6270if(!options.crossDomain&&!headers["X-Requested-With"]){
6271headers["X-Requested-With"]="XMLHttpRequest";
6272}
6273for(i in headers){
6274xhr.setRequestHeader(i,headers[i]);
6275}
6276callback=function(type){
6277return function(){
6278if(callback){
6279callback=errorCallback=xhr.onload=
6280xhr.onerror=xhr.onabort=xhr.ontimeout=
6281xhr.onreadystatechange=null;
6282if(type==="abort"){
6283xhr.abort();
6284}else if(type==="error"){
6285if(typeof xhr.status!=="number"){
6286complete(0,"error");
6287}else{
6288complete(
6289xhr.status,
6290xhr.statusText
6291);
6292}
6293}else{
6294complete(
6295xhrSuccessStatus[xhr.status]||xhr.status,
6296xhr.statusText,
6297(xhr.responseType||"text")!=="text"||
6298typeof xhr.responseText!=="string"?
6299{binary:xhr.response}:
6300{text:xhr.responseText},
6301xhr.getAllResponseHeaders()
6302);
6303}
6304}
6305};
6306};
6307xhr.onload=callback();
6308errorCallback=xhr.onerror=xhr.ontimeout=callback("error");
6309if(xhr.onabort!==undefined){
6310xhr.onabort=errorCallback;
6311}else{
6312xhr.onreadystatechange=function(){
6313if(xhr.readyState===4){
6314window.setTimeout(function(){
6315if(callback){
6316errorCallback();
6317}
6318});
6319}
6320};
6321}
6322callback=callback("abort");
6323try{
6324xhr.send(options.hasContent&&options.data||null);
6325}catch(e){
6326if(callback){
6327throw e;
6328}
6329}
6330},
6331abort:function(){
6332if(callback){
6333callback();
6334}
6335}
6336};
6337}
6338});
6339jQuery.ajaxPrefilter(function(s){
6340if(s.crossDomain){
6341s.contents.script=false;
6342}
6343});
6344jQuery.ajaxSetup({
6345accepts:{
6346script:"text/javascript, application/javascript, "+
6347"application/ecmascript, application/x-ecmascript"
6348},
6349contents:{
6350script:/\b(?:java|ecma)script\b/
6351},
6352converters:{
6353"text script":function(text){
6354jQuery.globalEval(text);
6355return text;
6356}
6357}
6358});
6359jQuery.ajaxPrefilter("script",function(s){
6360if(s.cache===undefined){
6361s.cache=false;
6362}
6363if(s.crossDomain){
6364s.type="GET";
6365}
6366});
6367jQuery.ajaxTransport("script",function(s){
6368if(s.crossDomain||s.scriptAttrs){
6369var script,callback;
6370return{
6371send:function(_,complete){
6372script=jQuery("<script>")
6373.attr(s.scriptAttrs||{})
6374.prop({charset:s.scriptCharset,src:s.url})
6375.on("load error",callback=function(evt){
6376script.remove();
6377callback=null;
6378if(evt){
6379complete(evt.type==="error"?404:200,evt.type);
6380}
6381});
6382document.head.appendChild(script[0]);
6383},
6384abort:function(){
6385if(callback){
6386callback();
6387}
6388}
6389};
6390}
6391});
6392var oldCallbacks=[],
6393rjsonp=/(=)\?(?=&|$)|\?\?/;
6394jQuery.ajaxSetup({
6395jsonp:"callback",
6396jsonpCallback:function(){
6397var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce.guid++));
6398this[callback]=true;
6399return callback;
6400}
6401});
6402jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){
6403var callbackName,overwritten,responseContainer,
6404jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?
6405"url":
6406typeof s.data==="string"&&
6407(s.contentType||"")
6408.indexOf("application/x-www-form-urlencoded")===0&&
6409rjsonp.test(s.data)&&"data"
6410);
6411if(jsonProp||s.dataTypes[0]==="jsonp"){
6412callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?
6413s.jsonpCallback():
6414s.jsonpCallback;
6415if(jsonProp){
6416s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);
6417}else if(s.jsonp!==false){
6418s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;
6419}
6420s.converters["script json"]=function(){
6421if(!responseContainer){
6422jQuery.error(callbackName+" was not called");
6423}
6424return responseContainer[0];
6425};
6426s.dataTypes[0]="json";
6427overwritten=window[callbackName];
6428window[callbackName]=function(){
6429responseContainer=arguments;
6430};
6431jqXHR.always(function(){
6432if(overwritten===undefined){
6433jQuery(window).removeProp(callbackName);
6434}else{
6435window[callbackName]=overwritten;
6436}
6437if(s[callbackName]){
6438s.jsonpCallback=originalSettings.jsonpCallback;
6439oldCallbacks.push(callbackName);
6440}
6441if(responseContainer&&isFunction(overwritten)){
6442overwritten(responseContainer[0]);
6443}
6444responseContainer=overwritten=undefined;
6445});
6446return"script";
6447}
6448});
6449support.createHTMLDocument=(function(){
6450var body=document.implementation.createHTMLDocument("").body;
6451body.innerHTML="<form></form><form></form>";
6452return body.childNodes.length===2;
6453})();
6454jQuery.parseHTML=function(data,context,keepScripts){
6455if(typeof data!=="string"){
6456return[];
6457}
6458if(typeof context==="boolean"){
6459keepScripts=context;
6460context=false;
6461}
6462var base,parsed,scripts;
6463if(!context){
6464if(support.createHTMLDocument){
6465context=document.implementation.createHTMLDocument("");
6466base=context.createElement("base");
6467base.href=document.location.href;
6468context.head.appendChild(base);
6469}else{
6470context=document;
6471}
6472}
6473parsed=rsingleTag.exec(data);
6474scripts=!keepScripts&&[];
6475if(parsed){
6476return[context.createElement(parsed[1])];
6477}
6478parsed=buildFragment([data],context,scripts);
6479if(scripts&&scripts.length){
6480jQuery(scripts).remove();
6481}
6482return jQuery.merge([],parsed.childNodes);
6483};
6484jQuery.fn.load=function(url,params,callback){
6485var selector,type,response,
6486self=this,
6487off=url.indexOf(" ");
6488if(off>-1){
6489selector=stripAndCollapse(url.slice(off));
6490url=url.slice(0,off);
6491}
6492if(isFunction(params)){
6493callback=params;
6494params=undefined;
6495}else if(params&&typeof params==="object"){
6496type="POST";
6497}
6498if(self.length>0){
6499jQuery.ajax({
6500url:url,
6501type:type||"GET",
6502dataType:"html",
6503data:params
6504}).done(function(responseText){
6505response=arguments;
6506self.html(selector?
6507jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):
6508responseText);
6509}).always(callback&&function(jqXHR,status){
6510self.each(function(){
6511callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);
6512});
6513});
6514}
6515return this;
6516};
6517jQuery.expr.pseudos.animated=function(elem){
6518return jQuery.grep(jQuery.timers,function(fn){
6519return elem===fn.elem;
6520}).length;
6521};
6522jQuery.offset={
6523setOffset:function(elem,options,i){
6524var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,
6525position=jQuery.css(elem,"position"),
6526curElem=jQuery(elem),
6527props={};
6528if(position==="static"){
6529elem.style.position="relative";
6530}
6531curOffset=curElem.offset();
6532curCSSTop=jQuery.css(elem,"top");
6533curCSSLeft=jQuery.css(elem,"left");
6534calculatePosition=(position==="absolute"||position==="fixed")&&
6535(curCSSTop+curCSSLeft).indexOf("auto")>-1;
6536if(calculatePosition){
6537curPosition=curElem.position();
6538curTop=curPosition.top;
6539curLeft=curPosition.left;
6540}else{
6541curTop=parseFloat(curCSSTop)||0;
6542curLeft=parseFloat(curCSSLeft)||0;
6543}
6544if(isFunction(options)){
6545options=options.call(elem,i,jQuery.extend({},curOffset));
6546}
6547if(options.top!=null){
6548props.top=(options.top-curOffset.top)+curTop;
6549}
6550if(options.left!=null){
6551props.left=(options.left-curOffset.left)+curLeft;
6552}
6553if("using"in options){
6554options.using.call(elem,props);
6555}else{
6556curElem.css(props);
6557}
6558}
6559};
6560jQuery.fn.extend({
6561offset:function(options){
6562if(arguments.length){
6563return options===undefined?
6564this:
6565this.each(function(i){
6566jQuery.offset.setOffset(this,options,i);
6567});
6568}
6569var rect,win,
6570elem=this[0];
6571if(!elem){
6572return;
6573}
6574if(!elem.getClientRects().length){
6575return{top:0,left:0};
6576}
6577rect=elem.getBoundingClientRect();
6578win=elem.ownerDocument.defaultView;
6579return{
6580top:rect.top+win.pageYOffset,
6581left:rect.left+win.pageXOffset
6582};
6583},
6584position:function(){
6585if(!this[0]){
6586return;
6587}
6588var offsetParent,offset,doc,
6589elem=this[0],
6590parentOffset={top:0,left:0};
6591if(jQuery.css(elem,"position")==="fixed"){
6592offset=elem.getBoundingClientRect();
6593}else{
6594offset=this.offset();
6595doc=elem.ownerDocument;
6596offsetParent=elem.offsetParent||doc.documentElement;
6597while(offsetParent&&
6598(offsetParent===doc.body||offsetParent===doc.documentElement)&&
6599jQuery.css(offsetParent,"position")==="static"){
6600offsetParent=offsetParent.parentNode;
6601}
6602if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){
6603parentOffset=jQuery(offsetParent).offset();
6604parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);
6605parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);
6606}
6607}
6608return{
6609top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),
6610left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)
6611};
6612},
6613offsetParent:function(){
6614return this.map(function(){
6615var offsetParent=this.offsetParent;
6616while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){
6617offsetParent=offsetParent.offsetParent;
6618}
6619return offsetParent||documentElement;
6620});
6621}
6622});
6623jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){
6624var top="pageYOffset"===prop;
6625jQuery.fn[method]=function(val){
6626return access(this,function(elem,method,val){
6627var win;
6628if(isWindow(elem)){
6629win=elem;
6630}else if(elem.nodeType===9){
6631win=elem.defaultView;
6632}
6633if(val===undefined){
6634return win?win[prop]:elem[method];
6635}
6636if(win){
6637win.scrollTo(
6638!top?val:win.pageXOffset,
6639top?val:win.pageYOffset
6640);
6641}else{
6642elem[method]=val;
6643}
6644},method,val,arguments.length);
6645};
6646});
6647jQuery.each(["top","left"],function(_i,prop){
6648jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,
6649function(elem,computed){
6650if(computed){
6651computed=curCSS(elem,prop);
6652return rnumnonpx.test(computed)?
6653jQuery(elem).position()[prop]+"px":
6654computed;
6655}
6656}
6657);
6658});
6659jQuery.each({Height:"height",Width:"width"},function(name,type){
6660jQuery.each({
6661padding:"inner"+name,
6662content:type,
6663"":"outer"+name
6664},function(defaultExtra,funcName){
6665jQuery.fn[funcName]=function(margin,value){
6666var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),
6667extra=defaultExtra||(margin===true||value===true?"margin":"border");
6668return access(this,function(elem,type,value){
6669var doc;
6670if(isWindow(elem)){
6671return funcName.indexOf("outer")===0?
6672elem["inner"+name]:
6673elem.document.documentElement["client"+name];
6674}
6675if(elem.nodeType===9){
6676doc=elem.documentElement;
6677return Math.max(
6678elem.body["scroll"+name],doc["scroll"+name],
6679elem.body["offset"+name],doc["offset"+name],
6680doc["client"+name]
6681);
6682}
6683return value===undefined?
6684jQuery.css(elem,type,extra):
6685jQuery.style(elem,type,value,extra);
6686},type,chainable?margin:undefined,chainable);
6687};
6688});
6689});
6690jQuery.each([
6691"ajaxStart",
6692"ajaxStop",
6693"ajaxComplete",
6694"ajaxError",
6695"ajaxSuccess",
6696"ajaxSend"
6697],function(_i,type){
6698jQuery.fn[type]=function(fn){
6699return this.on(type,fn);
6700};
6701});
6702jQuery.fn.extend({
6703bind:function(types,data,fn){
6704return this.on(types,null,data,fn);
6705},
6706unbind:function(types,fn){
6707return this.off(types,null,fn);
6708},
6709delegate:function(selector,types,data,fn){
6710return this.on(types,selector,data,fn);
6711},
6712undelegate:function(selector,types,fn){
6713return arguments.length===1?
6714this.off(selector,"**"):
6715this.off(types,selector||"**",fn);
6716},
6717hover:function(fnOver,fnOut){
6718return this
6719.on("mouseenter",fnOver)
6720.on("mouseleave",fnOut||fnOver);
6721}
6722});
6723jQuery.each(
6724("blur focus focusin focusout resize scroll click dblclick "+
6725"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+
6726"change select submit keydown keypress keyup contextmenu").split(" "),
6727function(_i,name){
6728jQuery.fn[name]=function(data,fn){
6729return arguments.length>0?
6730this.on(name,null,data,fn):
6731this.trigger(name);
6732};
6733}
6734);
6735var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
6736jQuery.proxy=function(fn,context){
6737var tmp,args,proxy;
6738if(typeof context==="string"){
6739tmp=fn[context];
6740context=fn;
6741fn=tmp;
6742}
6743if(!isFunction(fn)){
6744return undefined;
6745}
6746args=slice.call(arguments,2);
6747proxy=function(){
6748return fn.apply(context||this,args.concat(slice.call(arguments)));
6749};
6750proxy.guid=fn.guid=fn.guid||jQuery.guid++;
6751return proxy;
6752};
6753jQuery.holdReady=function(hold){
6754if(hold){
6755jQuery.readyWait++;
6756}else{
6757jQuery.ready(true);
6758}
6759};
6760jQuery.isArray=Array.isArray;
6761jQuery.parseJSON=JSON.parse;
6762jQuery.nodeName=nodeName;
6763jQuery.isFunction=isFunction;
6764jQuery.isWindow=isWindow;
6765jQuery.camelCase=camelCase;
6766jQuery.type=toType;
6767jQuery.now=Date.now;
6768jQuery.isNumeric=function(obj){
6769var type=jQuery.type(obj);
6770return(type==="number"||type==="string")&&
6771!isNaN(obj-parseFloat(obj));
6772};
6773jQuery.trim=function(text){
6774return text==null?
6775"":
6776(text+"").replace(rtrim,"$1");
6777};
6778if(typeof define==="function"&&define.amd){
6779define("jquery",[],function(){
6780return jQuery;
6781});
6782}
6783var
6784_jQuery=window.jQuery,
6785_$=window.$;
6786jQuery.noConflict=function(deep){
6787if(window.$===jQuery){
6788window.$=_$;
6789}
6790if(deep&&window.jQuery===jQuery){
6791window.jQuery=_jQuery;
6792}
6793return jQuery;
6794};
6795if(typeof noGlobal==="undefined"){
6796window.jQuery=window.$=jQuery;
6797}
6798return jQuery;
6799});
6800
6801
6802/* prive/javascript/jquery.form.js?1790084230 */
6803
6804(function(factory){
6805if(typeof define==='function'&&define.amd){
6806define(['jquery'],factory);
6807}else if(typeof module==='object'&&module.exports){
6808module.exports=function(root,jQuery){
6809if(typeof jQuery==='undefined'){
6810if(typeof window!=='undefined'){
6811jQuery=require('jquery');
6812}
6813else{
6814jQuery=require('jquery')(root);
6815}
6816}
6817factory(jQuery);
6818return jQuery;
6819};
6820}else{
6821factory(jQuery);
6822}
6823}(function($){
6824'use strict';
6825var rCRLF=/\r?\n/g;
6826var feature={};
6827feature.fileapi=$('<input type="file">').get(0).files!==undefined;
6828feature.formdata=(typeof window.FormData!=='undefined');
6829var hasProp=!!$.fn.prop;
6830$.fn.attr2=function(){
6831if(!hasProp){
6832return this.attr.apply(this,arguments);
6833}
6834var val=this.prop.apply(this,arguments);
6835if((val&&val.jquery)||typeof val==='string'){
6836return val;
6837}
6838return this.attr.apply(this,arguments);
6839};
6840$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){
6841if(!this.length){
6842log('ajaxSubmit: skipping submit process - no element selected');
6843return this;
6844}
6845var method,action,url,isMsie,iframeSrc,$form=this;
6846if(typeof options==='function'){
6847options={success:options};
6848}else if(typeof options==='string'||(options===false&&arguments.length>0)){
6849options={
6850'url':options,
6851'data':data,
6852'dataType':dataType
6853};
6854if(typeof onSuccess==='function'){
6855options.success=onSuccess;
6856}
6857}else if(typeof options==='undefined'){
6858options={};
6859}
6860method=options.method||options.type||this.attr2('method');
6861action=options.url||this.attr2('action');
6862url=(typeof action==='string')?$.trim(action):'';
6863url=url||window.location.href||'';
6864if(url){
6865url=(url.match(/^([^#]+)/)||[])[1];
6866}
6867isMsie=/(MSIE|Trident)/.test(navigator.userAgent||'');
6868iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank';
6869options=$.extend(true,{
6870url:url,
6871success:$.ajaxSettings.success,
6872type:method||$.ajaxSettings.type,
6873iframeSrc:iframeSrc
6874},options);
6875var veto={};
6876this.trigger('form-pre-serialize',[this,options,veto]);
6877if(veto.veto){
6878log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
6879return this;
6880}
6881if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){
6882log('ajaxSubmit: submit aborted via beforeSerialize callback');
6883return this;
6884}
6885var traditional=options.traditional;
6886if(typeof traditional==='undefined'){
6887traditional=$.ajaxSettings.traditional;
6888}
6889var elements=[];
6890var qx,a=this.formToArray(options.semantic,elements,options.filtering);
6891if(options.data){
6892var optionsData=$.isFunction(options.data)?options.data(a):options.data;
6893options.extraData=optionsData;
6894qx=$.param(optionsData,traditional);
6895}
6896if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){
6897log('ajaxSubmit: submit aborted via beforeSubmit callback');
6898return this;
6899}
6900this.trigger('form-submit-validate',[a,this,options,veto]);
6901if(veto.veto){
6902log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
6903return this;
6904}
6905var q=$.param(a,traditional);
6906if(qx){
6907q=(q?(q+'&'+qx):qx);
6908}
6909if(options.type.toUpperCase()==='GET'){
6910options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;
6911options.data=null;
6912}else{
6913options.data=q;
6914}
6915var callbacks=[];
6916if(options.resetForm){
6917callbacks.push(function(){
6918$form.resetForm();
6919});
6920}
6921if(options.clearForm){
6922callbacks.push(function(){
6923$form.clearForm(options.includeHidden);
6924});
6925}
6926if(!options.dataType&&options.target){
6927var oldSuccess=options.success||function(){};
6928callbacks.push(function(data,textStatus,jqXHR){
6929var successArguments=arguments,
6930fn=options.replaceTarget?'replaceWith':'html';
6931if(fn=='html'){
6932data=$.parseHTML($("<div>").text(data).html())
6933};
6934$(options.target)[fn](data).each(function(){
6935oldSuccess.apply(this,successArguments);
6936});
6937});
6938}else if(options.success){
6939if($.isArray(options.success)){
6940$.merge(callbacks,options.success);
6941}else{
6942callbacks.push(options.success);
6943}
6944}
6945options.success=function(data,status,xhr){
6946var context=options.context||this;
6947for(var i=0,max=callbacks.length;i<max;i++){
6948callbacks[i].apply(context,[data,status,xhr||$form,$form]);
6949}
6950};
6951if(options.error){
6952var oldError=options.error;
6953options.error=function(xhr,status,error){
6954var context=options.context||this;
6955oldError.apply(context,[xhr,status,error,$form]);
6956};
6957}
6958if(options.complete){
6959var oldComplete=options.complete;
6960options.complete=function(xhr,status){
6961var context=options.context||this;
6962oldComplete.apply(context,[xhr,status,$form]);
6963};
6964}
6965var fileInputs=$('input[type=file]:enabled',this).filter(function(){
6966return $(this).val()!=='';
6967});
6968var hasFileInputs=fileInputs.length>0;
6969var mp='multipart/form-data';
6970var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp);
6971var fileAPI=feature.fileapi&&feature.formdata;
6972log('fileAPI :'+fileAPI);
6973var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;
6974var jqxhr;
6975if(options.iframe!==false&&(options.iframe||shouldUseFrame)){
6976if(options.closeKeepAlive){
6977$.get(options.closeKeepAlive,function(){
6978jqxhr=fileUploadIframe(a);
6979});
6980}else{
6981jqxhr=fileUploadIframe(a);
6982}
6983}else if((hasFileInputs||multipart)&&fileAPI){
6984jqxhr=fileUploadXhr(a);
6985}else{
6986jqxhr=$.ajax(options);
6987}
6988$form.removeData('jqxhr').data('jqxhr',jqxhr);
6989for(var k=0;k<elements.length;k++){
6990elements[k]=null;
6991}
6992this.trigger('form-submit-notify',[this,options]);
6993return this;
6994function deepSerialize(extraData){
6995var serialized=$.param(extraData,options.traditional).split('&');
6996var len=serialized.length;
6997var result=[];
6998var i,part;
6999for(i=0;i<len;i++){
7000serialized[i]=serialized[i].replace(/\+/g,' ');
7001part=serialized[i].split('=');
7002result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]);
7003}
7004return result;
7005}
7006function fileUploadXhr(a){
7007var formdata=new FormData();
7008for(var i=0;i<a.length;i++){
7009formdata.append(a[i].name,a[i].value);
7010}
7011if(options.extraData){
7012var serializedData=deepSerialize(options.extraData);
7013for(i=0;i<serializedData.length;i++){
7014if(serializedData[i]){
7015formdata.append(serializedData[i][0],serializedData[i][1]);
7016}
7017}
7018}
7019options.data=null;
7020var s=$.extend(true,{},$.ajaxSettings,options,{
7021contentType:false,
7022processData:false,
7023cache:false,
7024type:method||'POST'
7025});
7026if(options.uploadProgress){
7027s.xhr=function(){
7028var xhr=$.ajaxSettings.xhr();
7029if(xhr.upload){
7030xhr.upload.addEventListener('progress',function(event){
7031var percent=0;
7032var position=event.loaded||event.position;
7033var total=event.total;
7034if(event.lengthComputable){
7035percent=Math.ceil(position/total*100);
7036}
7037options.uploadProgress(event,position,total,percent);
7038},false);
7039}
7040return xhr;
7041};
7042}
7043s.data=null;
7044var beforeSend=s.beforeSend;
7045s.beforeSend=function(xhr,o){
7046if(options.formData){
7047o.data=options.formData;
7048}else{
7049o.data=formdata;
7050}
7051if(beforeSend){
7052beforeSend.call(this,xhr,o);
7053}
7054};
7055return $.ajax(s);
7056}
7057function fileUploadIframe(a){
7058var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;
7059var deferred=$.Deferred();
7060deferred.abort=function(status){
7061xhr.abort(status);
7062};
7063if(a){
7064for(i=0;i<elements.length;i++){
7065el=$(elements[i]);
7066if(hasProp){
7067el.prop('disabled',false);
7068}else{
7069el.removeAttr('disabled');
7070}
7071}
7072}
7073s=$.extend(true,{},$.ajaxSettings,options);
7074s.context=s.context||s;
7075id='jqFormIO'+new Date().getTime();
7076var ownerDocument=form.ownerDocument;
7077var $body=$form.closest('body');
7078if(s.iframeTarget){
7079$io=$(s.iframeTarget,ownerDocument);
7080n=$io.attr2('name');
7081if(!n){
7082$io.attr2('name',id);
7083}else{
7084id=n;
7085}
7086}else{
7087$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'">',ownerDocument);
7088$io.css({position:'absolute',top:'-1000px',left:'-1000px'});
7089}
7090io=$io[0];
7091xhr={
7092aborted:0,
7093responseText:null,
7094responseXML:null,
7095status:0,
7096statusText:'n/a',
7097getAllResponseHeaders:function(){},
7098getResponseHeader:function(){},
7099setRequestHeader:function(){},
7100abort:function(status){
7101var e=(status==='timeout'?'timeout':'aborted');
7102log('aborting upload... '+e);
7103this.aborted=1;
7104try{
7105if(io.contentWindow.document.execCommand){
7106io.contentWindow.document.execCommand('Stop');
7107}
7108}catch(ignore){}
7109$io.attr('src',s.iframeSrc);
7110xhr.error=e;
7111if(s.error){
7112s.error.call(s.context,xhr,e,status);
7113}
7114if(g){
7115$.event.trigger('ajaxError',[xhr,s,e]);
7116}
7117if(s.complete){
7118s.complete.call(s.context,xhr,e);
7119}
7120}
7121};
7122g=s.global;
7123if(g&&$.active++===0){
7124$.event.trigger('ajaxStart');
7125}
7126if(g){
7127$.event.trigger('ajaxSend',[xhr,s]);
7128}
7129if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){
7130if(s.global){
7131$.active--;
7132}
7133deferred.reject();
7134return deferred;
7135}
7136if(xhr.aborted){
7137deferred.reject();
7138return deferred;
7139}
7140sub=form.clk;
7141if(sub){
7142n=sub.name;
7143if(n&&!sub.disabled){
7144s.extraData=s.extraData||{};
7145s.extraData[n]=sub.value;
7146if(sub.type==='image'){
7147s.extraData[n+'.x']=form.clk_x;
7148s.extraData[n+'.y']=form.clk_y;
7149}
7150}
7151}
7152var CLIENT_TIMEOUT_ABORT=1;
7153var SERVER_ABORT=2;
7154function getDoc(frame){
7155var doc=null;
7156try{
7157if(frame.contentWindow){
7158doc=frame.contentWindow.document;
7159}
7160}catch(err){
7161log('cannot get iframe.contentWindow document: '+err);
7162}
7163if(doc){
7164return doc;
7165}
7166try{
7167doc=frame.contentDocument?frame.contentDocument:frame.document;
7168}catch(err){
7169log('cannot get iframe.contentDocument: '+err);
7170doc=frame.document;
7171}
7172return doc;
7173}
7174var csrf_token=$('meta[name=csrf-token]').attr('content');
7175var csrf_param=$('meta[name=csrf-param]').attr('content');
7176if(csrf_param&&csrf_token){
7177s.extraData=s.extraData||{};
7178s.extraData[csrf_param]=csrf_token;
7179}
7180function doSubmit(){
7181var t=$form.attr2('target'),
7182a=$form.attr2('action'),
7183mp='multipart/form-data',
7184et=$form.attr('enctype')||$form.attr('encoding')||mp;
7185form.setAttribute('target',id);
7186if(!method||/post/i.test(method)){
7187form.setAttribute('method','POST');
7188}
7189if(a!==s.url){
7190form.setAttribute('action',s.url);
7191}
7192if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){
7193$form.attr({
7194encoding:'multipart/form-data',
7195enctype:'multipart/form-data'
7196});
7197}
7198if(s.timeout){
7199timeoutHandle=setTimeout(function(){
7200timedOut=true;cb(CLIENT_TIMEOUT_ABORT);
7201},s.timeout);
7202}
7203function checkState(){
7204try{
7205var state=getDoc(io).readyState;
7206log('state = '+state);
7207if(state&&state.toLowerCase()==='uninitialized'){
7208setTimeout(checkState,50);
7209}
7210}catch(e){
7211log('Server abort: ',e,' (',e.name,')');
7212cb(SERVER_ABORT);
7213if(timeoutHandle){
7214clearTimeout(timeoutHandle);
7215}
7216timeoutHandle=undefined;
7217}
7218}
7219var extraInputs=[];
7220try{
7221if(s.extraData){
7222for(var n in s.extraData){
7223if(s.extraData.hasOwnProperty(n)){
7224if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){
7225extraInputs.push(
7226$('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value)
7227.appendTo(form)[0]);
7228}else{
7229extraInputs.push(
7230$('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n])
7231.appendTo(form)[0]);
7232}
7233}
7234}
7235}
7236if(!s.iframeTarget){
7237$io.appendTo($body);
7238}
7239if(io.attachEvent){
7240io.attachEvent('onload',cb);
7241}else{
7242io.addEventListener('load',cb,false);
7243}
7244setTimeout(checkState,15);
7245try{
7246form.submit();
7247}catch(err){
7248var submitFn=document.createElement('form').submit;
7249submitFn.apply(form);
7250}
7251}finally{
7252form.setAttribute('action',a);
7253form.setAttribute('enctype',et);
7254if(t){
7255form.setAttribute('target',t);
7256}else{
7257$form.removeAttr('target');
7258}
7259$(extraInputs).remove();
7260}
7261}
7262if(s.forceSync){
7263doSubmit();
7264}else{
7265setTimeout(doSubmit,10);
7266}
7267var data,doc,domCheckCount=50,callbackProcessed;
7268function cb(e){
7269if(xhr.aborted||callbackProcessed){
7270return;
7271}
7272doc=getDoc(io);
7273if(!doc){
7274log('cannot access response document');
7275e=SERVER_ABORT;
7276}
7277if(e===CLIENT_TIMEOUT_ABORT&&xhr){
7278xhr.abort('timeout');
7279deferred.reject(xhr,'timeout');
7280return;
7281}
7282if(e===SERVER_ABORT&&xhr){
7283xhr.abort('server abort');
7284deferred.reject(xhr,'error','server abort');
7285return;
7286}
7287if(!doc||doc.location.href===s.iframeSrc){
7288if(!timedOut){
7289return;
7290}
7291}
7292if(io.detachEvent){
7293io.detachEvent('onload',cb);
7294}else{
7295io.removeEventListener('load',cb,false);
7296}
7297var status='success',errMsg;
7298try{
7299if(timedOut){
7300throw'timeout';
7301}
7302var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc);
7303log('isXml='+isXml);
7304if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){
7305if(--domCheckCount){
7306log('requeing onLoad callback, DOM not available');
7307setTimeout(cb,250);
7308return;
7309}
7310}
7311var docRoot=doc.body?doc.body:doc.documentElement;
7312xhr.responseText=docRoot?docRoot.innerHTML:null;
7313xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;
7314if(isXml){
7315s.dataType='xml';
7316}
7317xhr.getResponseHeader=function(header){
7318var headers={'content-type':s.dataType};
7319return headers[header.toLowerCase()];
7320};
7321if(docRoot){
7322xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;
7323xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;
7324}
7325var dt=(s.dataType||'').toLowerCase();
7326var scr=/(json|script|text)/.test(dt);
7327if(scr||s.textarea){
7328var ta=doc.getElementsByTagName('textarea')[0];
7329if(ta){
7330xhr.responseText=ta.value;
7331xhr.status=Number(ta.getAttribute('status'))||xhr.status;
7332xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;
7333}else if(scr){
7334var pre=doc.getElementsByTagName('pre')[0];
7335var b=doc.getElementsByTagName('body')[0];
7336if(pre){
7337xhr.responseText=pre.textContent?pre.textContent:pre.innerText;
7338}else if(b){
7339xhr.responseText=b.textContent?b.textContent:b.innerText;
7340}
7341}
7342}else if(dt==='xml'&&!xhr.responseXML&&xhr.responseText){
7343xhr.responseXML=toXml(xhr.responseText);
7344}
7345try{
7346data=httpData(xhr,dt,s);
7347}catch(err){
7348status='parsererror';
7349xhr.error=errMsg=(err||status);
7350}
7351}catch(err){
7352log('error caught: ',err);
7353status='error';
7354xhr.error=errMsg=(err||status);
7355}
7356if(xhr.aborted){
7357log('upload aborted');
7358status=null;
7359}
7360if(xhr.status){
7361status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error';
7362}
7363if(status==='success'){
7364if(s.success){
7365s.success.call(s.context,data,'success',xhr);
7366}
7367deferred.resolve(xhr.responseText,'success',xhr);
7368if(g){
7369$.event.trigger('ajaxSuccess',[xhr,s]);
7370}
7371}else if(status){
7372if(typeof errMsg==='undefined'){
7373errMsg=xhr.statusText;
7374}
7375if(s.error){
7376s.error.call(s.context,xhr,status,errMsg);
7377}
7378deferred.reject(xhr,'error',errMsg);
7379if(g){
7380$.event.trigger('ajaxError',[xhr,s,errMsg]);
7381}
7382}
7383if(g){
7384$.event.trigger('ajaxComplete',[xhr,s]);
7385}
7386if(g&&!--$.active){
7387$.event.trigger('ajaxStop');
7388}
7389if(s.complete){
7390s.complete.call(s.context,xhr,status);
7391}
7392callbackProcessed=true;
7393if(s.timeout){
7394clearTimeout(timeoutHandle);
7395}
7396setTimeout(function(){
7397if(!s.iframeTarget){
7398$io.remove();
7399}else{
7400$io.attr('src',s.iframeSrc);
7401}
7402xhr.responseXML=null;
7403},100);
7404}
7405var toXml=$.parseXML||function(s,doc){
7406if(window.ActiveXObject){
7407doc=new ActiveXObject('Microsoft.XMLDOM');
7408doc.async='false';
7409doc.loadXML(s);
7410}else{
7411doc=(new DOMParser()).parseFromString(s,'text/xml');
7412}
7413return(doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null;
7414};
7415var parseJSON=$.parseJSON||function(s){
7416window.console.error('jquery.parseJSON is undefined');
7417return null;
7418};
7419var httpData=function(xhr,type,s){
7420var ct=xhr.getResponseHeader('content-type')||'',
7421xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0),
7422data=xml?xhr.responseXML:xhr.responseText;
7423if(xml&&data.documentElement.nodeName==='parsererror'){
7424if($.error){
7425$.error('parsererror');
7426}
7427}
7428if(s&&s.dataFilter){
7429data=s.dataFilter(data,type);
7430}
7431if(typeof data==='string'){
7432if((type==='json'||!type)&&ct.indexOf('json')>=0){
7433data=parseJSON(data);
7434}else if((type==='script'||!type)&&ct.indexOf('javascript')>=0){
7435$.globalEval(data);
7436}
7437}
7438return data;
7439};
7440return deferred;
7441}
7442};
7443$.fn.ajaxForm=function(options,data,dataType,onSuccess){
7444if(typeof options==='string'||(options===false&&arguments.length>0)){
7445options={
7446'url':options,
7447'data':data,
7448'dataType':dataType
7449};
7450if(typeof onSuccess==='function'){
7451options.success=onSuccess;
7452}
7453}
7454options=options||{};
7455options.delegation=options.delegation&&$.isFunction($.fn.on);
7456if(!options.delegation&&this.length===0){
7457var o={s:this.selector,c:this.context};
7458if(!$.isReady&&o.s){
7459log('DOM not ready, queuing ajaxForm');
7460$(function(){
7461$(o.s,o.c).ajaxForm(options);
7462});
7463return this;
7464}
7465log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));
7466return this;
7467}
7468if(options.delegation){
7469$(document)
7470.off('submit.form-plugin',this.selector,doAjaxSubmit)
7471.off('click.form-plugin',this.selector,captureSubmittingElement)
7472.on('submit.form-plugin',this.selector,options,doAjaxSubmit)
7473.on('click.form-plugin',this.selector,options,captureSubmittingElement);
7474return this;
7475}
7476if(options.beforeFormUnbind){
7477options.beforeFormUnbind(this,options);
7478}
7479return this.ajaxFormUnbind()
7480.on('submit.form-plugin',options,doAjaxSubmit)
7481.on('click.form-plugin',options,captureSubmittingElement);
7482};
7483function doAjaxSubmit(e){
7484var options=e.data;
7485if(!e.isDefaultPrevented()){
7486e.preventDefault();
7487$(e.target).closest('form').ajaxSubmit(options);
7488}
7489}
7490function captureSubmittingElement(e){
7491var target=e.target;
7492var $el=$(target);
7493if(!$el.is('[type=submit],[type=image]')){
7494var t=$el.closest('[type=submit]');
7495if(t.length===0){
7496return;
7497}
7498target=t[0];
7499}
7500var form=target.form;
7501form.clk=target;
7502if(target.type==='image'){
7503if(typeof e.offsetX!=='undefined'){
7504form.clk_x=e.offsetX;
7505form.clk_y=e.offsetY;
7506}else if(typeof $.fn.offset==='function'){
7507var offset=$el.offset();
7508form.clk_x=e.pageX-offset.left;
7509form.clk_y=e.pageY-offset.top;
7510}else{
7511form.clk_x=e.pageX-target.offsetLeft;
7512form.clk_y=e.pageY-target.offsetTop;
7513}
7514}
7515setTimeout(function(){
7516form.clk=form.clk_x=form.clk_y=null;
7517},100);
7518}
7519$.fn.ajaxFormUnbind=function(){
7520return this.off('submit.form-plugin click.form-plugin');
7521};
7522$.fn.formToArray=function(semantic,elements,filtering){
7523var a=[];
7524if(this.length===0){
7525return a;
7526}
7527var form=this[0];
7528var formId=this.attr('id');
7529var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements;
7530var els2;
7531if(els){
7532els=$.makeArray(els);
7533}
7534if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){
7535els2=$(':input[form="'+formId+'"]').get();
7536if(els2.length){
7537els=(els||[]).concat(els2);
7538}
7539}
7540if(!els||!els.length){
7541return a;
7542}
7543if($.isFunction(filtering)){
7544els=$.map(els,filtering);
7545}
7546var i,j,n,v,el,max,jmax;
7547for(i=0,max=els.length;i<max;i++){
7548el=els[i];
7549n=el.name;
7550if(!n||el.disabled){
7551continue;
7552}
7553if(semantic&&form.clk&&el.type==='image'){
7554if(form.clk===el){
7555a.push({name:n,value:$(el).val(),type:el.type});
7556a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
7557}
7558continue;
7559}
7560v=$.fieldValue(el,true);
7561if(v&&v.constructor===Array){
7562if(elements){
7563elements.push(el);
7564}
7565for(j=0,jmax=v.length;j<jmax;j++){
7566a.push({name:n,value:v[j]});
7567}
7568}else if(feature.fileapi&&el.type==='file'){
7569if(elements){
7570elements.push(el);
7571}
7572var files=el.files;
7573if(files.length){
7574for(j=0;j<files.length;j++){
7575a.push({name:n,value:files[j],type:el.type});
7576}
7577}else{
7578a.push({name:n,value:'',type:el.type});
7579}
7580}else if(v!==null&&typeof v!=='undefined'){
7581if(elements){
7582elements.push(el);
7583}
7584a.push({name:n,value:v,type:el.type,required:el.required});
7585}
7586}
7587if(!semantic&&form.clk){
7588var $input=$(form.clk),input=$input[0];
7589n=input.name;
7590if(n&&!input.disabled&&input.type==='image'){
7591a.push({name:n,value:$input.val()});
7592a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
7593}
7594}
7595return a;
7596};
7597$.fn.formSerialize=function(semantic){
7598return $.param(this.formToArray(semantic));
7599};
7600$.fn.fieldSerialize=function(successful){
7601var a=[];
7602this.each(function(){
7603var n=this.name;
7604if(!n){
7605return;
7606}
7607var v=$.fieldValue(this,successful);
7608if(v&&v.constructor===Array){
7609for(var i=0,max=v.length;i<max;i++){
7610a.push({name:n,value:v[i]});
7611}
7612}else if(v!==null&&typeof v!=='undefined'){
7613a.push({name:this.name,value:v});
7614}
7615});
7616return $.param(a);
7617};
7618$.fn.fieldValue=function(successful){
7619for(var val=[],i=0,max=this.length;i<max;i++){
7620var el=this[i];
7621var v=$.fieldValue(el,successful);
7622if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length)){
7623continue;
7624}
7625if(v.constructor===Array){
7626$.merge(val,v);
7627}else{
7628val.push(v);
7629}
7630}
7631return val;
7632};
7633$.fieldValue=function(el,successful){
7634var n=el.name,t=el.type,tag=el.tagName.toLowerCase();
7635if(typeof successful==='undefined'){
7636successful=true;
7637}
7638if(successful&&(!n||el.disabled||t==='reset'||t==='button'||
7639(t==='checkbox'||t==='radio')&&!el.checked||
7640(t==='submit'||t==='image')&&el.form&&el.form.clk!==el||
7641tag==='select'&&el.selectedIndex===-1)){
7642return null;
7643}
7644if(tag==='select'){
7645var index=el.selectedIndex;
7646if(index<0){
7647return null;
7648}
7649var a=[],ops=el.options;
7650var one=(t==='select-one');
7651var max=(one?index+1:ops.length);
7652for(var i=(one?index:0);i<max;i++){
7653var op=ops[i];
7654if(op.selected&&!op.disabled){
7655var v=op.value;
7656if(!v){
7657v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;
7658}
7659if(one){
7660return v;
7661}
7662a.push(v);
7663}
7664}
7665return a;
7666}
7667return $(el).val().replace(rCRLF,'\r\n');
7668};
7669$.fn.clearForm=function(includeHidden){
7670return this.each(function(){
7671$('input,select,textarea',this).clearFields(includeHidden);
7672});
7673};
7674$.fn.clearFields=$.fn.clearInputs=function(includeHidden){
7675var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
7676return this.each(function(){
7677var t=this.type,tag=this.tagName.toLowerCase();
7678if(re.test(t)||tag==='textarea'){
7679this.value='';
7680}else if(t==='checkbox'||t==='radio'){
7681this.checked=false;
7682}else if(tag==='select'){
7683this.selectedIndex=-1;
7684}else if(t==='file'){
7685if(/MSIE/.test(navigator.userAgent)){
7686$(this).replaceWith($(this).clone(true));
7687}else{
7688$(this).val('');
7689}
7690}else if(includeHidden){
7691if((includeHidden===true&&/hidden/.test(t))||
7692(typeof includeHidden==='string'&&$(this).is(includeHidden))){
7693this.value='';
7694}
7695}
7696});
7697};
7698$.fn.resetForm=function(){
7699return this.each(function(){
7700var el=$(this);
7701var tag=this.tagName.toLowerCase();
7702switch(tag){
7703case'input':
7704this.checked=this.defaultChecked;
7705case'textarea':
7706this.value=this.defaultValue;
7707return true;
7708case'option':
7709case'optgroup':
7710var select=el.parents('select');
7711if(select.length&&select[0].multiple){
7712if(tag==='option'){
7713this.selected=this.defaultSelected;
7714}else{
7715el.find('option').resetForm();
7716}
7717}else{
7718select.resetForm();
7719}
7720return true;
7721case'select':
7722el.find('option').each(function(i){
7723this.selected=this.defaultSelected;
7724if(this.defaultSelected&&!el[0].multiple){
7725el[0].selectedIndex=i;
7726return false;
7727}
7728});
7729return true;
7730case'label':
7731var forEl=$(el.attr('for'));
7732var list=el.find('input,select,textarea');
7733if(forEl[0]){
7734list.unshift(forEl[0]);
7735}
7736list.resetForm();
7737return true;
7738case'form':
7739if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType)){
7740this.reset();
7741}
7742return true;
7743default:
7744el.find('form,input,label,select,textarea').resetForm();
7745return true;
7746}
7747});
7748};
7749$.fn.enable=function(b){
7750if(typeof b==='undefined'){
7751b=true;
7752}
7753return this.each(function(){
7754this.disabled=!b;
7755});
7756};
7757$.fn.selected=function(select){
7758if(typeof select==='undefined'){
7759select=true;
7760}
7761return this.each(function(){
7762var t=this.type;
7763if(t==='checkbox'||t==='radio'){
7764this.checked=select;
7765}else if(this.tagName.toLowerCase()==='option'){
7766var $sel=$(this).parent('select');
7767if(select&&$sel[0]&&$sel[0].type==='select-one'){
7768$sel.find('option').selected(false);
7769}
7770this.selected=select;
7771}
7772});
7773};
7774$.fn.ajaxSubmit.debug=false;
7775function log(){
7776if(!$.fn.ajaxSubmit.debug){
7777return;
7778}
7779var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');
7780if(window.console&&window.console.log){
7781window.console.log(msg);
7782}else if(window.opera&&window.opera.postError){
7783window.opera.postError(msg);
7784}
7785}
7786}));
7787
7788
7789/* prive/javascript/jquery.autosave.js?1790084230 */
7790
7791(function($){
7792$.fn.autosave=function(opt){
7793opt=$.extend({
7794url:window.location,
7795confirm:false,
7796confirmstring:'Sauvegarder ?'
7797},opt);
7798var save_changed=function(){
7799$('form.autosavechanged')
7800.each(function(){
7801if(!opt.confirm||confirm(opt.confirmstring)){
7802var contenu=$(this).serialize();
7803var d=new Date();
7804contenu=contenu+"&__timestamp="+Math.round(d.getTime()/1000);
7805$.post(opt.url,{
7806'action':'session',
7807'var':'autosave_'+$('input[name=autosave]',this).val(),
7808'val':contenu
7809});
7810}
7811}).removeClass('autosavechanged');
7812};
7813$(window).on('unload',save_changed);
7814return this
7815.on('keyup',function(){
7816$(this).addClass('autosavechanged');
7817})
7818.on('change',function(){
7819$(this).addClass('autosavechanged');
7820save_changed();
7821})
7822.on('submit',function(){
7823save_changed();
7824});
7825};
7826})(jQuery);
7827
7828
7829/* prive/javascript/jquery.placeholder-label.js?1790084230 */
7830
7831(function($){
7832$.placeholderLabel={
7833placeholder_class:null,
7834add_placeholder:function(){
7835if($(this).val()==$(this).attr('placeholder')){
7836$(this).val('').removeClass($.placeholderLabel.placeholder_class);
7837}
7838},
7839remove_placeholder:function(){
7840if($(this).val()==''){
7841$(this).val($(this).attr('placeholder')).addClass($.placeholderLabel.placeholder_class);
7842}
7843},
7844disable_placeholder_fields:function(){
7845$(this).find("input[placeholder]").each(function(){
7846if($(this).val()==$(this).attr('placeholder')){
7847$(this).val('');
7848}
7849});
7850return true;
7851}
7852};
7853$.fn.placeholderLabel=function(options){
7854var dummy=document.createElement('input');
7855if(dummy.placeholder!=undefined){
7856return this;
7857}
7858var config={
7859placeholder_class:'placeholder'
7860};
7861if(options)$.extend(config,options);
7862$.placeholderLabel.placeholder_class=config.placeholder_class;
7863this.each(function(){
7864var input=$(this);
7865input.focus($.placeholderLabel.add_placeholder);
7866input.blur($.placeholderLabel.remove_placeholder);
7867input.triggerHandler('focus');
7868input.triggerHandler('blur');
7869$(this.form).submit($.placeholderL
7869abel.disable_placeholder_fields);
7870});
7871return this;
7872}
7873})(jQuery);
7874
7875
7876/* prive/javascript/ajaxCallback.js?1790084230 */
7877jQuery.spip=jQuery.spip||{};
7878jQuery.spip.log=function(){
7879if(jQuery.spip.debug&&window.console&&window.console.log)
7880window.console.log.apply(this,arguments);
7881}
7882jQuery.spip.test_espace_prive=function(){
7883if(typeof spipConfig.core.test_espace_prive!=undefined&&spipConfig.core.test_espace_prive){
7884return true;
7885}
7886return false;
7887}
7888if(!jQuery.spip.load_handlers){
7889jQuery.spip.load_handlers=new Array();
7890function onAjaxLoad(f){
7891jQuery.spip.load_handlers.push(f);
7892};
7893jQuery.spip.triggerAjaxLoad=function(root){
7894jQuery.spip.log('triggerAjaxLoad');
7895jQuery.spip.log(root);
7896for(var i=0;i<jQuery.spip.load_handlers.length;i++)
7897jQuery.spip.load_handlers[i].apply(root);
7898};
7899jQuery.spip.intercepted={};
7900jQuery.spip.intercepted.load=jQuery.fn.load;
7901jQuery.fn.load=function(url,params,callback){
7902if(typeof url!=="string"){
7903return jQuery.spip.intercepted.load.apply(this,arguments);
7904}
7905callback=callback||function(){};
7906if(params){
7907if(params.constructor==Function){
7908callback=params;
7909params=null;
7910}
7911}
7912params=jQuery.extend(params,{triggerAjaxLoad:false});
7913var callback2=function(){jQuery.spip.log('jQuery.load');jQuery.spip.triggerAjaxLoad(this);callback.apply(this,arguments);};
7914return jQuery.spip.intercepted.load.apply(this,[url,params,callback2]);
7915};
7916jQuery.spip.intercepted.ajaxSubmit=jQuery.fn.ajaxSubmit;
7917jQuery.fn.ajaxSubmit=function(options){
7918options=options||{};
7919if(typeof options.onAjaxLoad=="undefined"||options.onAjaxLoad!=false){
7920var me=jQuery(this).parents('div.ajax');
7921if(me.length)
7922me=me.parent();
7923else
7924me=document;
7925if(typeof options=='function')
7926options={success:options};
7927var callback=options.success||function(){};
7928options.success=function(){callback.apply(this,arguments);jQuery.spip.log('jQuery.ajaxSubmit');jQuery.spip.triggerAjaxLoad(me);}
7929}
7930return jQuery.spip.intercepted.ajaxSubmit.apply(this,[options]);
7931}
7932jQuery.spip.intercepted.ajax=jQuery.ajax;
7933jQuery.ajax=function(url,settings){
7934if(typeof settings=='undefined'){
7935settings={};
7936if(typeof url=='object'){
7937settings=url;
7938url=null;
7939}
7940}
7941if(typeof url=='string'){
7942settings['url']=url;
7943}
7944if(settings.data&&settings.data['triggerAjaxLoad']===false){
7945settings.data['triggerAjaxLoad']=null;
7946return jQuery.spip.intercepted.ajax(settings);
7947}
7948var s=jQuery.extend(true,{},jQuery.ajaxSettings,settings);
7949var callbackContext=s.context||s;
7950try{
7951if(jQuery.ajax.caller==jQuery.spip.intercepted.load||jQuery.ajax.caller==jQuery.spip.intercepted.ajaxSubmit)
7952return jQuery.spip.intercepted.ajax(settings);
7953}
7954catch(err){}
7955var orig_complete=s.complete||function(){};
7956settings.complete=function(res,status){
7957var dataType=settings.dataType;
7958var ct=(res&&(typeof res.getResponseHeader=='function'))
7959?res.getResponseHeader("content-type"):'';
7960var xml=!dataType&&ct&&ct.indexOf("xml")>=0;
7961orig_complete.call(callbackContext,res,status);
7962if((!dataType&&!xml)||dataType=="html"){
7963jQuery.spip.log('jQuery.ajax');
7964if(typeof s.onAjaxLoad=="undefined"||s.onAjaxLoad!=false)
7965jQuery.spip.triggerAjaxLoad(s.ajaxTarget?s.ajaxTarget:document);
7966}
7967};
7968return jQuery.spip.intercepted.ajax(settings);
7969};
7970}
7971jQuery.uaMatch=function(ua){
7972ua=ua.toLowerCase();
7973var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
7974ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
7975[];
7976return{
7977browser:match[1]||"",
7978version:match[2]||"0"
7979};
7980};
7981if(!jQuery.browser){
7982matched=jQuery.uaMatch(navigator.userAgent);
7983browser={};
7984if(matched.browser){
7985browser[matched.browser]=true;
7986browser.version=matched.version;
7987}
7988if(browser.chrome){
7989browser.webkit=true;
7990}else if(browser.webkit){
7991browser.safari=true;
7992}
7993jQuery.browser=browser;
7994}
7995jQuery.getScript=function(url,callback){
7996return $.ajax({
7997url:url,
7998dataType:"script",
7999success:callback,
8000cache:true
8001});
8002}
8003jQuery.fn.positionner=function(force,setfocus){
8004if(!this.length){
8005return this;
8006}
8007var offset=jQuery(this).offset();
8008var hauteur=parseInt(jQuery(this).css('height'));
8009var marge=jQuery.spip.positionner_marge||5;
8010var scrolltop=self['pageYOffset']||
8011jQuery.boxModel&&document.documentElement['scrollTop']||
8012document.body['scrollTop'];
8013var h=jQuery(window).height();
8014var scroll=0;
8015if(force||(offset&&offset['top']-marge<=scrolltop)){
8016scroll=offset['top']-marge;
8017}
8018else if(offset&&offset['top']+hauteur-h+marge>scrolltop){
8019scroll=Math.min(offset['top']-marge-15,offset['top']+hauteur-h+40);
8020}
8021if(scroll)
8022jQuery('html,body')
8023.animate({scrollTop:scroll},300);
8024if(setfocus!==false)
8025jQuery(jQuery('*',this).filter('input[type=text],textarea')[0]).focus();
8026return this;
8027}
8028jQuery.spip.virtualbuffer_id='spip_virtualbufferupdate';
8029jQuery.spip.initReaderBuffer=function(){
8030if(jQuery('#'+jQuery.spip.virtualbuffer_id).length)return;
8031jQuery('body').append('<div style="float:left;width:0;height:0;position:absolute;left:-5000px;top:-5000px;"><input type="hidden" name="'+jQuery.spip.virtualbuffer_id+'" id="'+jQuery.spip.virtualbuffer_id+'" value="0"></div>');
8032}
8033jQuery.spip.updateReaderBuffer=function(){
8034var i=jQuery('#'+jQuery.spip.virtualbuffer_id);
8035if(!i.length)return;
8036i.val(parseInt(i.val())+1);
8037}
8038jQuery.fn.formulaire_setContainer=function(){
8039if(!this.closest('.ajax-form-container').length){
8040this.find('script').remove();
8041var aria=this.data('aria');
8042var $container=jQuery('<div class="ajax-form-container"></div>');
8043if(aria&&typeof aria==='object'){
8044for(var i in aria){
8045$container=$container.attr(i,aria[i]);
8046}
8047}
8048else{
8049aria=false;
8050}
8051this.wrap($container);
8052if(aria){
8053jQuery('form',this).not('[aria-live]').attr('aria-live','off');
8054}
8055}
8056return this;
8057}
8058jQuery.fn.formulaire_dyn_ajax=function(target){
8059if(this.length)
8060jQuery.spip.initReaderBuffer();
8061return this.each(function(){
8062var scrollwhensubmit=!jQuery(this).is('.noscroll');
8063var cible=target||this;
8064jQuery(cible).formulaire_setContainer();
8065jQuery('form:not(.noajax):not(.bouton_action_post)',this).each(function(){
8066var leform=this;
8067var leclk,leclk_x,leclk_y;
8068var onError=function(xhr,status,error,$form){
8069jQuery(leform).ajaxFormUnbind().find('input[name="var_ajax"]').remove();
8070var msg="Erreur";
8071if(typeof(error_on_ajaxform)!=="undefined")msg=error_on_ajaxform;
8072jQuery(leform).prepend("<p class='error ajax-error none'>"+msg+"</p>").find('.ajax-error').show('fast');
8073jQuery(cible).closest('.ajax-form-container').endLoading(true);
8074}
8075jQuery(this).prepend("<input type='hidden' name='var_ajax' value='form'>")
8076.ajaxForm({
8077beforeSubmit:function(){
8078leclk=leform.clk;
8079var scrollwhensubmit_button=true;
8080if(leclk){
8081scrollwhensubmit_button=!jQuery(leclk).is('.noscroll');
8082var n=leclk.name;
8083if(n&&!leclk.disabled&&leclk.type==="image"){
8084leclk_x=leform.clk_x;
8085leclk_y=leform.clk_y;
8086}
8087}
8088jQuery(cible).wrap('<div />');
8089cible=jQuery(cible).parent();
8090jQuery(cible).closest('.ajax-form-container').animateLoading();
8091if(scrollwhensubmit&&scrollwhensubmit_button){
8092jQuery(cible).positionner(false,false);
8093}
8094},
8095error:onError,
8096success:function(c,status,xhr,$form){
8097if(c.match(/^\s*noajax\s*$/)){
8098jQuery("input[name=var_ajax]",leform).remove();
8099if(leclk){
8100var n=leclk.name;
8101if(n&&!leclk.disabled){
8102jQuery(leform).prepend("<input type='hidden' name='"+n+"' value='"+leclk.value+"'>");
8103if(leclk.type==="image"){
8104jQuery(leform).prepend("<input type='hidden' name='"+n+".x' value='"+leform.clk_x+"'>");
8105jQuery(leform).prepend("<input type='hidden' name='"+n+".y' value='"+leform.clk_y+"'>");
8106}
8107}
8108}
8109jQuery(leform).ajaxFormUnbind().closest('.formulaire_spip').addClass('resubmit-noajax');
8110try{
8111leform.submit();
8112}catch(err){
8113var submitFn=document.createElement('form').submit;
8114submitFn.apply(leform);
8115}
8116}
8117else{
8118if(!c.length||c.indexOf("ajax-form-is-ok")==-1)
8119return onError.apply(this,[status,xhr,$form]);
8120var preloaded=jQuery.spip.preloaded_urls;
8121jQuery.spip.preloaded_urls={};
8122jQuery(cible).html(c);
8123var a=jQuery('a:first',cible).eq(0);
8124var d=jQuery('div.ajax',cible);
8125if(!d.length){
8126jQuery(cible).addClass('ajax');
8127if(!scrollwhensubmit)
8128jQuery(cible).addClass('noscroll');
8129}
8130else{
8131d.siblings('br.bugajaxie').remove();
8132cible=jQuery(":first",cible);
8133cible.unwrap();
8134}
8135if(a.length
8136&&a.is('a[name=ajax_ancre]')
8137&&jQuery(a.attr('href'),cible).length){
8138a=a.attr('href');
8139if(jQuery(a,cible).length)
8140setTimeout(function(){
8141jQuery(a,cible).positionner(false);
8142},10);
8143jQuery(cible).closest('.ajax-form-container').endLoading(true);
8144}
8145else{
8146if(a.length&&a.is('a[name=ajax_redirect]')){
8147a=a.get(0).href;
8148setTimeout(function(){
8149var cur=window.location.href.split('#');
8150document.location.replace(a);
8151if(cur[0]==a.split('#')[0]){
8152window.location.reload();
8153}
8154},10);
8155jQuery(cible).closest('.ajax-form-container').animateLoading();
8156}
8157else{
8158jQuery(cible).closest('.ajax-form-container').endLoading(true);
8159}
8160}
8161if(!jQuery('.reponse_formulaire_ok',cible).length)
8162jQuery.spip.preloaded_urls=preloaded;
8163jQuery.spip.updateReaderBuffer();
8164}
8165}
8166})
8167.addClass('noajax hasajax');
8168});
8169});
8170}
8171jQuery.fn.formulaire_verifier=function(callback,champ){
8172var erreurs={'message_erreur':'form non ajax'};
8173var me=this;
8174if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true'){
8175if(jQuery(me).is('form.hasajax')){
8176jQuery(me).ajaxSubmit({
8177dataType:"json",
8178data:{formulaire_action_verifier_json:true},
8179success:function(errs){
8180var args=[errs,champ]
8181if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true')
8182callback.apply(me,args);
8183}
8184});
8185}
8186else
8187callback.apply(me,[erreurs,champ]);
8188}
8189return this;
8190}
8191jQuery.fn.formulaire_activer_verif_auto=function(callback){
8192callback=callback||formulaire_actualiser_erreurs;
8193var me=jQuery(this).closest('.ajax-form-container');
8194var check=function(){
8195var name=jQuery(this).attr('name');
8196setTimeout(function(){me.find('form').formulaire_verifier(callback,name);},50);
8197}
8198var activer=function(){
8199if(me.find('form').attr('data-verifjson')!='on'){
8200me
8201.find('form')
8202.attr('data-verifjson','on')
8203.find('input,select,textarea')
8204.on('change',check);
8205}
8206}
8207jQuery(activer);
8208onAjaxLoad(function(){setTimeout(activer,150);});
8209}
8210function formulaire_actualiser_erreurs(erreurs){
8211var parent=jQuery(this).closest('.formulaire_spip');
8212if(!parent.length)return;
8213parent.find('.reponse_formulaire,.erreur_message').fadeOut().remove();
8214parent.find('.erreur').removeClass('erreur');
8215if(erreurs['message_ok'])
8216parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_ok">'+erreurs['message_ok']+'</p>');
8217if(erreurs['message_erreur'])
8218parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_erreur">'+erreurs['message_erreur']+'</p>');
8219for(var k in erreurs){
8220var saisie=parent.find('.editer_'+k);
8221if(saisie.length){
8222saisie.addClass('erreur');
8223saisie.find('label').after('<span class="erreur_message">'+erreurs[k]+'</span>');
8224}
8225}
8226}
8227var ajax_confirm=true;
8228var ajax_confirm_date=0;
8229var spip_confirm=window.confirm;
8230function _confirm(message){
8231ajax_confirm=spip_confirm(message);
8232if(!ajax_confirm){
8233var d=new Date();
8234ajax_confirm_date=d.getTime();
8235}
8236return ajax_confirm;
8237}
8238window.confirm=_confirm;
8239var ajaxbloc_selecteur;
8240jQuery.spip.preloaded_urls={};
8241jQuery.spip.on_ajax_loaded=function(blocfrag,c,href,history){
8242history=history||(history==null);
8243if(typeof href==undefined||href==null)
8244history=false;
8245if(history)
8246jQuery.spip.setHistoryState(blocfrag);
8247if(jQuery(blocfrag).attr('data-loaded-callback')){
8248var callback=eval(jQuery(blocfrag).attr('data-loaded-callback'));
8249callback.call(blocfrag,c,href,history);
8250}
8251else{
8252jQuery(blocfrag)
8253.html(c)
8254.endLoading();
8255}
8256if(typeof href!=undefined)
8257jQuery(blocfrag).attr('data-url',href);
8258if(history){
8259var href_history=href;
8260if(href_history.indexOf('var_nullify')!==-1){
8261href_history=parametre_url(href_history,'var_nullify','');
8262}
8263jQuery.spip.pushHistoryState(href_history);
8264jQuery.spip.setHistoryState(blocfrag);
8265}
8266var a=jQuery('a:first',jQuery(blocfrag)).eq(0);
8267if(a.length
8268&&a.is('a[name=ajax_ancre]')
8269&&jQuery(a.attr('href'),blocfrag).length){
8270a=a.attr('href');
8271jQuery(a,blocfrag).positionner(false);
8272}
8273jQuery.spip.log('on_ajax_loaded');
8274jQuery.spip.triggerAjaxLoad(blocfrag);
8275a=jQuery(blocfrag).parents('form.hasajax')
8276if(a.length)
8277a.eq(0).removeClass('noajax').parents('div.ajax').formulaire_dyn_ajax();
8278jQuery.spip.updateReaderBuffer();
8279}
8280jQuery.spip.on_ajax_failed=function(blocfrag,statusCode,href,history){
8281jQuery(blocfrag).addClass('invalid');
8282jQuery.spip.log("Echec AJAX statusCode "+statusCode)
8283history=history||(history==null);
8284if(history){
8285if(jQuery.spip.debug){
8286jQuery.spip.log("On redirige sur sur "+href)
8287}
8288else{
8289window.location.href=href;
8290}
8291}
8292}
8293jQuery.spip.stateId=0;
8294jQuery.spip.setHistoryState=function(blocfrag){
8295if(!window.history.replaceState)return;
8296if(!blocfrag.attr('id')){
8297while(jQuery('#ghsid'+jQuery.spip.stateId).length)
8298jQuery.spip.stateId++;
8299blocfrag.attr('id','ghsid'+jQuery.spip.stateId);
8300}
8301var href=blocfrag.attr('data-url')||blocfrag.attr('data-origin');
8302href=jQuery("<"+"a href='"+href+"'></a>").get(0).href;
8303var state={
8304id:blocfrag.attr('id'),
8305href:href
8306};
8307var ajaxid=blocfrag.attr('class').match(/\bajax-id-[\w-]+\b/);
8308if(ajaxid&&ajaxid.length)
8309state["ajaxid"]=ajaxid[0];
8310window.history.replaceState(state,window.document.title,window.document.location);
8311}
8312jQuery.spip.pushHistoryState=function(href,title){
8313if(!window.history.pushState)
8314return false;
8315window.history.pushState({},title,href);
8316}
8317window.onpopstate=function(popState){
8318if(popState.state&&popState.state.href){
8319var blocfrag=false;
8320if(popState.state.id){
8321blocfrag=jQuery('#'+popState.state.id);
8322}
8323if((!blocfrag||!blocfrag.length)&&popState.state.ajaxid){
8324blocfrag=jQuery('.ajaxbloc.'+popState.state.ajaxid);
8325}
8326if(blocfrag&&blocfrag.length==1){
8327jQuery.spip.ajaxClick(blocfrag,popState.state.href,{history:false});
8328return true;
8329}
8330else{
8331window.location.href=popState.state.href;
8332}
8333}
8334}
8335jQuery.spip.loadAjax=function(blocfrag,url,href,options){
8336var force=options.force||false;
8337if(jQuery(blocfrag).attr('data-loading-callback')){
8338var callback=eval(jQuery(blocfrag).attr('data-loading-callback'));
8339callback.call(blocfrag,url,href,options);
8340}
8341else{
8342jQuery(blocfrag).animateLoading();
8343}
8344if(jQuery.spip.preloaded_urls[url]&&!force){
8345if(jQuery.spip.preloaded_urls[url]=="<!--loading-->"){
8346setTimeout(function(){jQuery.spip.loadAjax(blocfrag,url,href,options);},100);
8347return;
8348}
8349jQuery.spip.on_ajax_loaded(blocfrag,jQuery.spip.preloaded_urls[url],href,options.history);
8350}else{
8351var d=new Date();
8352jQuery.spip.preloaded_urls[url]="<!--loading-->";
8353jQuery.ajax({
8354url:parametre_url(url,'var_t',d.getTime()),
8355onAjaxLoad:false,
8356success:function(c){
8357jQuery.spip.on_ajax_loaded(blocfrag,c,href,options.history);
8358jQuery.spip.preloaded_urls[url]=c;
8359if(options.callback&&typeof options.callback=="function")
8360options.callback.apply(blocfrag);
8361},
8362error:function(e){
8363jQuery.spip.preloaded_urls[url]='';
8364jQuery.spip.on_ajax_failed(blocfrag,e.status,href,options.history);
8365}
8366});
8367}
8368}
8369jQuery.spip.makeAjaxUrl=function(href,ajax_env,origin){
8370var url=href.split('#');
8371url[0]=parametre_url(url[0],'var_ajax',1);
8372url[0]=parametre_url(url[0],'var_ajax_env',ajax_env);
8373if(origin){
8374if(origin.indexOf('var_nullify')!==-1){
8375origin=parametre_url(origin,'var_nullify','');
8376}
8377var p=origin.indexOf('?');
8378var nullify=[];
8379if(p!==-1){
8380var args=origin.substring(p+1).split('&');
8381var val;
8382var arg;
8383for(var n=0;n<args.length;n++){
8384arg=args[n].split('=');
8385arg=decodeURIComponent(arg[0]);
8386p=arg.indexOf('[');
8387if(p!==-1)
8388arg=arg.substring(0,p);
8389val=parametre_url(href,arg);
8390if((typeof val=="undefined"||val==null)&&nullify.indexOf(arg)===-1){
8391nullify.push(arg);
8392}
8393}
8394if(nullify.length){
8395url[0]=url[0]+'&'+'var_nullify='+encodeURIComponent(nullify.join('|'));
8396}
8397}
8398}
8399if(url[1])
8400url[0]=parametre_url(url[0],'var_ajax_ancre',url[1]);
8401return url[0];
8402}
8403jQuery.spip.ajaxReload=function(blocfrag,options){
8404var ajax_env=blocfrag.attr('data-ajax-env');
8405if(!ajax_env||ajax_env==undefined)return;
8406var href=options.href||blocfrag.attr('data-url')||blocfrag.attr('data-origin');
8407if(href&&typeof href!=undefined){
8408if(href.indexOf('var_nullify')!==-1){
8409href=parametre_url(href,'var_nullify','');
8410}
8411options=options||{};
8412var callback=options.callback||null;
8413var history=options.history||false;
8414var args=options.args||{};
8415for(var key in args){
8416href=parametre_url(href,key,args[key]==undefined?'':args[key],'&',args[key]==undefined?false:true);
8417}
8418var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8419jQuery.spip.loadAjax(blocfrag,url,href,{force:true,callback:callback,history:history});
8420return true;
8421}
8422}
8423jQuery.spip.ajaxClick=function(blocfrag,href,options){
8424var ajax_env=blocfrag.attr('data-ajax-env');
8425if(!ajax_env||ajax_env==undefined)return;
8426if(!ajax_confirm){
8427ajax_confirm=true;
8428var d=new Date();
8429if((d.getTime()-ajax_confirm_date)<=2)
8430return false;
8431}
8432var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8433jQuery.spip.loadAjax(blocfrag,url,href,options);
8434return false;
8435}
8436jQuery.fn.ajaxbloc=function(){
8437if(this.length)
8438jQuery.spip.initReaderBuffer();
8439if(ajaxbloc_selecteur==undefined)
8440ajaxbloc_selecteur='.pagination a,a.ajax';
8441return this.each(function(){
8442jQuery('div.ajaxbloc',this).ajaxbloc();
8443var blocfrag=jQuery(this);
8444var ajax_env=blocfrag.attr('data-ajax-env');
8445if(!ajax_env||ajax_env==undefined)return;
8446blocfrag.not('.bind-ajaxReload').on('ajaxReload',function(event,options){
8447if(jQuery.spip.ajaxReload(blocfrag,options))
8448event.stopPropagation();
8449}).addClass('bind-ajaxReload');
8450jQuery(ajaxbloc_selecteur,this).not('.noajax,.bind-ajax')
8451.click(function(){return jQuery.spip.ajaxClick(blocfrag,this.href,{force:jQuery(this).is('.nocache'),history:!(jQuery(this).is('.nohistory')||jQuery(this).closest('.box_modalbox').length)});})
8452.addClass('bind-ajax')
8453.filter('.preload').each(function(){
8454var href=this.href;
8455var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8456if(!jQuery.spip.preloaded_urls[url]){
8457jQuery.spip.preloaded_urls[url]='<!--loading-->';
8458jQuery.ajax({url:url,onAjaxLoad:false,success:function(r){jQuery.spip.preloaded_urls[url]=r;},error:function(){jQuery.spip.preloaded_urls[url]='';}});
8459}
8460});
8461jQuery('form.bouton_action_post.ajax',this).not('.noajax,.bind-ajax').each(function(){
8462var leform=this;
8463var url=jQuery(this).attr('action').split('#');
8464var scrollwhensubmit=(!jQuery(this).is('.noscroll')&&!jQuery('.submit',this).is('.noscroll'));
8465jQuery(this)
8466.prepend("<input type='hidden' name='var_ajax' value='1'><input type='hidden' name='var_ajax_env' value='"+(ajax_env)+"'>"+(url[1]?"<input type='hidden' name='var_ajax_ancre' value='"+url[1]+"'>":""))
8467.ajaxForm({
8468beforeSubmit:function(){
8469jQuery(blocfrag).animateLoading();
8470if(scrollwhensubmit){
8471jQuery(blocfrag).positionner(false);
8472}
8473},
8474onAjaxLoad:false,
8475success:function(c){
8476jQuery.spip.on_ajax_loaded(blocfrag,c);
8477jQuery.spip.preloaded_urls={};
8478},
8479error:function(e){
8480jQuery.spip.preloaded_urls={};
8481var href=parametre_url(url,'redirect');
8482if(!href){
8483href=window.location.href;
8484}
8485jQuery.spip.on_ajax_failed(blocfrag,e.status,href,e.status===400);
8486}
8487})
8488.addClass('bind-ajax');
8489});
8490});
8491};
8492jQuery.fn.followLink=function(){
8493$(this).click();
8494if(!$(this).is('.bind-ajax'))
8495window.location.href=$(this).get(0).href;
8496return this;
8497}
8498function ajaxReload(ajaxid,options){
8499jQuery('div.ajaxbloc.ajax-id-'+ajaxid).ajaxReload(options);
8500}
8501jQuery.fn.ajaxReload=function(options){
8502options=options||{};
8503jQuery(this).trigger('ajaxReload',[options]);
8504return this;
8505}
8506jQuery.fn.animateLoading=function(){
8507this.attr('aria-busy','true').addClass('loading').children().css('opacity',0.5);
8508if(typeof ajax_image_searching!='undefined'){
8509var i=(this).find('.image_loading');
8510if(i.length)i.eq(0).html(ajax_image_searching);
8511else this.prepend('<span class="image_loading">'+ajax_image_searching+'</span>');
8512}
8513return this;
8514}
8515jQuery.fn.animeajax=jQuery.fn.animateLoading;
8516jQuery.fn.endLoading=function(hard){
8517hard=hard||false;
8518this.attr('aria-busy','false').removeClass('loading');
8519if(hard){
8520this.children().css('opacity','');
8521this.find('.image_loading').html('');
8522}
8523return this;
8524}
8525jQuery.fn.animateRemove=function(callback){
8526if(this.length){
8527var me=this;
8528var color=$("<div class='remove'></div>").css('background-color');
8529var sel=$(this);
8530if(sel.is('tr'))
8531sel=sel.add('>td',sel);
8532sel.addClass('remove').css({backgroundColor:color}).animate({opacity:"0.0"},'fast',function(){
8533sel.removeClass('remove').css({backgroundColor:''});
8534if(callback)
8535callback.apply(me);
8536});
8537}
8538return this;
8539}
8540jQuery.fn.animateAppend=function(callback){
8541if(this.length){
8542var me=this;
8543var color=$("<div class='append'></div>").css('background-color');
8544var origin=$(this).css('background-color')||'#ffffff';
8545if(origin=='transparent')origin='#ffffff';
8546var sel=$(this);
8547if(sel.is('tr'))
8548sel=sel.add('>td',sel);
8549sel.css('opacity','0.0').addClass('append').css({backgroundColor:color}).animate({opacity:"1.0"},1000,function(){
8550sel.animate({backgroundColor:origin},3000,function(){
8551sel.removeClass('append').css({backgroundColor:''});
8552if(callback)
8553callback.apply(me);
8554});
8555});
8556}
8557return this;
8558}
8559function parametre_url(url,c,v,sep,force_vide){
8560if(typeof(url)=='undefined'){
8561url='';
8562}
8563var p;
8564var ancre='';
8565var a='./';
8566var args=[];
8567p=url.indexOf('#');
8568if(p!=-1){
8569ancre=url.substring(p);
8570url=url.substring(0,p);
8571}
8572p=url.indexOf('?');
8573if(p!==-1){
8574if(p>0)a=url.substring(0,p);
8575args=url.substring(p+1).split('&');
8576}
8577else
8578a=url;
8579var regexp=new RegExp('^('+c.replace('[]','\\[\\]')+'\\[?\\]?)(=.*)?$');
8580var ajouts=[];
8581var u=(typeof(v)!=='object')?encodeURIComponent(v):v;
8582var na=[];
8583var v_read=null;
8584for(var n=0;n<args.length;n++){
8585var val=args[n];
8586try{
8587val=decodeURIComponent(val);
8588}catch(e){}
8589var r=val.match(regexp);
8590if(r&&r.length){
8591if(v==null){
8592if(r[1].substr(-2)=='[]'){
8593if(!v_read)v_read=[];
8594v_read.push((r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'');
8595}
8596else{
8597return(r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'';
8598}
8599}
8600else if(!v.length){
8601}
8602else if(r[1].substr(-2)!='[]'){
8603na.push(r[1]+'='+u);
8604ajouts.push(r[1]);
8605}
8606}
8607else
8608na.push(args[n]);
8609}
8610if(v==null)return v_read;
8611if(v||v.length||force_vide){
8612ajouts="="+ajouts.join("=")+"=";
8613var all=c.split('|');
8614for(n=0;n<all.length;n++){
8615if(ajouts.search("="+all[n]+"=")==-1){
8616if(typeof(v)!=='object'){
8617na.push(all[n]+'='+u);
8618}
8619else{
8620var id=((all[n].substring(-2)=='[]')?all[n]:all[n]+"[]");
8621for(p=0;p<v.length;p++)
8622na.push(id+'='+encodeURIComponent(v[p]));
8623}
8624}
8625}
8626}
8627if(na.length){
8628if(!sep)sep='&';
8629a=a+"?"+na.join(sep);
8630}
8631return a+ancre;
8632}
8633function spip_logo_survol_hover(){
8634var me=jQuery(this);
8635if(me.attr('data-src-hover')){
8636me.attr('data-src-original',me.attr('src'));
8637me.attr('src',me.attr('data-src-hover'));
8638}
8639}
8640function spip_logo_survol_out(){
8641var me=jQuery(this);
8642if(me.attr('data-src-original')){
8643me.attr('src',me.attr('data-src-original'));
8644}
8645}
8646function disableClickAfterFormSubmit(){
8647if(jQuery(this).is('.processing-submitted-form')){
8648return false;
8649}
8650jQuery(this)
8651.addClass('processing-submitted-form')
8652.find('button[type="submit"]')
8653.attr('disabled','disabled')
8654.addClass('disabled')
8655}
8656function puce_enable_survol(){
8657jQuery('span.puce_objet_popup a',this).not('.puce-survol-enabled').click(function(){
8658selec_statut(jQuery(this).attr('data-puce-id'),jQuery(this).attr('data-puce-type'),jQuery(this).attr('data-puce-decal'),jQuery('img',this).attr('src'),jQuery(this).attr('data-puce-action'));
8659return false;
8660}).addClass('puce-survol-enabled');
8661jQuery('span.puce_objet',this).not('.puce-survol-enabled').mouseover(function(){
8662if(!this.puce_loaded){
8663this.puce_loaded=true;prepare_selec_statut(this,jQuery(this).attr('data-puce-nom'),jQuery(this).attr('data-puce-type'),jQuery(this).attr('data-puce-id'),jQuery(this).attr('data-puce-action'));
8664}
8665}).addClass('puce-survol-enabled');
8666}
8667if(!window.var_zajax_content)
8668window.var_zajax_content='contenu';
8669jQuery(function(){
8670jQuery('form:not(.bouton_action_post)').parents('div.ajax')
8671.formulaire_dyn_ajax();
8672jQuery('div.ajaxbloc').ajaxbloc();
8673jQuery("input[placeholder]:text").placeholderLabel();
8674jQuery('.spip_logo_survol').hover(spip_logo_survol_hover,spip_logo_survol_out);
8675puce_enable_survol.apply(this);
8676jQuery('body').on('submit','form.bouton_action_post',disableClickAfterFormSubmit);
8677});
8678onAjaxLoad(function(){
8679if(jQuery){
8680jQuery('form:not(.bouton_action_post)',this).parents('div.ajax')
8681.formulaire_dyn_ajax();
8682if(jQuery(this).is('div.ajaxbloc'))
8683jQuery(this).ajaxbloc();
8684else if(jQuery(this).closest('div.ajaxbloc').length)
8685jQuery(this).closest('div.ajaxbloc').ajaxbloc();
8686else
8687jQuery('div.ajaxbloc',this).ajaxbloc();
8688jQuery("input[placeholder]:text",this).placeholderLabel();
8689jQuery('.spip_logo_survol',this).hover(spip_logo_survol_hover,spip_logo_survol_out);
8690puce_enable_survol.apply(this);
8691}
8692});
8693
8694
8695/* prive/javascript/js.cookie.js?1790084230 */
8696
8697;
8698(function(global,factory){
8699typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():
8700typeof define==='function'&&define.amd?define(factory):
8701(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){
8702var current=global.Cookies;
8703var exports=global.Cookies=factory();
8704exports.noConflict=function(){global.Cookies=current;return exports;};
8705})());
8706})(this,(function(){'use strict';
8707function assign(target){
8708for(var i=1;i<arguments.length;i++){
8709var source=arguments[i];
8710for(var key in source){
8711target[key]=source[key];
8712}
8713}
8714return target
8715}
8716var defaultConverter={
8717read:function(value){
8718if(value[0]==='"'){
8719value=value.slice(1,-1);
8720}
8721return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)
8722},
8723write:function(value){
8724return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
8725decodeURIComponent
8726)
8727}
8728};
8729function init(converter,defaultAttributes){
8730function set(name,value,attributes){
8731if(typeof document==='undefined'){
8732return
8733}
8734attributes=assign({},defaultAttributes,attributes);
8735if(typeof attributes.expires==='number'){
8736attributes.expires=new Date(Date.now()+attributes.expires*864e5);
8737}
8738if(attributes.expires){
8739attributes.expires=attributes.expires.toUTCString();
8740}
8741name=encodeURIComponent(name)
8742.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent)
8743.replace(/[()]/g,escape);
8744var stringifiedAttributes='';
8745for(var attributeName in attributes){
8746if(!attributes[attributeName]){
8747continue
8748}
8749stringifiedAttributes+='; '+attributeName;
8750if(attributes[attributeName]===true){
8751continue
8752}
8753stringifiedAttributes+='='+attributes[attributeName].split(';')[0];
8754}
8755return(document.cookie=
8756name+'='+converter.write(value,name)+stringifiedAttributes)
8757}
8758function get(name){
8759if(typeof document==='undefined'||(arguments.length&&!name)){
8760return
8761}
8762var cookies=document.cookie?document.cookie.split('; '):[];
8763var jar={};
8764for(var i=0;i<cookies.length;i++){
8765var parts=cookies[i].split('=');
8766var value=parts.slice(1).join('=');
8767try{
8768var found=decodeURIComponent(parts[0]);
8769jar[found]=converter.read(value,found);
8770if(name===found){
8771break
8772}
8773}catch(e){}
8774}
8775return name?jar[name]:jar
8776}
8777return Object.create(
8778{
8779set,
8780get,
8781remove:function(name,attributes){
8782set(
8783name,
8784'',
8785assign({},attributes,{
8786expires:-1
8787})
8788);
8789},
8790withAttributes:function(attributes){
8791return init(this.converter,assign({},this.attributes,attributes))
8792},
8793withConverter:function(converter){
8794return init(assign({},this.converter,converter),this.attributes)
8795}
8796},
8797{
8798attributes:{value:Object.freeze(defaultAttributes)},
8799converter:{value:Object.freeze(converter)}
8800}
8801)
8802}
8803var api=init(defaultConverter,{path:'/'});
8804return api;
8805}));
8806
8807
8808/* plugins/auto/jqueryui/v1.15.5/prive/javascript/ui/jquery-ui.js?1730750360 */
8809
8810(function(factory){
8811"use strict";
8812if(typeof define==="function"&&define.amd){
8813define(["jquery"],factory);
8814}else{
8815factory(jQuery);
8816}
8817})(function($){
8818"use strict";
8819$.ui=$.ui||{};
8820var version=$.ui.version="1.14.1";
8821var widgetUuid=0;
8822var widgetHasOwnProperty=Array.prototype.hasOwnProperty;
8823var widgetSlice=Array.prototype.slice;
8824$.cleanData=(function(orig){
8825return function(elems){
8826var events,elem,i;
8827for(i=0;(elem=elems[i])!=null;i++){
8828events=$._data(elem,"events");
8829if(events&&events.remove){
8830$(elem).triggerHandler("remove");
8831}
8832}
8833orig(elems);
8834};
8835})($.cleanData);
8836$.widget=function(name,base,prototype){
8837var existingConstructor,constructor,basePrototype;
8838var proxiedPrototype={};
8839var namespace=name.split(".")[0];
8840name=name.split(".")[1];
8841if(name==="__proto__"||name==="constructor"){
8842return $.error("Invalid widget name: "+name);
8843}
8844var fullName=namespace+"-"+name;
8845if(!prototype){
8846prototype=base;
8847base=$.Widget;
8848}
8849if(Array.isArray(prototype)){
8850prototype=$.extend.apply(null,[{}].concat(prototype));
8851}
8852$.expr.pseudos[fullName.toLowerCase()]=function(elem){
8853return!!$.data(elem,fullName);
8854};
8855$[namespace]=$[namespace]||{};
8856existingConstructor=$[namespace][name];
8857constructor=$[namespace][name]=function(options,element){
8858if(!this||!this._createWidget){
8859return new constructor(options,element);
8860}
8861if(arguments.length){
8862this._createWidget(options,element);
8863}
8864};
8865$.extend(constructor,existingConstructor,{
8866version:prototype.version,
8867_proto:$.extend({},prototype),
8868_childConstructors:[]
8869});
8870basePrototype=new base();
8871basePrototype.options=$.widget.extend({},basePrototype.options);
8872$.each(prototype,function(prop,value){
8873if(typeof value!=="function"){
8874proxiedPrototype[prop]=value;
8875return;
8876}
8877proxiedPrototype[prop]=(function(){
8878function _super(){
8879return base.prototype[prop].apply(this,arguments);
8880}
8881function _superApply(args){
8882return base.prototype[prop].apply(this,args);
8883}
8884return function(){
8885var __super=this._super;
8886var __superApply=this._superApply;
8887var returnValue;
8888this._super=_super;
8889this._superApply=_superApply;
8890returnValue=value.apply(this,arguments);
8891this._super=__super;
8892this._superApply=__superApply;
8893return returnValue;
8894};
8895})();
8896});
8897constructor.prototype=$.widget.extend(basePrototype,{
8898widgetEventPrefix:existingConstructor?(basePrototype.widgetEventPrefix||name):name
8899},proxiedPrototype,{
8900constructor:constructor,
8901namespace:namespace,
8902widgetName:name,
8903widgetFullName:fullName
8904});
8905if(existingConstructor){
8906$.each(existingConstructor._childConstructors,function(i,child){
8907var childPrototype=child.prototype;
8908$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,
8909child._proto);
8910});
8911delete existingConstructor._childConstructors;
8912}else{
8913base._childConstructors.push(constructor);
8914}
8915$.widget.bridge(name,constructor);
8916return constructor;
8917};
8918$.widget.extend=function(target){
vendor: 311,002 bytes, lines 8919-21436
8919var input=widgetSlice.call(arguments,1);
8920var inputIndex=0;
8921var inputLength=input.length;
8922var key;
8923var value;
8924for(;inputIndex<inputLength;inputIndex++){
8925for(key in input[inputIndex]){
8926value=input[inputIndex][key];
8927if(widgetHasOwnProperty.call(input[inputIndex],key)&&value!==undefined){
8928if($.isPlainObject(value)){
8929target[key]=$.isPlainObject(target[key])?
8930$.widget.extend({},target[key],value):
8931$.widget.extend({},value);
8932}else{
8933target[key]=value;
8934}
8935}
8936}
8937}
8938return target;
8939};
8940$.widget.bridge=function(name,object){
8941var fullName=object.prototype.widgetFullName||name;
8942$.fn[name]=function(options){
8943var isMethodCall=typeof options==="string";
8944var args=widgetSlice.call(arguments,1);
8945var returnValue=this;
8946if(isMethodCall){
8947if(!this.length&&options==="instance"){
8948returnValue=undefined;
8949}else{
8950this.each(function(){
8951var methodValue;
8952var instance=$.data(this,fullName);
8953if(options==="instance"){
8954returnValue=instance;
8955return false;
8956}
8957if(!instance){
8958return $.error("cannot call methods on "+name+
8959" prior to initialization; "+
8960"attempted to call method '"+options+"'");
8961}
8962if(typeof instance[options]!=="function"||
8963options.charAt(0)==="_"){
8964return $.error("no such method '"+options+"' for "+name+
8965" widget instance");
8966}
8967methodValue=instance[options].apply(instance,args);
8968if(methodValue!==instance&&methodValue!==undefined){
8969returnValue=methodValue&&methodValue.jquery?
8970returnValue.pushStack(methodValue.get()):
8971methodValue;
8972return false;
8973}
8974});
8975}
8976}else{
8977if(args.length){
8978options=$.widget.extend.apply(null,[options].concat(args));
8979}
8980this.each(function(){
8981var instance=$.data(this,fullName);
8982if(instance){
8983instance.option(options||{});
8984if(instance._init){
8985instance._init();
8986}
8987}else{
8988$.data(this,fullName,new object(options,this));
8989}
8990});
8991}
8992return returnValue;
8993};
8994};
8995$.Widget=function(){};
8996$.Widget._childConstructors=[];
8997$.Widget.prototype={
8998widgetName:"widget",
8999widgetEventPrefix:"",
9000defaultElement:"<div>",
9001options:{
9002classes:{},
9003disabled:false,
9004create:null
9005},
9006_createWidget:function(options,element){
9007element=$(element||this.defaultElement||this)[0];
9008this.element=$(element);
9009this.uuid=widgetUuid++;
9010this.eventNamespace="."+this.widgetName+this.uuid;
9011this.bindings=$();
9012this.hoverable=$();
9013this.focusable=$();
9014this.classesElementLookup={};
9015if(element!==this){
9016$.data(element,this.widgetFullName,this);
9017this._on(true,this.element,{
9018remove:function(event){
9019if(event.target===element){
9020this.destroy();
9021}
9022}
9023});
9024this.document=$(element.style?
9025element.ownerDocument:
9026element.document||element);
9027this.window=$(this.document[0].defaultView||this.document[0].parentWindow);
9028}
9029this.options=$.widget.extend({},
9030this.options,
9031this._getCreateOptions(),
9032options);
9033this._create();
9034if(this.options.disabled){
9035this._setOptionDisabled(this.options.disabled);
9036}
9037this._trigger("create",null,this._getCreateEventData());
9038this._init();
9039},
9040_getCreateOptions:function(){
9041return{};
9042},
9043_getCreateEventData:$.noop,
9044_create:$.noop,
9045_init:$.noop,
9046destroy:function(){
9047var that=this;
9048this._destroy();
9049$.each(this.classesElementLookup,function(key,value){
9050that._removeClass(value,key);
9051});
9052this.element
9053.off(this.eventNamespace)
9054.removeData(this.widgetFullName);
9055this.widget()
9056.off(this.eventNamespace)
9057.removeAttr("aria-disabled");
9058this.bindings.off(this.eventNamespace);
9059},
9060_destroy:$.noop,
9061widget:function(){
9062return this.element;
9063},
9064option:function(key,value){
9065var options=key;
9066var parts;
9067var curOption;
9068var i;
9069if(arguments.length===0){
9070return $.widget.extend({},this.options);
9071}
9072if(typeof key==="string"){
9073options={};
9074parts=key.split(".");
9075key=parts.shift();
9076if(parts.length){
9077curOption=options[key]=$.widget.extend({},this.options[key]);
9078for(i=0;i<parts.length-1;i++){
9079curOption[parts[i]]=curOption[parts[i]]||{};
9080curOption=curOption[parts[i]];
9081}
9082key=parts.pop();
9083if(arguments.length===1){
9084return curOption[key]===undefined?null:curOption[key];
9085}
9086curOption[key]=value;
9087}else{
9088if(arguments.length===1){
9089return this.options[key]===undefined?null:this.options[key];
9090}
9091options[key]=value;
9092}
9093}
9094this._setOptions(options);
9095return this;
9096},
9097_setOptions:function(options){
9098var key;
9099for(key in options){
9100this._setOption(key,options[key]);
9101}
9102return this;
9103},
9104_setOption:function(key,value){
9105if(key==="classes"){
9106this._setOptionClasses(value);
9107}
9108this.options[key]=value;
9109if(key==="disabled"){
9110this._setOptionDisabled(value);
9111}
9112return this;
9113},
9114_setOptionClasses:function(value){
9115var classKey,elements,currentElements;
9116for(classKey in value){
9117currentElements=this.classesElementLookup[classKey];
9118if(value[classKey]===this.options.classes[classKey]||
9119!currentElements||
9120!currentElements.length){
9121continue;
9122}
9123elements=$(currentElements.get());
9124this._removeClass(currentElements,classKey);
9125elements.addClass(this._classes({
9126element:elements,
9127keys:classKey,
9128classes:value,
9129add:true
9130}));
9131}
9132},
9133_setOptionDisabled:function(value){
9134this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!value);
9135if(value){
9136this._removeClass(this.hoverable,null,"ui-state-hover");
9137this._removeClass(this.focusable,null,"ui-state-focus");
9138}
9139},
9140enable:function(){
9141return this._setOptions({disabled:false});
9142},
9143disable:function(){
9144return this._setOptions({disabled:true});
9145},
9146_classes:function(options){
9147var full=[];
9148var that=this;
9149options=$.extend({
9150element:this.element,
9151classes:this.options.classes||{}
9152},options);
9153function bindRemoveEvent(){
9154var nodesToBind=[];
9155options.element.each(function(_,element){
9156var isTracked=$.map(that.classesElementLookup,function(elements){
9157return elements;
9158})
9159.some(function(elements){
9160return elements.is(element);
9161});
9162if(!isTracked){
9163nodesToBind.push(element);
9164}
9165});
9166that._on($(nodesToBind),{
9167remove:"_untrackClassesElement"
9168});
9169}
9170function processClassString(classes,checkOption){
9171var current,i;
9172for(i=0;i<classes.length;i++){
9173current=that.classesElementLookup[classes[i]]||$();
9174if(options.add){
9175bindRemoveEvent();
9176current=$($.uniqueSort(current.get().concat(options.element.get())));
9177}else{
9178current=$(current.not(options.element).get());
9179}
9180that.classesElementLookup[classes[i]]=current;
9181full.push(classes[i]);
9182if(checkOption&&options.classes[classes[i]]){
9183full.push(options.classes[classes[i]]);
9184}
9185}
9186}
9187if(options.keys){
9188processClassString(options.keys.match(/\S+/g)||[],true);
9189}
9190if(options.extra){
9191processClassString(options.extra.match(/\S+/g)||[]);
9192}
9193return full.join(" ");
9194},
9195_untrackClassesElement:function(event){
9196var that=this;
9197$.each(that.classesElementLookup,function(key,value){
9198if($.inArray(event.target,value)!==-1){
9199that.classesElementLookup[key]=$(value.not(event.target).get());
9200}
9201});
9202this._off($(event.target));
9203},
9204_removeClass:function(element,keys,extra){
9205return this._toggleClass(element,keys,extra,false);
9206},
9207_addClass:function(element,keys,extra){
9208return this._toggleClass(element,keys,extra,true);
9209},
9210_toggleClass:function(element,keys,extra,add){
9211add=(typeof add==="boolean")?add:extra;
9212var shift=(typeof element==="string"||element===null),
9213options={
9214extra:shift?keys:extra,
9215keys:shift?element:keys,
9216element:shift?this.element:element,
9217add:add
9218};
9219options.element.toggleClass(this._classes(options),add);
9220return this;
9221},
9222_on:function(suppressDisabledCheck,element,handlers){
9223var delegateElement;
9224var instance=this;
9225if(typeof suppressDisabledCheck!=="boolean"){
9226handlers=element;
9227element=suppressDisabledCheck;
9228suppressDisabledCheck=false;
9229}
9230if(!handlers){
9231handlers=element;
9232element=this.element;
9233delegateElement=this.widget();
9234}else{
9235element=delegateElement=$(element);
9236this.bindings=this.bindings.add(element);
9237}
9238$.each(handlers,function(event,handler){
9239function handlerProxy(){
9240if(!suppressDisabledCheck&&
9241(instance.options.disabled===true||
9242$(this).hasClass("ui-state-disabled"))){
9243return;
9244}
9245return(typeof handler==="string"?instance[handler]:handler)
9246.apply(instance,arguments);
9247}
9248if(typeof handler!=="string"){
9249handlerProxy.guid=handler.guid=
9250handler.guid||handlerProxy.guid||$.guid++;
9251}
9252var match=event.match(/^([\w:-]*)\s*(.*)$/);
9253var eventName=match[1]+instance.eventNamespace;
9254var selector=match[2];
9255if(selector){
9256delegateElement.on(eventName,selector,handlerProxy);
9257}else{
9258element.on(eventName,handlerProxy);
9259}
9260});
9261},
9262_off:function(element,eventName){
9263eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+
9264this.eventNamespace;
9265element.off(eventName);
9266this.bindings=$(this.bindings.not(element).get());
9267this.focusable=$(this.focusable.not(element).get());
9268this.hoverable=$(this.hoverable.not(element).get());
9269},
9270_delay:function(handler,delay){
9271function handlerProxy(){
9272return(typeof handler==="string"?instance[handler]:handler)
9273.apply(instance,arguments);
9274}
9275var instance=this;
9276return setTimeout(handlerProxy,delay||0);
9277},
9278_hoverable:function(element){
9279this.hoverable=this.hoverable.add(element);
9280this._on(element,{
9281mouseenter:function(event){
9282this._addClass($(event.currentTarget),null,"ui-state-hover");
9283},
9284mouseleave:function(event){
9285this._removeClass($(event.currentTarget),null,"ui-state-hover");
9286}
9287});
9288},
9289_focusable:function(element){
9290this.focusable=this.focusable.add(element);
9291this._on(element,{
9292focusin:function(event){
9293this._addClass($(event.currentTarget),null,"ui-state-focus");
9294},
9295focusout:function(event){
9296this._removeClass($(event.currentTarget),null,"ui-state-focus");
9297}
9298});
9299},
9300_trigger:function(type,event,data){
9301var prop,orig;
9302var callback=this.options[type];
9303data=data||{};
9304event=$.Event(event);
9305event.type=(type===this.widgetEventPrefix?
9306type:
9307this.widgetEventPrefix+type).toLowerCase();
9308event.target=this.element[0];
9309orig=event.originalEvent;
9310if(orig){
9311for(prop in orig){
9312if(!(prop in event)){
9313event[prop]=orig[prop];
9314}
9315}
9316}
9317this.element.trigger(event,data);
9318return!(typeof callback==="function"&&
9319callback.apply(this.element[0],[event].concat(data))===false||
9320event.isDefaultPrevented());
9321}
9322};
9323$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){
9324$.Widget.prototype["_"+method]=function(element,options,callback){
9325if(typeof options==="string"){
9326options={effect:options};
9327}
9328var hasOptions;
9329var effectName=!options?
9330method:
9331options===true||typeof options==="number"?
9332defaultEffect:
9333options.effect||defaultEffect;
9334options=options||{};
9335if(typeof options==="number"){
9336options={duration:options};
9337}else if(options===true){
9338options={};
9339}
9340hasOptions=!$.isEmptyObject(options);
9341options.complete=callback;
9342if(options.delay){
9343element.delay(options.delay);
9344}
9345if(hasOptions&&$.effects&&$.effects.effect[effectName]){
9346element[method](options);
9347}else if(effectName!==method&&element[effectName]){
9348element[effectName](options.duration,options.easing,callback);
9349}else{
9350element.queue(function(next){
9351$(this)[method]();
9352if(callback){
9353callback.call(element[0]);
9354}
9355next();
9356});
9357}
9358};
9359});
9360var widget=$.widget;
9361(function(){
9362var cachedScrollbarWidth,
9363max=Math.max,
9364abs=Math.abs,
9365rhorizontal=/left|center|right/,
9366rvertical=/top|center|bottom/,
9367roffset=/[\+\-]\d+(\.[\d]+)?%?/,
9368rposition=/^\w+/,
9369rpercent=/%$/,
9370_position=$.fn.position;
9371function getOffsets(offsets,width,height){
9372return[
9373parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),
9374parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)
9375];
9376}
9377function parseCss(element,property){
9378return parseInt($.css(element,property),10)||0;
9379}
9380function isWindow(obj){
9381return obj!=null&&obj===obj.window;
9382}
9383function getDimensions(elem){
9384var raw=elem[0];
9385if(raw.nodeType===9){
9386return{
9387width:elem.width(),
9388height:elem.height(),
9389offset:{top:0,left:0}
9390};
9391}
9392if(isWindow(raw)){
9393return{
9394width:elem.width(),
9395height:elem.height(),
9396offset:{top:elem.scrollTop(),left:elem.scrollLeft()}
9397};
9398}
9399if(raw.preventDefault){
9400return{
9401width:0,
9402height:0,
9403offset:{top:raw.pageY,left:raw.pageX}
9404};
9405}
9406return{
9407width:elem.outerWidth(),
9408height:elem.outerHeight(),
9409offset:elem.offset()
9410};
9411}
9412$.position={
9413scrollbarWidth:function(){
9414if(cachedScrollbarWidth!==undefined){
9415return cachedScrollbarWidth;
9416}
9417var w1,w2,
9418div=$("<div style="+
9419"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>"+
9420"<div style='height:300px;width:auto;'></div></div>"),
9421innerDiv=div.children()[0];
9422$("body").append(div);
9423w1=innerDiv.offsetWidth;
9424div.css("overflow","scroll");
9425w2=innerDiv.offsetWidth;
9426if(w1===w2){
9427w2=div[0].clientWidth;
9428}
9429div.remove();
9430return(cachedScrollbarWidth=w1-w2);
9431},
9432getScrollInfo:function(within){
9433var overflowX=within.isWindow||within.isDocument?"":
9434within.element.css("overflow-x"),
9435overflowY=within.isWindow||within.isDocument?"":
9436within.element.css("overflow-y"),
9437hasOverflowX=overflowX==="scroll"||
9438(overflowX==="auto"&&within.width<within.element[0].scrollWidth),
9439hasOverflowY=overflowY==="scroll"||
9440(overflowY==="auto"&&within.height<within.element[0].scrollHeight);
9441return{
9442width:hasOverflowY?$.position.scrollbarWidth():0,
9443height:hasOverflowX?$.position.scrollbarWidth():0
9444};
9445},
9446getWithinInfo:function(element){
9447var withinElement=$(element||window),
9448isElemWindow=isWindow(withinElement[0]),
9449isDocument=!!withinElement[0]&&withinElement[0].nodeType===9,
9450hasOffset=!isElemWindow&&!isDocument;
9451return{
9452element:withinElement,
9453isWindow:isElemWindow,
9454isDocument:isDocument,
9455offset:hasOffset?$(element).offset():{left:0,top:0},
9456scrollLeft:withinElement.scrollLeft(),
9457scrollTop:withinElement.scrollTop(),
9458width:withinElement.outerWidth(),
9459height:withinElement.outerHeight()
9460};
9461}
9462};
9463$.fn.position=function(options){
9464if(!options||!options.of){
9465return _position.apply(this,arguments);
9466}
9467options=$.extend({},options);
9468var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,
9469target=typeof options.of==="string"?
9470$(document).find(options.of):
9471$(options.of),
9472within=$.position.getWithinInfo(options.within),
9473scrollInfo=$.position.getScrollInfo(within),
9474collision=(options.collision||"flip").split(" "),
9475offsets={};
9476dimensions=getDimensions(target);
9477if(target[0].preventDefault){
9478options.at="left top";
9479}
9480targetWidth=dimensions.width;
9481targetHeight=dimensions.height;
9482targetOffset=dimensions.offset;
9483basePosition=$.extend({},targetOffset);
9484$.each(["my","at"],function(){
9485var pos=(options[this]||"").split(" "),
9486horizontalOffset,
9487verticalOffset;
9488if(pos.length===1){
9489pos=rhorizontal.test(pos[0])?
9490pos.concat(["center"]):
9491rvertical.test(pos[0])?
9492["center"].concat(pos):
9493["center","center"];
9494}
9495pos[0]=rhorizontal.test(pos[0])?pos[0]:"center";
9496pos[1]=rvertical.test(pos[1])?pos[1]:"center";
9497horizontalOffset=roffset.exec(pos[0]);
9498verticalOffset=roffset.exec(pos[1]);
9499offsets[this]=[
9500horizontalOffset?horizontalOffset[0]:0,
9501verticalOffset?verticalOffset[0]:0
9502];
9503options[this]=[
9504rposition.exec(pos[0])[0],
9505rposition.exec(pos[1])[0]
9506];
9507});
9508if(collision.length===1){
9509collision[1]=collision[0];
9510}
9511if(options.at[0]==="right"){
9512basePosition.left+=targetWidth;
9513}else if(options.at[0]==="center"){
9514basePosition.left+=targetWidth/2;
9515}
9516if(options.at[1]==="bottom"){
9517basePosition.top+=targetHeight;
9518}else if(options.at[1]==="center"){
9519basePosition.top+=targetHeight/2;
9520}
9521atOffset=getOffsets(offsets.at,targetWidth,targetHeight);
9522basePosition.left+=atOffset[0];
9523basePosition.top+=atOffset[1];
9524return this.each(function(){
9525var collisionPosition,using,
9526elem=$(this),
9527elemWidth=elem.outerWidth(),
9528elemHeight=elem.outerHeight(),
9529marginLeft=parseCss(this,"marginLeft"),
9530marginTop=parseCss(this,"marginTop"),
9531collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+
9532scrollInfo.width,
9533collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+
9534scrollInfo.height,
9535position=$.extend({},basePosition),
9536myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());
9537if(options.my[0]==="right"){
9538position.left-=elemWidth;
9539}else if(options.my[0]==="center"){
9540position.left-=elemWidth/2;
9541}
9542if(options.my[1]==="bottom"){
9543position.top-=elemHeight;
9544}else if(options.my[1]==="center"){
9545position.top-=elemHeight/2;
9546}
9547position.left+=myOffset[0];
9548position.top+=myOffset[1];
9549collisionPosition={
9550marginLeft:marginLeft,
9551marginTop:marginTop
9552};
9553$.each(["left","top"],function(i,dir){
9554if($.ui.position[collision[i]]){
9555$.ui.position[collision[i]][dir](position,{
9556targetWidth:targetWidth,
9557targetHeight:targetHeight,
9558elemWidth:elemWidth,
9559elemHeight:elemHeight,
9560collisionPosition:collisionPosition,
9561collisionWidth:collisionWidth,
9562collisionHeight:collisionHeight,
9563offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],
9564my:options.my,
9565at:options.at,
9566within:within,
9567elem:elem
9568});
9569}
9570});
9571if(options.using){
9572using=function(props){
9573var left=targetOffset.left-position.left,
9574right=left+targetWidth-elemWidth,
9575top=targetOffset.top-position.top,
9576bottom=top+targetHeight-elemHeight,
9577feedback={
9578target:{
9579element:target,
9580left:targetOffset.left,
9581top:targetOffset.top,
9582width:targetWidth,
9583height:targetHeight
9584},
9585element:{
9586element:elem,
9587left:position.left,
9588top:position.top,
9589width:elemWidth,
9590height:elemHeight
9591},
9592horizontal:right<0?"left":left>0?"right":"center",
9593vertical:bottom<0?"top":top>0?"bottom":"middle"
9594};
9595if(targetWidth<elemWidth&&abs(left+right)<targetWidth){
9596feedback.horizontal="center";
9597}
9598if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight){
9599feedback.vertical="middle";
9600}
9601if(max(abs(left),abs(right))>max(abs(top),abs(bottom))){
9602feedback.important="horizontal";
9603}else{
9604feedback.important="vertical";
9605}
9606options.using.call(this,props,feedback);
9607};
9608}
9609elem.offset($.extend(position,{using:using}));
9610});
9611};
9612$.ui.position={
9613fit:{
9614left:function(position,data){
9615var within=data.within,
9616withinOffset=within.isWindow?within.scrollLeft:within.offset.left,
9617outerWidth=within.width,
9618collisionPosLeft=position.left-data.collisionPosition.marginLeft,
9619overLeft=withinOffset-collisionPosLeft,
9620overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset,
9621newOverRight;
9622if(data.collisionWidth>outerWidth){
9623if(overLeft>0&&overRight<=0){
9624newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-
9625withinOffset;
9626position.left+=overLeft-newOverRight;
9627}else if(overRight>0&&overLeft<=0){
9628position.left=withinOffset;
9629}else{
9630if(overLeft>overRight){
9631position.left=withinOffset+outerWidth-data.collisionWidth;
9632}else{
9633position.left=withinOffset;
9634}
9635}
9636}else if(overLeft>0){
9637position.left+=overLeft;
9638}else if(overRight>0){
9639position.left-=overRight;
9640}else{
9641position.left=max(position.left-collisionPosLeft,position.left);
9642}
9643},
9644top:function(position,data){
9645var within=data.within,
9646withinOffset=within.isWindow?within.scrollTop:within.offset.top,
9647outerHeight=data.within.height,
9648collisionPosTop=position.top-data.collisionPosition.marginTop,
9649overTop=withinOffset-collisionPosTop,
9650overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset,
9651newOverBottom;
9652if(data.collisionHeight>outerHeight){
9653if(overTop>0&&overBottom<=0){
9654newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-
9655withinOffset;
9656position.top+=overTop-newOverBottom;
9657}else if(overBottom>0&&overTop<=0){
9658position.top=withinOffset;
9659}else{
9660if(overTop>overBottom){
9661position.top=withinOffset+outerHeight-data.collisionHeight;
9662}else{
9663position.top=withinOffset;
9664}
9665}
9666}else if(overTop>0){
9667position.top+=overTop;
9668}else if(overBottom>0){
9669position.top-=overBottom;
9670}else{
9671position.top=max(position.top-collisionPosTop,position.top);
9672}
9673}
9674},
9675flip:{
9676left:function(position,data){
9677var within=data.within,
9678withinOffset=within.offset.left+within.scrollLeft,
9679outerWidth=within.width,
9680offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,
9681collisionPosLeft=position.left-data.collisionPosition.marginLeft,
9682overLeft=collisionPosLeft-offsetLeft,
9683overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,
9684myOffset=data.my[0]==="left"?
9685-data.elemWidth:
9686data.my[0]==="right"?
9687data.elemWidth:
96880,
9689atOffset=data.at[0]==="left"?
9690data.targetWidth:
9691data.at[0]==="right"?
9692-data.targetWidth:
96930,
9694offset=-2*data.offset[0],
9695newOverRight,
9696newOverLeft;
9697if(overLeft<0){
9698newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-
9699outerWidth-withinOffset;
9700if(newOverRight<0||newOverRight<abs(overLeft)){
9701position.left+=myOffset+atOffset+offset;
9702}
9703}else if(overRight>0){
9704newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+
9705atOffset+offset-offsetLeft;
9706if(newOverLeft>0||abs(newOverLeft)<overRight){
9707position.left+=myOffset+atOffset+offset;
9708}
9709}
9710},
9711top:function(position,data){
9712var within=data.within,
9713withinOffset=within.offset.top+within.scrollTop,
9714outerHeight=within.height,
9715offsetTop=within.isWindow?within.scrollTop:within.offset.top,
9716collisionPosTop=position.top-data.collisionPosition.marginTop,
9717overTop=collisionPosTop-offsetTop,
9718overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop,
9719top=data.my[1]==="top",
9720myOffset=top?
9721-data.elemHeight:
9722data.my[1]==="bottom"?
9723data.elemHeight:
97240,
9725atOffset=data.at[1]==="top"?
9726data.targetHeight:
9727data.at[1]==="bottom"?
9728-data.targetHeight:
97290,
9730offset=-2*data.offset[1],
9731newOverTop,
9732newOverBottom;
9733if(overTop<0){
9734newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-
9735outerHeight-withinOffset;
9736if(newOverBottom<0||newOverBottom<abs(overTop)){
9737position.top+=myOffset+atOffset+offset;
9738}
9739}else if(overBottom>0){
9740newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+
9741offset-offsetTop;
9742if(newOverTop>0||abs(newOverTop)<overBottom){
9743position.top+=myOffset+atOffset+offset;
9744}
9745}
9746}
9747},
9748flipfit:{
9749left:function(){
9750$.ui.position.flip.left.apply(this,arguments);
9751$.ui.position.fit.left.apply(this,arguments);
9752},
9753top:function(){
9754$.ui.position.flip.top.apply(this,arguments);
9755$.ui.position.fit.top.apply(this,arguments);
9756}
9757}
9758};
9759})();
9760var position=$.ui.position;
9761var data=$.extend($.expr.pseudos,{
9762data:$.expr.createPseudo(function(dataName){
9763return function(elem){
9764return!!$.data(elem,dataName);
9765};
9766})
9767});
9768var disableSelection=$.fn.extend({
9769disableSelection:(function(){
9770var eventType="onselectstart"in document.createElement("div")?
9771"selectstart":
9772"mousedown";
9773return function(){
9774return this.on(eventType+".ui-disableSelection",function(event){
9775event.preventDefault();
9776});
9777};
9778})(),
9779enableSelection:function(){
9780return this.off(".ui-disableSelection");
9781}
9782});
9783var jQuery=$;
9784var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor "+
9785"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
9786class2type={},
9787toString=class2type.toString,
9788rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,
9789stringParsers=[{
9790re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
9791parse:function(execResult){
9792return[
9793execResult[1],
9794execResult[2],
9795execResult[3],
9796execResult[4]
9797];
9798}
9799},{
9800re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
9801parse:function(execResult){
9802return[
9803execResult[1]*2.55,
9804execResult[2]*2.55,
9805execResult[3]*2.55,
9806execResult[4]
9807];
9808}
9809},{
9810re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
9811parse:function(execResult){
9812return[
9813parseInt(execResult[1],16),
9814parseInt(execResult[2],16),
9815parseInt(execResult[3],16),
9816execResult[4]?
9817(parseInt(execResult[4],16)/255).toFixed(2):
98181
9819];
9820}
9821},{
9822re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
9823parse:function(execResult){
9824return[
9825parseInt(execResult[1]+execResult[1],16),
9826parseInt(execResult[2]+execResult[2],16),
9827parseInt(execResult[3]+execResult[3],16),
9828execResult[4]?
9829(parseInt(execResult[4]+execResult[4],16)/255)
9830.toFixed(2):
98311
9832];
9833}
9834},{
9835re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
9836space:"hsla",
9837parse:function(execResult){
9838return[
9839execResult[1],
9840execResult[2]/100,
9841execResult[3]/100,
9842execResult[4]
9843];
9844}
9845}],
9846color=jQuery.Color=function(color,green,blue,alpha){
9847return new jQuery.Color.fn.parse(color,green,blue,alpha);
9848},
9849spaces={
9850rgba:{
9851props:{
9852red:{
9853idx:0,
9854type:"byte"
9855},
9856green:{
9857idx:1,
9858type:"byte"
9859},
9860blue:{
9861idx:2,
9862type:"byte"
9863}
9864}
9865},
9866hsla:{
9867props:{
9868hue:{
9869idx:0,
9870type:"degrees"
9871},
9872saturation:{
9873idx:1,
9874type:"percent"
9875},
9876lightness:{
9877idx:2,
9878type:"percent"
9879}
9880}
9881}
9882},
9883propTypes={
9884"byte":{
9885floor:true,
9886max:255
9887},
9888"percent":{
9889max:1
9890},
9891"degrees":{
9892mod:360,
9893floor:true
9894}
9895},
9896colors,
9897each=jQuery.each;
9898each(spaces,function(spaceName,space){
9899space.cache="_"+spaceName;
9900space.props.alpha={
9901idx:3,
9902type:"percent",
9903def:1
9904};
9905});
9906jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
9907function(_i,name){
9908class2type["[object "+name+"]"]=name.toLowerCase();
9909});
9910function getType(obj){
9911if(obj==null){
9912return obj+"";
9913}
9914return typeof obj==="object"?
9915class2type[toString.call(obj)]||"object":
9916typeof obj;
9917}
9918function clamp(value,prop,allowEmpty){
9919var type=propTypes[prop.type]||{};
9920if(value==null){
9921return(allowEmpty||!prop.def)?null:prop.def;
9922}
9923value=type.floor?~~value:parseFloat(value);
9924if(type.mod){
9925return(value+type.mod)%type.mod;
9926}
9927return Math.min(type.max,Math.max(0,value));
9928}
9929function stringParse(string){
9930var inst=color(),
9931rgba=inst._rgba=[];
9932string=string.toLowerCase();
9933each(stringParsers,function(_i,parser){
9934var parsed,
9935match=parser.re.exec(string),
9936values=match&&parser.parse(match),
9937spaceName=parser.space||"rgba";
9938if(values){
9939parsed=inst[spaceName](values);
9940inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache];
9941rgba=inst._rgba=parsed._rgba;
9942return false;
9943}
9944});
9945if(rgba.length){
9946if(rgba.join()==="0,0,0,0"){
9947jQuery.extend(rgba,colors.transparent);
9948}
9949return inst;
9950}
9951return colors[string];
9952}
9953color.fn=jQuery.extend(color.prototype,{
9954parse:function(red,green,blue,alpha){
9955if(red===undefined){
9956this._rgba=[null,null,null,null];
9957return this;
9958}
9959if(red.jquery||red.nodeType){
9960red=jQuery(red).css(green);
9961green=undefined;
9962}
9963var inst=this,
9964type=getType(red),
9965rgba=this._rgba=[];
9966if(green!==undefined){
9967red=[red,green,blue,alpha];
9968type="array";
9969}
9970if(type==="string"){
9971return this.parse(stringParse(red)||colors._default);
9972}
9973if(type==="array"){
9974each(spaces.rgba.props,function(_key,prop){
9975rgba[prop.idx]=clamp(red[prop.idx],prop);
9976});
9977return this;
9978}
9979if(type==="object"){
9980if(red instanceof color){
9981each(spaces,function(_spaceName,space){
9982if(red[space.cache]){
9983inst[space.cache]=red[space.cache].slice();
9984}
9985});
9986}else{
9987each(spaces,function(_spaceName,space){
9988var cache=space.cache;
9989each(space.props,function(key,prop){
9990if(!inst[cache]&&space.to){
9991if(key==="alpha"||red[key]==null){
9992return;
9993}
9994inst[cache]=space.to(inst._rgba);
9995}
9996inst[cache][prop.idx]=clamp(red[key],prop,true);
9997});
9998if(inst[cache]&&jQuery.inArray(
9999null,
10000inst[cache].slice(0,3)
10001)<0){
10002if(inst[cache][3]==null){
10003inst[cache][3]=1;
10004}
10005if(space.from){
10006inst._rgba=space.from(inst[cache]);
10007}
10008}
10009});
10010}
10011return this;
10012}
10013},
10014is:function(compare){
10015var is=color(compare),
10016same=true,
10017inst=this;
10018each(spaces,function(_,space){
10019var localCache,
10020isCache=is[space.cache];
10021if(isCache){
10022localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[];
10023each(space.props,function(_,prop){
10024if(isCache[prop.idx]!=null){
10025same=(isCache[prop.idx]===localCache[prop.idx]);
10026return same;
10027}
10028});
10029}
10030return same;
10031});
10032return same;
10033},
10034_space:function(){
10035var used=[],
10036inst=this;
10037each(spaces,function(spaceName,space){
10038if(inst[space.cache]){
10039used.push(spaceName);
10040}
10041});
10042return used.pop();
10043},
10044transition:function(other,distance){
10045var end=color(other),
10046spaceName=end._space(),
10047space=spaces[spaceName],
10048startColor=this.alpha()===0?color("transparent"):this,
10049start=startColor[space.cache]||space.to(startColor._rgba),
10050result=start.slice();
10051end=end[space.cache];
10052each(space.props,function(_key,prop){
10053var index=prop.idx,
10054startValue=start[index],
10055endValue=end[index],
10056type=propTypes[prop.type]||{};
10057if(endValue===null){
10058return;
10059}
10060if(startValue===null){
10061result[index]=endValue;
10062}else{
10063if(type.mod){
10064if(endValue-startValue>type.mod/2){
10065startValue+=type.mod;
10066}else if(startValue-endValue>type.mod/2){
10067startValue-=type.mod;
10068}
10069}
10070result[index]=clamp((endValue-startValue)*distance+startValue,prop);
10071}
10072});
10073return this[spaceName](result);
10074},
10075blend:function(opaque){
10076if(this._rgba[3]===1){
10077return this;
10078}
10079var rgb=this._rgba.slice(),
10080a=rgb.pop(),
10081blend=color(opaque)._rgba;
10082return color(jQuery.map(rgb,function(v,i){
10083return(1-a)*blend[i]+a*v;
10084}));
10085},
10086toRgbaString:function(){
10087var prefix="rgba(",
10088rgba=jQuery.map(this._rgba,function(v,i){
10089if(v!=null){
10090return v;
10091}
10092return i>2?1:0;
10093});
10094if(rgba[3]===1){
10095rgba.pop();
10096prefix="rgb(";
10097}
10098return prefix+rgba.join(", ")+")";
10099},
10100toHslaString:function(){
10101var prefix="hsla(",
10102hsla=jQuery.map(this.hsla(),function(v,i){
10103if(v==null){
10104v=i>2?1:0;
10105}
10106if(i&&i<3){
10107v=Math.round(v*100)+"%";
10108}
10109return v;
10110});
10111if(hsla[3]===1){
10112hsla.pop();
10113prefix="hsl(";
10114}
10115return prefix+hsla.join(", ")+")";
10116},
10117toHexString:function(includeAlpha){
10118var rgba=this._rgba.slice(),
10119alpha=rgba.pop();
10120if(includeAlpha){
10121rgba.push(~~(alpha*255));
10122}
10123return"#"+jQuery.map(rgba,function(v){
10124return("0"+(v||0).toString(16)).substr(-2);
10125}).join("");
10126},
10127toString:function(){
10128return this.toRgbaString();
10129}
10130});
10131color.fn.parse.prototype=color.fn;
10132function hue2rgb(p,q,h){
10133h=(h+1)%1;
10134if(h*6<1){
10135return p+(q-p)*h*6;
10136}
10137if(h*2<1){
10138return q;
10139}
10140if(h*3<2){
10141return p+(q-p)*((2/3)-h)*6;
10142}
10143return p;
10144}
10145spaces.hsla.to=function(rgba){
10146if(rgba[0]==null||rgba[1]==null||rgba[2]==null){
10147return[null,null,null,rgba[3]];
10148}
10149var r=rgba[0]/255,
10150g=rgba[1]/255,
10151b=rgba[2]/255,
10152a=rgba[3],
10153max=Math.max(r,g,b),
10154min=Math.min(r,g,b),
10155diff=max-min,
10156add=max+min,
10157l=add*0.5,
10158h,s;
10159if(min===max){
10160h=0;
10161}else if(r===max){
10162h=(60*(g-b)/diff)+360;
10163}else if(g===max){
10164h=(60*(b-r)/diff)+120;
10165}else{
10166h=(60*(r-g)/diff)+240;
10167}
10168if(diff===0){
10169s=0;
10170}else if(l<=0.5){
10171s=diff/add;
10172}else{
10173s=diff/(2-add);
10174}
10175return[Math.round(h)%360,s,l,a==null?1:a];
10176};
10177spaces.hsla.from=function(hsla){
10178if(hsla[0]==null||hsla[1]==null||hsla[2]==null){
10179return[null,null,null,hsla[3]];
10180}
10181var h=hsla[0]/360,
10182s=hsla[1],
10183l=hsla[2],
10184a=hsla[3],
10185q=l<=0.5?l*(1+s):l+s-l*s,
10186p=2*l-q;
10187return[
10188Math.round(hue2rgb(p,q,h+(1/3))*255),
10189Math.round(hue2rgb(p,q,h)*255),
10190Math.round(hue2rgb(p,q,h-(1/3))*255),
10191a
10192];
10193};
10194each(spaces,function(spaceName,space){
10195var props=space.props,
10196cache=space.cache,
10197to=space.to,
10198from=space.from;
10199color.fn[spaceName]=function(value){
10200if(to&&!this[cache]){
10201this[cache]=to(this._rgba);
10202}
10203if(value===undefined){
10204return this[cache].slice();
10205}
10206var ret,
10207type=getType(value),
10208arr=(type==="array"||type==="object")?value:arguments,
10209local=this[cache].slice();
10210each(props,function(key,prop){
10211var val=arr[type==="object"?key:prop.idx];
10212if(val==null){
10213val=local[prop.idx];
10214}
10215local[prop.idx]=clamp(val,prop);
10216});
10217if(from){
10218ret=color(from(local));
10219ret[cache]=local;
10220return ret;
10221}else{
10222return color(local);
10223}
10224};
10225each(props,function(key,prop){
10226if(color.fn[key]){
10227return;
10228}
10229color.fn[key]=function(value){
10230var local,cur,match,fn,
10231vtype=getType(value);
10232if(key==="alpha"){
10233fn=this._hsla?"hsla":"rgba";
10234}else{
10235fn=spaceName;
10236}
10237local=this[fn]();
10238cur=local[prop.idx];
10239if(vtype==="undefined"){
10240return cur;
10241}
10242if(vtype==="function"){
10243value=value.call(this,cur);
10244vtype=getType(value);
10245}
10246if(value==null&&prop.empty){
10247return this;
10248}
10249if(vtype==="string"){
10250match=rplusequals.exec(value);
10251if(match){
10252value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1);
10253}
10254}
10255local[prop.idx]=value;
10256return this[fn](local);
10257};
10258});
10259});
10260color.hook=function(hook){
10261var hooks=hook.split(" ");
10262each(hooks,function(_i,hook){
10263jQuery.cssHooks[hook]={
10264set:function(elem,value){
10265var parsed;
10266if(value!=="transparent"&&
10267(getType(value)!=="string"||
10268(parsed=stringParse(value)))){
10269value=color(parsed||value);
10270value=value.toRgbaString();
10271}
10272elem.style[hook]=value;
10273}
10274};
10275jQuery.fx.step[hook]=function(fx){
10276if(!fx.colorInit){
10277fx.start=color(fx.elem,hook);
10278fx.end=color(fx.end);
10279fx.colorInit=true;
10280}
10281jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos));
10282};
10283});
10284};
10285color.hook(stepHooks);
10286jQuery.cssHooks.borderColor={
10287expand:function(value){
10288var expanded={};
10289each(["Top","Right","Bottom","Left"],function(_i,part){
10290expanded["border"+part+"Color"]=value;
10291});
10292return expanded;
10293}
10294};
10295colors=jQuery.Color.names={
10296aqua:"#00ffff",
10297black:"#000000",
10298blue:"#0000ff",
10299fuchsia:"#ff00ff",
10300gray:"#808080",
10301green:"#008000",
10302lime:"#00ff00",
10303maroon:"#800000",
10304navy:"#000080",
10305olive:"#808000",
10306purple:"#800080",
10307red:"#ff0000",
10308silver:"#c0c0c0",
10309teal:"#008080",
10310white:"#ffffff",
10311yellow:"#ffff00",
10312transparent:[null,null,null,0],
10313_default:"#ffffff"
10314};
10315var dataSpace="ui-effects-",
10316dataSpaceStyle="ui-effects-style",
10317dataSpaceAnimated="ui-effects-animated";
10318$.effects={
10319effect:{}
10320};
10321(function(){
10322var classAnimationActions=["add","remove","toggle"],
10323shorthandStyles={
10324border:1,
10325borderBottom:1,
10326borderColor:1,
10327borderLeft:1,
10328borderRight:1,
10329borderTop:1,
10330borderWidth:1,
10331margin:1,
10332padding:1
10333};
10334$.each(
10335["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],
10336function(_,prop){
10337$.fx.step[prop]=function(fx){
10338if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){
10339jQuery.style(fx.elem,prop,fx.end);
10340fx.setAttr=true;
10341}
10342};
10343}
10344);
10345function camelCase(string){
10346return string.replace(/-([\da-z])/gi,function(all,letter){
10347return letter.toUpperCase();
10348});
10349}
10350function getElementStyles(elem){
10351var key,len,
10352style=elem.ownerDocument.defaultView.getComputedStyle(elem),
10353styles={};
10354len=style.length;
10355while(len--){
10356key=style[len];
10357if(typeof style[key]==="string"){
10358styles[camelCase(key)]=style[key];
10359}
10360}
10361return styles;
10362}
10363function styleDifference(oldStyle,newStyle){
10364var diff={},
10365name,value;
10366for(name in newStyle){
10367value=newStyle[name];
10368if(oldStyle[name]!==value){
10369if(!shorthandStyles[name]){
10370if($.fx.step[name]||!isNaN(parseFloat(value))){
10371diff[name]=value;
10372}
10373}
10374}
10375}
10376return diff;
10377}
10378$.effects.animateClass=function(value,duration,easing,callback){
10379var o=$.speed(duration,easing,callback);
10380return this.queue(function(){
10381var animated=$(this),
10382baseClass=animated.attr("class")||"",
10383applyClassChange,
10384allAnimations=o.children?animated.find("*").addBack():animated;
10385allAnimations=allAnimations.map(function(){
10386var el=$(this);
10387return{
10388el:el,
10389start:getElementStyles(this)
10390};
10391});
10392applyClassChange=function(){
10393$.each(classAnimationActions,function(i,action){
10394if(value[action]){
10395animated[action+"Class"](value[action]);
10396}
10397});
10398};
10399applyClassChange();
10400allAnimations=allAnimations.map(function(){
10401this.end=getElementStyles(this.el[0]);
10402this.diff=styleDifference(this.start,this.end);
10403return this;
10404});
10405animated.attr("class",baseClass);
10406allAnimations=allAnimations.map(function(){
10407var styleInfo=this,
10408dfd=$.Deferred(),
10409opts=$.extend({},o,{
10410queue:false,
10411complete:function(){
10412dfd.resolve(styleInfo);
10413}
10414});
10415this.el.animate(this.diff,opts);
10416return dfd.promise();
10417});
10418$.when.apply($,allAnimations.get()).done(function(){
10419applyClassChange();
10420$.each(arguments,function(){
10421var el=this.el;
10422$.each(this.diff,function(key){
10423el.css(key,"");
10424});
10425});
10426o.complete.call(animated[0]);
10427});
10428});
10429};
10430$.fn.extend({
10431addClass:(function(orig){
10432return function(classNames,speed,easing,callback){
10433return speed?
10434$.effects.animateClass.call(this,
10435{add:classNames},speed,easing,callback):
10436orig.apply(this,arguments);
10437};
10438})($.fn.addClass),
10439removeClass:(function(orig){
10440return function(classNames,speed,easing,callback){
10441return arguments.length>1?
10442$.effects.animateClass.call(this,
10443{remove:classNames},speed,easing,callback):
10444orig.apply(this,arguments);
10445};
10446})($.fn.removeClass),
10447toggleClass:(function(orig){
10448return function(classNames,force,speed,easing,callback){
10449if(typeof force==="boolean"||force===undefined){
10450if(!speed){
10451return orig.apply(this,arguments);
10452}else{
10453return $.effects.animateClass.call(this,
10454(force?{add:classNames}:{remove:classNames}),
10455speed,easing,callback);
10456}
10457}else{
10458return $.effects.animateClass.call(this,
10459{toggle:classNames},force,speed,easing);
10460}
10461};
10462})($.fn.toggleClass),
10463switchClass:function(remove,add,speed,easing,callback){
10464return $.effects.animateClass.call(this,{
10465add:add,
10466remove:remove
10467},speed,easing,callback);
10468}
10469});
10470})();
10471(function(){
10472if($.expr&&$.expr.pseudos&&$.expr.pseudos.animated){
10473$.expr.pseudos.animated=(function(orig){
10474return function(elem){
10475return!!$(elem).data(dataSpaceAnimated)||orig(elem);
10476};
10477})($.expr.pseudos.animated);
10478}
10479if($.uiBackCompat===true){
10480$.extend($.effects,{
10481save:function(element,set){
10482var i=0,length=set.length;
10483for(;i<length;i++){
10484if(set[i]!==null){
10485element.data(dataSpace+set[i],element[0].style[set[i]]);
10486}
10487}
10488},
10489restore:function(element,set){
10490var val,i=0,length=set.length;
10491for(;i<length;i++){
10492if(set[i]!==null){
10493val=element.data(dataSpace+set[i]);
10494element.css(set[i],val);
10495}
10496}
10497},
10498setMode:function(el,mode){
10499if(mode==="toggle"){
10500mode=el.is(":hidden")?"show":"hide";
10501}
10502return mode;
10503},
10504createWrapper:function(element){
10505if(element.parent().is(".ui-effects-wrapper")){
10506return element.parent();
10507}
10508var props={
10509width:element.outerWidth(true),
10510height:element.outerHeight(true),
10511"float":element.css("float")
10512},
10513wrapper=$("<div></div>")
10514.addClass("ui-effects-wrapper")
10515.css({
10516fontSize:"100%",
10517background:"transparent",
10518border:"none",
10519margin:0,
10520padding:0
10521}),
10522size={
10523width:element.width(),
10524height:element.height()
10525},
10526active=document.activeElement;
10527try{
10528active.id;
10529}catch(e){
10530active=document.body;
10531}
10532element.wrap(wrapper);
10533if(element[0]===active||$.contains(element[0],active)){
10534$(active).trigger("focus");
10535}
10536wrapper=element.parent();
10537if(element.css("position")==="static"){
10538wrapper.css({position:"relative"});
10539element.css({position:"relative"});
10540}else{
10541$.extend(props,{
10542position:element.css("position"),
10543zIndex:element.css("z-index")
10544});
10545$.each(["top","left","bottom","right"],function(i,pos){
10546props[pos]=element.css(pos);
10547if(isNaN(parseInt(props[pos],10))){
10548props[pos]="auto";
10549}
10550});
10551element.css({
10552position:"relative",
10553top:0,
10554left:0,
10555right:"auto",
10556bottom:"auto"
10557});
10558}
10559element.css(size);
10560return wrapper.css(props).show();
10561},
10562removeWrapper:function(element){
10563var active=document.activeElement;
10564if(element.parent().is(".ui-effects-wrapper")){
10565element.parent().replaceWith(element);
10566if(element[0]===active||$.contains(element[0],active)){
10567$(active).trigger("focus");
10568}
10569}
10570return element;
10571}
10572});
10573}
10574$.extend($.effects,{
10575version:"1.14.1",
10576define:function(name,mode,effect){
10577if(!effect){
10578effect=mode;
10579mode="effect";
10580}
10581$.effects.effect[name]=effect;
10582$.effects.effect[name].mode=mode;
10583return effect;
10584},
10585scaledDimensions:function(element,percent,direction){
10586if(percent===0){
10587return{
10588height:0,
10589width:0,
10590outerHeight:0,
10591outerWidth:0
10592};
10593}
10594var x=direction!=="horizontal"?((percent||100)/100):1,
10595y=direction!=="vertical"?((percent||100)/100):1;
10596return{
10597height:element.height()*y,
10598width:element.width()*x,
10599outerHeight:element.outerHeight()*y,
10600outerWidth:element.outerWidth()*x
10601};
10602},
10603clipToBox:function(animation){
10604return{
10605width:animation.clip.right-animation.clip.left,
10606height:animation.clip.bottom-animation.clip.top,
10607left:animation.clip.left,
10608top:animation.clip.top
10609};
10610},
10611unshift:function(element,queueLength,count){
10612var queue=element.queue();
10613if(queueLength>1){
10614queue.splice.apply(queue,
10615[1,0].concat(queue.splice(queueLength,count)));
10616}
10617element.dequeue();
10618},
10619saveStyle:function(element){
10620element.data(dataSpaceStyle,element[0].style.cssText);
10621},
10622restoreStyle:function(element){
10623element[0].style.cssText=element.data(dataSpaceStyle)||"";
10624element.removeData(dataSpaceStyle);
10625},
10626mode:function(element,mode){
10627var hidden=element.is(":hidden");
10628if(mode==="toggle"){
10629mode=hidden?"show":"hide";
10630}
10631if(hidden?mode==="hide":mode==="show"){
10632mode="none";
10633}
10634return mode;
10635},
10636getBaseline:function(origin,original){
10637var y,x;
10638switch(origin[0]){
10639case"top":
10640y=0;
10641break;
10642case"middle":
10643y=0.5;
10644break;
10645case"bottom":
10646y=1;
10647break;
10648default:
10649y=origin[0]/original.height;
10650}
10651switch(origin[1]){
10652case"left":
10653x=0;
10654break;
10655case"center":
10656x=0.5;
10657break;
10658case"right":
10659x=1;
10660break;
10661default:
10662x=origin[1]/original.width;
10663}
10664return{
10665x:x,
10666y:y
10667};
10668},
10669createPlaceholder:function(element){
10670var placeholder,
10671cssPosition=element.css("position"),
10672position=element.position();
10673element.css({
10674marginTop:element.css("marginTop"),
10675marginBottom:element.css("marginBottom"),
10676marginLeft:element.css("marginLeft"),
10677marginRight:element.css("marginRight")
10678})
10679.outerWidth(element.outerWidth())
10680.outerHeight(element.outerHeight());
10681if(/^(static|relative)/.test(cssPosition)){
10682cssPosition="absolute";
10683placeholder=$("<"+element[0].nodeName+">").insertAfter(element).css({
10684display:/^(inline|ruby)/.test(element.css("display"))?
10685"inline-block":
10686"block",
10687visibility:"hidden",
10688marginTop:element.css("marginTop"),
10689marginBottom:element.css("marginBottom"),
10690marginLeft:element.css("marginLeft"),
10691marginRight:element.css("marginRight"),
10692"float":element.css("float")
10693})
10694.outerWidth(element.outerWidth())
10695.outerHeight(element.outerHeight())
10696.addClass("ui-effects-placeholder");
10697element.data(dataSpace+"placeholder",placeholder);
10698}
10699element.css({
10700position:cssPosition,
10701left:position.left,
10702top:position.top
10703});
10704return placeholder;
10705},
10706removePlaceholder:function(element){
10707var dataKey=dataSpace+"placeholder",
10708placeholder=element.data(dataKey);
10709if(placeholder){
10710placeholder.remove();
10711element.removeData(dataKey);
10712}
10713},
10714cleanUp:function(element){
10715$.effects.restoreStyle(element);
10716$.effects.removePlaceholder(element);
10717},
10718setTransition:function(element,list,factor,value){
10719value=value||{};
10720$.each(list,function(i,x){
10721var unit=element.cssUnit(x);
10722if(unit[0]>0){
10723value[x]=unit[0]*factor+unit[1];
10724}
10725});
10726return value;
10727}
10728});
10729function _normalizeArguments(effect,options,speed,callback){
10730if($.isPlainObject(effect)){
10731options=effect;
10732effect=effect.effect;
10733}
10734effect={effect:effect};
10735if(options==null){
10736options={};
10737}
10738if(typeof options==="function"){
10739callback=options;
10740speed=null;
10741options={};
10742}
10743if(typeof options==="number"||$.fx.speeds[options]){
10744callback=speed;
10745speed=options;
10746options={};
10747}
10748if(typeof speed==="function"){
10749callback=speed;
10750speed=null;
10751}
10752if(options){
10753$.extend(effect,options);
10754}
10755speed=speed||options.duration;
10756effect.duration=$.fx.off?0:
10757typeof speed==="number"?speed:
10758speed in $.fx.speeds?$.fx.speeds[speed]:
10759$.fx.speeds._default;
10760effect.complete=callback||options.complete;
10761return effect;
10762}
10763function standardAnimationOption(option){
10764if(!option||typeof option==="number"||$.fx.speeds[option]){
10765return true;
10766}
10767if(typeof option==="string"&&!$.effects.effect[option]){
10768return true;
10769}
10770if(typeof option==="function"){
10771return true;
10772}
10773if(typeof option==="object"&&!option.effect){
10774return true;
10775}
10776return false;
10777}
10778$.fn.extend({
10779effect:function(){
10780var args=_normalizeArguments.apply(this,arguments),
10781effectMethod=$.effects.effect[args.effect],
10782defaultMode=effectMethod.mode,
10783queue=args.queue,
10784queueName=queue||"fx",
10785complete=args.complete,
10786mode=args.mode,
10787modes=[],
10788prefilter=function(next){
10789var el=$(this),
10790normalizedMode=$.effects.mode(el,mode)||defaultMode;
10791el.data(dataSpaceAnimated,true);
10792modes.push(normalizedMode);
10793if(defaultMode&&(normalizedMode==="show"||
10794(normalizedMode===defaultMode&&normalizedMode==="hide"))){
10795el.show();
10796}
10797if(!defaultMode||normalizedMode!=="none"){
10798$.effects.saveStyle(el);
10799}
10800if(typeof next==="function"){
10801next();
10802}
10803};
10804if($.fx.off||!effectMethod){
10805if(mode){
10806return this[mode](args.duration,complete);
10807}else{
10808return this.each(function(){
10809if(complete){
10810complete.call(this);
10811}
10812});
10813}
10814}
10815function run(next){
10816var elem=$(this);
10817function cleanup(){
10818elem.removeData(dataSpaceAnimated);
10819$.effects.cleanUp(elem);
10820if(args.mode==="hide"){
10821elem.hide();
10822}
10823done();
10824}
10825function done(){
10826if(typeof complete==="function"){
10827complete.call(elem[0]);
10828}
10829if(typeof next==="function"){
10830next();
10831}
10832}
10833args.mode=modes.shift();
10834if($.uiBackCompat===true&&!defaultMode){
10835if(elem.is(":hidden")?mode==="hide":mode==="show"){
10836elem[mode]();
10837done();
10838}else{
10839effectMethod.call(elem[0],args,done);
10840}
10841}else{
10842if(args.mode==="none"){
10843elem[mode]();
10844done();
10845}else{
10846effectMethod.call(elem[0],args,cleanup);
10847}
10848}
10849}
10850return queue===false?
10851this.each(prefilter).each(run):
10852this.queue(queueName,prefilter).queue(queueName,run);
10853},
10854show:(function(orig){
10855return function(option){
10856if(standardAnimationOption(option)){
10857return orig.apply(this,arguments);
10858}else{
10859var args=_normalizeArguments.apply(this,arguments);
10860args.mode="show";
10861return this.effect.call(this,args);
10862}
10863};
10864})($.fn.show),
10865hide:(function(orig){
10866return function(option){
10867if(standardAnimationOption(option)){
10868return orig.apply(this,arguments);
10869}else{
10870var args=_normalizeArguments.apply(this,arguments);
10871args.mode="hide";
10872return this.effect.call(this,args);
10873}
10874};
10875})($.fn.hide),
10876toggle:(function(orig){
10877return function(option){
10878if(standardAnimationOption(option)||typeof option==="boolean"){
10879return orig.apply(this,arguments);
10880}else{
10881var args=_normalizeArguments.apply(this,arguments);
10882args.mode="toggle";
10883return this.effect.call(this,args);
10884}
10885};
10886})($.fn.toggle),
10887cssUnit:function(key){
10888var style=this.css(key),
10889val=[];
10890$.each(["em","px","%","pt"],function(i,unit){
10891if(style.indexOf(unit)>0){
10892val=[parseFloat(style),unit];
10893}
10894});
10895return val;
10896},
10897cssClip:function(clipObj){
10898if(clipObj){
10899return this.css("clip","rect("+clipObj.top+"px "+clipObj.right+"px "+
10900clipObj.bottom+"px "+clipObj.left+"px)");
10901}
10902return parseClip(this.css("clip"),this);
10903},
10904transfer:function(options,done){
10905var element=$(this),
10906target=$(options.to),
10907targetFixed=target.css("position")==="fixed",
10908body=$("body"),
10909fixTop=targetFixed?body.scrollTop():0,
10910fixLeft=targetFixed?body.scrollLeft():0,
10911endPosition=target.offset(),
10912animation={
10913top:endPosition.top-fixTop,
10914left:endPosition.left-fixLeft,
10915height:target.innerHeight(),
10916width:target.innerWidth()
10917},
10918startPosition=element.offset(),
10919transfer=$("<div class='ui-effects-transfer'></div>");
10920transfer
10921.appendTo("body")
10922.addClass(options.className)
10923.css({
10924top:startPosition.top-fixTop,
10925left:startPosition.left-fixLeft,
10926height:element.innerHeight(),
10927width:element.innerWidth(),
10928position:targetFixed?"fixed":"absolute"
10929})
10930.animate(animation,options.duration,options.easing,function(){
10931transfer.remove();
10932if(typeof done==="function"){
10933done();
10934}
10935});
10936}
10937});
10938function parseClip(str,element){
10939var outerWidth=element.outerWidth(),
10940outerHeight=element.outerHeight(),
10941clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
10942values=clipRegex.exec(str)||["",0,outerWidth,outerHeight,0];
10943return{
10944top:parseFloat(values[1])||0,
10945right:values[2]==="auto"?outerWidth:parseFloat(values[2]),
10946bottom:values[3]==="auto"?outerHeight:parseFloat(values[3]),
10947left:parseFloat(values[4])||0
10948};
10949}
10950$.fx.step.clip=function(fx){
10951if(!fx.clipInit){
10952fx.start=$(fx.elem).cssClip();
10953if(typeof fx.end==="string"){
10954fx.end=parseClip(fx.end,fx.elem);
10955}
10956fx.clipInit=true;
10957}
10958$(fx.elem).cssClip({
10959top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,
10960right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,
10961bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,
10962left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left
10963});
10964};
10965})();
10966(function(){
10967var baseEasings={};
10968$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){
10969baseEasings[name]=function(p){
10970return Math.pow(p,i+2);
10971};
10972});
10973$.extend(baseEasings,{
10974Sine:function(p){
10975return 1-Math.cos(p*Math.PI/2);
10976},
10977Circ:function(p){
10978return 1-Math.sqrt(1-p*p);
10979},
10980Elastic:function(p){
10981return p===0||p===1?p:
10982-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15);
10983},
10984Back:function(p){
10985return p*p*(3*p-2);
10986},
10987Bounce:function(p){
10988var pow2,
10989bounce=4;
10990while(p<((pow2=Math.pow(2,--bounce))-1)/11){}
10991return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2);
10992}
10993});
10994$.each(baseEasings,function(name,easeIn){
10995$.easing["easeIn"+name]=easeIn;
10996$.easing["easeOut"+name]=function(p){
10997return 1-easeIn(1-p);
10998};
10999$.easing["easeInOut"+name]=function(p){
11000return p<0.5?
11001easeIn(p*2)/2:
110021-easeIn(p*-2+2)/2;
11003};
11004});
11005})();
11006var effect=$.effects;
11007var effectsEffectBlind=$.effects.define("blind","hide",function(options,done){
11008var map={
11009up:["bottom","top"],
11010vertical:["bottom","top"],
11011down:["top","bottom"],
11012left:["right","left"],
11013horizontal:["right","left"],
11014right:["left","right"]
11015},
11016element=$(this),
11017direction=options.direction||"up",
11018start=element.cssClip(),
11019animate={clip:$.extend({},start)},
11020placeholder=$.effects.createPlaceholder(element);
11021animate.clip[map[direction][0]]=animate.clip[map[direction][1]];
11022if(options.mode==="show"){
11023element.cssClip(animate.clip);
11024if(placeholder){
11025placeholder.css($.effects.clipToBox(animate));
11026}
11027animate.clip=start;
11028}
11029if(placeholder){
11030placeholder.animate($.effects.clipToBox(animate),options.duration,options.easing);
11031}
11032element.animate(animate,{
11033queue:false,
11034duration:options.duration,
11035easing:options.easing,
11036complete:done
11037});
11038});
11039var effectsEffectBounce=$.effects.define("bounce",function(options,done){
11040var upAnim,downAnim,refValue,
11041element=$(this),
11042mode=options.mode,
11043hide=mode==="hide",
11044show=mode==="show",
11045direction=options.direction||"up",
11046distance=options.distance,
11047times=options.times||5,
11048anims=times*2+(show||hide?1:0),
11049speed=options.duration/anims,
11050easing=options.easing,
11051ref=(direction==="up"||direction==="down")?"top":"left",
11052motion=(direction==="up"||direction==="left"),
11053i=0,
11054queuelen=element.queue().length;
11055$.effects.createPlaceholder(element);
11056refValue=element.css(ref);
11057if(!distance){
11058distance=element[ref==="top"?"outerHeight":"outerWidth"]()/3;
11059}
11060if(show){
11061downAnim={opacity:1};
11062downAnim[ref]=refValue;
11063element
11064.css("opacity",0)
11065.css(ref,motion?-distance*2:distance*2)
11066.animate(downAnim,speed,easing);
11067}
11068if(hide){
11069distance=distance/Math.pow(2,times-1);
11070}
11071downAnim={};
11072downAnim[ref]=refValue;
11073for(;i<times;i++){
11074upAnim={};
11075upAnim[ref]=(motion?"-=":"+=")+distance;
11076element
11077.animate(upAnim,speed,easing)
11078.animate(downAnim,speed,easing);
11079distance=hide?distance*2:distance/2;
11080}
11081if(hide){
11082upAnim={opacity:0};
11083upAnim[ref]=(motion?"-=":"+=")+distance;
11084element.animate(upAnim,speed,easing);
11085}
11086element.queue(done);
11087$.effects.unshift(element,queuelen,anims+1);
11088});
11089var effectsEffectClip=$.effects.define("clip","hide",function(options,done){
11090var start,
11091animate={},
11092element=$(this),
11093direction=options.direction||"vertical",
11094both=direction==="both",
11095horizontal=both||direction==="horizontal",
11096vertical=both||direction==="vertical";
11097start=element.cssClip();
11098animate.clip={
11099top:vertical?(start.bottom-start.top)/2:start.top,
11100right:horizontal?(start.right-start.left)/2:start.right,
11101bottom:vertical?(start.bottom-start.top)/2:start.bottom,
11102left:horizontal?(start.right-start.left)/2:start.left
11103};
11104$.effects.createPlaceholder(element);
11105if(options.mode==="show"){
11106element.cssClip(animate.clip);
11107animate.clip=start;
11108}
11109element.animate(animate,{
11110queue:false,
11111duration:options.duration,
11112easing:options.easing,
11113complete:done
11114});
11115});
11116var effectsEffectDrop=$.effects.define("drop","hide",function(options,done){
11117var distance,
11118element=$(this),
11119mode=options.mode,
11120show=mode==="show",
11121direction=options.direction||"left",
11122ref=(direction==="up"||direction==="down")?"top":"left",
11123motion=(direction==="up"||direction==="left")?"-=":"+=",
11124oppositeMotion=(motion==="+=")?"-=":"+=",
11125animation={
11126opacity:0
11127};
11128$.effects.createPlaceholder(element);
11129distance=options.distance||
11130element[ref==="top"?"outerHeight":"outerWidth"](true)/2;
11131animation[ref]=motion+distance;
11132if(show){
11133element.css(animation);
11134animation[ref]=oppositeMotion+distance;
11135animation.opacity=1;
11136}
11137element.animate(animation,{
11138queue:false,
11139duration:options.duration,
11140easing:options.easing,
11141complete:done
11142});
11143});
11144var effectsEffectExplode=$.effects.define("explode","hide",function(options,done){
11145var i,j,left,top,mx,my,
11146rows=options.pieces?Math.round(Math.sqrt(options.pieces)):3,
11147cells=rows,
11148element=$(this),
11149mode=options.mode,
11150show=mode==="show",
11151offset=element.show().css("visibility","hidden").offset(),
11152width=Math.ceil(element.outerWidth()/cells),
11153height=Math.ceil(element.outerHeight()/rows),
11154pieces=[];
11155function childComplete(){
11156pieces.push(this);
11157if(pieces.length===rows*cells){
11158animComplete();
11159}
11160}
11161for(i=0;i<rows;i++){
11162top=offset.top+i*height;
11163my=i-(rows-1)/2;
11164for(j=0;j<cells;j++){
11165left=offset.left+j*width;
11166mx=j-(cells-1)/2;
11167element
11168.clone()
11169.appendTo("body")
11170.wrap("<div></div>")
11171.css({
11172position:"absolute",
11173visibility:"visible",
11174left:-j*width,
11175top:-i*height
11176})
11177.parent()
11178.addClass("ui-effects-explode")
11179.css({
11180position:"absolute",
11181overflow:"hidden",
11182width:width,
11183height:height,
11184left:left+(show?mx*width:0),
11185top:top+(show?my*height:0),
11186opacity:show?0:1
11187})
11188.animate({
11189left:left+(show?0:mx*width),
11190top:top+(show?0:my*height),
11191opacity:show?1:0
11192},options.duration||500,options.easing,childComplete);
11193}
11194}
11195function animComplete(){
11196element.css({
11197visibility:"visible"
11198});
11199$(pieces).remove();
11200done();
11201}
11202});
11203var effectsEffectFade=$.effects.define("fade","toggle",function(options,done){
11204var show=options.mode==="show";
11205$(this)
11206.css("opacity",show?0:1)
11207.animate({
11208opacity:show?1:0
11209},{
11210queue:false,
11211duration:options.duration,
11212easing:options.easing,
11213complete:done
11214});
11215});
11216var effectsEffectFold=$.effects.define("fold","hide",function(options,done){
11217var element=$(this),
11218mode=options.mode,
11219show=mode==="show",
11220hide=mode==="hide",
11221size=options.size||15,
11222percent=/([0-9]+)%/.exec(size),
11223horizFirst=!!options.horizFirst,
11224ref=horizFirst?["right","bottom"]:["bottom","right"],
11225duration=options.duration/2,
11226placeholder=$.effects.createPlaceholder(element),
11227start=element.cssClip(),
11228animation1={clip:$.extend({},start)},
11229animation2={clip:$.extend({},start)},
11230distance=[start[ref[0]],start[ref[1]]],
11231queuelen=element.queue().length;
11232if(percent){
11233size=parseInt(percent[1],10)/100*distance[hide?0:1];
11234}
11235animation1.clip[ref[0]]=size;
11236animation2.clip[ref[0]]=size;
11237animation2.clip[ref[1]]=0;
11238if(show){
11239element.cssClip(animation2.clip);
11240if(placeholder){
11241placeholder.css($.effects.clipToBox(animation2));
11242}
11243animation2.clip=start;
11244}
11245element
11246.queue(function(next){
11247if(placeholder){
11248placeholder
11249.animate($.effects.clipToBox(animation1),duration,options.easing)
11250.animate($.effects.clipToBox(animation2),duration,options.easing);
11251}
11252next();
11253})
11254.animate(animation1,duration,options.easing)
11255.animate(animation2,duration,options.easing)
11256.queue(done);
11257$.effects.unshift(element,queuelen,4);
11258});
11259var effectsEffectHighlight=$.effects.define("highlight","show",function(options,done){
11260var element=$(this),
11261animation={
11262backgroundColor:element.css("backgroundColor")
11263};
11264if(options.mode==="hide"){
11265animation.opacity=0;
11266}
11267$.effects.saveStyle(element);
11268element
11269.css({
11270backgroundImage:"none",
11271backgroundColor:options.color||"#ffff99"
11272})
11273.animate(animation,{
11274queue:false,
11275duration:options.duration,
11276easing:options.easing,
11277complete:done
11278});
11279});
11280var effectsEffectSize=$.effects.define("size",function(options,done){
11281var baseline,factor,temp,
11282element=$(this),
11283cProps=["fontSize"],
11284vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],
11285hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
11286mode=options.mode,
11287restore=mode!=="effect",
11288scale=options.scale||"both",
11289origin=options.origin||["middle","center"],
11290position=element.css("position"),
11291pos=element.position(),
11292original=$.effects.scaledDimensions(element),
11293from=options.from||original,
11294to=options.to||$.effects.scaledDimensions(element,0);
11295$.effects.createPlaceholder(element);
11296if(mode==="show"){
11297temp=from;
11298from=to;
11299to=temp;
11300}
11301factor={
11302from:{
11303y:from.height/original.height,
11304x:from.width/original.width
11305},
11306to:{
11307y:to.height/original.height,
11308x:to.width/original.width
11309}
11310};
11311if(scale==="box"||scale==="both"){
11312if(factor.from.y!==factor.to.y){
11313from=$.effects.setTransition(element,vProps,factor.from.y,from);
11314to=$.effects.setTransition(element,vProps,factor.to.y,to);
11315}
11316if(factor.from.x!==factor.to.x){
11317from=$.effects.setTransition(element,hProps,factor.from.x,from);
11318to=$.effects.setTransition(element,hProps,factor.to.x,to);
11319}
11320}
11321if(scale==="content"||scale==="both"){
11322if(factor.from.y!==factor.to.y){
11323from=$.effects.setTransition(element,cProps,factor.from.y,from);
11324to=$.effects.setTransition(element,cProps,factor.to.y,to);
11325}
11326}
11327if(origin){
11328baseline=$.effects.getBaseline(origin,original);
11329from.top=(original.outerHeight-from.outerHeight)*baseline.y+pos.top;
11330from.left=(original.outerWidth-from.outerWidth)*baseline.x+pos.left;
11331to.top=(original.outerHeight-to.outerHeight)*baseline.y+pos.top;
11332to.left=(original.outerWidth-to.outerWidth)*baseline.x+pos.left;
11333}
11334delete from.outerHeight;
11335delete from.outerWidth;
11336element.css(from);
11337if(scale==="content"||scale==="both"){
11338vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);
11339hProps=hProps.concat(["marginLeft","marginRight"]);
11340element.find("*[width]").each(function(){
11341var child=$(this),
11342childOriginal=$.effects.scaledDimensions(child),
11343childFrom={
11344height:childOriginal.height*factor.from.y,
11345width:childOriginal.width*factor.from.x,
11346outerHeight:childOriginal.outerHeight*factor.from.y,
11347outerWidth:childOriginal.outerWidth*factor.from.x
11348},
11349childTo={
11350height:childOriginal.height*factor.to.y,
11351width:childOriginal.width*factor.to.x,
11352outerHeight:childOriginal.height*factor.to.y,
11353outerWidth:childOriginal.width*factor.to.x
11354};
11355if(factor.from.y!==factor.to.y){
11356childFrom=$.effects.setTransition(child,vProps,factor.from.y,childFrom);
11357childTo=$.effects.setTransition(child,vProps,factor.to.y,childTo);
11358}
11359if(factor.from.x!==factor.to.x){
11360childFrom=$.effects.setTransition(child,hProps,factor.from.x,childFrom);
11361childTo=$.effects.setTransition(child,hProps,factor.to.x,childTo);
11362}
11363if(restore){
11364$.effects.saveStyle(child);
11365}
11366child.css(childFrom);
11367child.animate(childTo,options.duration,options.easing,function(){
11368if(restore){
11369$.effects.restoreStyle(child);
11370}
11371});
11372});
11373}
11374element.animate(to,{
11375queue:false,
11376duration:options.duration,
11377easing:options.easing,
11378complete:function(){
11379var offset=element.offset();
11380if(to.opacity===0){
11381element.css("opacity",from.opacity);
11382}
11383if(!restore){
11384element
11385.css("position",position==="static"?"relative":position)
11386.offset(offset);
11387$.effects.saveStyle(element);
11388}
11389done();
11390}
11391});
11392});
11393var effectsEffectScale=$.effects.define("scale",function(options,done){
11394var el=$(this),
11395mode=options.mode,
11396percent=parseInt(options.percent,10)||
11397(parseInt(options.percent,10)===0?0:(mode!=="effect"?0:100)),
11398newOptions=$.extend(true,{
11399from:$.effects.scaledDimensions(el),
11400to:$.effects.scaledDimensions(el,percent,options.direction||"both"),
11401origin:options.origin||["middle","center"]
11402},options);
11403if(options.fade){
11404newOptions.from.opacity=1;
11405newOptions.to.opacity=0;
11406}
11407$.effects.effect.size.call(this,newOptions,done);
11408});
11409var effectsEffectPuff=$.effects.define("puff","hide",function(options,done){
11410var newOptions=$.extend(true,{},options,{
11411fade:true,
11412percent:parseInt(options.percent,10)||150
11413});
11414$.effects.effect.scale.call(this,newOptions,done);
11415});
11416var effectsEffectPulsate=$.effects.define("pulsate","show",function(options,done){
11417var element=$(this),
11418mode=options.mode,
11419show=mode==="show",
11420hide=mode==="hide",
11421showhide=show||hide,
11422anims=((options.times||5)*2)+(showhide?1:0),
11423duration=options.duration/anims,
11424animateTo=0,
11425i=1,
11426queuelen=element.queue().length;
11427if(show||!element.is(":visible")){
11428element.css("opacity",0).show();
11429animateTo=1;
11430}
11431for(;i<anims;i++){
11432element.animate({opacity:animateTo},duration,options.easing);
11433animateTo=1-animateTo;
11434}
11435element.animate({opacity:animateTo},duration,options.easing);
11436element.queue(done);
11437$.effects.unshift(element,queuelen,anims+1);
11438});
11439var effectsEffectShake=$.effects.define("shake",function(options,done){
11440var i=1,
11441element=$(this),
11442direction=options.direction||"left",
11443distance=options.distance||20,
11444times=options.times||3,
11445anims=times*2+1,
11446speed=Math.round(options.duration/anims),
11447ref=(direction==="up"||direction==="down")?"top":"left",
11448positiveMotion=(direction==="up"||direction==="left"),
11449animation={},
11450animation1={},
11451animation2={},
11452queuelen=element.queue().length;
11453$.effects.createPlaceholder(element);
11454animation[ref]=(positiveMotion?"-=":"+=")+distance;
11455animation1[ref]=(positiveMotion?"+=":"-=")+distance*2;
11456animation2[ref]=(positiveMotion?"-=":"+=")+distance*2;
11457element.animate(animation,speed,options.easing);
11458for(;i<times;i++){
11459element
11460.animate(animation1,speed,options.easing)
11461.animate(animation2,speed,options.easing);
11462}
11463element
11464.animate(animation1,speed,options.easing)
11465.animate(animation,speed/2,options.easing)
11466.queue(done);
11467$.effects.unshift(element,queuelen,anims+1);
11468});
11469var effectsEffectSlide=$.effects.define("slide","show",function(options,done){
11470var startClip,startRef,
11471element=$(this),
11472map={
11473up:["bottom","top"],
11474down:["top","bottom"],
11475left:["right","left"],
11476right:["left","right"]
11477},
11478mode=options.mode,
11479direction=options.direction||"left",
11480ref=(direction==="up"||direction==="down")?"top":"left",
11481positiveMotion=(direction==="up"||direction==="left"),
11482distance=options.distance||
11483element[ref==="top"?"outerHeight":"outerWidth"](true),
11484animation={};
11485$.effects.createPlaceholder(element);
11486startClip=element.cssClip();
11487startRef=element.position()[ref];
11488animation[ref]=(positiveMotion?-1:1)*distance+startRef;
11489animation.clip=element.cssClip();
11490animation.clip[map[direction][1]]=animation.clip[map[direction][0]];
11491if(mode==="show"){
11492element.cssClip(animation.clip);
11493element.css(ref,animation[ref]);
11494animation.clip=startClip;
11495animation[ref]=startRef;
11496}
11497element.animate(animation,{
11498queue:false,
11499duration:options.duration,
11500easing:options.easing,
11501complete:done
11502});
11503});
11504var effect;
11505if($.uiBackCompat===true){
11506effect=$.effects.define("transfer",function(options,done){
11507$(this).transfer(options,done);
11508});
11509}
11510var effectsEffectTransfer=effect;
11511$.ui.focusable=function(element,hasTabindex){
11512var map,mapName,img,focusableIfVisible,fieldset,
11513nodeName=element.nodeName.toLowerCase();
11514if("area"===nodeName){
11515map=element.parentNode;
11516mapName=map.name;
11517if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){
11518return false;
11519}
11520img=$("img[usemap='#"+mapName+"']");
11521return img.length>0&&img.is(":visible");
11522}
11523if(/^(input|select|textarea|button|object)$/.test(nodeName)){
11524focusableIfVisible=!element.disabled;
11525if(focusableIfVisible){
11526fieldset=$(element).closest("fieldset")[0];
11527if(fieldset){
11528focusableIfVisible=!fieldset.disabled;
11529}
11530}
11531}else if("a"===nodeName){
11532focusableIfVisible=element.href||hasTabindex;
11533}else{
11534focusableIfVisible=hasTabindex;
11535}
11536return focusableIfVisible&&$(element).is(":visible")&&
11537$(element).css("visibility")==="visible";
11538};
11539$.extend($.expr.pseudos,{
11540focusable:function(element){
11541return $.ui.focusable(element,$.attr(element,"tabindex")!=null);
11542}
11543});
11544var focusable=$.ui.focusable;
11545var formResetMixin=$.ui.formResetMixin={
11546_formResetHandler:function(){
11547var form=$(this);
11548setTimeout(function(){
11549var instances=form.data("ui-form-reset-instances");
11550$.each(instances,function(){
11551this.refresh();
11552});
11553});
11554},
11555_bindFormResetHandler:function(){
11556this.form=$(this.element.prop("form"));
11557if(!this.form.length){
11558return;
11559}
11560var instances=this.form.data("ui-form-reset-instances")||[];
11561if(!instances.length){
11562this.form.on("reset.ui-form-reset",this._formResetHandler);
11563}
11564instances.push(this);
11565this.form.data("ui-form-reset-instances",instances);
11566},
11567_unbindFormResetHandler:function(){
11568if(!this.form.length){
11569return;
11570}
11571var instances=this.form.data("ui-form-reset-instances");
11572instances.splice($.inArray(this,instances),1);
11573if(instances.length){
11574this.form.data("ui-form-reset-instances",instances);
11575}else{
11576this.form
11577.removeData("ui-form-reset-instances")
11578.off("reset.ui-form-reset");
11579}
11580}
11581};
11582if(!$.escapeSelector){
11583$.escapeSelector=function(id){
11584return CSS.escape(id+"");
11585};
11586}
11587if(!$.fn.even||!$.fn.odd){
11588$.fn.extend({
11589even:function(){
11590return this.filter(function(i){
11591return i%2===0;
11592});
11593},
11594odd:function(){
11595return this.filter(function(i){
11596return i%2===1;
11597});
11598}
11599});
11600}
11601;
11602var keycode=$.ui.keyCode={
11603BACKSPACE:8,
11604COMMA:188,
11605DELETE:46,
11606DOWN:40,
11607END:35,
11608ENTER:13,
11609ESCAPE:27,
11610HOME:36,
11611LEFT:37,
11612PAGE_DOWN:34,
11613PAGE_UP:33,
11614PERIOD:190,
11615RIGHT:39,
11616SPACE:32,
11617TAB:9,
11618UP:38
11619};
11620var labels=$.fn.labels=function(){
11621var ancestor,selector,id,labels,ancestors;
11622if(!this.length){
11623return this.pushStack([]);
11624}
11625if(this[0].labels&&this[0].labels.length){
11626return this.pushStack(this[0].labels);
11627}
11628labels=this.eq(0).parents("label");
11629id=this.attr("id");
11630if(id){
11631ancestor=this.eq(0).parents().last();
11632ancestors=ancestor.add(ancestor.length?ancestor.siblings():this.siblings());
11633selector="label[for='"+CSS.escape(id)+"']";
11634labels=labels.add(ancestors.find(selector).addBack(selector));
11635}
11636return this.pushStack(labels);
11637};
11638var scrollParent=$.fn.scrollParent=function(includeHidden){
11639var position=this.css("position"),
11640excludeStaticParent=position==="absolute",
11641overflowRegex=includeHidden?/(auto|scroll|hidden)/:/(auto|scroll)/,
11642scrollParent=this.parents().filter(function(){
11643var parent=$(this);
11644if(excludeStaticParent&&parent.css("position")==="static"){
11645return false;
11646}
11647return overflowRegex.test(parent.css("overflow")+parent.css("overflow-y")+
11648parent.css("overflow-x"));
11649}).eq(0);
11650return position==="fixed"||!scrollParent.length?
11651$(this[0].ownerDocument||document):
11652scrollParent;
11653};
11654var tabbable=$.extend($.expr.pseudos,{
11655tabbable:function(element){
11656var tabIndex=$.attr(element,"tabindex"),
11657hasTabindex=tabIndex!=null;
11658return(!hasTabindex||tabIndex>=0)&&$.ui.focusable(element,hasTabindex);
11659}
11660});
11661var uniqueId=$.fn.extend({
11662uniqueId:(function(){
11663var uuid=0;
11664return function(){
11665return this.each(function(){
11666if(!this.id){
11667this.id="ui-id-"+(++uuid);
11668}
11669});
11670};
11671})(),
11672removeUniqueId:function(){
11673return this.each(function(){
11674if(/^ui-id-\d+$/.test(this.id)){
11675$(this).removeAttr("id");
11676}
11677});
11678}
11679});
11680var widgetsAccordion=$.widget("ui.accordion",{
11681version:"1.14.1",
11682options:{
11683active:0,
11684animate:{},
11685classes:{
11686"ui-accordion-header":"ui-corner-top",
11687"ui-accordion-header-collapsed":"ui-corner-all",
11688"ui-accordion-content":"ui-corner-bottom"
11689},
11690collapsible:false,
11691event:"click",
11692header:function(elem){
11693return elem
11694.find("> li > :first-child")
11695.add(
11696elem.find("> :not(li)")
11697.filter(function(i){
11698return i%2===0;
11699})
11700);
11701},
11702heightStyle:"auto",
11703icons:{
11704activeHeader:"ui-icon-triangle-1-s",
11705header:"ui-icon-triangle-1-e"
11706},
11707activate:null,
11708beforeActivate:null
11709},
11710hideProps:{
11711borderTopWidth:"hide",
11712borderBottomWidth:"hide",
11713paddingTop:"hide",
11714paddingBottom:"hide",
11715height:"hide"
11716},
11717showProps:{
11718borderTopWidth:"show",
11719borderBottomWidth:"show",
11720paddingTop:"show",
11721paddingBottom:"show",
11722height:"show"
11723},
11724_create:function(){
11725var options=this.options;
11726this.prevShow=this.prevHide=$();
11727this._addClass("ui-accordion","ui-widget ui-helper-reset");
11728this.element.attr("role","tablist");
11729if(!options.collapsible&&(options.active===false||options.active==null)){
11730options.active=0;
11731}
11732this._processPanels();
11733if(options.active<0){
11734options.active+=this.headers.length;
11735}
11736this._refresh();
11737},
11738_getCreateEventData:function(){
11739return{
11740header:this.active,
11741panel:!this.active.length?$():this.active.next()
11742};
11743},
11744_createIcons:function(){
11745var icon,children,
11746icons=this.options.icons;
11747if(icons){
11748icon=$("<span>");
11749this._addClass(icon,"ui-accordion-header-icon","ui-icon "+icons.header);
11750icon.prependTo(this.headers);
11751children=this.active.children(".ui-accordion-header-icon");
11752this._removeClass(children,icons.header)
11753._addClass(children,null,icons.activeHeader)
11754._addClass(this.headers,"ui-accordion-icons");
11755}
11756},
11757_destroyIcons:function(){
11758this._removeClass(this.headers,"ui-accordion-icons");
11759this.headers.children(".ui-accordion-header-icon").remove();
11760},
11761_destroy:function(){
11762var contents;
11763this.element.removeAttr("role");
11764this.headers
11765.removeAttr("role aria-expanded aria-selected aria-controls tabIndex")
11766.removeUniqueId();
11767this._destroyIcons();
11768contents=this.headers.next()
11769.css("display","")
11770.removeAttr("role aria-hidden aria-labelledby")
11771.removeUniqueId();
11772if(this.options.heightStyle!=="content"){
11773contents.css("height","");
11774}
11775},
11776_setOption:function(key,value){
11777if(key==="active"){
11778this._activate(value);
11779return;
11780}
11781if(key==="event"){
11782if(this.options.event){
11783this._off(this.headers,this.options.event);
11784}
11785this._setupEvents(value);
11786}
11787this._super(key,value);
11788if(key==="collapsible"&&!value&&this.options.active===false){
11789this._activate(0);
11790}
11791if(key==="icons"){
11792this._destroyIcons();
11793if(value){
11794this._createIcons();
11795}
11796}
11797},
11798_setOptionDisabled:function(value){
11799this._super(value);
11800this.element.attr("aria-disabled",value);
11801this._toggleClass(null,"ui-state-disabled",!!value);
11802},
11803_keydown:function(event){
11804if(event.altKey||event.ctrlKey){
11805return;
11806}
11807var keyCode=$.ui.keyCode,
11808length=this.headers.length,
11809currentIndex=this.headers.index(event.target),
11810toFocus=false;
11811switch(event.keyCode){
11812case keyCode.RIGHT:
11813case keyCode.DOWN:
11814toFocus=this.headers[(currentIndex+1)%length];
11815break;
11816case keyCode.LEFT:
11817case keyCode.UP:
11818toFocus=this.headers[(currentIndex-1+length)%length];
11819break;
11820case keyCode.SPACE:
11821case keyCode.ENTER:
11822this._eventHandler(event);
11823break;
11824case keyCode.HOME:
11825toFocus=this.headers[0];
11826break;
11827case keyCode.END:
11828toFocus=this.headers[length-1];
11829break;
11830}
11831if(toFocus){
11832$(event.target).attr("tabIndex",-1);
11833$(toFocus).attr("tabIndex",0);
11834$(toFocus).trigger("focus");
11835event.preventDefault();
11836}
11837},
11838_panelKeyDown:function(event){
11839if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){
11840$(event.currentTarget).prev().trigger("focus");
11841}
11842},
11843refresh:function(){
11844var options=this.options;
11845this._processPanels();
11846if((options.active===false&&options.collapsible===true)||
11847!this.headers.length){
11848options.active=false;
11849this.active=$();
11850}else if(options.active===false){
11851this._activate(0);
11852}else if(this.active.length&&!$.contains(this.element[0],this.active[0])){
11853if(this.headers.length===this.headers.find(".ui-state-disabled").length){
11854options.active=false;
11855this.active=$();
11856}else{
11857this._activate(Math.max(0,options.active-1));
11858}
11859}else{
11860options.active=this.headers.index(this.active);
11861}
11862this._destroyIcons();
11863this._refresh();
11864},
11865_processPanels:function(){
11866var prevHeaders=this.headers,
11867prevPanels=this.panels;
11868if(typeof this.options.header==="function"){
11869this.headers=this.options.header(this.element);
11870}else{
11871this.headers=this.element.find(this.options.header);
11872}
11873this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed",
11874"ui-state-default");
11875this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide();
11876this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content");
11877if(prevPanels){
11878this._off(prevHeaders.not(this.headers));
11879this._off(prevPanels.not(this.panels));
11880}
11881},
11882_refresh:function(){
11883var maxHeight,
11884options=this.options,
11885heightStyle=options.heightStyle,
11886parent=this.element.parent();
11887this.active=this._findActive(options.active);
11888this._addClass(this.active,"ui-accordion-header-active","ui-state-active")
11889._removeClass(this.active,"ui-accordion-header-collapsed");
11890this._addClass(this.active.next(),"ui-accordion-content-active");
11891this.active.next().show();
11892this.headers
11893.attr("role","tab")
11894.each(function(){
11895var header=$(this),
11896headerId=header.uniqueId().attr("id"),
11897panel=header.next(),
11898panelId=panel.uniqueId().attr("id");
11899header.attr("aria-controls",panelId);
11900panel.attr("aria-labelledby",headerId);
11901})
11902.next()
11903.attr("role","tabpanel");
11904this.headers
11905.not(this.active)
11906.attr({
11907"aria-selected":"false",
11908"aria-expanded":"false",
11909tabIndex:-1
11910})
11911.next()
11912.attr({
11913"aria-hidden":"true"
11914})
11915.hide();
11916if(!this.active.length){
11917this.headers.eq(0).attr("tabIndex",0);
11918}else{
11919this.active.attr({
11920"aria-selected":"true",
11921"aria-expanded":"true",
11922tabIndex:0
11923})
11924.next()
11925.attr({
11926"aria-hidden":"false"
11927});
11928}
11929this._createIcons();
11930this._setupEvents(options.event);
11931if(heightStyle==="fill"){
11932maxHeight=parent.height();
11933this.element.siblings(":visible").each(function(){
11934var elem=$(this),
11935position=elem.css("position");
11936if(position==="absolute"||position==="fixed"){
11937return;
11938}
11939maxHeight-=elem.outerHeight(true);
11940});
11941this.headers.each(function(){
11942maxHeight-=$(this).outerHeight(true);
11943});
11944this.headers.next()
11945.each(function(){
11946$(this).height(Math.max(0,maxHeight-
11947$(this).innerHeight()+$(this).height()));
11948})
11949.css("overflow","auto");
11950}else if(heightStyle==="auto"){
11951maxHeight=0;
11952this.headers.next()
11953.each(function(){
11954var isVisible=$(this).is(":visible");
11955if(!isVisible){
11956$(this).show();
11957}
11958maxHeight=Math.max(maxHeight,$(this).css("height","").height());
11959if(!isVisible){
11960$(this).hide();
11961}
11962})
11963.height(maxHeight);
11964}
11965},
11966_activate:function(index){
11967var active=this._findActive(index)[0];
11968if(active===this.active[0]){
11969return;
11970}
11971active=active||this.active[0];
11972this._eventHandler({
11973target:active,
11974currentTarget:active,
11975preventDefault:$.noop
11976});
11977},
11978_findActive:function(selector){
11979return typeof selector==="number"?this.headers.eq(selector):$();
11980},
11981_setupEvents:function(event){
11982var events={
11983keydown:"_keydown"
11984};
11985if(event){
11986$.each(event.split(" "),function(index,eventName){
11987events[eventName]="_eventHandler";
11988});
11989}
11990this._off(this.headers.add(this.headers.next()));
11991this._on(this.headers,events);
11992this._on(this.headers.next(),{keydown:"_panelKeyDown"});
11993this._hoverable(this.headers);
11994this._focusable(this.headers);
11995},
11996_eventHandler:function(event){
11997var activeChildren,clickedChildren,
11998options=this.options,
11999active=this.active,
12000clicked=$(event.currentTarget),
12001clickedIsActive=clicked[0]===active[0],
12002collapsing=clickedIsActive&&options.collapsible,
12003toShow=collapsing?$():clicked.next(),
12004toHide=active.next(),
12005eventData={
12006oldHeader:active,
12007oldPanel:toHide,
12008newHeader:collapsing?$():clicked,
12009newPanel:toShow
12010};
12011event.preventDefault();
12012if(
12013(clickedIsActive&&!options.collapsible)||
12014(this._trigger("beforeActivate",event,eventData)===false)){
12015return;
12016}
12017options.active=collapsing?false:this.headers.index(clicked);
12018this.active=clickedIsActive?$():clicked;
12019this._toggle(eventData);
12020this._removeClass(active,"ui-accordion-header-active","ui-state-active");
12021if(options.icons){
12022activeChildren=active.children(".ui-accordion-header-icon");
12023this._removeClass(activeChildren,null,options.icons.activeHeader)
12024._addClass(activeChildren,null,options.icons.header);
12025}
12026if(!clickedIsActive){
12027this._removeClass(clicked,"ui-accordion-header-collapsed")
12028._addClass(clicked,"ui-accordion-header-active","ui-state-active");
12029if(options.icons){
12030clickedChildren=clicked.children(".ui-accordion-header-icon");
12031this._removeClass(clickedChildren,null,options.icons.header)
12032._addClass(clickedChildren,null,options.icons.activeHeader);
12033}
12034this._addClass(clicked.next(),"ui-accordion-content-active");
12035}
12036},
12037_toggle:function(data){
12038var toShow=data.newPanel,
12039toHide=this.prevShow.length?this.prevShow:data.oldPanel;
12040this.prevShow.add(this.prevHide).stop(true,true);
12041this.prevShow=toShow;
12042this.prevHide=toHide;
12043if(this.options.animate){
12044this._animate(toShow,toHide,data);
12045}else{
12046toHide.hide();
12047toShow.show();
12048this._toggleComplete(data);
12049}
12050toHide.attr({
12051"aria-hidden":"true"
12052});
12053toHide.prev().attr({
12054"aria-selected":"false",
12055"aria-expanded":"false"
12056});
12057if(toShow.length&&toHide.length){
12058toHide.prev().attr({
12059"tabIndex":-1,
12060"aria-expanded":"false"
12061});
12062}else if(toShow.length){
12063this.headers.filter(function(){
12064return parseInt($(this).attr("tabIndex"),10)===0;
12065})
12066.attr("tabIndex",-1);
12067}
12068toShow
12069.attr("aria-hidden","false")
12070.prev()
12071.attr({
12072"aria-selected":"true",
12073"aria-expanded":"true",
12074tabIndex:0
12075});
12076},
12077_animate:function(toShow,toHide,data){
12078var total,easing,duration,
12079that=this,
12080adjust=0,
12081boxSizing=toShow.css("box-sizing"),
12082down=toShow.length&&
12083(!toHide.length||(toShow.index()<toHide.index())),
12084animate=this.options.animate||{},
12085options=down&&animate.down||animate,
12086complete=function(){
12087that._toggleComplete(data);
12088};
12089if(typeof options==="number"){
12090duration=options;
12091}
12092if(typeof options==="string"){
12093easing=options;
12094}
12095easing=easing||options.easing||animate.easing;
12096duration=duration||options.duration||animate.duration;
12097if(!toHide.length){
12098return toShow.animate(this.showProps,duration,easing,complete);
12099}
12100if(!toShow.length){
12101return toHide.animate(this.hideProps,duration,easing,complete);
12102}
12103total=toShow.show().outerHeight();
12104toHide.animate(this.hideProps,{
12105duration:duration,
12106easing:easing,
12107step:function(now,fx){
12108fx.now=Math.round(now);
12109}
12110});
12111toShow
12112.hide()
12113.animate(this.showProps,{
12114duration:duration,
12115easing:easing,
12116complete:complete,
12117step:function(now,fx){
12118fx.now=Math.round(now);
12119if(fx.prop!=="height"){
12120if(boxSizing==="content-box"){
12121adjust+=fx.now;
12122}
12123}else if(that.options.heightStyle!=="content"){
12124fx.now=Math.round(total-toHide.outerHeight()-adjust);
12125adjust=0;
12126}
12127}
12128});
12129},
12130_toggleComplete:function(data){
12131var toHide=data.oldPanel,
12132prev=toHide.prev();
12133this._removeClass(toHide,"ui-accordion-content-active");
12134this._removeClass(prev,"ui-accordion-header-active")
12135._addClass(prev,"ui-accordion-header-collapsed");
12136this._trigger("activate",null,data);
12137}
12138});
12139var widgetsMenu=$.widget("ui.menu",{
12140version:"1.14.1",
12141defaultElement:"<ul>",
12142delay:300,
12143options:{
12144icons:{
12145submenu:"ui-icon-caret-1-e"
12146},
12147items:"> *",
12148menus:"ul",
12149position:{
12150my:"left top",
12151at:"right top"
12152},
12153role:"menu",
12154blur:null,
12155focus:null,
12156select:null
12157},
12158_create:function(){
12159this.activeMenu=this.element;
12160this.mouseHandled=false;
12161this.lastMousePosition={x:null,y:null};
12162this.element
12163.uniqueId()
12164.attr({
12165role:this.options.role,
12166tabIndex:0
12167});
12168this._addClass("ui-menu","ui-widget ui-widget-content");
12169this._on({
12170"mousedown .ui-menu-item":function(event){
12171event.preventDefault();
12172this._activateItem(event);
12173},
12174"click .ui-menu-item":function(event){
12175var target=$(event.target);
12176var active=$(this.document[0].activeElement);
12177if(!this.mouseHandled&&target.not(".ui-state-disabled").length){
12178this.select(event);
12179if(!event.isPropagationStopped()){
12180this.mouseHandled=true;
12181}
12182if(target.has(".ui-menu").length){
12183this.expand(event);
12184}else if(!this.element.is(":focus")&&
12185active.closest(".ui-menu").length){
12186this.element.trigger("focus",[true]);
12187if(this.active&&this.active.parents(".ui-menu").length===1){
12188clearTimeout(this.timer);
12189}
12190}
12191}
12192},
12193"mouseenter .ui-menu-item":"_activateItem",
12194"mousemove .ui-menu-item":"_activateItem",
12195mouseleave:"collapseAll",
12196"mouseleave .ui-menu":"collapseAll",
12197focus:function(event,keepActiveItem){
12198var item=this.active||this._menuItems().first();
12199if(!keepActiveItem){
12200this.focus(event,item);
12201}
12202},
12203blur:function(event){
12204this._delay(function(){
12205var notContained=!$.contains(
12206this.element[0],
12207this.document[0].activeElement
12208);
12209if(notContained){
12210this.collapseAll(event);
12211}
12212});
12213},
12214keydown:"_keydown"
12215});
12216this.refresh();
12217this._on(this.document,{
12218click:function(event){
12219if(this._closeOnDocumentClick(event)){
12220this.collapseAll(event,true);
12221}
12222this.mouseHandled=false;
12223}
12224});
12225},
12226_activateItem:function(event){
12227if(this.previousFilter){
12228return;
12229}
12230if(event.clientX===this.lastMousePosition.x&&
12231event.clientY===this.lastMousePosition.y){
12232return;
12233}
12234this.lastMousePosition={
12235x:event.clientX,
12236y:event.clientY
12237};
12238var actualTarget=$(event.target).closest(".ui-menu-item"),
12239target=$(event.currentTarget);
12240if(actualTarget[0]!==target[0]){
12241return;
12242}
12243if(target.is(".ui-state-active")){
12244return;
12245}
12246this._removeClass(target.siblings().children(".ui-state-active"),
12247null,"ui-state-active");
12248this.focus(event,target);
12249},
12250_destroy:function(){
12251var items=this.element.find(".ui-menu-item")
12252.removeAttr("role aria-disabled"),
12253submenus=items.children(".ui-menu-item-wrapper")
12254.removeUniqueId()
12255.removeAttr("tabIndex role aria-haspopup");
12256this.element
12257.removeAttr("aria-activedescendant")
12258.find(".ui-menu").addBack()
12259.removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled "+
12260"tabIndex")
12261.removeUniqueId()
12262.show();
12263submenus.children().each(function(){
12264var elem=$(this);
12265if(elem.data("ui-menu-submenu-caret")){
12266elem.remove();
12267}
12268});
12269},
12270_keydown:function(event){
12271var match,prev,character,skip,
12272preventDefault=true;
12273switch(event.keyCode){
12274case $.ui.keyCode.PAGE_UP:
12275this.previousPage(event);
12276break;
12277case $.ui.keyCode.PAGE_DOWN:
12278this.nextPage(event);
12279break;
12280case $.ui.keyCode.HOME:
12281this._move("first","first",event);
12282break;
12283case $.ui.keyCode.END:
12284this._move("last","last",event);
12285break;
12286case $.ui.keyCode.UP:
12287this.previous(event);
12288break;
12289case $.ui.keyCode.DOWN:
12290this.next(event);
12291break;
12292case $.ui.keyCode.LEFT:
12293this.collapse(event);
12294break;
12295case $.ui.keyCode.RIGHT:
12296if(this.active&&!this.active.is(".ui-state-disabled")){
12297this.expand(event);
12298}
12299break;
12300case $.ui.keyCode.ENTER:
12301case $.ui.keyCode.SPACE:
12302this._activate(event);
12303break;
12304case $.ui.keyCode.ESCAPE:
12305this.collapse(event);
12306break;
12307default:
12308preventDefault=false;
12309prev=this.previousFilter||"";
12310skip=false;
12311character=event.keyCode>=96&&event.keyCode<=105?
12312(event.keyCode-96).toString():String.fromCharCode(event.keyCode);
12313clearTimeout(this.filterTimer);
12314if(character===prev){
12315skip=true;
12316}else{
12317character=prev+character;
12318}
12319match=this._filterMenuItems(character);
12320match=skip&&match.index(this.active.next())!==-1?
12321this.active.nextAll(".ui-menu-item"):
12322match;
12323if(!match.length){
12324character=String.fromCharCode(event.keyCode);
12325match=this._filterMenuItems(character);
12326}
12327if(match.length){
12328this.focus(event,match);
12329this.previousFilter=character;
12330this.filterTimer=this._delay(function(){
12331delete this.previousFilter;
12332},1000);
12333}else{
12334delete this.previousFilter;
12335}
12336}
12337if(preventDefault){
12338event.preventDefault();
12339}
12340},
12341_activate:function(event){
12342if(this.active&&!this.active.is(".ui-state-disabled")){
12343if(this.active.children("[aria-haspopup='true']").length){
12344this.expand(event);
12345}else{
12346this.select(event);
12347}
12348}
12349},
12350refresh:function(){
12351var menus,items,newSubmenus,newItems,newWrappers,
12352that=this,
12353icon=this.options.icons.submenu,
12354submenus=this.element.find(this.options.menus);
12355this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length);
12356newSubmenus=submenus.filter(":not(.ui-menu)")
12357.hide()
12358.attr({
12359role:this.options.role,
12360"aria-hidden":"true",
12361"aria-expanded":"false"
12362})
12363.each(function(){
12364var menu=$(this),
12365item=menu.prev(),
12366submenuCaret=$("<span>").data("ui-menu-submenu-caret",true);
12367that._addClass(submenuCaret,"ui-menu-icon","ui-icon "+icon);
12368item
12369.attr("aria-haspopup","true")
12370.prepend(submenuCaret);
12371menu.attr("aria-labelledby",item.attr("id"));
12372});
12373this._addClass(newSubmenus,"ui-menu","ui-widget ui-widget-content ui-front");
12374menus=submenus.add(this.element);
12375items=menus.find(this.options.items);
12376items.not(".ui-menu-item").each(function(){
12377var item=$(this);
12378if(that._isDivider(item)){
12379that._addClass(item,"ui-menu-divider","ui-widget-content");
12380}
12381});
12382newItems=items.not(".ui-menu-item, .ui-menu-divider");
12383newWrappers=newItems.children()
12384.not(".ui-menu")
12385.uniqueId()
12386.attr({
12387tabIndex:-1,
12388role:this._itemRole()
12389});
12390this._addClass(newItems,"ui-menu-item")
12391._addClass(newWrappers,"ui-menu-item-wrapper");
12392items.filter(".ui-state-disabled").attr("aria-disabled","true");
12393if(this.active&&!$.contains(this.element[0],this.active[0])){
12394this.blur();
12395}
12396},
12397_itemRole:function(){
12398return{
12399menu:"menuitem",
12400listbox:"option"
12401}[this.options.role];
12402},
12403_setOption:function(key,value){
12404if(key==="icons"){
12405var icons=this.element.find(".ui-menu-icon");
12406this._removeClass(icons,null,this.options.icons.submenu)
12407._addClass(icons,null,value.submenu);
12408}
12409this._super(key,value);
12410},
12411_setOptionDisabled:function(value){
12412this._super(value);
12413this.element.attr("aria-disabled",String(value));
12414this._toggleClass(null,"ui-state-disabled",!!value);
12415},
12416focus:function(event,item){
12417var nested,focused,activeParent;
12418this.blur(event,event&&event.type==="focus");
12419this._scrollIntoView(item);
12420this.active=item.first();
12421focused=this.active.children(".ui-menu-item-wrapper");
12422this._addClass(focused,null,"ui-state-active");
12423if(this.options.role){
12424this.element.attr("aria-activedescendant",focused.attr("id"));
12425}
12426activeParent=this.active
12427.parent()
12428.closest(".ui-menu-item")
12429.children(".ui-menu-item-wrapper");
12430this._addClass(activeParent,null,"ui-state-active");
12431if(event&&event.type==="keydown"){
12432this._close();
12433}else{
12434this.timer=this._delay(function(){
12435this._close();
12436},this.delay);
12437}
12438nested=item.children(".ui-menu");
12439if(nested.length&&event&&(/^mouse/.test(event.type))){
12440this._startOpening(nested);
12441}
12442this.activeMenu=item.parent();
12443this._trigger("focus",event,{item:item});
12444},
12445_scrollIntoView:function(item){
12446var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;
12447if(this._hasScroll()){
12448borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;
12449paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;
12450offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;
12451scroll=this.activeMenu.scrollTop();
12452elementHeight=this.activeMenu.height();
12453itemHeight=item.outerHeight();
12454if(offset<0){
12455this.activeMenu.scrollTop(scroll+offset);
12456}else if(offset+itemHeight>elementHeight){
12457this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight);
12458}
12459}
12460},
12461blur:function(event,fromFocus){
12462if(!fromFocus){
12463clearTimeout(this.timer);
12464}
12465if(!this.active){
12466return;
12467}
12468this._removeClass(this.active.children(".ui-menu-item-wrapper"),
12469null,"ui-state-active");
12470this._trigger("blur",event,{item:this.active});
12471this.active=null;
12472},
12473_startOpening:function(submenu){
12474clearTimeout(this.timer);
12475if(submenu.attr("aria-hidden")!=="true"){
12476return;
12477}
12478this.timer=this._delay(function(){
12479this._close();
12480this._open(submenu);
12481},this.delay);
12482},
12483_open:function(submenu){
12484var position=$.extend({
12485of:this.active
12486},this.options.position);
12487clearTimeout(this.timer);
12488this.element.find(".ui-menu").not(submenu.parents(".ui-menu"))
12489.hide()
12490.attr("aria-hidden","true");
12491submenu
12492.show()
12493.removeAttr("aria-hidden")
12494.attr("aria-expanded","true")
12495.position(position);
12496},
12497collapseAll:function(event,all){
12498clearTimeout(this.timer);
12499this.timer=this._delay(function(){
12500var currentMenu=all?this.element:
12501$(event&&event.target).closest(this.element.find(".ui-menu"));
12502if(!currentMenu.length){
12503currentMenu=this.element;
12504}
12505this._close(currentMenu);
12506this.blur(event);
12507this._removeClass(currentMenu.find(".ui-state-active"),null,"ui-state-active");
12508this.activeMenu=currentMenu;
12509},all?0:this.delay);
12510},
12511_close:function(startMenu){
12512if(!startMenu){
12513startMenu=this.active?this.active.parent():this.element;
12514}
12515startMenu.find(".ui-menu")
12516.hide()
12517.attr("aria-hidden","true")
12518.attr("aria-expanded","false");
12519},
12520_closeOnDocumentClick:function(event){
12521return!$(event.target).closest(".ui-menu").length;
12522},
12523_isDivider:function(item){
12524return!/[^\-\u2014\u2013\s]/.test(item.text());
12525},
12526collapse:function(event){
12527var newItem=this.active&&
12528this.active.parent().closest(".ui-menu-item",this.element);
12529if(newItem&&newItem.length){
12530this._close();
12531this.focus(event,newItem);
12532}
12533},
12534expand:function(event){
12535var newItem=this.active&&this._menuItems(this.active.children(".ui-menu")).first();
12536if(newItem&&newItem.length){
12537this._open(newItem.parent());
12538this._delay(function(){
12539this.focus(event,newItem);
12540});
12541}
12542},
12543next:function(event){
12544this._move("next","first",event);
12545},
12546previous:function(event){
12547this._move("prev","last",event);
12548},
12549isFirstItem:function(){
12550return this.active&&!this.active.prevAll(".ui-menu-item").length;
12551},
12552isLastItem:function(){
12553return this.active&&!this.active.nextAll(".ui-menu-item").length;
12554},
12555_menuItems:function(menu){
12556return(menu||this.element)
12557.find(this.options.items)
12558.filter(".ui-menu-item");
12559},
12560_move:function(direction,filter,event){
12561var next;
12562if(this.active){
12563if(direction==="first"||direction==="last"){
12564next=this.active
12565[direction==="first"?"prevAll":"nextAll"](".ui-menu-item")
12566.last();
12567}else{
12568next=this.active
12569[direction+"All"](".ui-menu-item")
12570.first();
12571}
12572}
12573if(!next||!next.length||!this.active){
12574next=this._menuItems(this.activeMenu)[filter]();
12575}
12576this.focus(event,next);
12577},
12578nextPage:function(event){
12579var item,base,height;
12580if(!this.active){
12581this.next(event);
12582return;
12583}
12584if(this.isLastItem()){
12585return;
12586}
12587if(this._hasScroll()){
12588base=this.active.offset().top;
12589height=this.element.innerHeight();
12590if($.fn.jquery.indexOf("3.2.")===0){
12591height+=this.element[0].offsetHeight-this.element.outerHeight();
12592}
12593this.active.nextAll(".ui-menu-item").each(function(){
12594item=$(this);
12595return item.offset().top-base-height<0;
12596});
12597this.focus(event,item);
12598}else{
12599this.focus(event,this._menuItems(this.activeMenu)
12600[!this.active?"first":"last"]());
12601}
12602},
12603previousPage:function(event){
12604var item,base,height;
12605if(!this.active){
12606this.next(event);
12607return;
12608}
12609if(this.isFirstItem()){
12610return;
12611}
12612if(this._hasScroll()){
12613base=this.active.offset().top;
12614height=this.element.innerHeight();
12615if($.fn.jquery.indexOf("3.2.")===0){
12616height+=this.element[0].offsetHeight-this.element.outerHeight();
12617}
12618this.active.prevAll(".ui-menu-item").each(function(){
12619item=$(this);
12620return item.offset().top-base+height>0;
12621});
12622this.focus(event,item);
12623}else{
12624this.focus(event,this._menuItems(this.activeMenu).first());
12625}
12626},
12627_hasScroll:function(){
12628return this.element.outerHeight()<this.element.prop("scrollHeight");
12629},
12630select:function(event){
12631this.active=this.active||$(event.target).closest(".ui-menu-item");
12632var ui={item:this.active};
12633if(!this.active.has(".ui-menu").length){
12634this.collapseAll(event,true);
12635}
12636this._trigger("select",event,ui);
12637},
12638_filterMenuItems:function(character){
12639var escapedCharacter=character.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),
12640regex=new RegExp("^"+escapedCharacter,"i");
12641return this.activeMenu
12642.find(this.options.items)
12643.filter(".ui-menu-item")
12644.filter(function(){
12645return regex.test(
12646String.prototype.trim.call(
12647$(this).children(".ui-menu-item-wrapper").text()));
12648});
12649}
12650});
12651$.widget("ui.autocomplete",{
12652version:"1.14.1",
12653defaultElement:"<input>",
12654options:{
12655appendTo:null,
12656autoFocus:false,
12657delay:300,
12658minLength:1,
12659position:{
12660my:"left top",
12661at:"left bottom",
12662collision:"none"
12663},
12664source:null,
12665change:null,
12666close:null,
12667focus:null,
12668open:null,
12669response:null,
12670search:null,
12671select:null
12672},
12673requestIndex:0,
12674pending:0,
12675liveRegionTimer:null,
12676_create:function(){
12677var suppressKeyPress,suppressKeyPressRepeat,suppressInput,
12678nodeName=this.element[0].nodeName.toLowerCase(),
12679isTextarea=nodeName==="textarea",
12680isInput=nodeName==="input";
12681this.isMultiLine=isTextarea||
12682!isInput&&this.element.prop("contentEditable")==="true";
12683this.valueMethod=this.element[isTextarea||isInput?"val":"text"];
12684this.isNewMenu=true;
12685this._addClass("ui-autocomplete-input");
12686this.element.attr("autocomplete","off");
12687this._on(this.element,{
12688keydown:function(event){
12689if(this.element.prop("readOnly")){
12690suppressKeyPress=true;
12691suppressInput=true;
12692suppressKeyPressRepeat=true;
12693return;
12694}
12695suppressKeyPress=false;
12696suppressInput=false;
12697suppressKeyPressRepeat=false;
12698var keyCode=$.ui.keyCode;
12699switch(event.keyCode){
12700case keyCode.PAGE_UP:
12701suppressKeyPress=true;
12702this._move("previousPage",event);
12703break;
12704case keyCode.PAGE_DOWN:
12705suppressKeyPress=true;
12706this._move("nextPage",event);
12707break;
12708case keyCode.UP:
12709suppressKeyPress=true;
12710this._keyEvent("previous",event);
12711break;
12712case keyCode.DOWN:
12713suppressKeyPress=true;
12714this._keyEvent("next",event);
12715break;
12716case keyCode.ENTER:
12717if(this.menu.active){
12718suppressKeyPress=true;
12719event.preventDefault();
12720this.menu.select(event);
12721}
12722break;
12723case keyCode.TAB:
12724if(this.menu.active){
12725this.menu.select(event);
12726}
12727break;
12728case keyCode.ESCAPE:
12729if(this.menu.element.is(":visible")){
12730if(!this.isMultiLine){
12731this._value(this.term);
12732}
12733this.close(event);
12734event.preventDefault();
12735}
12736break;
12737default:
12738suppressKeyPressRepeat=true;
12739this._searchTimeout(event);
12740break;
12741}
12742},
12743keypress:function(event){
12744if(suppressKeyPress){
12745suppressKeyPress=false;
12746if(!this.isMultiLine||this.menu.element.is(":visible")){
12747event.preventDefault();
12748}
12749return;
12750}
12751if(suppressKeyPressRepeat){
12752return;
12753}
12754var keyCode=$.ui.keyCode;
12755switch(event.keyCode){
12756case keyCode.PAGE_UP:
12757this._move("previousPage",event);
12758break;
12759case keyCode.PAGE_DOWN:
12760this._move("nextPage",event);
12761break;
12762case keyCode.UP:
12763this._keyEvent("previous",event);
12764break;
12765case keyCode.DOWN:
12766this._keyEvent("next",event);
12767break;
12768}
12769},
12770input:function(event){
12771if(suppressInput){
12772suppressInput=false;
12773event.preventDefault();
12774return;
12775}
12776this._searchTimeout(event);
12777},
12778focus:function(){
12779this.selectedItem=null;
12780this.previous=this._value();
12781},
12782blur:function(event){
12783clearTimeout(this.searching);
12784this.close(event);
12785this._change(event);
12786}
12787});
12788this._initSource();
12789this.menu=$("<ul>")
12790.appendTo(this._appendTo())
12791.menu({
12792role:null
12793})
12794.hide()
12795.menu("instance");
12796this._addClass(this.menu.element,"ui-autocomplete","ui-front");
12797this._on(this.menu.element,{
12798mousedown:function(event){
12799event.preventDefault();
12800},
12801menufocus:function(event,ui){
12802var label,item;
12803if(this.isNewMenu){
12804this.isNewMenu=false;
12805if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){
12806this.menu.blur();
12807this.document.one("mousemove",function(){
12808$(event.target).trigger(event.originalEvent);
12809});
12810return;
12811}
12812}
12813item=ui.item.data("ui-autocomplete-item");
12814if(false!==this._trigger("focus",event,{item:item})){
12815if(event.originalEvent&&/^key/.test(event.originalEvent.type)){
12816this._value(item.value);
12817}
12818}
12819label=ui.item.attr("aria-label")||item.value;
12820if(label&&String.prototype.trim.call(label).length){
12821clearTimeout(this.liveRegionTimer);
12822this.liveRegionTimer=this._delay(function(){
12823this.liveRegion.html($("<div>").text(label));
12824},100);
12825}
12826},
12827menuselect:function(event,ui){
12828var item=ui.item.data("ui-autocomplete-item"),
12829previous=this.previous;
12830if(this.element[0]!==this.document[0].activeElement){
12831this.element.trigger("focus");
12832this.previous=previous;
12833}
12834if(false!==this._trigger("select",event,{item:item})){
12835this._value(item.value);
12836}
12837this.term=this._value();
12838this.close(event);
12839this.selectedItem=item;
12840}
12841});
12842this.liveRegion=$("<div>",{
12843role:"status",
12844"aria-live":"assertive",
12845"aria-relevant":"additions"
12846})
12847.appendTo(this.document[0].body);
12848this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");
12849this._on(this.window,{
12850beforeunload:function(){
12851this.element.removeAttr("autocomplete");
12852}
12853});
12854},
12855_destroy:function(){
12856clearTimeout(this.searching);
12857this.element.removeAttr("autocomplete");
12858this.menu.element.remove();
12859this.liveRegion.remove();
12860},
12861_setOption:function(key,value){
12862this._super(key,value);
12863if(key==="source"){
12864this._initSource();
12865}
12866if(key==="appendTo"){
12867this.menu.element.appendTo(this._appendTo());
12868}
12869if(key==="disabled"&&value&&this.xhr){
12870this.xhr.abort();
12871}
12872},
12873_isEventTargetInWidget:function(event){
12874var menuElement=this.menu.element[0];
12875return event.target===this.element[0]||
12876event.target===menuElement||
12877$.contains(menuElement,event.target);
12878},
12879_closeOnClickOutside:function(event){
12880if(!this._isEventTargetInWidget(event)){
12881this.close();
12882}
12883},
12884_appendTo:function(){
12885var element=this.options.appendTo;
12886if(element){
12887element=element.jquery||element.nodeType?
12888$(element):
12889this.document.find(element).eq(0);
12890}
12891if(!element||!element[0]){
12892element=this.element.closest(".ui-front, dialog");
12893}
12894if(!element.length){
12895element=this.document[0].body;
12896}
12897return element;
12898},
12899_initSource:function(){
12900var array,url,
12901that=this;
12902if(Array.isArray(this.options.source)){
12903array=this.options.source;
12904this.source=function(request,response){
12905response($.ui.autocomplete.filter(array,request.term));
12906};
12907}else if(typeof this.options.source==="string"){
12908url=this.options.source;
12909this.source=function(request,response){
12910if(that.xhr){
12911that.xhr.abort();
12912}
12913that.xhr=$.ajax({
12914url:url,
12915data:request,
12916dataType:"json",
12917success:function(data){
12918response(data);
12919},
12920error:function(){
12921response([]);
12922}
12923});
12924};
12925}else{
12926this.source=this.options.source;
12927}
12928},
12929_searchTimeout:function(event){
12930clearTimeout(this.searching);
12931this.searching=this._delay(function(){
12932var equalValues=this.term===this._value(),
12933menuVisible=this.menu.element.is(":visible"),
12934modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;
12935if(!equalValues||(equalValues&&!menuVisible&&!modifierKey)){
12936this.selectedItem=null;
12937this.search(null,event);
12938}
12939},this.options.delay);
12940},
12941search:function(value,event){
12942value=value!=null?value:this._value();
12943this.term=this._value();
12944if(value.length<this.options.minLength){
12945return this.close(event);
12946}
12947if(this._trigger("search",event)===false){
12948return;
12949}
12950return this._search(value);
12951},
12952_search:function(value){
12953this.pending++;
12954this._addClass("ui-autocomplete-loading");
12955this.cancelSearch=false;
12956this.source({term:value},this._response());
12957},
12958_response:function(){
12959var index=++this.requestIndex;
12960return function(content){
12961if(index===this.requestIndex){
12962this.__response(content);
12963}
12964this.pending--;
12965if(!this.pending){
12966this._removeClass("ui-autocomplete-loading");
12967}
12968}.bind(this);
12969},
12970__response:function(content){
12971if(content){
12972content=this._normalize(content);
12973}
12974this._trigger("response",null,{content:content});
12975if(!this.options.disabled&&content&&content.length&&!this.cancelSearch){
12976this._suggest(content);
12977this._trigger("open");
12978}else{
12979this._close();
12980}
12981},
12982close:function(event){
12983this.cancelSearch=true;
12984this._close(event);
12985},
12986_close:function(event){
12987this._off(this.document,"mousedown");
12988if(this.menu.element.is(":visible")){
12989this.menu.element.hide();
12990this.menu.blur();
12991this.isNewMenu=true;
12992this._trigger("close",event);
12993}
12994},
12995_change:function(event){
12996if(this.previous!==this._value()){
12997this._trigger("change",event,{item:this.selectedItem});
12998}
12999},
13000_normalize:function(items){
13001if(items.length&&items[0].label&&items[0].value){
13002return items;
13003}
13004return $.map(items,function(item){
13005if(typeof item==="string"){
13006return{
13007label:item,
13008value:item
13009};
13010}
13011return $.extend({},item,{
13012label:item.label||item.value,
13013value:item.value||item.label
13014});
13015});
13016},
13017_suggest:function(items){
13018var ul=this.menu.element.empty();
13019this._renderMenu(ul,items);
13020this.isNewMenu=true;
13021this.menu.refresh();
13022ul.show();
13023this._resizeMenu();
13024ul.position($.extend({
13025of:this.element
13026},this.options.position));
13027if(this.options.autoFocus){
13028this.menu.next();
13029}
13030this._on(this.document,{
13031mousedown:"_closeOnClickOutside"
13032});
13033},
13034_resizeMenu:function(){
13035var ul=this.menu.element;
13036ul.outerWidth(Math.max(
13037ul.width("").outerWidth()+1,
13038this.element.outerWidth()
13039));
13040},
13041_renderMenu:function(ul,items){
13042var that=this;
13043$.each(items,function(index,item){
13044that._renderItemData(ul,item);
13045});
13046},
13047_renderItemData:function(ul,item){
13048return this._renderItem(ul,item).data("ui-autocomplete-item",item);
13049},
13050_renderItem:function(ul,item){
13051return $("<li>")
13052.append($("<div>").text(item.label))
13053.appendTo(ul);
13054},
13055_move:function(direction,event){
13056if(!this.menu.element.is(":visible")){
13057this.search(null,event);
13058return;
13059}
13060if(this.menu.isFirstItem()&&/^previous/.test(direction)||
13061this.menu.isLastItem()&&/^next/.test(direction)){
13062if(!this.isMultiLine){
13063this._value(this.term);
13064}
13065this.menu.blur();
13066return;
13067}
13068this.menu[direction](event);
13069},
13070widget:function(){
13071return this.menu.element;
13072},
13073_value:function(){
13074return this.valueMethod.apply(this.element,arguments);
13075},
13076_keyEvent:function(keyEvent,event){
13077if(!this.isMultiLine||this.menu.element.is(":visible")){
13078this._move(keyEvent,event);
13079event.preventDefault();
13080}
13081}
13082});
13083$.extend($.ui.autocomplete,{
13084escapeRegex:function(value){
13085return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");
13086},
13087filter:function(array,term){
13088var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");
13089return $.grep(array,function(value){
13090return matcher.test(value.label||value.value||value);
13091});
13092}
13093});
13094$.widget("ui.autocomplete",$.ui.autocomplete,{
13095options:{
13096messages:{
13097noResults:"No search results.",
13098results:function(amount){
13099return amount+(amount>1?" results are":" result is")+
13100" available, use up and down arrow keys to navigate.";
13101}
13102}
13103},
13104__response:function(content){
13105var message;
13106this._superApply(arguments);
13107if(this.options.disabled||this.cancelSearch){
13108return;
13109}
13110if(content&&content.length){
13111message=this.options.messages.results(content.length);
13112}else{
13113message=this.options.messages.noResults;
13114}
13115clearTimeout(this.liveRegionTimer);
13116this.liveRegionTimer=this._delay(function(){
13117this.liveRegion.html($("<div>").text(message));
13118},100);
13119}
13120});
13121var widgetsAutocomplete=$.ui.autocomplete;
13122var controlgroupCornerRegex=/ui-corner-([a-z]){2,6}/g;
13123var widgetsControlgroup=$.widget("ui.controlgroup",{
13124version:"1.14.1",
13125defaultElement:"<div>",
13126options:{
13127direction:"horizontal",
13128disabled:null,
13129onlyVisible:true,
13130items:{
13131"button":"input[type=button], input[type=submit], input[type=reset], button, a",
13132"controlgroupLabel":".ui-controlgroup-label",
13133"checkboxradio":"input[type='checkbox'], input[type='radio']",
13134"selectmenu":"select",
13135"spinner":".ui-spinner-input"
13136}
13137},
13138_create:function(){
13139this._enhance();
13140},
13141_enhance:function(){
13142this.element.attr("role","toolbar");
13143this.refresh();
13144},
13145_destroy:function(){
13146this._callChildMethod("destroy");
13147this.childWidgets.removeData("ui-controlgroup-data");
13148this.element.removeAttr("role");
13149if(this.options.items.controlgroupLabel){
13150this.element
13151.find(this.options.items.controlgroupLabel)
13152.find(".ui-controlgroup-label-contents")
13153.contents().unwrap();
13154}
13155},
13156_initWidgets:function(){
13157var that=this,
13158childWidgets=[];
13159$.each(this.options.items,function(widget,selector){
13160var labels;
13161var options={};
13162if(!selector){
13163return;
13164}
13165if(widget==="controlgroupLabel"){
13166labels=that.element.find(selector);
13167labels.each(function(){
13168var element=$(this);
13169if(element.children(".ui-controlgroup-label-contents").length){
13170return;
13171}
13172element.contents()
13173.wrapAll("<span class='ui-controlgroup-label-contents'></span>");
13174});
13175that._addClass(labels,null,"ui-widget ui-widget-content ui-state-default");
13176childWidgets=childWidgets.concat(labels.get());
13177return;
13178}
13179if(!$.fn[widget]){
13180return;
13181}
13182if(that["_"+widget+"Options"]){
13183options=that["_"+widget+"Options"]("middle");
13184}else{
13185options={classes:{}};
13186}
13187that.element
13188.find(selector)
13189.each(function(){
13190var element=$(this);
13191var instance=element[widget]("instance");
13192var instanceOptions=$.widget.extend({},options);
13193if(widget==="button"&&element.parent(".ui-spinner").length){
13194return;
13195}
13196if(!instance){
13197instance=element[widget]()[widget]("instance");
13198}
13199if(instance){
13200instanceOptions.classes=
13201that._resolveClassesValues(instanceOptions.classes,instance);
13202}
13203element[widget](instanceOptions);
13204var widgetElement=element[widget]("widget");
13205$.data(widgetElement[0],"ui-controlgroup-data",
13206instance?instance:element[widget]("instance"));
13207childWidgets.push(widgetElement[0]);
13208});
13209});
13210this.childWidgets=$($.uniqueSort(childWidgets));
13211this._addClass(this.childWidgets,"ui-controlgroup-item");
13212},
13213_callChildMethod:function(method){
13214this.childWidgets.each(function(){
13215var element=$(this),
13216data=element.data("ui-controlgroup-data");
13217if(data&&data[method]){
13218data[method]();
13219}
13220});
13221},
13222_updateCornerClass:function(element,position){
13223var remove="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
13224var add=this._buildSimpleOptions(position,"label").classes.label;
13225this._removeClass(element,null,remove);
13226this._addClass(element,null,add);
13227},
13228_buildSimpleOptions:function(position,key){
13229var direction=this.options.direction==="vertical";
13230var result={
13231classes:{}
13232};
13233result.classes[key]={
13234"middle":"",
13235"first":"ui-corner-"+(direction?"top":"left"),
13236"last":"ui-corner-"+(direction?"bottom":"right"),
13237"only":"ui-corner-all"
13238}[position];
13239return result;
13240},
13241_spinnerOptions:function(position){
13242var options=this._buildSimpleOptions(position,"ui-spinner");
13243options.classes["ui-spinner-up"]="";
13244options.classes["ui-spinner-down"]="";
13245return options;
13246},
13247_buttonOptions:function(position){
13248return this._buildSimpleOptions(position,"ui-button");
13249},
13250_checkboxradioOptions:function(position){
13251return this._buildSimpleOptions(position,"ui-checkboxradio-label");
13252},
13253_selectmenuOptions:function(position){
13254var direction=this.options.direction==="vertical";
13255return{
13256width:direction?"auto":false,
13257classes:{
13258middle:{
13259"ui-selectmenu-button-open":"",
13260"ui-selectmenu-button-closed":""
13261},
13262first:{
13263"ui-selectmenu-button-open":"ui-corner-"+(direction?"top":"tl"),
13264"ui-selectmenu-button-closed":"ui-corner-"+(direction?"top":"left")
13265},
13266last:{
13267"ui-selectmenu-button-open":direction?"":"ui-corner-tr",
13268"ui-selectmenu-button-closed":"ui-corner-"+(direction?"bottom":"right")
13269},
13270only:{
13271"ui-selectmenu-button-open":"ui-corner-top",
13272"ui-selectmenu-button-closed":"ui-corner-all"
13273}
13274}[position]
13275};
13276},
13277_resolveClassesValues:function(classes,instance){
13278var result={};
13279$.each(classes,function(key){
13280var current=instance.options.classes[key]||"";
13281current=String.prototype.trim.call(current.replace(controlgroupCornerRegex,""));
13282result[key]=(current+" "+classes[key]).replace(/\s+/g," ");
13283});
13284return result;
13285},
13286_setOption:function(key,value){
13287if(key==="direction"){
13288this._removeClass("ui-controlgroup-"+this.options.direction);
13289}
13290this._super(key,value);
13291if(key==="disabled"){
13292this._callChildMethod(value?"disable":"enable");
13293return;
13294}
13295this.refresh();
13296},
13297refresh:function(){
13298var children,
13299that=this;
13300this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction);
13301if(this.options.direction==="horizontal"){
13302this._addClass(null,"ui-helper-clearfix");
13303}
13304this._initWidgets();
13305children=this.childWidgets;
13306if(this.options.onlyVisible){
13307children=children.filter(":visible");
13308}
13309if(children.length){
13310$.each(["first","last"],function(index,value){
13311var instance=children[value]().data("ui-controlgroup-data");
13312if(instance&&that["_"+instance.widgetName+"Options"]){
13313var options=that["_"+instance.widgetName+"Options"](
13314children.length===1?"only":value
13315);
13316options.classes=that._resolveClassesValues(options.classes,instance);
13317instance.element[instance.widgetName](options);
13318}else{
13319that._updateCornerClass(children[value](),value);
13320}
13321});
13322this._callChildMethod("refresh");
13323}
13324}
13325});
13326$.widget("ui.checkboxradio",[$.ui.formResetMixin,{
13327version:"1.14.1",
13328options:{
13329disabled:null,
13330label:null,
13331icon:true,
13332classes:{
13333"ui-checkboxradio-label":"ui-corner-all",
13334"ui-checkboxradio-icon":"ui-corner-all"
13335}
13336},
13337_getCreateOptions:function(){
13338var disabled,labels,labelContents;
13339var options=this._super()||{};
13340this._readType();
13341labels=this.element.labels();
13342this.label=$(labels[labels.length-1]);
13343if(!this.label.length){
13344$.error("No label found for checkboxradio widget");
13345}
13346this.originalLabel="";
13347labelContents=this.label.contents().not(this.element[0]);
13348if(labelContents.length){
13349this.originalLabel+=labelContents
13350.clone()
13351.wrapAll("<div></div>")
13352.parent()
13353.html();
13354}
13355if(this.originalLabel){
13356options.label=this.originalLabel;
13357}
13358disabled=this.element[0].disabled;
13359if(disabled!=null){
13360options.disabled=disabled;
13361}
13362return options;
13363},
13364_create:function(){
13365var checked=this.element[0].checked;
13366this._bindFormResetHandler();
13367if(this.options.disabled==null){
13368this.options.disabled=this.element[0].disabled;
13369}
13370this._setOption("disabled",this.options.disabled);
13371this._addClass("ui-checkboxradio","ui-helper-hidden-accessible");
13372this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget");
13373if(this.type==="radio"){
13374this._addClass(this.label,"ui-checkboxradio-radio-label");
13375}
13376if(this.options.label&&this.options.label!==this.originalLabel){
13377this._updateLabel();
13378}else if(this.originalLabel){
13379this.options.label=this.originalLabel;
13380}
13381this._enhance();
13382if(checked){
13383this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active");
13384}
13385this._on({
13386change:"_toggleClasses",
13387focus:function(){
13388this._addClass(this.label,null,"ui-state-focus ui-visual-focus");
13389},
13390blur:function(){
13391this._removeClass(this.label,null,"ui-state-focus ui-visual-focus");
13392}
13393});
13394},
13395_readType:function(){
13396var nodeName=this.element[0].nodeName.toLowerCase();
13397this.type=this.element[0].type;
13398if(nodeName!=="input"||!/radio|checkbox/.test(this.type)){
13399$.error("Can't create checkboxradio on element.nodeName="+nodeName+
13400" and element.type="+this.type);
13401}
13402},
13403_enhance:function(){
13404this._updateIcon(this.element[0].checked);
13405},
13406widget:function(){
13407return this.label;
13408},
13409_getRadioGroup:function(){
13410var group;
13411var name=this.element[0].name;
13412var nameSelector="input[name='"+CSS.escape(name)+"']";
13413if(!name){
13414return $([]);
13415}
13416if(this.form.length){
13417group=$(this.form[0].elements).filter(nameSelector);
13418}else{
13419group=$(nameSelector).filter(function(){
13420return $($(this).prop("form")).length===0;
13421});
13422}
13423return group.not(this.element);
13424},
13425_toggleClasses:function(){
13426var checked=this.element[0].checked;
13427this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked);
13428if(this.options.icon&&this.type==="checkbox"){
13429this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",checked)
13430._toggleClass(this.icon,null,"ui-icon-blank",!checked);
13431}
13432if(this.type==="radio"){
13433this._getRadioGroup()
13434.each(function(){
13435var instance=$(this).checkboxradio("instance");
13436if(instance){
13437instance._removeClass(instance.label,
13438"ui-checkboxradio-checked","ui-state-active");
13439}
13440});
13441}
13442},
13443_destroy:function(){
13444this._unbindFormResetHandler();
13445if(this.icon){
13446this.icon.remove();
13447this.iconSpace.remove();
13448}
13449},
13450_setOption:function(key,value){
13451if(key==="label"&&!value){
13452return;
13453}
13454this._super(key,value);
13455if(key==="disabled"){
13456this._toggleClass(this.label,null,"ui-state-disabled",value);
13457this.element[0].disabled=value;
13458return;
13459}
13460this.refresh();
13461},
13462_updateIcon:function(checked){
13463var toAdd="ui-icon ui-icon-background ";
13464if(this.options.icon){
13465if(!this.icon){
13466this.icon=$("<span>");
13467this.iconSpace=$("<span> </span>");
13468this._addClass(this.iconSpace,"ui-checkboxradio-icon-space");
13469}
13470if(this.type==="checkbox"){
13471toAdd+=checked?"ui-icon-check ui-state-checked":"ui-icon-blank";
13472this._removeClass(this.icon,null,checked?"ui-icon-blank":"ui-icon-check");
13473}else{
13474toAdd+="ui-icon-blank";
13475}
13476this._addClass(this.icon,"ui-checkboxradio-icon",toAdd);
13477if(!checked){
13478this._removeClass(this.icon,null,"ui-icon-check ui-state-checked");
13479}
13480this.icon.prependTo(this.label).after(this.iconSpace);
13481}else if(this.icon!==undefined){
13482this.icon.remove();
13483this.iconSpace.remove();
13484delete this.icon;
13485}
13486},
13487_updateLabel:function(){
13488var contents=this.label.contents().not(this.element[0]);
13489if(this.icon){
13490contents=contents.not(this.icon[0]);
13491}
13492if(this.iconSpace){
13493contents=contents.not(this.iconSpace[0]);
13494}
13495contents.remove();
13496this.label.append(this.options.label);
13497},
13498refresh:function(){
13499var checked=this.element[0].checked,
13500isDisabled=this.element[0].disabled;
13501this._updateIcon(checked);
13502this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked);
13503if(this.options.label!==null){
13504this._updateLabel();
13505}
13506if(isDisabled!==this.options.disabled){
13507this._setOptions({"disabled":isDisabled});
13508}
13509}
13510}]);
13511var widgetsCheckboxradio=$.ui.checkboxradio;
13512$.widget("ui.button",{
13513version:"1.14.1",
13514defaultElement:"<button>",
13515options:{
13516classes:{
13517"ui-button":"ui-corner-all"
13518},
13519disabled:null,
13520icon:null,
13521iconPosition:"beginning",
13522label:null,
13523showLabel:true
13524},
13525_getCreateOptions:function(){
13526var disabled,
13527options=this._super()||{};
13528this.isInput=this.element.is("input");
13529disabled=this.element[0].disabled;
13530if(disabled!=null){
13531options.disabled=disabled;
13532}
13533this.originalLabel=this.isInput?this.element.val():this.element.html();
13534if(this.originalLabel){
13535options.label=this.originalLabel;
13536}
13537return options;
13538},
13539_create:function(){
13540if(!this.option.showLabel&!this.options.icon){
13541this.options.showLabel=true;
13542}
13543if(this.options.disabled==null){
13544this.options.disabled=this.element[0].disabled||false;
13545}
13546this.hasTitle=!!this.element.attr("title");
13547if(this.options.label&&this.options.label!==this.originalLabel){
13548if(this.isInput){
13549this.element.val(this.options.label);
13550}else{
13551this.element.html(this.options.label);
13552}
13553}
13554this._addClass("ui-button","ui-widget");
13555this._setOption("disabled",this.options.disabled);
13556this._enhance();
13557if(this.element.is("a")){
13558this._on({
13559"keyup":function(event){
13560if(event.keyCode===$.ui.keyCode.SPACE){
13561event.preventDefault();
13562if(this.element[0].click){
13563this.element[0].click();
13564}else{
13565this.element.trigger("click");
13566}
13567}
13568}
13569});
13570}
13571},
13572_enhance:function(){
13573if(!this.element.is("button")){
13574this.element.attr("role","button");
13575}
13576if(this.options.icon){
13577this._updateIcon("icon",this.options.icon);
13578this._updateTooltip();
13579}
13580},
13581_updateTooltip:function(){
13582this.title=this.element.attr("title");
13583if(!this.options.showLabel&&!this.title){
13584this.element.attr("title",this.options.label);
13585}
13586},
13587_updateIcon:function(option,value){
13588var icon=option!=="iconPosition",
13589position=icon?this.options.iconPosition:value,
13590displayBlock=position==="top"||position==="bottom";
13591if(!this.icon){
13592this.icon=$("<span>");
13593this._addClass(this.icon,"ui-button-icon","ui-icon");
13594if(!this.options.showLabel){
13595this._addClass("ui-button-icon-only");
13596}
13597}else if(icon){
13598this._removeClass(this.icon,null,this.options.icon);
13599}
13600if(icon){
13601this._addClass(this.icon,null,value);
13602}
13603this._attachIcon(position);
13604if(displayBlock){
13605this._addClass(this.icon,null,"ui-widget-icon-block");
13606if(this.iconSpace){
13607this.iconSpace.remove();
13608}
13609}else{
13610if(!this.iconSpace){
13611this.iconSpace=$("<span> </span>");
13612this._addClass(this.iconSpace,"ui-button-icon-space");
13613}
13614this._removeClass(this.icon,null,"ui-wiget-icon-block");
13615this._attachIconSpace(position);
13616}
13617},
13618_destroy:function(){
13619this.element.removeAttr("role");
13620if(this.icon){
13621this.icon.remove();
13622}
13623if(this.iconSpace){
13624this.iconSpace.remove();
13625}
13626if(!this.hasTitle){
13627this.element.removeAttr("title");
13628}
13629},
13630_attachIconSpace:function(iconPosition){
13631this.icon[/^(?:end|bottom)/.test(iconPosition)?"before":"after"](this.iconSpace);
13632},
13633_attachIcon:function(iconPosition){
13634this.element[/^(?:end|bottom)/.test(iconPosition)?"append":"prepend"](this.icon);
13635},
13636_setOptions:function(options){
13637var newShowLabel=options.showLabel===undefined?
13638this.options.showLabel:
13639options.showLabel,
13640newIcon=options.icon===undefined?this.options.icon:options.icon;
13641if(!newShowLabel&&!newIcon){
13642options.showLabel=true;
13643}
13644this._super(options);
13645},
13646_setOption:function(key,value){
13647if(key==="icon"){
13648if(value){
13649this._updateIcon(key,value);
13650}else if(this.icon){
13651this.icon.remove();
13652if(this.iconSpace){
13653this.iconSpace.remove();
13654}
13655}
13656}
13657if(key==="iconPosition"){
13658this._updateIcon(key,value);
13659}
13660if(key==="showLabel"){
13661this._toggleClass("ui-button-icon-only",null,!value);
13662this._updateTooltip();
13663}
13664if(key==="label"){
13665if(this.isInput){
13666this.element.val(value);
13667}else{
13668this.element.html(value);
13669if(this.icon){
13670this._attachIcon(this.options.iconPosition);
13671this._attachIconSpace(this.options.iconPosition);
13672}
13673}
13674}
13675this._super(key,value);
13676if(key==="disabled"){
13677this._toggleClass(null,"ui-state-disabled",value);
13678this.element[0].disabled=value;
13679if(value){
13680this.element.trigger("blur");
13681}
13682}
13683},
13684refresh:function(){
13685var isDisabled=this.element.is("input, button")?
13686this.element[0].disabled:this.element.hasClass("ui-button-disabled");
13687if(isDisabled!==this.options.disabled){
13688this._setOptions({disabled:isDisabled});
13689}
13690this._updateTooltip();
13691}
13692});
13693if($.uiBackCompat===true){
13694$.widget("ui.button",$.ui.button,{
13695options:{
13696text:true,
13697icons:{
13698primary:null,
13699secondary:null
13700}
13701},
13702_create:function(){
13703if(this.options.showLabel&&!this.options.text){
13704this.options.showLabel=this.options.text;
13705}
13706if(!this.options.showLabel&&this.options.text){
13707this.options.text=this.options.showLabel;
13708}
13709if(!this.options.icon&&(this.options.icons.primary||
13710this.options.icons.secondary)){
13711if(this.options.icons.primary){
13712this.options.icon=this.options.icons.primary;
13713}else{
13714this.options.icon=this.options.icons.secondary;
13715this.options.iconPosition="end";
13716}
13717}else if(this.options.icon){
13718this.options.icons.primary=this.options.icon;
13719}
13720this._super();
13721},
13722_setOption:function(key,value){
13723if(key==="text"){
13724this._super("showLabel",value);
13725return;
13726}
13727if(key==="showLabel"){
13728this.options.text=value;
13729}
13730if(key==="icon"){
13731this.options.icons.primary=value;
13732}
13733if(key==="icons"){
13734if(value.primary){
13735this._super("icon",value.primary);
13736this._super("iconPosition","beginning");
13737}else if(value.secondary){
13738this._super("icon",value.secondary);
13739this._super("iconPosition","end");
13740}
13741}
13742this._superApply(arguments);
13743}
13744});
13745$.fn.button=(function(orig){
13746return function(options){
13747var isMethodCall=typeof options==="string";
13748var args=Array.prototype.slice.call(arguments,1);
13749var returnValue=this;
13750if(isMethodCall){
13751if(!this.length&&options==="instance"){
13752returnValue=undefined;
13753}else{
13754this.each(function(){
13755var methodValue;
13756var type=$(this).attr("type");
13757var name=type!=="checkbox"&&type!=="radio"?
13758"button":
13759"checkboxradio";
13760var instance=$.data(this,"ui-"+name);
13761if(options==="instance"){
13762returnValue=instance;
13763return false;
13764}
13765if(!instance){
13766return $.error("cannot call methods on button"+
13767" prior to initialization; "+
13768"attempted to call method '"+options+"'");
13769}
13770if(typeof instance[options]!=="function"||
13771options.charAt(0)==="_"){
13772return $.error("no such method '"+options+"' for button"+
13773" widget instance");
13774}
13775methodValue=instance[options].apply(instance,args);
13776if(methodValue!==instance&&methodValue!==undefined){
13777returnValue=methodValue&&methodValue.jquery?
13778returnValue.pushStack(methodValue.get()):
13779methodValue;
13780return false;
13781}
13782});
13783}
13784}else{
13785if(args.length){
13786options=$.widget.extend.apply(null,[options].concat(args));
13787}
13788this.each(function(){
13789var type=$(this).attr("type");
13790var name=type!=="checkbox"&&type!=="radio"?"button":"checkboxradio";
13791var instance=$.data(this,"ui-"+name);
13792if(instance){
13793instance.option(options||{});
13794if(instance._init){
13795instance._init();
13796}
13797}else{
13798if(name==="button"){
13799orig.call($(this),options);
13800return;
13801}
13802$(this).checkboxradio($.extend({icon:false},options));
13803}
13804});
13805}
13806return returnValue;
13807};
13808})($.fn.button);
13809$.fn.buttonset=function(){
13810if(!$.ui.controlgroup){
13811$.error("Controlgroup widget missing");
13812}
13813if(arguments[0]==="option"&&arguments[1]==="items"&&arguments[2]){
13814return this.controlgroup.apply(this,
13815[arguments[0],"items.button",arguments[2]]);
13816}
13817if(arguments[0]==="option"&&arguments[1]==="items"){
13818return this.controlgroup.apply(this,[arguments[0],"items.button"]);
13819}
13820if(typeof arguments[0]==="object"&&arguments[0].items){
13821arguments[0].items={
13822button:arguments[0].items
13823};
13824}
13825return this.controlgroup.apply(this,arguments);
13826};
13827}
13828var widgetsButton=$.ui.button;
13829$.extend($.ui,{datepicker:{version:"1.14.1"}});
13830var datepicker_instActive;
13831function datepicker_getZindex(elem){
13832var position,value;
13833while(elem.length&&elem[0]!==document){
13834position=elem.css("position");
13835if(position==="absolute"||position==="relative"||position==="fixed"){
13836value=parseInt(elem.css("zIndex"),10);
13837if(!isNaN(value)&&value!==0){
13838return value;
13839}
13840}
13841elem=elem.parent();
13842}
13843return 0;
13844}
13845function Datepicker(){
13846this._curInst=null;
13847this._keyEvent=false;
13848this._disabledInputs=[];
13849this._datepickerShowing=false;
13850this._inDialog=false;
13851this._mainDivId="ui-datepicker-div";
13852this._inlineClass="ui-datepicker-inline";
13853this._appendClass="ui-datepicker-append";
13854this._triggerClass="ui-datepicker-trigger";
13855this._dialogClass="ui-datepicker-dialog";
13856this._disableClass="ui-datepicker-disabled";
13857this._unselectableClass="ui-datepicker-unselectable";
13858this._currentClass="ui-datepicker-current-day";
13859this._dayOverClass="ui-datepicker-days-cell-over";
13860this.regional=[];
13861this.regional[""]={
13862closeText:"Done",
13863prevText:"Prev",
13864nextText:"Next",
13865currentText:"Today",
13866monthNames:["January","February","March","April","May","June",
13867"July","August","September","October","November","December"],
13868monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
13869dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
13870dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
13871dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],
13872weekHeader:"Wk",
13873dateFormat:"mm/dd/yy",
13874firstDay:0,
13875isRTL:false,
13876showMonthAfterYear:false,
13877yearSuffix:"",
13878selectMonthLabel:"Select month",
13879selectYearLabel:"Select year"
13880};
13881this._defaults={
13882showOn:"focus",
13883showAnim:"fadeIn",
13884showOptions:{},
13885defaultDate:null,
13886appendText:"",
13887buttonText:"...",
13888buttonImage:"",
13889buttonImageOnly:false,
13890hideIfNoPrevNext:false,
13891navigationAsDateFormat:false,
13892gotoCurrent:false,
13893changeMonth:false,
13894changeYear:false,
13895yearRange:"c-10:c+10",
13896showOtherMonths:false,
13897selectOtherMonths:false,
13898showWeek:false,
13899calculateWeek:this.iso8601Week,
13900shortYearCutoff:"+10",
13901minDate:null,
13902maxDate:null,
13903duration:"fast",
13904beforeShowDay:null,
13905beforeShow:null,
13906onSelect:null,
13907onChangeMonthYear:null,
13908onClose:null,
13909onUpdateDatepicker:null,
13910numberOfMonths:1,
13911showCurrentAtPos:0,
13912stepMonths:1,
13913stepBigMonths:12,
13914altField:"",
13915altFormat:"",
13916constrainInput:true,
13917showButtonPanel:false,
13918autoSize:false,
13919disabled:false
13920};
13921$.extend(this._defaults,this.regional[""]);
13922this.regional.en=$.extend(true,{},this.regional[""]);
13923this.regional["en-US"]=$.extend(true,{},this.regional.en);
13924this.dpDiv=datepicker_bindHover($("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
13925}
13926$.extend(Datepicker.prototype,{
13927markerClassName:"hasDatepicker",
13928maxRows:4,
13929_widgetDatepicker:function(){
13930return this.dpDiv;
13931},
13932setDefaults:function(settings){
13933datepicker_extendRemove(this._defaults,settings||{});
13934return this;
13935},
13936_attachDatepicker:function(target,settings){
13937var nodeName,inline,inst;
13938nodeName=target.nodeName.toLowerCase();
13939inline=(nodeName==="div"||nodeName==="span");
13940if(!target.id){
13941this.uuid+=1;
13942target.id="dp"+this.uuid;
13943}
13944inst=this._newInst($(target),inline);
13945inst.settings=$.extend({},settings||{});
13946if(nodeName==="input"){
13947this._connectDatepicker(target,inst);
13948}else if(inline){
13949this._inlineDatepicker(target,inst);
13950}
13951},
13952_newInst:function(target,inline){
13953var id=target[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");
13954return{id:id,input:target,
13955selectedDay:0,selectedMonth:0,selectedYear:0,
13956drawMonth:0,drawYear:0,
13957inline:inline,
13958dpDiv:(!inline?this.dpDiv:
13959datepicker_bindHover($("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
13960},
13961_connectDatepicker:function(target,inst){
13962var input=$(target);
13963inst.append=$([]);
13964inst.trigger=$([]);
13965if(input.hasClass(this.markerClassName)){
13966return;
13967}
13968this._attachments(input,inst);
13969input.addClass(this.markerClassName).on("keydown",this._doKeyDown).
13970on("keypress",this._doKeyPress).on("keyup",this._doKeyUp);
13971this._autoSize(inst);
13972$.data(target,"datepicker",inst);
13973if(inst.settings.disabled){
13974this._disableDatepicker(target);
13975}
13976},
13977_attachments:function(input,inst){
13978var showOn,buttonText,buttonImage,
13979appendText=this._get(inst,"appendText"),
13980isRTL=this._get(inst,"isRTL");
13981if(inst.append){
13982inst.append.remove();
13983}
13984if(appendText){
13985inst.append=$("<span>")
13986.addClass(this._appendClass)
13987.text(appendText);
13988input[isRTL?"before":"after"](inst.append);
13989}
13990input.off("focus",this._showDatepicker);
13991if(inst.trigger){
13992inst.trigger.remove();
13993}
13994showOn=this._get(inst,"showOn");
13995if(showOn==="focus"||showOn==="both"){
13996input.on("focus",this._showDatepicker);
13997}
13998if(showOn==="button"||showOn==="both"){
13999buttonText=this._get(inst,"buttonText");
14000buttonImage=this._get(inst,"buttonImage");
14001if(this._get(inst,"buttonImageOnly")){
14002inst.trigger=$("<img>")
14003.addClass(this._triggerClass)
14004.attr({
14005src:buttonImage,
14006alt:buttonText,
14007title:buttonText
14008});
14009}else{
14010inst.trigger=$("<button type='button'>")
14011.addClass(this._triggerClass);
14012if(buttonImage){
14013inst.trigger.html(
14014$("<img>")
14015.attr({
14016src:buttonImage,
14017alt:buttonText,
14018title:buttonText
14019})
14020);
14021}else{
14022inst.trigger.text(buttonText);
14023}
14024}
14025input[isRTL?"before":"after"](inst.trigger);
14026inst.trigger.on("click",function(){
14027if($.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]){
14028$.datepicker._hideDatepicker();
14029}else if($.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]){
14030$.datepicker._hideDatepicker();
14031$.datepicker._showDatepicker(input[0]);
14032}else{
14033$.datepicker._showDatepicker(input[0]);
14034}
14035return false;
14036});
14037}
14038},
14039_autoSize:function(inst){
14040if(this._get(inst,"autoSize")&&!inst.inline){
14041var findMax,max,maxI,i,
14042date=new Date(2009,12-1,20),
14043dateFormat=this._get(inst,"dateFormat");
14044if(dateFormat.match(/[DM]/)){
14045findMax=function(names){
14046max=0;
14047maxI=0;
14048for(i=0;i<names.length;i++){
14049if(names[i].length>max){
14050max=names[i].length;
14051maxI=i;
14052}
14053}
14054return maxI;
14055};
14056date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?
14057"monthNames":"monthNamesShort"))));
14058date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?
14059"dayNames":"dayNamesShort")))+20-date.getDay());
14060}
14061inst.input.attr("size",this._formatDate(inst,date).length);
14062}
14063},
14064_inlineDatepicker:function(target,inst){
14065var divSpan=$(target);
14066if(divSpan.hasClass(this.markerClassName)){
14067return;
14068}
14069divSpan.addClass(this.markerClassName).append(inst.dpDiv);
14070$.data(target,"datepicker",inst);
14071this._setDate(inst,this._getDefaultDate(inst),true);
14072this._updateDatepicker(inst);
14073this._updateAlternate(inst);
14074if(inst.settings.disabled){
14075this._disableDatepicker(target);
14076}
14077inst.dpDiv.css("display","block");
14078},
14079_dialogDatepicker:function(input,date,onSelect,settings,pos){
14080var id,browserWidth,browserHeight,scrollX,scrollY,
14081inst=this._dialogInst;
14082if(!inst){
14083this.uuid+=1;
14084id="dp"+this.uuid;
14085this._dialogInput=$("<input type='text' id='"+id+
14086"' style='position: absolute; top: -100px; width: 0px;'/>");
14087this._dialogInput.on("keydown",this._doKeyDown);
14088$("body").append(this._dialogInput);
14089inst=this._dialogInst=this._newInst(this._dialogInput,false);
14090inst.settings={};
14091$.data(this._dialogInput[0],"datepicker",inst);
14092}
14093datepicker_extendRemove(inst.settings,settings||{});
14094date=(date&&date.constructor===Date?this._formatDate(inst,date):date);
14095this._dialogInput.val(date);
14096this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);
14097if(!this._pos){
14098browserWidth=document.documentElement.clientWidth;
14099browserHeight=document.documentElement.clientHeight;
14100scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;
14101scrollY=document.documentElement.scrollTop||document.body.scrollTop;
14102this._pos=
14103[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];
14104}
14105this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");
14106inst.settings.onSelect=onSelect;
14107this._inDialog=true;
14108this.dpDiv.addClass(this._dialogClass);
14109this._showDatepicker(this._dialogInput[0]);
14110if($.blockUI){
14111$.blockUI(this.dpDiv);
14112}
14113$.data(this._dialogInput[0],"datepicker",inst);
14114return this;
14115},
14116_destroyDatepicker:function(target){
14117var nodeName,
14118$target=$(target),
14119inst=$.data(target,"datepicker");
14120if(!$target.hasClass(this.markerClassName)){
14121return;
14122}
14123nodeName=target.nodeName.toLowerCase();
14124$.removeData(target,"datepicker");
14125if(nodeName==="input"){
14126inst.append.remove();
14127inst.trigger.remove();
14128$target.removeClass(this.markerClassName).
14129off("focus",this._showDatepicker).
14130off("keydown",this._doKeyDown).
14131off("keypress",this._doKeyPress).
14132off("keyup",this._doKeyUp);
14133}else if(nodeName==="div"||nodeName==="span"){
14134$target.removeClass(this.markerClassName).empty();
14135}
14136$.datepicker._hideDatepicker();
14137if(datepicker_instActive===inst){
14138datepicker_instActive=null;
14139this._curInst=null;
14140}
14141},
14142_enableDatepicker:function(target){
14143var nodeName,inline,
14144$target=$(target),
14145inst=$.data(target,"datepicker");
14146if(!$target.hasClass(this.markerClassName)){
14147return;
14148}
14149nodeName=target.nodeName.toLowerCase();
14150if(nodeName==="input"){
14151target.disabled=false;
14152inst.trigger.filter("button").
14153each(function(){
14154this.disabled=false;
14155}).end().
14156filter("img").css({opacity:"1.0",cursor:""});
14157}else if(nodeName==="div"||nodeName==="span"){
14158inline=$target.children("."+this._inlineClass);
14159inline.children().removeClass("ui-state-disabled");
14160inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
14161prop("disabled",false);
14162}
14163this._disabledInputs=$.map(this._disabledInputs,
14164function(value){
14165return(value===target?null:value);
14166});
14167},
14168_disableDatepicker:function(target){
14169var nodeName,inline,
14170$target=$(target),
14171inst=$.data(target,"datepicker");
14172if(!$target.hasClass(this.markerClassName)){
14173return;
14174}
14175nodeName=target.nodeName.toLowerCase();
14176if(nodeName==="input"){
14177target.disabled=true;
14178inst.trigger.filter("button").
14179each(function(){
14180this.disabled=true;
14181}).end().
14182filter("img").css({opacity:"0.5",cursor:"default"});
14183}else if(nodeName==="div"||nodeName==="span"){
14184inline=$target.children("."+this._inlineClass);
14185inline.children().addClass("ui-state-disabled");
14186inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
14187prop("disabled",true);
14188}
14189this._disabledInputs=$.map(this._disabledInputs,
14190function(value){
14191return(value===target?null:value);
14192});
14193this._disabledInputs[this._disabledInputs.length]=target;
14194},
14195_isDisabledDatepicker:function(target){
14196if(!target){
14197return false;
14198}
14199for(var i=0;i<this._disabledInputs.length;i++){
14200if(this._disabledInputs[i]===target){
14201return true;
14202}
14203}
14204return false;
14205},
14206_getInst:function(target){
14207try{
14208return $.data(target,"datepicker");
14209}catch(err){
14210throw"Missing instance data for this datepicker";
14211}
14212},
14213_optionDatepicker:function(target,name,value){
14214var settings,date,minDate,maxDate,
14215inst=this._getInst(target);
14216if(arguments.length===2&&typeof name==="string"){
14217return(name==="defaults"?$.extend({},$.datepicker._defaults):
14218(inst?(name==="all"?$.extend({},inst.settings):
14219this._get(inst,name)):null));
14220}
14221settings=name||{};
14222if(typeof name==="string"){
14223settings={};
14224settings[name]=value;
14225}
14226if(inst){
14227if(this._curInst===inst){
14228this._hideDatepicker();
14229}
14230date=this._getDateDatepicker(target,true);
14231minDate=this._getMinMaxDate(inst,"min");
14232maxDate=this._getMinMaxDate(inst,"max");
14233datepicker_extendRemove(inst.settings,settings);
14234if(minDate!==null&&settings.dateFormat!==undefined&&settings.minDate===undefined){
14235inst.settings.minDate=this._formatDate(inst,minDate);
14236}
14237if(maxDate!==null&&settings.dateFormat!==undefined&&settings.maxDate===undefined){
14238inst.settings.maxDate=this._formatDate(inst,maxDate);
14239}
14240if("disabled"in settings){
14241if(settings.disabled){
14242this._disableDatepicker(target);
14243}else{
14244this._enableDatepicker(target);
14245}
14246}
14247this._attachments($(target),inst);
14248this._autoSize(inst);
14249this._setDate(inst,date);
14250this._updateAlternate(inst);
14251this._updateDatepicker(inst);
14252}
14253},
14254_changeDatepicker:function(target,name,value){
14255this._optionDatepicker(target,name,value);
14256},
14257_refreshDatepicker:function(target){
14258var inst=this._getInst(target);
14259if(inst){
14260this._updateDatepicker(inst);
14261}
14262},
14263_setDateDatepicker:function(target,date){
14264var inst=this._getInst(target);
14265if(inst){
14266this._setDate(inst,date);
14267this._updateDatepicker(inst);
14268this._updateAlternate(inst);
14269}
14270},
14271_getDateDatepicker:function(target,noDefault){
14272var inst=this._getInst(target);
14273if(inst&&!inst.inline){
14274this._setDateFromField(inst,noDefault);
14275}
14276return(inst?this._getDate(inst):null);
14277},
14278_doKeyDown:function(event){
14279var onSelect,dateStr,sel,
14280inst=$.datepicker._getInst(event.target),
14281handled=true,
14282isRTL=inst.dpDiv.is(".ui-datepicker-rtl");
14283inst._keyEvent=true;
14284if($.datepicker._datepickerShowing){
14285switch(event.keyCode){
14286case 9:$.datepicker._hideDatepicker();
14287handled=false;
14288break;
14289case 13:sel=$("td."+$.datepicker._dayOverClass+":not(."+
14290$.datepicker._currentClass+")",inst.dpDiv);
14291if(sel[0]){
14292$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]);
14293}
14294onSelect=$.datepicker._get(inst,"onSelect");
14295if(onSelect){
14296dateStr=$.datepicker._formatDate(inst);
14297onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);
14298}else{
14299$.datepicker._hideDatepicker();
14300}
14301return false;
14302case 27:$.datepicker._hideDatepicker();
14303break;
14304case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?
14305-$.datepicker._get(inst,"stepBigMonths"):
14306-$.datepicker._get(inst,"stepMonths")),"M");
14307break;
14308case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?
14309+$.datepicker._get(inst,"stepBigMonths"):
14310+$.datepicker._get(inst,"stepMonths")),"M");
14311break;
14312case 35:if(event.ctrlKey||event.metaKey){
14313$.datepicker._clearDate(event.target);
14314}
14315handled=event.ctrlKey||event.metaKey;
14316break;
14317case 36:if(event.ctrlKey||event.metaKey){
14318$.datepicker._gotoToday(event.target);
14319}
14320handled=event.ctrlKey||event.metaKey;
14321break;
14322case 37:if(event.ctrlKey||event.metaKey){
14323$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D");
14324}
14325handled=event.ctrlKey||event.metaKey;
14326if(event.originalEvent.altKey){
14327$.datepicker._adjustDate(event.target,(event.ctrlKey?
14328-$.datepicker._get(inst,"stepBigMonths"):
14329-$.datepicker._get(inst,"stepMonths")),"M");
14330}
14331break;
14332case 38:if(event.ctrlKey||event.metaKey){
14333$.datepicker._adjustDate(event.target,-7,"D");
14334}
14335handled=event.ctrlKey||event.metaKey;
14336break;
14337case 39:if(event.ctrlKey||event.metaKey){
14338$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D");
14339}
14340handled=event.ctrlKey||event.metaKey;
14341if(event.originalEvent.altKey){
14342$.datepicker._adjustDate(event.target,(event.ctrlKey?
14343+$.datepicker._get(inst,"stepBigMonths"):
14344+$.datepicker._get(inst,"stepMonths")),"M");
14345}
14346break;
14347case 40:if(event.ctrlKey||event.metaKey){
14348$.datepicker._adjustDate(event.target,+7,"D");
14349}
14350handled=event.ctrlKey||event.metaKey;
14351break;
14352default:handled=false;
14353}
14354}else if(event.keyCode===36&&event.ctrlKey){
14355$.datepicker._showDatepicker(this);
14356}else{
14357handled=false;
14358}
14359if(handled){
14360event.preventDefault();
14361event.stopPropagation();
14362}
14363},
14364_doKeyPress:function(event){
14365var chars,chr,
14366inst=$.datepicker._getInst(event.target);
14367if($.datepicker._get(inst,"constrainInput")){
14368chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));
14369chr=String.fromCharCode(event.charCode==null?event.keyCode:event.charCode);
14370return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1);
14371}
14372},
14373_doKeyUp:function(event){
14374var date,
14375inst=$.datepicker._getInst(event.target);
14376if(inst.input.val()!==inst.lastVal){
14377try{
14378date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),
14379(inst.input?inst.input.val():null),
14380$.datepicker._getFormatConfig(inst));
14381if(date){
14382$.datepicker._setDateFromField(inst);
14383$.datepicker._updateAlternate(inst);
14384$.datepicker._updateDatepicker(inst);
14385}
14386}catch(err){
14387}
14388}
14389return true;
14390},
14391_showDatepicker:function(input){
14392input=input.target||input;
14393if(input.nodeName.toLowerCase()!=="input"){
14394input=$("input",input.parentNode)[0];
14395}
14396if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput===input){
14397return;
14398}
14399var inst,beforeShow,beforeShowSettings,isFixed,
14400offset,showAnim,duration;
14401inst=$.datepicker._getInst(input);
14402if($.datepicker._curInst&&$.datepicker._curInst!==inst){
14403$.datepicker._curInst.dpDiv.stop(true,true);
14404if(inst&&$.datepicker._datepickerShowing){
14405$.datepicker._hideDatepicker($.datepicker._curInst.input[0]);
14406}
14407}
14408beforeShow=$.datepicker._get(inst,"beforeShow");
14409beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};
14410if(beforeShowSettings===false){
14411return;
14412}
14413datepicker_extendRemove(inst.settings,beforeShowSettings);
14414inst.lastVal=null;
14415$.datepicker._lastInput=input;
14416$.datepicker._setDateFromField(inst);
14417if($.datepicker._inDialog){
14418input.value="";
14419}
14420if(!$.datepicker._pos){
14421$.datepicker._pos=$.datepicker._findPos(input);
14422$.datepicker._pos[1]+=input.offsetHeight;
14423}
14424isFixed=false;
14425$(input).parents().each(function(){
14426isFixed|=$(this).css("position")==="fixed";
14427return!isFixed;
14428});
14429offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};
14430$.datepicker._pos=null;
14431inst.dpDiv.empty();
14432inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});
14433$.datepicker._updateDatepicker(inst);
14434offset=$.datepicker._checkOffset(inst,offset,isFixed);
14435inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?
14436"static":(isFixed?"fixed":"absolute")),display:"none",
14437left:offset.left+"px",top:offset.top+"px"});
14438if(!inst.inline){
14439showAnim=$.datepicker._get(inst,"showAnim");
14440duration=$.datepicker._get(inst,"duration");
14441inst.dpDiv.css("z-index",datepicker_getZindex($(input))+1);
14442$.datepicker._datepickerShowing=true;
14443if($.effects&&$.effects.effect[showAnim]){
14444inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration);
14445}else{
14446inst.dpDiv[showAnim||"show"](showAnim?duration:null);
14447}
14448if($.datepicker._shouldFocusInput(inst)){
14449inst.input.trigger("focus");
14450}
14451$.datepicker._curInst=inst;
14452}
14453},
14454_updateDatepicker:function(inst){
14455this.maxRows=4;
14456datepicker_instActive=inst;
14457inst.dpDiv.empty().append(this._generateHTML(inst));
14458this._attachHandlers(inst);
14459var origyearshtml,
14460numMonths=this._getNumberOfMonths(inst),
14461cols=numMonths[1],
14462width=17,
14463activeCell=inst.dpDiv.find("."+this._dayOverClass+" a"),
14464onUpdateDatepicker=$.datepicker._get(inst,"onUpdateDatepicker");
14465if(activeCell.length>0){
14466datepicker_handleMouseover.apply(activeCell.get(0));
14467}
14468inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
14469if(cols>1){
14470inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em");
14471}
14472inst.dpDiv[(numMonths[0]!==1||numMonths[1]!==1?"add":"remove")+
14473"Class"]("ui-datepicker-multi");
14474inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+
14475"Class"]("ui-datepicker-rtl");
14476if(inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)){
14477inst.input.trigger("focus");
14478}
14479if(inst.yearshtml){
14480origyearshtml=inst.yearshtml;
14481setTimeout(function(){
14482if(origyearshtml===inst.yearshtml&&inst.yearshtml){
14483inst.dpDiv.find("select.ui-datepicker-year").first().replaceWith(inst.yearshtml);
14484}
14485origyearshtml=inst.yearshtml=null;
14486},0);
14487}
14488if(onUpdateDatepicker){
14489onUpdateDatepicker.apply((inst.input?inst.input[0]:null),[inst]);
14490}
14491},
14492_shouldFocusInput:function(inst){
14493return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled");
14494},
14495_checkOffset:function(inst,offset,isFixed){
14496var dpWidth=inst.dpDiv.outerWidth(),
14497dpHeight=inst.dpDiv.outerHeight(),
14498inputWidth=inst.input?inst.input.outerWidth():0,
14499inputHeight=inst.input?inst.input.outerHeight():0,
14500viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),
14501viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());
14502offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);
14503offset.left-=(isFixed&&offset.left===inst.input.offset().left)?$(document).scrollLeft():0;
14504offset.top-=(isFixed&&offset.top===(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;
14505offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?
14506Math.abs(offset.left+dpWidth-viewWidth):0);
14507offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?
14508Math.abs(dpHeight+inputHeight):0);
14509return offset;
14510},
14511_findPos:function(obj){
14512var position,
14513inst=this._getInst(obj),
14514isRTL=this._get(inst,"isRTL");
14515while(obj&&(obj.type==="hidden"||obj.nodeType!==1||$.expr.pseudos.hidden(obj))){
14516obj=obj[isRTL?"previousSibling":"nextSibling"];
14517}
14518position=$(obj).offset();
14519return[position.left,position.top];
14520},
14521_hideDatepicker:function(input){
14522var showAnim,duration,postProcess,onClose,
14523inst=this._curInst;
14524if(!inst||(input&&inst!==$.data(input,"datepicker"))){
14525return;
14526}
14527if(this._datepickerShowing){
14528showAnim=this._get(inst,"showAnim");
14529duration=this._get(inst,"duration");
14530postProcess=function(){
14531$.datepicker._tidyDialog(inst);
14532};
14533if($.effects&&($.effects.effect[showAnim])){
14534inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);
14535}else{
14536inst.dpDiv[(showAnim==="slideDown"?"slideUp":
14537(showAnim==="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess);
14538}
14539if(!showAnim){
14540postProcess();
14541}
14542this._datepickerShowing=false;
14543onClose=this._get(inst,"onClose");
14544if(onClose){
14545onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst]);
14546}
14547this._lastInput=null;
14548if(this._inDialog){
14549this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});
14550if($.blockUI){
14551$.unblockUI();
14552$("body").append(this.dpDiv);
14553}
14554}
14555this._inDialog=false;
14556}
14557},
14558_tidyDialog:function(inst){
14559inst.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar");
14560},
14561_checkExternalClick:function(event){
14562if(!$.datepicker._curInst){
14563return;
14564}
14565var $target=$(event.target),
14566inst=$.datepicker._getInst($target[0]);
14567if((($target[0].id!==$.datepicker._mainDivId&&
14568$target.parents("#"+$.datepicker._mainDivId).length===0&&
14569!$target.hasClass($.datepicker.markerClassName)&&
14570!$target.closest("."+$.datepicker._triggerClass).length&&
14571$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)))||
14572($target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!==inst)){
14573$.datepicker._hideDatepicker();
14574}
14575},
14576_adjustDate:function(id,offset,period){
14577var target=$(id),
14578inst=this._getInst(target[0]);
14579if(this._isDisabledDatepicker(target[0])){
14580return;
14581}
14582this._adjustInstDate(inst,offset,period);
14583this._updateDatepicker(inst);
14584},
14585_gotoToday:function(id){
14586var date,
14587target=$(id),
14588inst=this._getInst(target[0]);
14589if(this._get(inst,"gotoCurrent")&&inst.currentDay){
14590inst.selectedDay=inst.currentDay;
14591inst.drawMonth=inst.selectedMonth=inst.currentMonth;
14592inst.drawYear=inst.selectedYear=inst.currentYear;
14593}else{
14594date=new Date();
14595inst.selectedDay=date.getDate();
14596inst.drawMonth=inst.selectedMonth=date.getMonth();
14597inst.drawYear=inst.selectedYear=date.getFullYear();
14598}
14599this._notifyChange(inst);
14600this._adjustDate(target);
14601},
14602_selectMonthYear:function(id,select,period){
14603var target=$(id),
14604inst=this._getInst(target[0]);
14605inst["selected"+(period==="M"?"Month":"Year")]=
14606inst["draw"+(period==="M"?"Month":"Year")]=
14607parseInt(select.options[select.selectedIndex].value,10);
14608this._notifyChange(inst);
14609this._adjustDate(target);
14610},
14611_selectDay:function(id,month,year,td){
14612var inst,
14613target=$(id);
14614if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){
14615return;
14616}
14617inst=this._getInst(target[0]);
14618inst.selectedDay=inst.currentDay=parseInt($("a",td).attr("data-date"));
14619inst.selectedMonth=inst.currentMonth=month;
14620inst.selectedYear=inst.currentYear=year;
14621this._selectDate(id,this._formatDate(inst,
14622inst.currentDay,inst.currentMonth,inst.currentYear));
14623},
14624_clearDate:function(id){
14625var target=$(id);
14626this._selectDate(target,"");
14627},
14628_selectDate:function(id,dateStr){
14629var onSelect,
14630target=$(id),
14631inst=this._getInst(target[0]);
14632dateStr=(dateStr!=null?dateStr:this._formatDate(inst));
14633if(inst.input){
14634inst.input.val(dateStr);
14635}
14636this._updateAlternate(inst);
14637onSelect=this._get(inst,"onSelect");
14638if(onSelect){
14639onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);
14640}else if(inst.input){
14641inst.input.trigger("change");
14642}
14643if(inst.inline){
14644this._updateDatepicker(inst);
14645}else{
14646this._hideDatepicker();
14647this._lastInput=inst.input[0];
14648if(typeof(inst.input[0])!=="object"){
14649inst.input.trigger("focus");
14650}
14651this._lastInput=null;
14652}
14653},
14654_updateAlternate:function(inst){
14655var altFormat,date,dateStr,
14656altField=this._get(inst,"altField");
14657if(altField){
14658altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");
14659date=this._getDate(inst);
14660dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));
14661$(document).find(altField).val(dateStr);
14662}
14663},
14664noWeekends:function(date){
14665var day=date.getDay();
14666return[(day>0&&day<6),""];
14667},
14668iso8601Week:function(date){
14669var time,
14670checkDate=new Date(date.getTime());
14671checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));
14672time=checkDate.getTime();
14673checkDate.setMonth(0);
14674checkDate.setDate(1);
14675return Math.floor(Math.round((time-checkDate)/86400000)/7)+1;
14676},
14677parseDate:function(format,value,settings){
14678if(format==null||value==null){
14679throw"Invalid arguments";
14680}
14681value=(typeof value==="object"?value.toString():value+"");
14682if(value===""){
14683return null;
14684}
14685var iFormat,dim,extra,
14686iValue=0,
14687shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,
14688shortYearCutoff=(typeof shortYearCutoffTemp!=="string"?shortYearCutoffTemp:
14689new Date().getFullYear()%100+parseInt(shortYearCutoffTemp,10)),
14690dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,
14691dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,
14692monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,
14693monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,
14694year=-1,
14695month=-1,
14696day=-1,
14697doy=-1,
14698literal=false,
14699date,
14700lookAhead=function(match){
14701var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);
14702if(matches){
14703iFormat++;
14704}
14705return matches;
14706},
14707getNumber=function(match){
14708var isDoubled=lookAhead(match),
14709size=(match==="@"?14:(match==="!"?20:
14710(match==="y"&&isDoubled?4:(match==="o"?3:2)))),
14711minSize=(match==="y"?size:1),
14712digits=new RegExp("^\\d{"+minSize+","+size+"}"),
14713num=value.substring(iValue).match(digits);
14714if(!num){
14715throw"Missing number at position "+iValue;
14716}
14717iValue+=num[0].length;
14718return parseInt(num[0],10);
14719},
14720getName=function(match,shortNames,longNames){
14721var index=-1,
14722names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){
14723return[[k,v]];
14724}).sort(function(a,b){
14725return-(a[1].length-b[1].length);
14726});
14727$.each(names,function(i,pair){
14728var name=pair[1];
14729if(value.substr(iValue,name.length).toLowerCase()===name.toLowerCase()){
14730index=pair[0];
14731iValue+=name.length;
14732return false;
14733}
14734});
14735if(index!==-1){
14736return index+1;
14737}else{
14738throw"Unknown name at position "+iValue;
14739}
14740},
14741checkLiteral=function(){
14742if(value.charAt(iValue)!==format.charAt(iFormat)){
14743throw"Unexpected literal at position "+iValue;
14744}
14745iValue++;
14746};
14747for(iFormat=0;iFormat<format.length;iFormat++){
14748if(literal){
14749if(format.charAt(iFormat)==="'"&&!lookAhead("'")){
14750literal=false;
14751}else{
14752checkLiteral();
14753}
14754}else{
14755switch(format.charAt(iFormat)){
14756case"d":
14757day=getNumber("d");
14758break;
14759case"D":
14760getName("D",dayNamesShort,dayNames);
14761break;
14762case"o":
14763doy=getNumber("o");
14764break;
14765case"m":
14766month=getNumber("m");
14767break;
14768case"M":
14769month=getName("M",monthNamesShort,monthNames);
14770break;
14771case"y":
14772year=getNumber("y");
14773break;
14774case"@":
14775date=new Date(getNumber("@"));
14776year=date.getFullYear();
14777month=date.getMonth()+1;
14778day=date.getDate();
14779break;
14780case"!":
14781date=new Date((getNumber("!")-this._ticksTo1970)/10000);
14782year=date.getFullYear();
14783month=date.getMonth()+1;
14784day=date.getDate();
14785break;
14786case"'":
14787if(lookAhead("'")){
14788checkLiteral();
14789}else{
14790literal=true;
14791}
14792break;
14793default:
14794checkLiteral();
14795}
14796}
14797}
14798if(iValue<value.length){
14799extra=value.substr(iValue);
14800if(!/^\s+/.test(extra)){
14801throw"Extra/unparsed characters found in date: "+extra;
14802}
14803}
14804if(year===-1){
14805year=new Date().getFullYear();
14806}else if(year<100){
14807year+=new Date().getFullYear()-new Date().getFullYear()%100+
14808(year<=shortYearCutoff?0:-100);
14809}
14810if(doy>-1){
14811month=1;
14812day=doy;
14813do{
14814dim=this._getDaysInMonth(year,month-1);
14815if(day<=dim){
14816break;
14817}
14818month++;
14819day-=dim;
14820}while(true);
14821}
14822date=this._daylightSavingAdjust(new Date(year,month-1,day));
14823if(date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day){
14824throw"Invalid date";
14825}
14826return date;
14827},
14828ATOM:"yy-mm-dd",
14829COOKIE:"D, dd M yy",
14830ISO_8601:"yy-mm-dd",
14831RFC_822:"D, d M y",
14832RFC_850:"DD, dd-M-y",
14833RFC_1036:"D, d M y",
14834RFC_1123:"D, d M yy",
14835RFC_2822:"D, d M yy",
14836RSS:"D, d M y",
14837TICKS:"!",
14838TIMESTAMP:"@",
14839W3C:"yy-mm-dd",
14840_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+
14841Math.floor(1970/400))*24*60*60*10000000),
14842formatDate:function(format,date,settings){
14843if(!date){
14844return"";
14845}
14846var iFormat,
14847dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,
14848dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,
14849monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,
14850monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,
14851lookAhead=function(match){
14852var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);
14853if(matches){
14854iFormat++;
14855}
14856return matches;
14857},
14858formatNumber=function(match,value,len){
14859var num=""+value;
14860if(lookAhead(match)){
14861while(num.length<len){
14862num="0"+num;
14863}
14864}
14865return num;
14866},
14867formatName=function(match,value,shortNames,longNames){
14868return(lookAhead(match)?longNames[value]:shortNames[value]);
14869},
14870output="",
14871literal=false;
14872if(date){
14873for(iFormat=0;iFormat<format.length;iFormat++){
14874if(literal){
14875if(format.charAt(iFormat)==="'"&&!lookAhead("'")){
14876literal=false;
14877}else{
14878output+=format.charAt(iFormat);
14879}
14880}else{
14881switch(format.charAt(iFormat)){
14882case"d":
14883output+=formatNumber("d",date.getDate(),2);
14884break;
14885case"D":
14886output+=formatName("D",date.getDay(),dayNamesShort,dayNames);
14887break;
14888case"o":
14889output+=formatNumber("o",
14890Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000),3);
14891break;
14892case"m":
14893output+=formatNumber("m",date.getMonth()+1,2);
14894break;
14895case"M":
14896output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);
14897break;
14898case"y":
14899output+=(lookAhead("y")?date.getFullYear():
14900(date.getFullYear()%100<10?"0":"")+date.getFullYear()%100);
14901break;
14902case"@":
14903output+=date.getTime();
14904break;
14905case"!":
14906output+=date.getTime()*10000+this._ticksTo1970;
14907break;
14908case"'":
14909if(lookAhead("'")){
14910output+="'";
14911}else{
14912literal=true;
14913}
14914break;
14915default:
14916output+=format.charAt(iFormat);
14917}
14918}
14919}
14920}
14921return output;
14922},
14923_possibleChars:function(format){
14924var iFormat,
14925chars="",
14926literal=false,
14927lookAhead=function(match){
14928var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);
14929if(matches){
14930iFormat++;
14931}
14932return matches;
14933};
14934for(iFormat=0;iFormat<format.length;iFormat++){
14935if(literal){
14936if(format.charAt(iFormat)==="'"&&!lookAhead("'")){
14937literal=false;
14938}else{
14939chars+=format.charAt(iFormat);
14940}
14941}else{
14942switch(format.charAt(iFormat)){
14943case"d":case"m":case"y":case"@":
14944chars+="0123456789";
14945break;
14946case"D":case"M":
14947return null;
14948case"'":
14949if(lookAhead("'")){
14950chars+="'";
14951}else{
14952literal=true;
14953}
14954break;
14955default:
14956chars+=format.charAt(iFormat);
14957}
14958}
14959}
14960return chars;
14961},
14962_get:function(inst,name){
14963return inst.settings[name]!==undefined?
14964inst.settings[name]:this._defaults[name];
14965},
14966_setDateFromField:function(inst,noDefault){
14967if(inst.input.val()===inst.lastVal){
14968return;
14969}
14970var dateFormat=this._get(inst,"dateFormat"),
14971dates=inst.lastVal=inst.input?inst.input.val():null,
14972defaultDate=this._getDefaultDate(inst),
14973date=defaultDate,
14974settings=this._getFormatConfig(inst);
14975try{
14976date=this.parseDate(dateFormat,dates,settings)||defaultDate;
14977}catch(event){
14978dates=(noDefault?"":dates);
14979}
14980inst.selectedDay=date.getDate();
14981inst.drawMonth=inst.selectedMonth=date.getMonth();
14982inst.drawYear=inst.selectedYear=date.getFullYear();
14983inst.currentDay=(dates?date.getDate():0);
14984inst.currentMonth=(dates?date.getMonth():0);
14985inst.currentYear=(dates?date.getFullYear():0);
14986this._adjustInstDate(inst);
14987},
14988_getDefaultDate:function(inst){
14989return this._restrictMinMax(inst,
14990this._determineDate(inst,this._get(inst,"defaultDate"),new Date()));
14991},
14992_determineDate:function(inst,date,defaultDate){
14993var offsetNumeric=function(offset){
14994var date=new Date();
14995date.setDate(date.getDate()+offset);
14996return date;
14997},
14998offsetString=function(offset){
14999try{
15000return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),
15001offset,$.datepicker._getFormatConfig(inst));
15002}catch(e){
15003}
15004var date=(offset.toLowerCase().match(/^c/)?
15005$.datepicker._getDate(inst):null)||new Date(),
15006year=date.getFullYear(),
15007month=date.getMonth(),
15008day=date.getDate(),
15009pattern=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
15010matches=pattern.exec(offset);
15011while(matches){
15012switch(matches[2]||"d"){
15013case"d":case"D":
15014day+=parseInt(matches[1],10);break;
15015case"w":case"W":
15016day+=parseInt(matches[1],10)*7;break;
15017case"m":case"M":
15018month+=parseInt(matches[1],10);
15019day=Math.min(day,$.datepicker._getDaysInMonth(year,month));
15020break;
15021case"y":case"Y":
15022year+=parseInt(matches[1],10);
15023day=Math.min(day,$.datepicker._getDaysInMonth(year,month));
15024break;
15025}
15026matches=pattern.exec(offset);
15027}
15028return new Date(year,month,day);
15029},
15030newDate=(date==null||date===""?defaultDate:(typeof date==="string"?offsetString(date):
15031(typeof date==="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):new Date(date.getTime()))));
15032newDate=(newDate&&newDate.toString()==="Invalid Date"?defaultDate:newDate);
15033if(newDate){
15034newDate.setHours(0);
15035newDate.setMinutes(0);
15036newDate.setSeconds(0);
15037newDate.setMilliseconds(0);
15038}
15039return this._daylightSavingAdjust(newDate);
15040},
15041_daylightSavingAdjust:function(date){
15042if(!date){
15043return null;
15044}
15045date.setHours(date.getHours()>12?date.getHours()+2:0);
15046return date;
15047},
15048_setDate:function(inst,date,noChange){
15049var clear=!date,
15050origMonth=inst.selectedMonth,
15051origYear=inst.selectedYear,
15052newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));
15053inst.selectedDay=inst.currentDay=newDate.getDate();
15054inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();
15055inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();
15056if((origMonth!==inst.selectedMonth||origYear!==inst.selectedYear)&&!noChange){
15057this._notifyChange(inst);
15058}
15059this._adjustInstDate(inst);
15060if(inst.input){
15061inst.input.val(clear?"":this._formatDate(inst));
15062}
15063},
15064_getDate:function(inst){
15065var startDate=(!inst.currentYear||(inst.input&&inst.input.val()==="")?null:
15066this._daylightSavingAdjust(new Date(
15067inst.currentYear,inst.currentMonth,inst.currentDay)));
15068return startDate;
15069},
15070_attachHandlers:function(inst){
15071var stepMonths=this._get(inst,"stepMonths"),
15072id="#"+inst.id.replace(/\\\\/g,"\\");
15073inst.dpDiv.find("[data-handler]").map(function(){
15074var handler={
15075prev:function(){
15076$.datepicker._adjustDate(id,-stepMonths,"M");
15077},
15078next:function(){
15079$.datepicker._adjustDate(id,+stepMonths,"M");
15080},
15081hide:function(){
15082$.datepicker._hideDatepicker();
15083},
15084today:function(){
15085$.datepicker._gotoToday(id);
15086},
15087selectDay:function(){
15088$.datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);
15089return false;
15090},
15091selectMonth:function(){
15092$.datepicker._selectMonthYear(id,this,"M");
15093return false;
15094},
15095selectYear:function(){
15096$.datepicker._selectMonthYear(id,this,"Y");
15097return false;
15098}
15099};
15100$(this).on(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")]);
15101});
15102},
15103_generateHTML:function(inst){
15104var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,
15105controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,
15106monthNames,monthNamesShort,beforeShowDay,showOtherMonths,
15107selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,
15108cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,
15109printDate,dRow,tbody,daySettings,otherMonth,unselectable,
15110tempDate=new Date(),
15111today=this._daylightSavingAdjust(
15112new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),
15113isRTL=this._get(inst,"isRTL"),
15114showButtonPanel=this._get(inst,"showButtonPanel"),
15115hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),
15116navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),
15117numMonths=this._getNumberOfMonths(inst),
15118showCurrentAtPos=this._get(inst,"showCurrentAtPos"),
15119stepMonths=this._get(inst,"stepMonths"),
15120isMultiMonth=(numMonths[0]!==1||numMonths[1]!==1),
15121currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):
15122new Date(inst.currentYear,inst.currentMonth,inst.currentDay))),
15123minDate=this._getMinMaxDate(inst,"min"),
15124maxDate=this._getMinMaxDate(inst,"max"),
15125drawMonth=inst.drawMonth-showCurrentAtPos,
15126drawYear=inst.drawYear;
15127if(drawMonth<0){
15128drawMonth+=12;
15129drawYear--;
15130}
15131if(maxDate){
15132maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
15133maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));
15134maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);
15135while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){
15136drawMonth--;
15137if(drawMonth<0){
15138drawMonth=11;
15139drawYear--;
15140}
15141}
15142}
15143inst.drawMonth=drawMonth;
15144inst.drawYear=drawYear;
15145prevText=this._get(inst,"prevText");
15146prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,
15147this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),
15148this._getFormatConfig(inst)));
15149if(this._canAdjustMonth(inst,-1,drawYear,drawMonth)){
15150prev=$("<a>")
15151.attr({
15152"class":"ui-datepicker-prev ui-corner-all",
15153"data-handler":"prev",
15154"data-event":"click",
15155title:prevText
15156})
15157.append(
15158$("<span>")
15159.addClass("ui-icon ui-icon-circle-triangle-"+
15160(isRTL?"e":"w"))
15161.text(prevText)
15162)[0].outerHTML;
15163}else if(hideIfNoPrevNext){
15164prev="";
15165}else{
15166prev=$("<a>")
15167.attr({
15168"class":"ui-datepicker-prev ui-corner-all ui-state-disabled",
15169title:prevText
15170})
15171.append(
15172$("<span>")
15173.addClass("ui-icon ui-icon-circle-triangle-"+
15174(isRTL?"e":"w"))
15175.text(prevText)
15176)[0].outerHTML;
15177}
15178nextText=this._get(inst,"nextText");
15179nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,
15180this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),
15181this._getFormatConfig(inst)));
15182if(this._canAdjustMonth(inst,+1,drawYear,drawMonth)){
15183next=$("<a>")
15184.attr({
15185"class":"ui-datepicker-next ui-corner-all",
15186"data-handler":"next",
15187"data-event":"click",
15188title:nextText
15189})
15190.append(
15191$("<span>")
15192.addClass("ui-icon ui-icon-circle-triangle-"+
15193(isRTL?"w":"e"))
15194.text(nextText)
15195)[0].outerHTML;
15196}else if(hideIfNoPrevNext){
15197next="";
15198}else{
15199next=$("<a>")
15200.attr({
15201"class":"ui-datepicker-next ui-corner-all ui-state-disabled",
15202title:nextText
15203})
15204.append(
15205$("<span>")
15206.attr("class","ui-icon ui-icon-circle-triangle-"+
15207(isRTL?"w":"e"))
15208.text(nextText)
15209)[0].outerHTML;
15210}
15211currentText=this._get(inst,"currentText");
15212gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);
15213currentText=(!navigationAsDateFormat?currentText:
15214this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));
15215controls="";
15216if(!inst.inline){
15217controls=$("<button>")
15218.attr({
15219type:"button",
15220"class":"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
15221"data-handler":"hide",
15222"data-event":"click"
15223})
15224.text(this._get(inst,"closeText"))[0].outerHTML;
15225}
15226buttonPanel="";
15227if(showButtonPanel){
15228buttonPanel=$("<div class='ui-datepicker-buttonpane ui-widget-content'>")
15229.append(isRTL?controls:"")
15230.append(this._isInRange(inst,gotoDate)?
15231$("<button>")
15232.attr({
15233type:"button",
15234"class":"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
15235"data-handler":"today",
15236"data-event":"click"
15237})
15238.text(currentText):
15239"")
15240.append(isRTL?"":controls)[0].outerHTML;
15241}
15242firstDay=parseInt(this._get(inst,"firstDay"),10);
15243firstDay=(isNaN(firstDay)?0:firstDay);
15244showWeek=this._get(inst,"showWeek");
15245dayNames=this._get(inst,"dayNames");
15246dayNamesMin=this._get(inst,"dayNamesMin");
15247monthNames=this._get(inst,"monthNames");
15248monthNamesShort=this._get(inst,"monthNamesShort");
15249beforeShowDay=this._get(inst,"beforeShowDay");
15250showOtherMonths=this._get(inst,"showOtherMonths");
15251selectOtherMonths=this._get(inst,"selectOtherMonths");
15252defaultDate=this._getDefaultDate(inst);
15253html="";
15254for(row=0;row<numMonths[0];row++){
15255group="";
15256this.maxRows=4;
15257for(col=0;col<numMonths[1];col++){
15258selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));
15259cornerClass=" ui-corner-all";
15260calender="";
15261if(isMultiMonth){
15262calender+="<div class='ui-datepicker-group";
15263if(numMonths[1]>1){
15264switch(col){
15265case 0:calender+=" ui-datepicker-group-first";
15266cornerClass=" ui-corner-"+(isRTL?"right":"left");break;
15267case numMonths[1]-1:calender+=" ui-datepicker-group-last";
15268cornerClass=" ui-corner-"+(isRTL?"left":"right");break;
15269default:calender+=" ui-datepicker-group-middle";cornerClass="";break;
15270}
15271}
15272calender+="'>";
15273}
15274calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+
15275(/all|left/.test(cornerClass)&&row===0?(isRTL?next:prev):"")+
15276(/all|right/.test(cornerClass)&&row===0?(isRTL?prev:next):"")+
15277this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,
15278row>0||col>0,monthNames,monthNamesShort)+
15279"</div><table class='ui-datepicker-calendar'><thead>"+
15280"<tr>";
15281thead=(showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"");
15282for(dow=0;dow<7;dow++){
15283day=(dow+firstDay)%7;
15284thead+="<th scope='col'"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+
15285"<span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>";
15286}
15287calender+=thead+"</tr></thead><tbody>";
15288daysInMonth=this._getDaysInMonth(drawYear,drawMonth);
15289if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){
15290inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);
15291}
15292leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;
15293curRows=Math.ceil((leadDays+daysInMonth)/7);
15294numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);
15295this.maxRows=numRows;
15296printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));
15297for(dRow=0;dRow<numRows;dRow++){
15298calender+="<tr>";
15299tbody=(!showWeek?"":"<td class='ui-datepicker-week-col'>"+
15300this._get(inst,"calculateWeek")(printDate)+"</td>");
15301for(dow=0;dow<7;dow++){
15302daySettings=(beforeShowDay?
15303beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);
15304otherMonth=(printDate.getMonth()!==drawMonth);
15305unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||
15306(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);
15307tbody+="<td class='"+
15308((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+
15309(otherMonth?" ui-datepicker-other-month":"")+
15310((printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent)||
15311(defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime())?
15312" "+this._dayOverClass:"")+
15313(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+
15314(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+
15315(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+
15316(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+
15317((!otherMonth||showOtherMonths)&&daySettings[2]?" title='"+daySettings[2].replace(/'/g,"&#39;")+"'":"")+
15318(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+
15319(otherMonth&&!showOtherMonths?"&#xa0;":
15320(unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+
15321(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+
15322(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+
15323(otherMonth?" ui-priority-secondary":"")+
15324"' href='#' aria-current='"+(printDate.getTime()===currentDate.getTime()?"true":"false")+
15325"' data-date='"+printDate.getDate()+
15326"'>"+printDate.getDate()+"</a>"))+"</td>";
15327printDate.setDate(printDate.getDate()+1);
15328printDate=this._daylightSavingAdjust(printDate);
15329}
15330calender+=tbody+"</tr>";
15331}
15332drawMonth++;
15333if(drawMonth>11){
15334drawMonth=0;
15335drawYear++;
15336}
15337calender+="</tbody></table>"+(isMultiMonth?"</div>"+
15338((numMonths[0]>0&&col===numMonths[1]-1)?"<div class='ui-datepicker-row-break'></div>":""):"");
15339group+=calender;
15340}
15341html+=group;
15342}
15343html+=buttonPanel;
15344inst._keyEvent=false;
15345return html;
15346},
15347_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,
15348secondary,monthNames,monthNamesShort){
15349var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,
15350changeMonth=this._get(inst,"changeMonth"),
15351changeYear=this._get(inst,"changeYear"),
15352showMonthAfterYear=this._get(inst,"showMonthAfterYear"),
15353selectMonthLabel=this._get(inst,"selectMonthLabel"),
15354selectYearLabel=this._get(inst,"selectYearLabel"),
15355html="<div class='ui-datepicker-title'>",
15356monthHtml="";
15357if(secondary||!changeMonth){
15358monthHtml+="<span class='ui-datepicker-month'>"+monthNames[drawMonth]+"</span>";
15359}else{
15360inMinYear=(minDate&&minDate.getFullYear()===drawYear);
15361inMaxYear=(maxDate&&maxDate.getFullYear()===drawYear);
15362monthHtml+="<select class='ui-datepicker-month' aria-label='"+selectMonthLabel+"' data-handler='selectMonth' data-event='change'>";
15363for(month=0;month<12;month++){
15364if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){
15365monthHtml+="<option value='"+month+"'"+
15366(month===drawMonth?" selected='selected'":"")+
15367">"+monthNamesShort[month]+"</option>";
15368}
15369}
15370monthHtml+="</select>";
15371}
15372if(!showMonthAfterYear){
15373html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"");
15374}
15375if(!inst.yearshtml){
15376inst.yearshtml="";
15377if(secondary||!changeYear){
15378html+="<span class='ui-datepicker-year'>"+drawYear+"</span>";
15379}else{
15380years=this._get(inst,"yearRange").split(":");
15381thisYear=new Date().getFullYear();
15382determineYear=function(value){
15383var year=(value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):
15384(value.match(/[+\-].*/)?thisYear+parseInt(value,10):
15385parseInt(value,10)));
15386return(isNaN(year)?thisYear:year);
15387};
15388year=determineYear(years[0]);
15389endYear=Math.max(year,determineYear(years[1]||""));
15390year=(minDate?Math.max(year,minDate.getFullYear()):year);
15391endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);
15392inst.yearshtml+="<select class='ui-datepicker-year' aria-label='"+selectYearLabel+"' data-handler='selectYear' data-event='change'>";
15393for(;year<=endYear;year++){
15394inst.yearshtml+="<option value='"+year+"'"+
15395(year===drawYear?" selected='selected'":"")+
15396">"+year+"</option>";
15397}
15398inst.yearshtml+="</select>";
15399html+=inst.yearshtml;
15400inst.yearshtml=null;
15401}
15402}
15403html+=this._get(inst,"yearSuffix");
15404if(showMonthAfterYear){
15405html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml;
15406}
15407html+="</div>";
15408return html;
15409},
15410_adjustInstDate:function(inst,offset,period){
15411var year=inst.selectedYear+(period==="Y"?offset:0),
15412month=inst.selectedMonth+(period==="M"?offset:0),
15413day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==="D"?offset:0),
15414date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));
15415inst.selectedDay=date.getDate();
15416inst.drawMonth=inst.selectedMonth=date.getMonth();
15417inst.drawYear=inst.selectedYear=date.getFullYear();
15418if(period==="M"||period==="Y"){
15419this._notifyChange(inst);
15420}
15421},
15422_restrictMinMax:function(inst,date){
15423var minDate=this._getMinMaxDate(inst,"min"),
15424maxDate=this._getMinMaxDate(inst,"max"),
15425newDate=(minDate&&date<minDate?minDate:date);
15426return(maxDate&&newDate>maxDate?maxDate:newDate);
15427},
15428_notifyChange:function(inst){
15429var onChange=this._get(inst,"onChangeMonthYear");
15430if(onChange){
15431onChange.apply((inst.input?inst.input[0]:null),
15432[inst.selectedYear,inst.selectedMonth+1,inst]);
15433}
15434},
15435_getNumberOfMonths:function(inst){
15436var numMonths=this._get(inst,"numberOfMonths");
15437return(numMonths==null?[1,1]:(typeof numMonths==="number"?[1,numMonths]:numMonths));
15438},
15439_getMinMaxDate:function(inst,minMax){
15440return this._determineDate(inst,this._get(inst,minMax+"Date"),null);
15441},
15442_getDaysInMonth:function(year,month){
15443return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate();
15444},
15445_getFirstDayOfMonth:function(year,month){
15446return new Date(year,month,1).getDay();
15447},
15448_canAdjustMonth:function(inst,offset,curYear,curMonth){
15449var numMonths=this._getNumberOfMonths(inst),
15450date=this._daylightSavingAdjust(new Date(curYear,
15451curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));
15452if(offset<0){
15453date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));
15454}
15455return this._isInRange(inst,date);
15456},
15457_isInRange:function(inst,date){
15458var yearSplit,currentYear,
15459minDate=this._getMinMaxDate(inst,"min"),
15460maxDate=this._getMinMaxDate(inst,"max"),
15461minYear=null,
15462maxYear=null,
15463years=this._get(inst,"yearRange");
15464if(years){
15465yearSplit=years.split(":");
15466currentYear=new Date().getFullYear();
15467minYear=parseInt(yearSplit[0],10);
15468maxYear=parseInt(yearSplit[1],10);
15469if(yearSplit[0].match(/[+\-].*/)){
15470minYear+=currentYear;
15471}
15472if(yearSplit[1].match(/[+\-].*/)){
15473maxYear+=currentYear;
15474}
15475}
15476return((!minDate||date.getTime()>=minDate.getTime())&&
15477(!maxDate||date.getTime()<=maxDate.getTime())&&
15478(!minYear||date.getFullYear()>=minYear)&&
15479(!maxYear||date.getFullYear()<=maxYear));
15480},
15481_getFormatConfig:function(inst){
15482var shortYearCutoff=this._get(inst,"shortYearCutoff");
15483shortYearCutoff=(typeof shortYearCutoff!=="string"?shortYearCutoff:
15484new Date().getFullYear()%100+parseInt(shortYearCutoff,10));
15485return{shortYearCutoff:shortYearCutoff,
15486dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),
15487monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")};
15488},
15489_formatDate:function(inst,day,month,year){
15490if(!day){
15491inst.currentDay=inst.selectedDay;
15492inst.currentMonth=inst.selectedMonth;
15493inst.currentYear=inst.selectedYear;
15494}
15495var date=(day?(typeof day==="object"?day:
15496this._daylightSavingAdjust(new Date(year,month,day))):
15497this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
15498return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst));
15499}
15500});
15501function datepicker_bindHover(dpDiv){
15502var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
15503return dpDiv.on("mouseout",selector,function(){
15504$(this).removeClass("ui-state-hover");
15505if(this.className.indexOf("ui-datepicker-prev")!==-1){
15506$(this).removeClass("ui-datepicker-prev-hover");
15507}
15508if(this.className.indexOf("ui-datepicker-next")!==-1){
15509$(this).removeClass("ui-datepicker-next-hover");
15510}
15511})
15512.on("mouseover",selector,datepicker_handleMouseover);
15513}
15514function datepicker_handleMouseover(){
15515if(!$.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])){
15516$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
15517$(this).addClass("ui-state-hover");
15518if(this.className.indexOf("ui-datepicker-prev")!==-1){
15519$(this).addClass("ui-datepicker-prev-hover");
15520}
15521if(this.className.indexOf("ui-datepicker-next")!==-1){
15522$(this).addClass("ui-datepicker-next-hover");
15523}
15524}
15525}
15526function datepicker_extendRemove(target,props){
15527$.extend(target,props);
15528for(var name in props){
15529if(props[name]==null){
15530target[name]=props[name];
15531}
15532}
15533return target;
15534}
15535$.fn.datepicker=function(options){
15536if(!this.length){
15537return this;
15538}
15539if(!$.datepicker.initialized){
15540$(document).on("mousedown",$.datepicker._checkExternalClick);
15541$.datepicker.initialized=true;
15542}
15543if($("#"+$.datepicker._mainDivId).length===0){
15544$("body").append($.datepicker.dpDiv);
15545}
15546var otherArgs=Array.prototype.slice.call(arguments,1);
15547if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){
15548return $.datepicker["_"+options+"Datepicker"].
15549apply($.datepicker,[this[0]].concat(otherArgs));
15550}
15551if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){
15552return $.datepicker["_"+options+"Datepicker"].
15553apply($.datepicker,[this[0]].concat(otherArgs));
15554}
15555return this.each(function(){
15556if(typeof options==="string"){
15557$.datepicker["_"+options+"Datepicker"]
15558.apply($.datepicker,[this].concat(otherArgs));
15559}else{
15560$.datepicker._attachDatepicker(this,options);
15561}
15562});
15563};
15564$.datepicker=new Datepicker();
15565$.datepicker.initialized=false;
15566$.datepicker.uuid=new Date().getTime();
15567$.datepicker.version="1.14.1";
15568var widgetsDatepicker=$.datepicker;
15569var mouseHandled=false;
15570$(document).on("mouseup",function(){
15571mouseHandled=false;
15572});
15573var widgetsMouse=$.widget("ui.mouse",{
15574version:"1.14.1",
15575options:{
15576cancel:"input, textarea, button, select, option",
15577distance:1,
15578delay:0
15579},
15580_mouseInit:function(){
15581var that=this;
15582this.element
15583.on("mousedown."+this.widgetName,function(event){
15584return that._mouseDown(event);
15585})
15586.on("click."+this.widgetName,function(event){
15587if(true===$.data(event.target,that.widgetName+".preventClickEvent")){
15588$.removeData(event.target,that.widgetName+".preventClickEvent");
15589event.stopImmediatePropagation();
15590return false;
15591}
15592});
15593this.started=false;
15594},
15595_mouseDestroy:function(){
15596this.element.off("."+this.widgetName);
15597if(this._mouseMoveDelegate){
15598this.document
15599.off("mousemove."+this.widgetName,this._mouseMoveDelegate)
15600.off("mouseup."+this.widgetName,this._mouseUpDelegate);
15601}
15602},
15603_mouseDown:function(event){
15604if(mouseHandled){
15605return;
15606}
15607this._mouseMoved=false;
15608if(this._mouseStarted){
15609this._mouseUp(event);
15610}
15611this._mouseDownEvent=event;
15612var that=this,
15613btnIsLeft=event.which===1,
15614elIsCancel=typeof this.options.cancel==="string"?
15615$(event.target).closest(this.options.cancel).length:
15616false;
15617if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){
15618return true;
15619}
15620this.mouseDelayMet=!this.options.delay;
15621if(!this.mouseDelayMet){
15622this._mouseDelayTimer=setTimeout(function(){
15623that.mouseDelayMet=true;
15624},this.options.delay);
15625}
15626if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){
15627this._mouseStarted=(this._mouseStart(event)!==false);
15628if(!this._mouseStarted){
15629event.preventDefault();
15630return true;
15631}
15632}
15633if(true===$.data(event.target,this.widgetName+".preventClickEvent")){
15634$.removeData(event.target,this.widgetName+".preventClickEvent");
15635}
15636this._mouseMoveDelegate=function(event){
15637return that._mouseMove(event);
15638};
15639this._mouseUpDelegate=function(event){
15640return that._mouseUp(event);
15641};
15642this.document
15643.on("mousemove."+this.widgetName,this._mouseMoveDelegate)
15644.on("mouseup."+this.widgetName,this._mouseUpDelegate);
15645event.preventDefault();
15646mouseHandled=true;
15647return true;
15648},
15649_mouseMove:function(event){
15650if(this._mouseMoved&&!event.which){
15651if(event.originalEvent.altKey||event.originalEvent.ctrlKey||
15652event.originalEvent.metaKey||event.originalEvent.shiftKey){
15653this.ignoreMissingWhich=true;
15654}else if(!this.ignoreMissingWhich){
15655return this._mouseUp(event);
15656}
15657}
15658if(event.which||event.button){
15659this._mouseMoved=true;
15660}
15661if(this._mouseStarted){
15662this._mouseDrag(event);
15663return event.preventDefault();
15664}
15665if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){
15666this._mouseStarted=
15667(this._mouseStart(this._mouseDownEvent,event)!==false);
15668if(this._mouseStarted){
15669this._mouseDrag(event);
15670}else{
15671this._mouseUp(event);
15672}
15673}
15674return!this._mouseStarted;
15675},
15676_mouseUp:function(event){
15677this.document
15678.off("mousemove."+this.widgetName,this._mouseMoveDelegate)
15679.off("mouseup."+this.widgetName,this._mouseUpDelegate);
15680if(this._mouseStarted){
15681this._mouseStarted=false;
15682if(event.target===this._mouseDownEvent.target){
15683$.data(event.target,this.widgetName+".preventClickEvent",true);
15684}
15685this._mouseStop(event);
15686}
15687if(this._mouseDelayTimer){
15688clearTimeout(this._mouseDelayTimer);
15689delete this._mouseDelayTimer;
15690}
15691this.ignoreMissingWhich=false;
15692mouseHandled=false;
15693event.preventDefault();
15694},
15695_mouseDistanceMet:function(event){
15696return(Math.max(
15697Math.abs(this._mouseDownEvent.pageX-event.pageX),
15698Math.abs(this._mouseDownEvent.pageY-event.pageY)
15699)>=this.options.distance
15700);
15701},
15702_mouseDelayMet:function(){
15703return this.mouseDelayMet;
15704},
15705_mouseStart:function(){},
15706_mouseDrag:function(){},
15707_mouseStop:function(){},
15708_mouseCapture:function(){
15709return true;
15710}
15711});
15712var plugin=$.ui.plugin={
15713add:function(module,option,set){
15714var i,
15715proto=$.ui[module].prototype;
15716for(i in set){
15717proto.plugins[i]=proto.plugins[i]||[];
15718proto.plugins[i].push([option,set[i]]);
15719}
15720},
15721call:function(instance,name,args,allowDisconnected){
15722var i,
15723set=instance.plugins[name];
15724if(!set){
15725return;
15726}
15727if(!allowDisconnected&&(!instance.element[0].parentNode||
15728instance.element[0].parentNode.nodeType===11)){
15729return;
15730}
15731for(i=0;i<set.length;i++){
15732if(instance.options[set[i][0]]){
15733set[i][1].apply(instance.element,args);
15734}
15735}
15736}
15737};
15738$.widget("ui.draggable",$.ui.mouse,{
15739version:"1.14.1",
15740widgetEventPrefix:"drag",
15741options:{
15742addClasses:true,
15743appendTo:"parent",
15744axis:false,
15745connectToSortable:false,
15746containment:false,
15747cursor:"auto",
15748cursorAt:false,
15749grid:false,
15750handle:false,
15751helper:"original",
15752iframeFix:false,
15753opacity:false,
15754refreshPositions:false,
15755revert:false,
15756revertDuration:500,
15757scope:"default",
15758scroll:true,
15759scrollSensitivity:20,
15760scrollSpeed:20,
15761snap:false,
15762snapMode:"both",
15763snapTolerance:20,
15764stack:false,
15765zIndex:false,
15766drag:null,
15767start:null,
15768stop:null
15769},
15770_create:function(){
15771if(this.options.helper==="original"){
15772this._setPositionRelative();
15773}
15774if(this.options.addClasses){
15775this._addClass("ui-draggable");
15776}
15777this._setHandleClassName();
15778this._mouseInit();
15779},
15780_setOption:function(key,value){
15781this._super(key,value);
15782if(key==="handle"){
15783this._removeHandleClassName();
15784this._setHandleClassName();
15785}
15786},
15787_destroy:function(){
15788if((this.helper||this.element).is(".ui-draggable-dragging")){
15789this.destroyOnClear=true;
15790return;
15791}
15792this._removeHandleClassName();
15793this._mouseDestroy();
15794},
15795_mouseCapture:function(event){
15796var o=this.options;
15797if(this.helper||o.disabled||
15798$(event.target).closest(".ui-resizable-handle").length>0){
15799return false;
15800}
15801this.handle=this._getHandle(event);
15802if(!this.handle){
15803return false;
15804}
15805this._blurActiveElement(event);
15806this._blockFrames(o.iframeFix===true?"iframe":o.iframeFix);
15807return true;
15808},
15809_blockFrames:function(selector){
15810this.iframeBlocks=this.document.find(selector).map(function(){
15811var iframe=$(this);
15812return $("<div>")
15813.css("position","absolute")
15814.appendTo(iframe.parent())
15815.outerWidth(iframe.outerWidth())
15816.outerHeight(iframe.outerHeight())
15817.offset(iframe.offset())[0];
15818});
15819},
15820_unblockFrames:function(){
15821if(this.iframeBlocks){
15822this.iframeBlocks.remove();
15823delete this.iframeBlocks;
15824}
15825},
15826_blurActiveElement:function(event){
15827var activeElement=this.document[0].activeElement,
15828target=$(event.target);
15829if(target.closest(activeElement).length){
15830return;
15831}
15832$(activeElement).trigger("blur");
15833},
15834_mouseStart:function(event){
15835var o=this.options;
15836this.helper=this._createHelper(event);
15837this._addClass(this.helper,"ui-draggable-dragging");
15838this._cacheHelperProportions();
15839if($.ui.ddmanager){
15840$.ui.ddmanager.current=this;
15841}
15842this._cacheMargins();
15843this.cssPosition=this.helper.css("position");
15844this.scrollParent=this.helper.scrollParent(true);
15845this.offsetParent=this.helper.offsetParent();
15846this.hasFixedAncestor=this.helper.parents().filter(function(){
15847return $(this).css("position")==="fixed";
15848}).length>0;
15849this.positionAbs=this.element.offset();
15850this._refreshOffsets(event);
15851this.originalPosition=this.position=this._generatePosition(event,false);
15852this.originalPageX=event.pageX;
15853this.originalPageY=event.pageY;
15854if(o.cursorAt){
15855this._adjustOffsetFromHelper(o.cursorAt);
15856}
15857this._setContainment();
15858if(this._trigger("start",event)===false){
15859this._clear();
15860return false;
15861}
15862this._cacheHelperProportions();
15863if($.ui.ddmanager&&!o.dropBehaviour){
15864$.ui.ddmanager.prepareOffsets(this,event);
15865}
15866this._mouseDrag(event,true);
15867if($.ui.ddmanager){
15868$.ui.ddmanager.dragStart(this,event);
15869}
15870return true;
15871},
15872_refreshOffsets:function(event){
15873this.offset={
15874top:this.positionAbs.top-this.margins.top,
15875left:this.positionAbs.left-this.margins.left,
15876scroll:false,
15877parent:this._getParentOffset(),
15878relative:this._getRelativeOffset()
15879};
15880this.offset.click={
15881left:event.pageX-this.offset.left,
15882top:event.pageY-this.offset.top
15883};
15884},
15885_mouseDrag:function(event,noPropagation){
15886if(this.hasFixedAncestor){
15887this.offset.parent=this._getParentOffset();
15888}
15889this.position=this._generatePosition(event,true);
15890this.positionAbs=this._convertPositionTo("absolute");
15891if(!noPropagation){
15892var ui=this._uiHash();
15893if(this._trigger("drag",event,ui)===false){
15894this._mouseUp(new $.Event("mouseup",event));
15895return false;
15896}
15897this.position=ui.position;
15898}
15899this.helper[0].style.left=this.position.left+"px";
15900this.helper[0].style.top=this.position.top+"px";
15901if($.ui.ddmanager){
15902$.ui.ddmanager.drag(this,event);
15903}
15904return false;
15905},
15906_mouseStop:function(event){
15907var that=this,
15908dropped=false;
15909if($.ui.ddmanager&&!this.options.dropBehaviour){
15910dropped=$.ui.ddmanager.drop(this,event);
15911}
15912if(this.dropped){
15913dropped=this.dropped;
15914this.dropped=false;
15915}
15916if((this.options.revert==="invalid"&&!dropped)||
15917(this.options.revert==="valid"&&dropped)||
15918this.options.revert===true||(typeof this.options.revert==="function"&&
15919this.options.revert.call(this.element,dropped))
15920){
15921$(this.helper).animate(
15922this.originalPosition,
15923parseInt(this.options.revertDuration,10),
15924function(){
15925if(that._trigger("stop",event)!==false){
15926that._clear();
15927}
15928}
15929);
15930}else{
15931if(this._trigger("stop",event)!==false){
15932this._clear();
15933}
15934}
15935return false;
15936},
15937_mouseUp:function(event){
15938this._unblockFrames();
15939if($.ui.ddmanager){
15940$.ui.ddmanager.dragStop(this,event);
15941}
15942if(this.handleElement.is(event.target)){
15943this.element.trigger("focus");
15944}
15945return $.ui.mouse.prototype._mouseUp.call(this,event);
15946},
15947cancel:function(){
15948if(this.helper.is(".ui-draggable-dragging")){
15949this._mouseUp(new $.Event("mouseup",{target:this.element[0]}));
15950}else{
15951this._clear();
15952}
15953return this;
15954},
15955_getHandle:function(event){
15956return this.options.handle?
15957!!$(event.target).closest(this.element.find(this.options.handle)).length:
15958true;
15959},
15960_setHandleClassName:function(){
15961this.handleElement=this.options.handle?
15962this.element.find(this.options.handle):this.element;
15963this._addClass(this.handleElement,"ui-draggable-handle");
15964},
15965_removeHandleClassName:function(){
15966this._removeClass(this.handleElement,"ui-draggable-handle");
15967},
15968_createHelper:function(event){
15969var o=this.options,
15970helperIsFunction=typeof o.helper==="function",
15971helper=helperIsFunction?
15972$(o.helper.apply(this.element[0],[event])):
15973(o.helper==="clone"?
15974this.element.clone().removeAttr("id"):
15975this.element);
15976if(!helper.parents("body").length){
15977helper.appendTo((o.appendTo==="parent"?
15978this.element[0].parentNode:
15979o.appendTo));
15980}
15981if(helperIsFunction&&helper[0]===this.element[0]){
15982this._setPositionRelative();
15983}
15984if(helper[0]!==this.element[0]&&
15985!(/(fixed|absolute)/).test(helper.css("position"))){
15986helper.css("position","absolute");
15987}
15988return helper;
15989},
15990_setPositionRelative:function(){
15991if(!(/^(?:r|a|f)/).test(this.element.css("position"))){
15992this.element[0].style.position="relative";
15993}
15994},
15995_adjustOffsetFromHelper:function(obj){
15996if(typeof obj==="string"){
15997obj=obj.split(" ");
15998}
15999if(Array.isArray(obj)){
16000obj={left:+obj[0],top:+obj[1]||0};
16001}
16002if("left"in obj){
16003this.offset.click.left=obj.left+this.margins.left;
16004}
16005if("right"in obj){
16006this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;
16007}
16008if("top"in obj){
16009this.offset.click.top=obj.top+this.margins.top;
16010}
16011if("bottom"in obj){
16012this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;
16013}
16014},
16015_isRootNode:function(element){
16016return(/(html|body)/i).test(element.tagName)||element===this.document[0];
16017},
16018_getParentOffset:function(){
16019var po=this.offsetParent.offset(),
16020document=this.document[0];
16021if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&
16022$.contains(this.scrollParent[0],this.offsetParent[0])){
16023po.left+=this.scrollParent.scrollLeft();
16024po.top+=this.scrollParent.scrollTop();
16025}
16026if(this._isRootNode(this.offsetParent[0])){
16027po={top:0,left:0};
16028}
16029return{
16030top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),
16031left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)
16032};
16033},
16034_getRelativeOffset:function(){
16035if(this.cssPosition!=="relative"){
16036return{top:0,left:0};
16037}
16038var p=this.element.position(),
16039scrollIsRootNode=this._isRootNode(this.scrollParent[0]);
16040return{
16041top:p.top-(parseInt(this.helper.css("top"),10)||0)+
16042(!scrollIsRootNode?this.scrollParent.scrollTop():0),
16043left:p.left-(parseInt(this.helper.css("left"),10)||0)+
16044(!scrollIsRootNode?this.scrollParent.scrollLeft():0)
16045};
16046},
16047_cacheMargins:function(){
16048this.margins={
16049left:(parseInt(this.element.css("marginLeft"),10)||0),
16050top:(parseInt(this.element.css("marginTop"),10)||0),
16051right:(parseInt(this.element.css("marginRight"),10)||0),
16052bottom:(parseInt(this.element.css("marginBottom"),10)||0)
16053};
16054},
16055_cacheHelperProportions:function(){
16056this.helperProportions={
16057width:this.helper.outerWidth(),
16058height:this.helper.outerHeight()
16059};
16060},
16061_setContainment:function(){
16062var isUserScrollable,c,ce,
16063o=this.options,
16064document=this.document[0];
16065this.relativeContainer=null;
16066if(!o.containment){
16067this.containment=null;
16068return;
16069}
16070if(o.containment==="window"){
16071this.containment=[
16072$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,
16073$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
16074$(window).scrollLeft()+$(window).width()-
16075this.helperProportions.width-this.margins.left,
16076$(window).scrollTop()+
16077($(window).height()||document.body.parentNode.scrollHeight)-
16078this.helperProportions.height-this.margins.top
16079];
16080return;
16081}
16082if(o.containment==="document"){
16083this.containment=[
160840,
160850,
16086$(document).width()-this.helperProportions.width-this.margins.left,
16087($(document).height()||document.body.parentNode.scrollHeight)-
16088this.helperProportions.height-this.margins.top
16089];
16090return;
16091}
16092if(o.containment.constructor===Array){
16093this.containment=o.containment;
16094return;
16095}
16096if(o.containment==="parent"){
16097o.containment=this.helper[0].parentNode;
16098}
16099c=$(o.containment);
16100ce=c[0];
16101if(!ce){
16102return;
16103}
16104isUserScrollable=/(scroll|auto)/.test(c.css("overflow"));
16105this.containment=[
16106(parseInt(c.css("borderLeftWidth"),10)||0)+
16107(parseInt(c.css("paddingLeft"),10)||0),
16108(parseInt(c.css("borderTopWidth"),10)||0)+
16109(parseInt(c.css("paddingTop"),10)||0),
16110(isUserScrollable?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-
16111(parseInt(c.css("borderRightWidth"),10)||0)-
16112(parseInt(c.css("paddingRight"),10)||0)-
16113this.helperProportions.width-
16114this.margins.left-
16115this.margins.right,
16116(isUserScrollable?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-
16117(parseInt(c.css("borderBottomWidth"),10)||0)-
16118(parseInt(c.css("paddingBottom"),10)||0)-
16119this.helperProportions.height-
16120this.margins.top-
16121this.margins.bottom
16122];
16123this.relativeContainer=c;
16124},
16125_convertPositionTo:function(d,pos){
16126if(!pos){
16127pos=this.position;
16128}
16129var mod=d==="absolute"?1:-1,
16130scrollIsRootNode=this._isRootNode(this.scrollParent[0]);
16131return{
16132top:(
16133pos.top+
16134this.offset.relative.top*mod+
16135this.offset.parent.top*mod-
16136((this.cssPosition==="fixed"?
16137-this.offset.scroll.top:
16138(scrollIsRootNode?0:this.offset.scroll.top))*mod)
16139),
16140left:(
16141pos.left+
16142this.offset.relative.left*mod+
16143this.offset.parent.left*mod-
16144((this.cssPosition==="fixed"?
16145-this.offset.scroll.left:
16146(scrollIsRootNode?0:this.offset.scroll.left))*mod)
16147)
16148};
16149},
16150_generatePosition:function(event,constrainPosition){
16151var containment,co,top,left,
16152o=this.options,
16153scrollIsRootNode=this._isRootNode(this.scrollParent[0]),
16154pageX=event.pageX,
16155pageY=event.pageY;
16156if(!scrollIsRootNode||!this.offset.scroll){
16157this.offset.scroll={
16158top:this.scrollParent.scrollTop(),
16159left:this.scrollParent.scrollLeft()
16160};
16161}
16162if(constrainPosition){
16163if(this.containment){
16164if(this.relativeContainer){
16165co=this.relativeContainer.offset();
16166containment=[
16167this.containment[0]+co.left,
16168this.containment[1]+co.top,
16169this.containment[2]+co.left,
16170this.containment[3]+co.top
16171];
16172}else{
16173containment=this.containment;
16174}
16175if(event.pageX-this.offset.click.left<containment[0]){
16176pageX=containment[0]+this.offset.click.left;
16177}
16178if(event.pageY-this.offset.click.top<containment[1]){
16179pageY=containment[1]+this.offset.click.top;
16180}
16181if(event.pageX-this.offset.click.left>containment[2]){
16182pageX=containment[2]+this.offset.click.left;
16183}
16184if(event.pageY-this.offset.click.top>containment[3]){
16185pageY=containment[3]+this.offset.click.top;
16186}
16187}
16188if(o.grid){
16189top=o.grid[1]?this.originalPageY+Math.round((pageY-
16190this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;
16191pageY=containment?((top-this.offset.click.top>=containment[1]||
16192top-this.offset.click.top>containment[3])?
16193top:
16194((top-this.offset.click.top>=containment[1])?
16195top-o.grid[1]:top+o.grid[1])):top;
16196left=o.grid[0]?this.originalPageX+
16197Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:
16198this.originalPageX;
16199pageX=containment?((left-this.offset.click.left>=containment[0]||
16200left-this.offset.click.left>containment[2])?
16201left:
16202((left-this.offset.click.left>=containment[0])?
16203left-o.grid[0]:left+o.grid[0])):left;
16204}
16205if(o.axis==="y"){
16206pageX=this.originalPageX;
16207}
16208if(o.axis==="x"){
16209pageY=this.originalPageY;
16210}
16211}
16212return{
16213top:(
16214pageY-
16215this.offset.click.top-
16216this.offset.relative.top-
16217this.offset.parent.top+
16218(this.cssPosition==="fixed"?
16219-this.offset.scroll.top:
16220(scrollIsRootNode?0:this.offset.scroll.top))
16221),
16222left:(
16223pageX-
16224this.offset.click.left-
16225this.offset.relative.left-
16226this.offset.parent.left+
16227(this.cssPosition==="fixed"?
16228-this.offset.scroll.left:
16229(scrollIsRootNode?0:this.offset.scroll.left))
16230)
16231};
16232},
16233_clear:function(){
16234this._removeClass(this.helper,"ui-draggable-dragging");
16235if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){
16236this.helper.remove();
16237}
16238this.helper=null;
16239this.cancelHelperRemoval=false;
16240if(this.destroyOnClear){
16241this.destroy();
16242}
16243},
16244_trigger:function(type,event,ui){
16245ui=ui||this._uiHash();
16246$.ui.plugin.call(this,type,[event,ui,this],true);
16247if(/^(drag|start|stop)/.test(type)){
16248this.positionAbs=this._convertPositionTo("absolute");
16249ui.offset=this.positionAbs;
16250}
16251return $.Widget.prototype._trigger.call(this,type,event,ui);
16252},
16253plugins:{},
16254_uiHash:function(){
16255return{
16256helper:this.helper,
16257position:this.position,
16258originalPosition:this.originalPosition,
16259offset:this.positionAbs
16260};
16261}
16262});
16263$.ui.plugin.add("draggable","connectToSortable",{
16264start:function(event,ui,draggable){
16265var uiSortable=$.extend({},ui,{
16266item:draggable.element
16267});
16268draggable.sortables=[];
16269$(draggable.options.connectToSortable).each(function(){
16270var sortable=$(this).sortable("instance");
16271if(sortable&&!sortable.options.disabled){
16272draggable.sortables.push(sortable);
16273sortable.refreshPositions();
16274sortable._trigger("activate",event,uiSortable);
16275}
16276});
16277},
16278stop:function(event,ui,draggable){
16279var uiSortable=$.extend({},ui,{
16280item:draggable.element
16281});
16282draggable.cancelHelperRemoval=false;
16283$.each(draggable.sortables,function(){
16284var sortable=this;
16285if(sortable.isOver){
16286sortable.isOver=0;
16287draggable.cancelHelperRemoval=true;
16288sortable.cancelHelperRemoval=false;
16289sortable._storedCSS={
16290position:sortable.placeholder.css("position"),
16291top:sortable.placeholder.css("top"),
16292left:sortable.placeholder.css("left")
16293};
16294sortable._mouseStop(event);
16295sortable.options.helper=sortable.options._helper;
16296}else{
16297sortable.cancelHelperRemoval=true;
16298sortable._trigger("deactivate",event,uiSortable);
16299}
16300});
16301},
16302drag:function(event,ui,draggable){
16303$.each(draggable.sortables,function(){
16304var innermostIntersecting=false,
16305sortable=this;
16306sortable.positionAbs=draggable.positionAbs;
16307sortable.helperProportions=draggable.helperProportions;
16308sortable.offset.click=draggable.offset.click;
16309if(sortable._intersectsWith(sortable.containerCache)){
16310innermostIntersecting=true;
16311$.each(draggable.sortables,function(){
16312this.positionAbs=draggable.positionAbs;
16313this.helperProportions=draggable.helperProportions;
16314this.offset.click=draggable.offset.click;
16315if(this!==sortable&&
16316this._intersectsWith(this.containerCache)&&
16317$.contains(sortable.element[0],this.element[0])){
16318innermostIntersecting=false;
16319}
16320return innermostIntersecting;
16321});
16322}
16323if(innermostIntersecting){
16324if(!sortable.isOver){
16325sortable.isOver=1;
16326draggable._parent=ui.helper.parent();
16327sortable.currentItem=ui.helper
16328.appendTo(sortable.element)
16329.data("ui-sortable-item",true);
16330sortable.options._helper=sortable.options.helper;
16331sortable.options.helper=function(){
16332return ui.helper[0];
16333};
16334event.target=sortable.currentItem[0];
16335sortable._mouseCapture(event,true);
16336sortable._mouseStart(event,true,true);
16337sortable.offset.click.top=draggable.offset.click.top;
16338sortable.offset.click.left=draggable.offset.click.left;
16339sortable.offset.parent.left-=draggable.offset.parent.left-
16340sortable.offset.parent.left;
16341sortable.offset.parent.top-=draggable.offset.parent.top-
16342sortable.offset.parent.top;
16343draggable._trigger("toSortable",event);
16344draggable.dropped=sortable.element;
16345$.each(draggable.sortables,function(){
16346this.refreshPositions();
16347});
16348draggable.currentItem=draggable.element;
16349sortable.fromOutside=draggable;
16350}
16351if(sortable.currentItem){
16352sortable._mouseDrag(event);
16353ui.position=sortable.position;
16354}
16355}else{
16356if(sortable.isOver){
16357sortable.isOver=0;
16358sortable.cancelHelperRemoval=true;
16359sortable.options._revert=sortable.options.revert;
16360sortable.options.revert=false;
16361sortable._trigger("out",event,sortable._uiHash(sortable));
16362sortable._mouseStop(event,true);
16363sortable.options.revert=sortable.options._revert;
16364sortable.options.helper=sortable.options._helper;
16365if(sortable.placeholder){
16366sortable.placeholder.remove();
16367}
16368ui.helper.appendTo(draggable._parent);
16369draggable._refreshOffsets(event);
16370ui.position=draggable._generatePosition(event,true);
16371draggable._trigger("fromSortable",event);
16372draggable.dropped=false;
16373$.each(draggable.sortables,function(){
16374this.refreshPositions();
16375});
16376}
16377}
16378});
16379}
16380});
16381$.ui.plugin.add("draggable","cursor",{
16382start:function(event,ui,instance){
16383var t=$("body"),
16384o=instance.options;
16385if(t.css("cursor")){
16386o._cursor=t.css("cursor");
16387}
16388t.css("cursor",o.cursor);
16389},
16390stop:function(event,ui,instance){
16391var o=instance.options;
16392if(o._cursor){
16393$("body").css("cursor",o._cursor);
16394}
16395}
16396});
16397$.ui.plugin.add("draggable","opacity",{
16398start:function(event,ui,instance){
16399var t=$(ui.helper),
16400o=instance.options;
16401if(t.css("opacity")){
16402o._opacity=t.css("opacity");
16403}
16404t.css("opacity",o.opacity);
16405},
16406stop:function(event,ui,instance){
16407var o=instance.options;
16408if(o._opacity){
16409$(ui.helper).css("opacity",o._opacity);
16410}
16411}
16412});
16413$.ui.plugin.add("draggable","scroll",{
16414start:function(event,ui,i){
16415if(!i.scrollParentNotHidden){
16416i.scrollParentNotHidden=i.helper.scrollParent(false);
16417}
16418if(i.scrollParentNotHidden[0]!==i.document[0]&&
16419i.scrollParentNotHidden[0].tagName!=="HTML"){
16420i.overflowOffset=i.scrollParentNotHidden.offset();
16421}
16422},
16423drag:function(event,ui,i){
16424var o=i.options,
16425scrolled=false,
16426scrollParent=i.scrollParentNotHidden[0],
16427document=i.document[0];
16428if(scrollParent!==document&&scrollParent.tagName!=="HTML"){
16429if(!o.axis||o.axis!=="x"){
16430if((i.overflowOffset.top+scrollParent.offsetHeight)-event.pageY<
16431o.scrollSensitivity){
16432scrollParent.scrollTop=scrolled=scrollParent.scrollTop+o.scrollSpeed;
16433}else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){
16434scrollParent.scrollTop=scrolled=scrollParent.scrollTop-o.scrollSpeed;
16435}
16436}
16437if(!o.axis||o.axis!=="y"){
16438if((i.overflowOffset.left+scrollParent.offsetWidth)-event.pageX<
16439o.scrollSensitivity){
16440scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft+o.scrollSpeed;
16441}else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){
16442scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft-o.scrollSpeed;
16443}
16444}
16445}else{
16446if(!o.axis||o.axis!=="x"){
16447if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){
16448scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);
16449}else if($(window).height()-(event.pageY-$(document).scrollTop())<
16450o.scrollSensitivity){
16451scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);
16452}
16453}
16454if(!o.axis||o.axis!=="y"){
16455if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){
16456scrolled=$(document).scrollLeft(
16457$(document).scrollLeft()-o.scrollSpeed
16458);
16459}else if($(window).width()-(event.pageX-$(document).scrollLeft())<
16460o.scrollSensitivity){
16461scrolled=$(document).scrollLeft(
16462$(document).scrollLeft()+o.scrollSpeed
16463);
16464}
16465}
16466}
16467if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){
16468$.ui.ddmanager.prepareOffsets(i,event);
16469}
16470}
16471});
16472$.ui.plugin.add("draggable","snap",{
16473start:function(event,ui,i){
16474var o=i.options;
16475i.snapElements=[];
16476$(o.snap.constructor!==String?(o.snap.items||":data(ui-draggable)"):o.snap)
16477.each(function(){
16478var $t=$(this),
16479$o=$t.offset();
16480if(this!==i.element[0]){
16481i.snapElements.push({
16482item:this,
16483width:$t.outerWidth(),height:$t.outerHeight(),
16484top:$o.top,left:$o.left
16485});
16486}
16487});
16488},
16489drag:function(event,ui,inst){
16490var ts,bs,ls,rs,l,r,t,b,i,first,
16491o=inst.options,
16492d=o.snapTolerance,
16493x1=ui.offset.left,x2=x1+inst.helperProportions.width,
16494y1=ui.offset.top,y2=y1+inst.helperProportions.height;
16495for(i=inst.snapElements.length-1;i>=0;i--){
16496l=inst.snapElements[i].left-inst.margins.left;
16497r=l+inst.snapElements[i].width;
16498t=inst.snapElements[i].top-inst.margins.top;
16499b=t+inst.snapElements[i].height;
16500if(x2<l-d||x1>r+d||y2<t-d||y1>b+d||
16501!$.contains(inst.snapElements[i].item.ownerDocument,
16502inst.snapElements[i].item)){
16503if(inst.snapElements[i].snapping){
16504if(inst.options.snap.release){
16505inst.options.snap.release.call(
16506inst.element,
16507event,
16508$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})
16509);
16510}
16511}
16512inst.snapElements[i].snapping=false;
16513continue;
16514}
16515if(o.snapMode!=="inner"){
16516ts=Math.abs(t-y2)<=d;
16517bs=Math.abs(b-y1)<=d;
16518ls=Math.abs(l-x2)<=d;
16519rs=Math.abs(r-x1)<=d;
16520if(ts){
16521ui.position.top=inst._convertPositionTo("relative",{
16522top:t-inst.helperProportions.height,
16523left:0
16524}).top;
16525}
16526if(bs){
16527ui.position.top=inst._convertPositionTo("relative",{
16528top:b,
16529left:0
16530}).top;
16531}
16532if(ls){
16533ui.position.left=inst._convertPositionTo("relative",{
16534top:0,
16535left:l-inst.helperProportions.width
16536}).left;
16537}
16538if(rs){
16539ui.position.left=inst._convertPositionTo("relative",{
16540top:0,
16541left:r
16542}).left;
16543}
16544}
16545first=(ts||bs||ls||rs);
16546if(o.snapMode!=="outer"){
16547ts=Math.abs(t-y1)<=d;
16548bs=Math.abs(b-y2)<=d;
16549ls=Math.abs(l-x1)<=d;
16550rs=Math.abs(r-x2)<=d;
16551if(ts){
16552ui.position.top=inst._convertPositionTo("relative",{
16553top:t,
16554left:0
16555}).top;
16556}
16557if(bs){
16558ui.position.top=inst._convertPositionTo("relative",{
16559top:b-inst.helperProportions.height,
16560left:0
16561}).top;
16562}
16563if(ls){
16564ui.position.left=inst._convertPositionTo("relative",{
16565top:0,
16566left:l
16567}).left;
16568}
16569if(rs){
16570ui.position.left=inst._convertPositionTo("relative",{
16571top:0,
16572left:r-inst.helperProportions.width
16573}).left;
16574}
16575}
16576if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){
16577if(inst.options.snap.snap){
16578inst.options.snap.snap.call(
16579inst.element,
16580event,
16581$.extend(inst._uiHash(),{
16582snapItem:inst.snapElements[i].item
16583}));
16584}
16585}
16586inst.snapElements[i].snapping=(ts||bs||ls||rs||first);
16587}
16588}
16589});
16590$.ui.plugin.add("draggable","stack",{
16591start:function(event,ui,instance){
16592var min,
16593o=instance.options,
16594group=$.makeArray($(o.stack)).sort(function(a,b){
16595return(parseInt($(a).css("zIndex"),10)||0)-
16596(parseInt($(b).css("zIndex"),10)||0);
16597});
16598if(!group.length){
16599return;
16600}
16601min=parseInt($(group[0]).css("zIndex"),10)||0;
16602$(group).each(function(i){
16603$(this).css("zIndex",min+i);
16604});
16605this.css("zIndex",(min+group.length));
16606}
16607});
16608$.ui.plugin.add("draggable","zIndex",{
16609start:function(event,ui,instance){
16610var t=$(ui.helper),
16611o=instance.options;
16612if(t.css("zIndex")){
16613o._zIndex=t.css("zIndex");
16614}
16615t.css("zIndex",o.zIndex);
16616},
16617stop:function(event,ui,instance){
16618var o=instance.options;
16619if(o._zIndex){
16620$(ui.helper).css("zIndex",o._zIndex);
16621}
16622}
16623});
16624var widgetsDraggable=$.ui.draggable;
16625$.widget("ui.resizable",$.ui.mouse,{
16626version:"1.14.1",
16627widgetEventPrefix:"resize",
16628options:{
16629alsoResize:false,
16630animate:false,
16631animateDuration:"slow",
16632animateEasing:"swing",
16633aspectRatio:false,
16634autoHide:false,
16635classes:{
16636"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"
16637},
16638containment:false,
16639ghost:false,
16640grid:false,
16641handles:"e,s,se",
16642helper:false,
16643maxHeight:null,
16644maxWidth:null,
16645minHeight:10,
16646minWidth:10,
16647zIndex:90,
16648resize:null,
16649start:null,
16650stop:null
16651},
16652_num:function(value){
16653return parseFloat(value)||0;
16654},
16655_isNumber:function(value){
16656return!isNaN(parseFloat(value));
16657},
16658_hasScroll:function(el,a){
16659var scroll,
16660has=false,
16661overflow=$(el).css("overflow");
16662if(overflow==="hidden"){
16663return false;
16664}
16665if(overflow==="scroll"){
16666return true;
16667}
16668scroll=(a&&a==="left")?"scrollLeft":"scrollTop";
16669if(el[scroll]>0){
16670return true;
16671}
16672try{
16673el[scroll]=1;
16674has=(el[scroll]>0);
16675el[scroll]=0;
16676}catch(e){
16677}
16678return has;
16679},
16680_create:function(){
16681var margins,
16682o=this.options,
16683that=this;
16684this._addClass("ui-resizable");
16685$.extend(this,{
16686_aspectRatio:!!(o.aspectRatio),
16687aspectRatio:o.aspectRatio,
16688originalElement:this.element,
16689_proportionallyResizeElements:[],
16690_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null
16691});
16692if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){
16693this.element.wrap(
16694$("<div class='ui-wrapper'></div>").css({
16695overflow:"hidden",
16696position:this.element.css("position"),
16697width:this.element.outerWidth(),
16698height:this.element.outerHeight(),
16699top:this.element.css("top"),
16700left:this.element.css("left")
16701})
16702);
16703this.element=this.element.parent().data(
16704"ui-resizable",this.element.resizable("instance")
16705);
16706this.elementIsWrapper=true;
16707margins={
16708marginTop:this.originalElement.css("marginTop"),
16709marginRight:this.originalElement.css("marginRight"),
16710marginBottom:this.originalElement.css("marginBottom"),
16711marginLeft:this.originalElement.css("marginLeft")
16712};
16713this.element.css(margins);
16714this.originalResizeStyle=this.originalElement.css("resize");
16715this.originalElement.css("resize","none");
16716this._proportionallyResizeElements.push(this.originalElement.css({
16717position:"static",
16718zoom:1,
16719display:"block"
16720}));
16721this._proportionallyResize();
16722}
16723this._setupHandles();
16724if(o.autoHide){
16725$(this.element)
16726.on("mouseenter",function(){
16727if(o.disabled){
16728return;
16729}
16730that._removeClass("ui-resizable-autohide");
16731that._handles.show();
16732})
16733.on("mouseleave",function(){
16734if(o.disabled){
16735return;
16736}
16737if(!that.resizing){
16738that._addClass("ui-resizable-autohide");
16739that._handles.hide();
16740}
16741});
16742}
16743this._mouseInit();
16744},
16745_destroy:function(){
16746this._mouseDestroy();
16747this._addedHandles.remove();
16748var wrapper,
16749_destroy=function(exp){
16750$(exp)
16751.removeData("resizable")
16752.removeData("ui-resizable")
16753.off(".resizable");
16754};
16755if(this.elementIsWrapper){
16756_destroy(this.element);
16757wrapper=this.element;
16758this.originalElement.css({
16759position:wrapper.css("position"),
16760width:wrapper.outerWidth(),
16761height:wrapper.outerHeight(),
16762top:wrapper.css("top"),
16763left:wrapper.css("left")
16764}).insertAfter(wrapper);
16765wrapper.remove();
16766}
16767this.originalElement.css("resize",this.originalResizeStyle);
16768_destroy(this.originalElement);
16769return this;
16770},
16771_setOption:function(key,value){
16772this._super(key,value);
16773switch(key){
16774case"handles":
16775this._removeHandles();
16776this._setupHandles();
16777break;
16778case"aspectRatio":
16779this._aspectRatio=!!value;
16780break;
16781default:
16782break;
16783}
16784},
16785_setupHandles:function(){
16786var o=this.options,handle,i,n,hname,axis,that=this;
16787this.handles=o.handles||
16788(!$(".ui-resizable-handle",this.element).length?
16789"e,s,se":{
16790n:".ui-resizable-n",
16791e:".ui-resizable-e",
16792s:".ui-resizable-s",
16793w:".ui-resizable-w",
16794se:".ui-resizable-se",
16795sw:".ui-resizable-sw",
16796ne:".ui-resizable-ne",
16797nw:".ui-resizable-nw"
16798});
16799this._handles=$();
16800this._addedHandles=$();
16801if(this.handles.constructor===String){
16802if(this.handles==="all"){
16803this.handles="n,e,s,w,se,sw,ne,nw";
16804}
16805n=this.handles.split(",");
16806this.handles={};
16807for(i=0;i<n.length;i++){
16808handle=String.prototype.trim.call(n[i]);
16809hname="ui-resizable-"+handle;
16810axis=$("<div>");
16811this._addClass(axis,"ui-resizable-handle "+hname);
16812axis.css({zIndex:o.zIndex});
16813this.handles[handle]=".ui-resizable-"+handle;
16814if(!this.element.children(this.handles[handle]).length){
16815this.element.append(axis);
16816this._addedHandles=this._addedHandles.add(axis);
16817}
16818}
16819}
16820this._renderAxis=function(target){
16821var i,axis,padPos,padWrapper;
16822target=target||this.element;
16823for(i in this.handles){
16824if(this.handles[i].constructor===String){
16825this.handles[i]=this.element.children(this.handles[i]).first().show();
16826}else if(this.handles[i].jquery||this.handles[i].nodeType){
16827this.handles[i]=$(this.handles[i]);
16828this._on(this.handles[i],{"mousedown":that._mouseDown});
16829}
16830if(this.elementIsWrapper&&
16831this.originalElement[0]
16832.nodeName
16833.match(/^(textarea|input|select|button)$/i)){
16834axis=$(this.handles[i],this.element);
16835padWrapper=/sw|ne|nw|se|n|s/.test(i)?
16836axis.outerHeight():
16837axis.outerWidth();
16838padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");
16839target.css(padPos,padWrapper);
16840this._proportionallyResize();
16841}
16842this._handles=this._handles.add(this.handles[i]);
16843}
16844};
16845this._renderAxis(this.element);
16846this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));
16847this._handles.disableSelection();
16848this._handles.on("mouseover",function(){
16849if(!that.resizing){
16850if(this.className){
16851axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
16852}
16853that.axis=axis&&axis[1]?axis[1]:"se";
16854}
16855});
16856if(o.autoHide){
16857this._handles.hide();
16858this._addClass("ui-resizable-autohide");
16859}
16860},
16861_removeHandles:function(){
16862this._addedHandles.remove();
16863},
16864_mouseCapture:function(event){
16865var i,handle,
16866capture=false;
16867for(i in this.handles){
16868handle=$(this.handles[i])[0];
16869if(handle===event.target||$.contains(handle,event.target)){
16870capture=true;
16871}
16872}
16873return!this.options.disabled&&capture;
16874},
16875_mouseStart:function(event){
16876var curleft,curtop,cursor,calculatedSize,
16877o=this.options,
16878el=this.element;
16879this.resizing=true;
16880this._renderProxy();
16881curleft=this._num(this.helper.css("left"));
16882curtop=this._num(this.helper.css("top"));
16883if(o.containment){
16884curleft+=$(o.containment).scrollLeft()||0;
16885curtop+=$(o.containment).scrollTop()||0;
16886}
16887this.offset=this.helper.offset();
16888this.position={left:curleft,top:curtop};
16889if(!this._helper){
16890calculatedSize=this._calculateAdjustedElementDimensions(el);
16891}
16892this.size=this._helper?{
16893width:this.helper.width(),
16894height:this.helper.height()
16895}:{
16896width:calculatedSize.width,
16897height:calculatedSize.height
16898};
16899this.originalSize=this._helper?{
16900width:el.outerWidth(),
16901height:el.outerHeight()
16902}:{
16903width:calculatedSize.width,
16904height:calculatedSize.height
16905};
16906this.sizeDiff={
16907width:el.outerWidth()-el.width(),
16908height:el.outerHeight()-el.height()
16909};
16910this.originalPosition={left:curleft,top:curtop};
16911this.originalMousePosition={left:event.pageX,top:event.pageY};
16912this.aspectRatio=(typeof o.aspectRatio==="number")?
16913o.aspectRatio:
16914((this.originalSize.width/this.originalSize.height)||1);
16915cursor=$(".ui-resizable-"+this.axis).css("cursor");
16916$("body").css("cursor",cursor==="auto"?this.axis+"-resize":cursor);
16917this._addClass("ui-resizable-resizing");
16918this._propagate("start",event);
16919return true;
16920},
16921_mouseDrag:function(event){
16922var data,props,
16923smp=this.originalMousePosition,
16924a=this.axis,
16925dx=(event.pageX-smp.left)||0,
16926dy=(event.pageY-smp.top)||0,
16927trigger=this._change[a];
16928this._updatePrevProperties();
16929if(!trigger){
16930return false;
16931}
16932data=trigger.apply(this,[event,dx,dy]);
16933this._updateVirtualBoundaries(event.shiftKey);
16934if(this._aspectRatio||event.shiftKey){
16935data=this._updateRatio(data,event);
16936}
16937data=this._respectSize(data,event);
16938this._updateCache(data);
16939this._propagate("resize",event);
16940props=this._applyChanges();
16941if(!this._helper&&this._proportionallyResizeElements.length){
16942this._proportionallyResize();
16943}
16944if(!$.isEmptyObject(props)){
16945this._updatePrevProperties();
16946this._trigger("resize",event,this.ui());
16947this._applyChanges();
16948}
16949return false;
16950},
16951_mouseStop:function(event){
16952this.resizing=false;
16953var pr,ista,soffseth,soffsetw,s,left,top,
16954o=this.options,that=this;
16955if(this._helper){
16956pr=this._proportionallyResizeElements;
16957ista=pr.length&&(/textarea/i).test(pr[0].nodeName);
16958soffseth=ista&&this._hasScroll(pr[0],"left")?0:that.sizeDiff.height;
16959soffsetw=ista?0:that.sizeDiff.width;
16960s={
16961width:(that.helper.width()-soffsetw),
16962height:(that.helper.height()-soffseth)
16963};
16964left=(parseFloat(that.element.css("left"))+
16965(that.position.left-that.originalPosition.left))||null;
16966top=(parseFloat(that.element.css("top"))+
16967(that.position.top-that.originalPosition.top))||null;
16968if(!o.animate){
16969this.element.css($.extend(s,{top:top,left:left}));
16970}
16971that.helper.height(that.size.height);
16972that.helper.width(that.size.width);
16973if(this._helper&&!o.animate){
16974this._proportionallyResize();
16975}
16976}
16977$("body").css("cursor","auto");
16978this._removeClass("ui-resizable-resizing");
16979this._propagate("stop",event);
16980if(this._helper){
16981this.helper.remove();
16982}
16983return false;
16984},
16985_updatePrevProperties:function(){
16986this.prevPosition={
16987top:this.position.top,
16988left:this.position.left
16989};
16990this.prevSize={
16991width:this.size.width,
16992height:this.size.height
16993};
16994},
16995_applyChanges:function(){
16996var props={};
16997if(this.position.top!==this.prevPosition.top){
16998props.top=this.position.top+"px";
16999}
17000if(this.position.left!==this.prevPosition.left){
17001props.left=this.position.left+"px";
17002}
17003this.helper.css(props);
17004if(this.size.width!==this.prevSize.width){
17005props.width=this.size.width+"px";
17006this.helper.width(props.width);
17007}
17008if(this.size.height!==this.prevSize.height){
17009props.height=this.size.height+"px";
17010this.helper.height(props.height);
17011}
17012return props;
17013},
17014_updateVirtualBoundaries:function(forceAspectRatio){
17015var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,
17016o=this.options;
17017b={
17018minWidth:this._isNumber(o.minWidth)?o.minWidth:0,
17019maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:Infinity,
17020minHeight:this._isNumber(o.minHeight)?o.minHeight:0,
17021maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:Infinity
17022};
17023if(this._aspectRatio||forceAspectRatio){
17024pMinWidth=b.minHeight*this.aspectRatio;
17025pMinHeight=b.minWidth/this.aspectRatio;
17026pMaxWidth=b.maxHeight*this.aspectRatio;
17027pMaxHeight=b.maxWidth/this.aspectRatio;
17028if(pMinWidth>b.minWidth){
17029b.minWidth=pMinWidth;
17030}
17031if(pMinHeight>b.minHeight){
17032b.minHeight=pMinHeight;
17033}
17034if(pMaxWidth<b.maxWidth){
17035b.maxWidth=pMaxWidth;
17036}
17037if(pMaxHeight<b.maxHeight){
17038b.maxHeight=pMaxHeight;
17039}
17040}
17041this._vBoundaries=b;
17042},
17043_updateCache:function(data){
17044this.offset=this.helper.offset();
17045if(this._isNumber(data.left)){
17046this.position.left=data.left;
17047}
17048if(this._isNumber(data.top)){
17049this.position.top=data.top;
17050}
17051if(this._isNumber(data.height)){
17052this.size.height=data.height;
17053}
17054if(this._isNumber(data.width)){
17055this.size.width=data.width;
17056}
17057},
17058_updateRatio:function(data){
17059var cpos=this.position,
17060csize=this.size,
17061a=this.axis;
17062if(this._isNumber(data.height)){
17063data.width=(data.height*this.aspectRatio);
17064}else if(this._isNumber(data.width)){
17065data.height=(data.width/this.aspectRatio);
17066}
17067if(a==="sw"){
17068data.left=cpos.left+(csize.width-data.width);
17069data.top=null;
17070}
17071if(a==="nw"){
17072data.top=cpos.top+(csize.height-data.height);
17073data.left=cpos.left+(csize.width-data.width);
17074}
17075return data;
17076},
17077_respectSize:function(data){
17078var o=this._vBoundaries,
17079a=this.axis,
17080ismaxw=this._isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),
17081ismaxh=this._isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),
17082isminw=this._isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),
17083isminh=this._isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height),
17084dw=this.originalPosition.left+this.originalSize.width,
17085dh=this.originalPosition.top+this.originalSize.height,
17086cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);
17087if(isminw){
17088data.width=o.minWidth;
17089}
17090if(isminh){
17091data.height=o.minHeight;
17092}
17093if(ismaxw){
17094data.width=o.maxWidth;
17095}
17096if(ismaxh){
17097data.height=o.maxHeight;
17098}
17099if(isminw&&cw){
17100data.left=dw-o.minWidth;
17101}
17102if(ismaxw&&cw){
17103data.left=dw-o.maxWidth;
17104}
17105if(isminh&&ch){
17106data.top=dh-o.minHeight;
17107}
17108if(ismaxh&&ch){
17109data.top=dh-o.maxHeight;
17110}
17111if(!data.width&&!data.height&&!data.left&&data.top){
17112data.top=null;
17113}else if(!data.width&&!data.height&&!data.top&&data.left){
17114data.left=null;
17115}
17116return data;
17117},
17118_getPaddingPlusBorderDimensions:function(element){
17119var i=0,
17120widths=[],
17121borders=[
17122element.css("borderTopWidth"),
17123element.css("borderRightWidth"),
17124element.css("borderBottomWidth"),
17125element.css("borderLeftWidth")
17126],
17127paddings=[
17128element.css("paddingTop"),
17129element.css("paddingRight"),
17130element.css("paddingBottom"),
17131element.css("paddingLeft")
17132];
17133for(;i<4;i++){
17134widths[i]=(parseFloat(borders[i])||0);
17135widths[i]+=(parseFloat(paddings[i])||0);
17136}
17137return{
17138height:widths[0]+widths[2],
17139width:widths[1]+widths[3]
17140};
17141},
17142_calculateAdjustedElementDimensions:function(element){
17143var elWidth,elHeight,paddingBorder,
17144ce=element.get(0);
17145if(element.css("box-sizing")!=="content-box"||
17146(!this._hasScroll(ce)&&!this._hasScroll(ce,"left"))){
17147return{
17148height:parseFloat(element.css("height")),
17149width:parseFloat(element.css("width"))
17150};
17151}
17152elWidth=parseFloat(ce.style.width);
17153elHeight=parseFloat(ce.style.height);
17154paddingBorder=this._getPaddingPlusBorderDimensions(element);
17155elWidth=isNaN(elWidth)?
17156this._getElementTheoreticalSize(element,paddingBorder,"width"):
17157elWidth;
17158elHeight=isNaN(elHeight)?
17159this._getElementTheoreticalSize(element,paddingBorder,"height"):
17160elHeight;
17161return{
17162height:elHeight,
17163width:elWidth
17164};
17165},
17166_getElementTheoreticalSize:function(element,extraSize,dimension){
17167var size=Math.max(0,Math.ceil(
17168element.get(0)["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
17169extraSize[dimension]-
171700.5
17171))||0;
17172return size;
17173},
17174_proportionallyResize:function(){
17175if(!this._proportionallyResizeElements.length){
17176return;
17177}
17178var prel,
17179i=0,
17180element=this.helper||this.element;
17181for(;i<this._proportionallyResizeElements.length;i++){
17182prel=this._proportionallyResizeElements[i];
17183if(!this.outerDimensions){
17184this.outerDimensions=this._getPaddingPlusBorderDimensions(prel);
17185}
17186prel.css({
17187height:(element.height()-this.outerDimensions.height)||0,
17188width:(element.width()-this.outerDimensions.width)||0
17189});
17190}
17191},
17192_renderProxy:function(){
17193var el=this.element,o=this.options;
17194this.elementOffset=el.offset();
17195if(this._helper){
17196this.helper=this.helper||$("<div></div>").css({overflow:"hidden"});
17197this._addClass(this.helper,this._helper);
17198this.helper.css({
17199width:this.element.outerWidth(),
17200height:this.element.outerHeight(),
17201position:"absolute",
17202left:this.elementOffset.left+"px",
17203top:this.elementOffset.top+"px",
17204zIndex:++o.zIndex
17205});
17206this.helper
17207.appendTo("body")
17208.disableSelection();
17209}else{
17210this.helper=this.element;
17211}
17212},
17213_change:{
17214e:function(event,dx){
17215return{width:this.originalSize.width+dx};
17216},
17217w:function(event,dx){
17218var cs=this.originalSize,sp=this.originalPosition;
17219return{left:sp.left+dx,width:cs.width-dx};
17220},
17221n:function(event,dx,dy){
17222var cs=this.originalSize,sp=this.originalPosition;
17223return{top:sp.top+dy,height:cs.height-dy};
17224},
17225s:function(event,dx,dy){
17226return{height:this.originalSize.height+dy};
17227},
17228se:function(event,dx,dy){
17229return $.extend(this._change.s.apply(this,arguments),
17230this._change.e.apply(this,[event,dx,dy]));
17231},
17232sw:function(event,dx,dy){
17233return $.extend(this._change.s.apply(this,arguments),
17234this._change.w.apply(this,[event,dx,dy]));
17235},
17236ne:function(event,dx,dy){
17237return $.extend(this._change.n.apply(this,arguments),
17238this._change.e.apply(this,[event,dx,dy]));
17239},
17240nw:function(event,dx,dy){
17241return $.extend(this._change.n.apply(this,arguments),
17242this._change.w.apply(this,[event,dx,dy]));
17243}
17244},
17245_propagate:function(n,event){
17246$.ui.plugin.call(this,n,[event,this.ui()]);
17247if(n!=="resize"){
17248this._trigger(n,event,this.ui());
17249}
17250},
17251plugins:{},
17252ui:function(){
17253return{
17254originalElement:this.originalElement,
17255element:this.element,
17256helper:this.helper,
17257position:this.position,
17258size:this.size,
17259originalSize:this.originalSize,
17260originalPosition:this.originalPosition
17261};
17262}
17263});
17264$.ui.plugin.add("resizable","animate",{
17265stop:function(event){
17266var that=$(this).resizable("instance"),
17267o=that.options,
17268pr=that._proportionallyResizeElements,
17269ista=pr.length&&(/textarea/i).test(pr[0].nodeName),
17270soffseth=ista&&that._hasScroll(pr[0],"left")?0:that.sizeDiff.height,
17271soffsetw=ista?0:that.sizeDiff.width,
17272style={
17273width:(that.size.width-soffsetw),
17274height:(that.size.height-soffseth)
17275},
17276left=(parseFloat(that.element.css("left"))+
17277(that.position.left-that.originalPosition.left))||null,
17278top=(parseFloat(that.element.css("top"))+
17279(that.position.top-that.originalPosition.top))||null;
17280that.element.animate(
17281$.extend(style,top&&left?{top:top,left:left}:{}),{
17282duration:o.animateDuration,
17283easing:o.animateEasing,
17284step:function(){
17285var data={
17286width:parseFloat(that.element.css("width")),
17287height:parseFloat(that.element.css("height")),
17288top:parseFloat(that.element.css("top")),
17289left:parseFloat(that.element.css("left"))
17290};
17291if(pr&&pr.length){
17292$(pr[0]).css({width:data.width,height:data.height});
17293}
17294that._updateCache(data);
17295that._propagate("resize",event);
17296}
17297}
17298);
17299}
17300});
17301$.ui.plugin.add("resizable","containment",{
17302start:function(){
17303var element,p,co,ch,cw,width,height,
17304that=$(this).resizable("instance"),
17305o=that.options,
17306el=that.element,
17307oc=o.containment,
17308ce=(oc instanceof $)?
17309oc.get(0):
17310(/parent/.test(oc))?el.parent().get(0):oc;
17311if(!ce){
17312return;
17313}
17314that.containerElement=$(ce);
17315if(/document/.test(oc)||oc===document){
17316that.containerOffset={
17317left:0,
17318top:0
17319};
17320that.containerPosition={
17321left:0,
17322top:0
17323};
17324that.parentData={
17325element:$(document),
17326left:0,
17327top:0,
17328width:$(document).width(),
17329height:$(document).height()||document.body.parentNode.scrollHeight
17330};
17331}else{
17332element=$(ce);
17333p=[];
17334$(["Top","Right","Left","Bottom"]).each(function(i,name){
17335p[i]=that._num(element.css("padding"+name));
17336});
17337that.containerOffset=element.offset();
17338that.containerPosition=element.position();
17339that.containerSize={
17340height:(element.innerHeight()-p[3]),
17341width:(element.innerWidth()-p[1])
17342};
17343co=that.containerOffset;
17344ch=that.containerSize.height;
17345cw=that.containerSize.width;
17346width=(that._hasScroll(ce,"left")?ce.scrollWidth:cw);
17347height=(that._hasScroll(ce)?ce.scrollHeight:ch);
17348that.parentData={
17349element:ce,
17350left:co.left,
17351top:co.top,
17352width:width,
17353height:height
17354};
17355}
17356},
17357resize:function(event){
17358var woset,hoset,isParent,isOffsetRelative,
17359that=$(this).resizable("instance"),
17360o=that.options,
17361co=that.containerOffset,
17362cp=that.position,
17363pRatio=that._aspectRatio||event.shiftKey,
17364cop={
17365top:0,
17366left:0
17367},
17368ce=that.containerElement,
17369continueResize=true;
17370if(ce[0]!==document&&(/static/).test(ce.css("position"))){
17371cop=co;
17372}
17373if(cp.left<(that._helper?co.left:0)){
17374that.size.width=that.size.width+
17375(that._helper?
17376(that.position.left-co.left):
17377(that.position.left-cop.left));
17378if(pRatio){
17379that.size.height=that.size.width/that.aspectRatio;
17380continueResize=false;
17381}
17382that.position.left=o.helper?co.left:0;
17383}
17384if(cp.top<(that._helper?co.top:0)){
17385that.size.height=that.size.height+
17386(that._helper?
17387(that.position.top-co.top):
17388that.position.top);
17389if(pRatio){
17390that.size.width=that.size.height*that.aspectRatio;
17391continueResize=false;
17392}
17393that.position.top=that._helper?co.top:0;
17394}
17395isParent=that.containerElement.get(0)===that.element.parent().get(0);
17396isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));
17397if(isParent&&isOffsetRelative){
17398that.offset.left=that.parentData.left+that.position.left;
17399that.offset.top=that.parentData.top+that.position.top;
17400}else{
17401that.offset.left=that.element.offset().left;
17402that.offset.top=that.element.offset().top;
17403}
17404woset=Math.abs(that.sizeDiff.width+
17405(that._helper?
17406that.offset.left-cop.left:
17407(that.offset.left-co.left)));
17408hoset=Math.abs(that.sizeDiff.height+
17409(that._helper?
17410that.offset.top-cop.top:
17411(that.offset.top-co.top)));
17412if(woset+that.size.width>=that.parentData.width){
17413that.size.width=that.parentData.width-woset;
17414if(pRatio){
17415that.size.height=that.size.width/that.aspectRatio;
17416continueResize=false;
17417}
17418}
17419if(hoset+that.size.height>=that.parentData.height){
17420that.size.height=that.parentData.height-hoset;
17421if(pRatio){
17422that.size.width=that.size.height*that.aspectRatio;
17423continueResize=false;
17424}
17425}
17426if(!continueResize){
17427that.position.left=that.prevPosition.left;
17428that.position.top=that.prevPosition.top;
17429that.size.width=that.prevSize.width;
17430that.size.height=that.prevSize.height;
17431}
17432},
17433stop:function(){
17434var that=$(this).resizable("instance"),
17435o=that.options,
17436co=that.containerOffset,
17437cop=that.containerPosition,
17438ce=that.containerElement,
17439helper=$(that.helper),
17440ho=helper.offset(),
17441w=helper.outerWidth()-that.sizeDiff.width,
17442h=helper.outerHeight()-that.sizeDiff.height;
17443if(that._helper&&!o.animate&&(/relative/).test(ce.css("position"))){
17444$(this).css({
17445left:ho.left-cop.left-co.left,
17446width:w,
17447height:h
17448});
17449}
17450if(that._helper&&!o.animate&&(/static/).test(ce.css("position"))){
17451$(this).css({
17452left:ho.left-cop.left-co.left,
17453width:w,
17454height:h
17455});
17456}
17457}
17458});
17459$.ui.plugin.add("resizable","alsoResize",{
17460start:function(){
17461var that=$(this).resizable("instance"),
17462o=that.options;
17463$(o.alsoResize).each(function(){
17464var el=$(this),
17465elSize=that._calculateAdjustedElementDimensions(el);
17466el.data("ui-resizable-alsoresize",{
17467width:elSize.width,height:elSize.height,
17468left:parseFloat(el.css("left")),top:parseFloat(el.css("top"))
17469});
17470});
17471},
17472resize:function(event,ui){
17473var that=$(this).resizable("instance"),
17474o=that.options,
17475os=that.originalSize,
17476op=that.originalPosition,
17477delta={
17478height:(that.size.height-os.height)||0,
17479width:(that.size.width-os.width)||0,
17480top:(that.position.top-op.top)||0,
17481left:(that.position.left-op.left)||0
17482};
17483$(o.alsoResize).each(function(){
17484var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},
17485css=el.parents(ui.originalElement[0]).length?
17486["width","height"]:
17487["width","height","top","left"];
17488$.each(css,function(i,prop){
17489var sum=(start[prop]||0)+(delta[prop]||0);
17490if(sum&&sum>=0){
17491style[prop]=sum||null;
17492}
17493});
17494el.css(style);
17495});
17496},
17497stop:function(){
17498$(this).removeData("ui-resizable-alsoresize");
17499}
17500});
17501$.ui.plugin.add("resizable","ghost",{
17502start:function(){
17503var that=$(this).resizable("instance"),cs=that.size;
17504that.ghost=that.originalElement.clone();
17505that.ghost.css({
17506opacity:0.25,
17507display:"block",
17508position:"relative",
17509height:cs.height,
17510width:cs.width,
17511margin:0,
17512left:0,
17513top:0
17514});
17515that._addClass(that.ghost,"ui-resizable-ghost");
17516if($.uiBackCompat===true&&typeof that.options.ghost==="string"){
17517that.ghost.addClass(this.options.ghost);
17518}
17519that.ghost.appendTo(that.helper);
17520},
17521resize:function(){
17522var that=$(this).resizable("instance");
17523if(that.ghost){
17524that.ghost.css({
17525position:"relative",
17526height:that.size.height,
17527width:that.size.width
17528});
17529}
17530},
17531stop:function(){
17532var that=$(this).resizable("instance");
17533if(that.ghost&&that.helper){
17534that.helper.get(0).removeChild(that.ghost.get(0));
17535}
17536}
17537});
17538$.ui.plugin.add("resizable","grid",{
17539resize:function(){
17540var outerDimensions,
17541that=$(this).resizable("instance"),
17542o=that.options,
17543cs=that.size,
17544os=that.originalSize,
17545op=that.originalPosition,
17546a=that.axis,
17547grid=typeof o.grid==="number"?[o.grid,o.grid]:o.grid,
17548gridX=(grid[0]||1),
17549gridY=(grid[1]||1),
17550ox=Math.round((cs.width-os.width)/gridX)*gridX,
17551oy=Math.round((cs.height-os.height)/gridY)*gridY,
17552newWidth=os.width+ox,
17553newHeight=os.height+oy,
17554isMaxWidth=o.maxWidth&&(o.maxWidth<newWidth),
17555isMaxHeight=o.maxHeight&&(o.maxHeight<newHeight),
17556isMinWidth=o.minWidth&&(o.minWidth>newWidth),
17557isMinHeight=o.minHeight&&(o.minHeight>newHeight);
17558o.grid=grid;
17559if(isMinWidth){
17560newWidth+=gridX;
17561}
17562if(isMinHeight){
17563newHeight+=gridY;
17564}
17565if(isMaxWidth){
17566newWidth-=gridX;
17567}
17568if(isMaxHeight){
17569newHeight-=gridY;
17570}
17571if(/^(se|s|e)$/.test(a)){
17572that.size.width=newWidth;
17573that.size.height=newHeight;
17574}else if(/^(ne)$/.test(a)){
17575that.size.width=newWidth;
17576that.size.height=newHeight;
17577that.position.top=op.top-oy;
17578}else if(/^(sw)$/.test(a)){
17579that.size.width=newWidth;
17580that.size.height=newHeight;
17581that.position.left=op.left-ox;
17582}else{
17583if(newHeight-gridY<=0||newWidth-gridX<=0){
17584outerDimensions=that._getPaddingPlusBorderDimensions(this);
17585}
17586if(newHeight-gridY>0){
17587that.size.height=newHeight;
17588that.position.top=op.top-oy;
17589}else{
17590newHeight=gridY-outerDimensions.height;
17591that.size.height=newHeight;
17592that.position.top=op.top+os.height-newHeight;
17593}
17594if(newWidth-gridX>0){
17595that.size.width=newWidth;
17596that.position.left=op.left-ox;
17597}else{
17598newWidth=gridX-outerDimensions.width;
17599that.size.width=newWidth;
17600that.position.left=op.left+os.width-newWidth;
17601}
17602}
17603}
17604});
17605var widgetsResizable=$.ui.resizable;
17606$.widget("ui.dialog",{
17607version:"1.14.1",
17608options:{
17609appendTo:"body",
17610autoOpen:true,
17611buttons:[],
17612classes:{
17613"ui-dialog":"ui-corner-all",
17614"ui-dialog-titlebar":"ui-corner-all"
17615},
17616closeOnEscape:true,
17617closeText:"Close",
17618draggable:true,
17619hide:null,
17620height:"auto",
17621maxHeight:null,
17622maxWidth:null,
17623minHeight:150,
17624minWidth:150,
17625modal:false,
17626position:{
17627my:"center",
17628at:"center",
17629of:window,
17630collision:"fit",
17631using:function(pos){
17632var topOffset=$(this).css(pos).offset().top;
17633if(topOffset<0){
17634$(this).css("top",pos.top-topOffset);
17635}
17636}
17637},
17638resizable:true,
17639show:null,
17640title:null,
17641uiDialogTitleHeadingLevel:0,
17642width:300,
17643beforeClose:null,
17644close:null,
17645drag:null,
17646dragStart:null,
17647dragStop:null,
17648focus:null,
17649open:null,
17650resize:null,
17651resizeStart:null,
17652resizeStop:null
17653},
17654sizeRelatedOptions:{
17655buttons:true,
17656height:true,
17657maxHeight:true,
17658maxWidth:true,
17659minHeight:true,
17660minWidth:true,
17661width:true
17662},
17663resizableRelatedOptions:{
17664maxHeight:true,
17665maxWidth:true,
17666minHeight:true,
17667minWidth:true
17668},
17669_create:function(){
17670this.originalCss={
17671display:this.element[0].style.display,
17672width:this.element[0].style.width,
17673minHeight:this.element[0].style.minHeight,
17674maxHeight:this.element[0].style.maxHeight,
17675height:this.element[0].style.height
17676};
17677this.originalPosition={
17678parent:this.element.parent(),
17679index:this.element.parent().children().index(this.element)
17680};
17681this.originalTitle=this.element.attr("title");
17682if(this.options.title==null&&this.originalTitle!=null){
17683this.options.title=this.originalTitle;
17684}
17685if(this.options.disabled){
17686this.options.disabled=false;
17687}
17688this._createWrapper();
17689this.element
17690.show()
17691.removeAttr("title")
17692.appendTo(this.uiDialog);
17693this._addClass("ui-dialog-content","ui-widget-content");
17694this._createTitlebar();
17695this._createButtonPane();
17696if(this.options.draggable&&$.fn.draggable){
17697this._makeDraggable();
17698}
17699if(this.options.resizable&&$.fn.resizable){
17700this._makeResizable();
17701}
17702this._isOpen=false;
17703this._trackFocus();
17704},
17705_init:function(){
17706if(this.options.autoOpen){
17707this.open();
17708}
17709},
17710_appendTo:function(){
17711var element=this.options.appendTo;
17712if(element&&(element.jquery||element.nodeType)){
17713return $(element);
17714}
17715return this.document.find(element||"body").eq(0);
17716},
17717_destroy:function(){
17718var next,
17719originalPosition=this.originalPosition;
17720this._untrackInstance();
17721this._destroyOverlay();
17722this.element
17723.removeUniqueId()
17724.css(this.originalCss)
17725.detach();
17726this.uiDialog.remove();
17727if(this.originalTitle){
17728this.element.attr("title",this.originalTitle);
17729}
17730next=originalPosition.parent.children().eq(originalPosition.index);
17731if(next.length&&next[0]!==this.element[0]){
17732next.before(this.element);
17733}else{
17734originalPosition.parent.append(this.element);
17735}
17736},
17737widget:function(){
17738return this.uiDialog;
17739},
17740disable:$.noop,
17741enable:$.noop,
17742close:function(event){
17743var that=this;
17744if(!this._isOpen||this._trigger("beforeClose",event)===false){
17745return;
17746}
17747this._isOpen=false;
17748this._focusedElement=null;
17749this._destroyOverlay();
17750this._untrackInstance();
17751if(!this.opener.filter(":focusable").trigger("focus").length){
17752$(this.document[0].activeElement).trigger("blur");
17753}
17754this._hide(this.uiDialog,this.options.hide,function(){
17755that._trigger("close",event);
17756});
17757},
17758isOpen:function(){
17759return this._isOpen;
17760},
17761moveToTop:function(){
17762this._moveToTop();
17763},
17764_moveToTop:function(event,silent){
17765var moved=false,
17766zIndices=this.uiDialog.siblings(".ui-front:visible").map(function(){
17767return+$(this).css("z-index");
17768}).get(),
17769zIndexMax=Math.max.apply(null,zIndices);
17770if(zIndexMax>=+this.uiDialog.css("z-index")){
17771this.uiDialog.css("z-index",zIndexMax+1);
17772moved=true;
17773}
17774if(moved&&!silent){
17775this._trigger("focus",event);
17776}
17777return moved;
17778},
17779open:function(){
17780var that=this;
17781if(this._isOpen){
17782if(this._moveToTop()){
17783this._focusTabbable();
17784}
17785return;
17786}
17787this._isOpen=true;
17788this.opener=$(this.document[0].activeElement);
17789this._size();
17790this._position();
17791this._createOverlay();
17792this._moveToTop(null,true);
17793if(this.overlay){
17794this.overlay.css("z-index",this.uiDialog.css("z-index")-1);
17795}
17796this._show(this.uiDialog,this.options.show,function(){
17797that._focusTabbable();
17798that._trigger("focus");
17799});
17800this._makeFocusTarget();
17801this._trigger("open");
17802},
17803_focusTabbable:function(){
17804var hasFocus=this._focusedElement;
17805if(!hasFocus){
17806hasFocus=this.element.find("[autofocus]");
17807}
17808if(!hasFocus.length){
17809hasFocus=this.element.find(":tabbable");
17810}
17811if(!hasFocus.length){
17812hasFocus=this.uiDialogButtonPane.find(":tabbable");
17813}
17814if(!hasFocus.length){
17815hasFocus=this.uiDialogTitlebarClose.filter(":tabbable");
17816}
17817if(!hasFocus.length){
17818hasFocus=this.uiDialog;
17819}
17820hasFocus.eq(0).trigger("focus");
17821},
17822_restoreTabbableFocus:function(){
17823var activeElement=this.document[0].activeElement,
17824isActive=this.uiDialog[0]===activeElement||
17825$.contains(this.uiDialog[0],activeElement);
17826if(!isActive){
17827this._focusTabbable();
17828}
17829},
17830_keepFocus:function(event){
17831event.preventDefault();
17832this._restoreTabbableFocus();
17833},
17834_createWrapper:function(){
17835this.uiDialog=$("<div>")
17836.hide()
17837.attr({
17838tabIndex:-1,
17839role:"dialog",
17840"aria-modal":this.options.modal?"true":null
17841})
17842.appendTo(this._appendTo());
17843this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front");
17844this._on(this.uiDialog,{
17845keydown:function(event){
17846if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&
17847event.keyCode===$.ui.keyCode.ESCAPE){
17848event.preventDefault();
17849this.close(event);
17850return;
17851}
17852if(event.keyCode!==$.ui.keyCode.TAB||event.isDefaultPrevented()){
17853return;
17854}
17855var tabbables=this.uiDialog.find(":tabbable"),
17856first=tabbables.first(),
17857last=tabbables.last();
17858if((event.target===last[0]||event.target===this.uiDialog[0])&&
17859!event.shiftKey){
17860this._delay(function(){
17861first.trigger("focus");
17862});
17863event.preventDefault();
17864}else if((event.target===first[0]||
17865event.target===this.uiDialog[0])&&event.shiftKey){
17866this._delay(function(){
17867last.trigger("focus");
17868});
17869event.preventDefault();
17870}
17871},
17872mousedown:function(event){
17873if(this._moveToTop(event)){
17874this._focusTabbable();
17875}
17876}
17877});
17878if(!this.element.find("[aria-describedby]").length){
17879this.uiDialog.attr({
17880"aria-describedby":this.element.uniqueId().attr("id")
17881});
17882}
17883},
17884_createTitlebar:function(){
17885var uiDialogTitle;
17886this.uiDialogTitlebar=$("<div>");
17887this._addClass(this.uiDialogTitlebar,
17888"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix");
17889this._on(this.uiDialogTitlebar,{
17890mousedown:function(event){
17891if(!$(event.target).closest(".ui-dialog-titlebar-close")){
17892this.uiDialog.trigger("focus");
17893}
17894}
17895});
17896this.uiDialogTitlebarClose=$("<button type='button'></button>")
17897.button({
17898label:$("<a>").text(this.options.closeText).html(),
17899icon:"ui-icon-closethick",
17900showLabel:false
17901})
17902.appendTo(this.uiDialogTitlebar);
17903this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close");
17904this._on(this.uiDialogTitlebarClose,{
17905click:function(event){
17906event.preventDefault();
17907this.close(event);
17908}
17909});
17910var uiDialogHeadingLevel=Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&
17911this.options.uiDialogTitleHeadingLevel>0&&
17912this.options.uiDialogTitleHeadingLevel<=6?
17913"h"+this.options.uiDialogTitleHeadingLevel:"span";
17914uiDialogTitle=$("<"+uiDialogHeadingLevel+">")
17915.uniqueId().prependTo(this.uiDialogTitlebar);
17916this._addClass(uiDialogTitle,"ui-dialog-title");
17917this._title(uiDialogTitle);
17918this.uiDialogTitlebar.prependTo(this.uiDialog);
17919this.uiDialog.attr({
17920"aria-labelledby":uiDialogTitle.attr("id")
17921});
17922},
17923_title:function(title){
17924if(this.options.title){
17925title.text(this.options.title);
17926}else{
17927title.html("&#160;");
17928}
17929},
17930_createButtonPane:function(){
17931this.uiDialogButtonPane=$("<div>");
17932this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane",
17933"ui-widget-content ui-helper-clearfix");
17934this.uiButtonSet=$("<div>")
17935.appendTo(this.uiDialogButtonPane);
17936this._addClass(this.uiButtonSet,"ui-dialog-buttonset");
17937this._createButtons();
17938},
17939_createButtons:function(){
17940var that=this,
17941buttons=this.options.buttons;
17942this.uiDialogButtonPane.remove();
17943this.uiButtonSet.empty();
17944if($.isEmptyObject(buttons)||(Array.isArray(buttons)&&!buttons.length)){
17945this._removeClass(this.uiDialog,"ui-dialog-buttons");
17946return;
17947}
17948$.each(buttons,function(name,props){
17949var click,buttonOptions;
17950props=typeof props==="function"?
17951{click:props,text:name}:
17952props;
17953props=$.extend({type:"button"},props);
17954click=props.click;
17955buttonOptions={
17956icon:props.icon,
17957iconPosition:props.iconPosition,
17958showLabel:props.showLabel,
17959icons:props.icons,
17960text:props.text
17961};
17962delete props.click;
17963delete props.icon;
17964delete props.iconPosition;
17965delete props.showLabel;
17966delete props.icons;
17967if(typeof props.text==="boolean"){
17968delete props.text;
17969}
17970$("<button></button>",props)
17971.button(buttonOptions)
17972.appendTo(that.uiButtonSet)
17973.on("click",function(){
17974click.apply(that.element[0],arguments);
17975});
17976});
17977this._addClass(this.uiDialog,"ui-dialog-buttons");
17978this.uiDialogButtonPane.appendTo(this.uiDialog);
17979},
17980_makeDraggable:function(){
17981var that=this,
17982options=this.options;
17983function filteredUi(ui){
17984return{
17985position:ui.position,
17986offset:ui.offset
17987};
17988}
17989this.uiDialog.draggable({
17990cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
17991handle:".ui-dialog-titlebar",
17992containment:"document",
17993start:function(event,ui){
17994that._addClass($(this),"ui-dialog-dragging");
17995that._blockFrames();
17996that._trigger("dragStart",event,filteredUi(ui));
17997},
17998drag:function(event,ui){
17999that._trigger("drag",event,filteredUi(ui));
18000},
18001stop:function(event,ui){
18002var left=ui.offset.left-that.document.scrollLeft(),
18003top=ui.offset.top-that.document.scrollTop();
18004options.position={
18005my:"left top",
18006at:"left"+(left>=0?"+":"")+left+" "+
18007"top"+(top>=0?"+":"")+top,
18008of:that.window
18009};
18010that._removeClass($(this),"ui-dialog-dragging");
18011that._unblockFrames();
18012that._trigger("dragStop",event,filteredUi(ui));
18013}
18014});
18015},
18016_makeResizable:function(){
18017var that=this,
18018options=this.options,
18019handles=options.resizable,
18020position=this.uiDialog.css("position"),
18021resizeHandles=typeof handles==="string"?
18022handles:
18023"n,e,s,w,se,sw,ne,nw";
18024function filteredUi(ui){
18025return{
18026originalPosition:ui.originalPosition,
18027originalSize:ui.originalSize,
18028position:ui.position,
18029size:ui.size
18030};
18031}
18032this.uiDialog.resizable({
18033cancel:".ui-dialog-content",
18034containment:"document",
18035alsoResize:this.element,
18036maxWidth:options.maxWidth,
18037maxHeight:options.maxHeight,
18038minWidth:options.minWidth,
18039minHeight:this._minHeight(),
18040handles:resizeHandles,
18041start:function(event,ui){
18042that._addClass($(this),"ui-dialog-resizing");
18043that._blockFrames();
18044that._trigger("resizeStart",event,filteredUi(ui));
18045},
18046resize:function(event,ui){
18047that._trigger("resize",event,filteredUi(ui));
18048},
18049stop:function(event,ui){
18050var offset=that.uiDialog.offset(),
18051left=offset.left-that.document.scrollLeft(),
18052top=offset.top-that.document.scrollTop();
18053options.height=that.uiDialog.height();
18054options.width=that.uiDialog.width();
18055options.position={
18056my:"left top",
18057at:"left"+(left>=0?"+":"")+left+" "+
18058"top"+(top>=0?"+":"")+top,
18059of:that.window
18060};
18061that._removeClass($(this),"ui-dialog-resizing");
18062that._unblockFrames();
18063that._trigger("resizeStop",event,filteredUi(ui));
18064}
18065})
18066.css("position",position);
18067},
18068_trackFocus:function(){
18069this._on(this.widget(),{
18070focusin:function(event){
18071this._makeFocusTarget();
18072this._focusedElement=$(event.target);
18073}
18074});
18075},
18076_makeFocusTarget:function(){
18077this._untrackInstance();
18078this._trackingInstances().unshift(this);
18079},
18080_untrackInstance:function(){
18081var instances=this._trackingInstances(),
18082exists=$.inArray(this,instances);
18083if(exists!==-1){
18084instances.splice(exists,1);
18085}
18086},
18087_trackingInstances:function(){
18088var instances=this.document.data("ui-dialog-instances");
18089if(!instances){
18090instances=[];
18091this.document.data("ui-dialog-instances",instances);
18092}
18093return instances;
18094},
18095_minHeight:function(){
18096var options=this.options;
18097return options.height==="auto"?
18098options.minHeight:
18099Math.min(options.minHeight,options.height);
18100},
18101_position:function(){
18102var isVisible=this.uiDialog.is(":visible");
18103if(!isVisible){
18104this.uiDialog.show();
18105}
18106this.uiDialog.position(this.options.position);
18107if(!isVisible){
18108this.uiDialog.hide();
18109}
18110},
18111_setOptions:function(options){
18112var that=this,
18113resize=false,
18114resizableOptions={};
18115$.each(options,function(key,value){
18116that._setOption(key,value);
18117if(key in that.sizeRelatedOptions){
18118resize=true;
18119}
18120if(key in that.resizableRelatedOptions){
18121resizableOptions[key]=value;
18122}
18123});
18124if(resize){
18125this._size();
18126this._position();
18127}
18128if(this.uiDialog.is(":data(ui-resizable)")){
18129this.uiDialog.resizable("option",resizableOptions);
18130}
18131},
18132_setOption:function(key,value){
18133var isDraggable,isResizable,
18134uiDialog=this.uiDialog;
18135if(key==="disabled"){
18136return;
18137}
18138this._super(key,value);
18139if(key==="appendTo"){
18140this.uiDialog.appendTo(this._appendTo());
18141}
18142if(key==="buttons"){
18143this._createButtons();
18144}
18145if(key==="closeText"){
18146this.uiDialogTitlebarClose.button({
18147label:$("<a>").text(""+this.options.closeText).html()
18148});
18149}
18150if(key==="draggable"){
18151isDraggable=uiDialog.is(":data(ui-draggable)");
18152if(isDraggable&&!value){
18153uiDialog.draggable("destroy");
18154}
18155if(!isDraggable&&value){
18156this._makeDraggable();
18157}
18158}
18159if(key==="position"){
18160this._position();
18161}
18162if(key==="resizable"){
18163isResizable=uiDialog.is(":data(ui-resizable)");
18164if(isResizable&&!value){
18165uiDialog.resizable("destroy");
18166}
18167if(isResizable&&typeof value==="string"){
18168uiDialog.resizable("option","handles",value);
18169}
18170if(!isResizable&&value!==false){
18171this._makeResizable();
18172}
18173}
18174if(key==="title"){
18175this._title(this.uiDialogTitlebar.find(".ui-dialog-title"));
18176}
18177if(key==="modal"){
18178uiDialog.attr("aria-modal",value?"true":null);
18179}
18180},
18181_size:function(){
18182var nonContentHeight,minContentHeight,maxContentHeight,
18183options=this.options;
18184this.element.show().css({
18185width:"auto",
18186minHeight:0,
18187maxHeight:"none",
18188height:0
18189});
18190if(options.minWidth>options.width){
18191options.width=options.minWidth;
18192}
18193nonContentHeight=this.uiDialog.css({
18194height:"auto",
18195width:options.width
18196})
18197.outerHeight();
18198minContentHeight=Math.max(0,options.minHeight-nonContentHeight);
18199maxContentHeight=typeof options.maxHeight==="number"?
18200Math.max(0,options.maxHeight-nonContentHeight):
18201"none";
18202if(options.height==="auto"){
18203this.element.css({
18204minHeight:minContentHeight,
18205maxHeight:maxContentHeight,
18206height:"auto"
18207});
18208}else{
18209this.element.height(Math.max(0,options.height-nonContentHeight));
18210}
18211if(this.uiDialog.is(":data(ui-resizable)")){
18212this.uiDialog.resizable("option","minHeight",this._minHeight());
18213}
18214},
18215_blockFrames:function(){
18216this.iframeBlocks=this.document.find("iframe").map(function(){
18217var iframe=$(this);
18218return $("<div>")
18219.css({
18220position:"absolute",
18221width:iframe.outerWidth(),
18222height:iframe.outerHeight()
18223})
18224.appendTo(iframe.parent())
18225.offset(iframe.offset())[0];
18226});
18227},
18228_unblockFrames:function(){
18229if(this.iframeBlocks){
18230this.iframeBlocks.remove();
18231delete this.iframeBlocks;
18232}
18233},
18234_allowInteraction:function(event){
18235if($(event.target).closest(".ui-dialog").length){
18236return true;
18237}
18238return!!$(event.target).closest(".ui-datepicker").length;
18239},
18240_createOverlay:function(){
18241if(!this.options.modal){
18242return;
18243}
18244var isOpening=true;
18245this._delay(function(){
18246isOpening=false;
18247});
18248if(!this.document.data("ui-dialog-overlays")){
18249this.document.on("focusin.ui-dialog",function(event){
18250if(isOpening){
18251return;
18252}
18253var instance=this._trackingInstances()[0];
18254if(!instance._allowInteraction(event)){
18255event.preventDefault();
18256instance._focusTabbable();
18257}
18258}.bind(this));
18259}
18260this.overlay=$("<div>")
18261.appendTo(this._appendTo());
18262this._addClass(this.overlay,null,"ui-widget-overlay ui-front");
18263this._on(this.overlay,{
18264mousedown:"_keepFocus"
18265});
18266this.document.data("ui-dialog-overlays",
18267(this.document.data("ui-dialog-overlays")||0)+1);
18268},
18269_destroyOverlay:function(){
18270if(!this.options.modal){
18271return;
18272}
18273if(this.overlay){
18274var overlays=this.document.data("ui-dialog-overlays")-1;
18275if(!overlays){
18276this.document.off("focusin.ui-dialog");
18277this.document.removeData("ui-dialog-overlays");
18278}else{
18279this.document.data("ui-dialog-overlays",overlays);
18280}
18281this.overlay.remove();
18282this.overlay=null;
18283}
18284}
18285});
18286if($.uiBackCompat===true){
18287$.widget("ui.dialog",$.ui.dialog,{
18288options:{
18289dialogClass:""
18290},
18291_createWrapper:function(){
18292this._super();
18293this.uiDialog.addClass(this.options.dialogClass);
18294},
18295_setOption:function(key,value){
18296if(key==="dialogClass"){
18297this.uiDialog
18298.removeClass(this.options.dialogClass)
18299.addClass(value);
18300}
18301this._superApply(arguments);
18302}
18303});
18304}
18305var widgetsDialog=$.ui.dialog;
18306$.widget("ui.droppable",{
18307version:"1.14.1",
18308widgetEventPrefix:"drop",
18309options:{
18310accept:"*",
18311addClasses:true,
18312greedy:false,
18313scope:"default",
18314tolerance:"intersect",
18315activate:null,
18316deactivate:null,
18317drop:null,
18318out:null,
18319over:null
18320},
18321_create:function(){
18322var proportions,
18323o=this.options,
18324accept=o.accept;
18325this.isover=false;
18326this.isout=true;
18327this.accept=typeof accept==="function"?accept:function(d){
18328return d.is(accept);
18329};
18330this.proportions=function(){
18331if(arguments.length){
18332proportions=arguments[0];
18333}else{
18334return proportions?
18335proportions:
18336proportions={
18337width:this.element[0].offsetWidth,
18338height:this.element[0].offsetHeight
18339};
18340}
18341};
18342this._addToManager(o.scope);
18343if(o.addClasses){
18344this._addClass("ui-droppable");
18345}
18346},
18347_addToManager:function(scope){
18348$.ui.ddmanager.droppables[scope]=$.ui.ddmanager.droppables[scope]||[];
18349$.ui.ddmanager.droppables[scope].push(this);
18350},
18351_splice:function(drop){
18352var i=0;
18353for(;i<drop.length;i++){
18354if(drop[i]===this){
18355drop.splice(i,1);
18356}
18357}
18358},
18359_destroy:function(){
18360var drop=$.ui.ddmanager.droppables[this.options.scope];
18361this._splice(drop);
18362},
18363_setOption:function(key,value){
18364if(key==="accept"){
18365this.accept=typeof value==="function"?value:function(d){
18366return d.is(value);
18367};
18368}else if(key==="scope"){
18369var drop=$.ui.ddmanager.droppables[this.options.scope];
18370this._splice(drop);
18371this._addToManager(value);
18372}
18373this._super(key,value);
18374},
18375_activate:function(event){
18376var draggable=$.ui.ddmanager.current;
18377this._addActiveClass();
18378if(draggable){
18379this._trigger("activate",event,this.ui(draggable));
18380}
18381},
18382_deactivate:function(event){
18383var draggable=$.ui.ddmanager.current;
18384this._removeActiveClass();
18385if(draggable){
18386this._trigger("deactivate",event,this.ui(draggable));
18387}
18388},
18389_over:function(event){
18390var draggable=$.ui.ddmanager.current;
18391if(!draggable||(draggable.currentItem||
18392draggable.element)[0]===this.element[0]){
18393return;
18394}
18395if(this.accept.call(this.element[0],(draggable.currentItem||
18396draggable.element))){
18397this._addHoverClass();
18398this._trigger("over",event,this.ui(draggable));
18399}
18400},
18401_out:function(event){
18402var draggable=$.ui.ddmanager.current;
18403if(!draggable||(draggable.currentItem||
18404draggable.element)[0]===this.element[0]){
18405return;
18406}
18407if(this.accept.call(this.element[0],(draggable.currentItem||
18408draggable.element))){
18409this._removeHoverClass();
18410this._trigger("out",event,this.ui(draggable));
18411}
18412},
18413_drop:function(event,custom){
18414var draggable=custom||$.ui.ddmanager.current,
18415childrenIntersection=false;
18416if(!draggable||(draggable.currentItem||
18417draggable.element)[0]===this.element[0]){
18418return false;
18419}
18420this.element
18421.find(":data(ui-droppable)")
18422.not(".ui-draggable-dragging")
18423.each(function(){
18424var inst=$(this).droppable("instance");
18425if(
18426inst.options.greedy&&
18427!inst.options.disabled&&
18428inst.options.scope===draggable.options.scope&&
18429inst.accept.call(
18430inst.element[0],(draggable.currentItem||draggable.element)
18431)&&
18432$.ui.intersect(
18433draggable,
18434$.extend(inst,{offset:inst.element.offset()}),
18435inst.options.tolerance,event
18436)
18437){
18438childrenIntersection=true;
18439return false;
18440}
18441});
18442if(childrenIntersection){
18443return false;
18444}
18445if(this.accept.call(this.element[0],
18446(draggable.currentItem||draggable.element))){
18447this._removeActiveClass();
18448this._removeHoverClass();
18449this._trigger("drop",event,this.ui(draggable));
18450return this.element;
18451}
18452return false;
18453},
18454ui:function(c){
18455return{
18456draggable:(c.currentItem||c.element),
18457helper:c.helper,
18458position:c.position,
18459offset:c.positionAbs
18460};
18461},
18462_addHoverClass:function(){
18463this._addClass("ui-droppable-hover");
18464},
18465_removeHoverClass:function(){
18466this._removeClass("ui-droppable-hover");
18467},
18468_addActiveClass:function(){
18469this._addClass("ui-droppable-active");
18470},
18471_removeActiveClass:function(){
18472this._removeClass("ui-droppable-active");
18473}
18474});
18475$.ui.intersect=(function(){
18476function isOverAxis(x,reference,size){
18477return(x>=reference)&&(x<(reference+size));
18478}
18479return function(draggable,droppable,toleranceMode,event){
18480if(!droppable.offset){
18481return false;
18482}
18483var x1=(draggable.positionAbs||
18484draggable.position.absolute).left+draggable.margins.left,
18485y1=(draggable.positionAbs||
18486draggable.position.absolute).top+draggable.margins.top,
18487x2=x1+draggable.helperProportions.width,
18488y2=y1+draggable.helperProportions.height,
18489l=droppable.offset.left,
18490t=droppable.offset.top,
18491r=l+droppable.proportions().width,
18492b=t+droppable.proportions().height;
18493switch(toleranceMode){
18494case"fit":
18495return(l<=x1&&x2<=r&&t<=y1&&y2<=b);
18496case"intersect":
18497return(l<x1+(draggable.helperProportions.width/2)&&
18498x2-(draggable.helperProportions.width/2)<r&&
18499t<y1+(draggable.helperProportions.height/2)&&
18500y2-(draggable.helperProportions.height/2)<b);
18501case"pointer":
18502return isOverAxis(event.pageY,t,droppable.proportions().height)&&
18503isOverAxis(event.pageX,l,droppable.proportions().width);
18504case"touch":
18505return(
18506(y1>=t&&y1<=b)||
18507(y2>=t&&y2<=b)||
18508(y1<t&&y2>b)
18509)&&(
18510(x1>=l&&x1<=r)||
18511(x2>=l&&x2<=r)||
18512(x1<l&&x2>r)
18513);
18514default:
18515return false;
18516}
18517};
18518})();
18519$.ui.ddmanager={
18520current:null,
18521droppables:{"default":[]},
18522prepareOffsets:function(t,event){
18523var i,j,
18524m=$.ui.ddmanager.droppables[t.options.scope]||[],
18525type=event?event.type:null,
18526list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();
18527droppablesLoop:for(i=0;i<m.length;i++){
18528if(m[i].options.disabled||(t&&!m[i].accept.call(m[i].element[0],
18529(t.currentItem||t.element)))){
18530continue;
18531}
18532for(j=0;j<list.length;j++){
18533if(list[j]===m[i].element[0]){
18534m[i].proportions().height=0;
18535continue droppablesLoop;
18536}
18537}
18538m[i].visible=m[i].element.css("display")!=="none";
18539if(!m[i].visible){
18540continue;
18541}
18542if(type==="mousedown"){
18543m[i]._activate.call(m[i],event);
18544}
18545m[i].offset=m[i].element.offset();
18546m[i].proportions({
18547width:m[i].element[0].offsetWidth,
18548height:m[i].element[0].offsetHeight
18549});
18550}
18551},
18552drop:function(draggable,event){
18553var dropped=false;
18554$.each(($.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){
18555if(!this.options){
18556return;
18557}
18558if(!this.options.disabled&&this.visible&&
18559$.ui.intersect(draggable,this,this.options.tolerance,event)){
18560dropped=this._drop.call(this,event)||dropped;
18561}
18562if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],
18563(draggable.currentItem||draggable.element))){
18564this.isout=true;
18565this.isover=false;
18566this._deactivate.call(this,event);
18567}
18568});
18569return dropped;
18570},
18571dragStart:function(draggable,event){
18572draggable.element.parentsUntil("body").on("scroll.droppable",function(){
18573if(!draggable.options.refreshPositions){
18574$.ui.ddmanager.prepareOffsets(draggable,event);
18575}
18576});
18577},
18578drag:function(draggable,event){
18579if(draggable.options.refreshPositions){
18580$.ui.ddmanager.prepareOffsets(draggable,event);
18581}
18582$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){
18583if(this.options.disabled||this.greedyChild||!this.visible){
18584return;
18585}
18586var parentInstance,scope,parent,
18587intersects=$.ui.intersect(draggable,this,this.options.tolerance,event),
18588c=!intersects&&this.isover?
18589"isout":
18590(intersects&&!this.isover?"isover":null);
18591if(!c){
18592return;
18593}
18594if(this.options.greedy){
18595scope=this.options.scope;
18596parent=this.element.parents(":data(ui-droppable)").filter(function(){
18597return $(this).droppable("instance").options.scope===scope;
18598});
18599if(parent.length){
18600parentInstance=$(parent[0]).droppable("instance");
18601parentInstance.greedyChild=(c==="isover");
18602}
18603}
18604if(parentInstance&&c==="isover"){
18605parentInstance.isover=false;
18606parentInstance.isout=true;
18607parentInstance._out.call(parentInstance,event);
18608}
18609this[c]=true;
18610this[c==="isout"?"isover":"isout"]=false;
18611this[c==="isover"?"_over":"_out"].call(this,event);
18612if(parentInstance&&c==="isout"){
18613parentInstance.isout=false;
18614parentInstance.isover=true;
18615parentInstance._over.call(parentInstance,event);
18616}
18617});
18618},
18619dragStop:function(draggable,event){
18620draggable.element.parentsUntil("body").off("scroll.droppable");
18621if(!draggable.options.refreshPositions){
18622$.ui.ddmanager.prepareOffsets(draggable,event);
18623}
18624}
18625};
18626if($.uiBackCompat===true){
18627$.widget("ui.droppable",$.ui.droppable,{
18628options:{
18629hoverClass:false,
18630activeClass:false
18631},
18632_addActiveClass:function(){
18633this._super();
18634if(this.options.activeClass){
18635this.element.addClass(this.options.activeClass);
18636}
18637},
18638_removeActiveClass:function(){
18639this._super();
18640if(this.options.activeClass){
18641this.element.removeClass(this.options.activeClass);
18642}
18643},
18644_addHoverClass:function(){
18645this._super();
18646if(this.options.hoverClass){
18647this.element.addClass(this.options.hoverClass);
18648}
18649},
18650_removeHoverClass:function(){
18651this._super();
18652if(this.options.hoverClass){
18653this.element.removeClass(this.options.hoverClass);
18654}
18655}
18656});
18657}
18658var widgetsDroppable=$.ui.droppable;
18659var widgetsProgressbar=$.widget("ui.progressbar",{
18660version:"1.14.1",
18661options:{
18662classes:{
18663"ui-progressbar":"ui-corner-all",
18664"ui-progressbar-value":"ui-corner-left",
18665"ui-progressbar-complete":"ui-corner-right"
18666},
18667max:100,
18668value:0,
18669change:null,
18670complete:null
18671},
18672min:0,
18673_create:function(){
18674this.oldValue=this.options.value=this._constrainedValue();
18675this.element.attr({
18676role:"progressbar",
18677"aria-valuemin":this.min
18678});
18679this._addClass("ui-progressbar","ui-widget ui-widget-content");
18680this.valueDiv=$("<div>").appendTo(this.element);
18681this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header");
18682this._refreshValue();
18683},
18684_destroy:function(){
18685this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow");
18686this.valueDiv.remove();
18687},
18688value:function(newValue){
18689if(newValue===undefined){
18690return this.options.value;
18691}
18692this.options.value=this._constrainedValue(newValue);
18693this._refreshValue();
18694},
18695_constrainedValue:function(newValue){
18696if(newValue===undefined){
18697newValue=this.options.value;
18698}
18699this.indeterminate=newValue===false;
18700if(typeof newValue!=="number"){
18701newValue=0;
18702}
18703return this.indeterminate?false:
18704Math.min(this.options.max,Math.max(this.min,newValue));
18705},
18706_setOptions:function(options){
18707var value=options.value;
18708delete options.value;
18709this._super(options);
18710this.options.value=this._constrainedValue(value);
18711this._refreshValue();
18712},
18713_setOption:function(key,value){
18714if(key==="max"){
18715value=Math.max(this.min,value);
18716}
18717this._super(key,value);
18718},
18719_setOptionDisabled:function(value){
18720this._super(value);
18721this.element.attr("aria-disabled",value);
18722this._toggleClass(null,"ui-state-disabled",!!value);
18723},
18724_percentage:function(){
18725return this.indeterminate?
18726100:
18727100*(this.options.value-this.min)/(this.options.max-this.min);
18728},
18729_refreshValue:function(){
18730var value=this.options.value,
18731percentage=this._percentage();
18732this.valueDiv
18733.toggle(this.indeterminate||value>this.min)
18734.width(percentage.toFixed(0)+"%");
18735this
18736._toggleClass(this.valueDiv,"ui-progressbar-complete",null,
18737value===this.options.max)
18738._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate);
18739if(this.indeterminate){
18740this.element.removeAttr("aria-valuenow");
18741if(!this.overlayDiv){
18742this.overlayDiv=$("<div>").appendTo(this.valueDiv);
18743this._addClass(this.overlayDiv,"ui-progressbar-overlay");
18744}
18745}else{
18746this.element.attr({
18747"aria-valuemax":this.options.max,
18748"aria-valuenow":value
18749});
18750if(this.overlayDiv){
18751this.overlayDiv.remove();
18752this.overlayDiv=null;
18753}
18754}
18755if(this.oldValue!==value){
18756this.oldValue=value;
18757this._trigger("change");
18758}
18759if(value===this.options.max){
18760this._trigger("complete");
18761}
18762}
18763});
18764var widgetsSelectable=$.widget("ui.selectable",$.ui.mouse,{
18765version:"1.14.1",
18766options:{
18767appendTo:"body",
18768autoRefresh:true,
18769distance:0,
18770filter:"*",
18771tolerance:"touch",
18772selected:null,
18773selecting:null,
18774start:null,
18775stop:null,
18776unselected:null,
18777unselecting:null
18778},
18779_create:function(){
18780var that=this;
18781this._addClass("ui-selectable");
18782this.dragged=false;
18783this.refresh=function(){
18784that.elementPos=$(that.element[0]).offset();
18785that.selectees=$(that.options.filter,that.element[0]);
18786that._addClass(that.selectees,"ui-selectee");
18787that.selectees.each(function(){
18788var $this=$(this),
18789selecteeOffset=$this.offset(),
18790pos={
18791left:selecteeOffset.left-that.elementPos.left,
18792top:selecteeOffset.top-that.elementPos.top
18793};
18794$.data(this,"selectable-item",{
18795element:this,
18796$element:$this,
18797left:pos.left,
18798top:pos.top,
18799right:pos.left+$this.outerWidth(),
18800bottom:pos.top+$this.outerHeight(),
18801startselected:false,
18802selected:$this.hasClass("ui-selected"),
18803selecting:$this.hasClass("ui-selecting"),
18804unselecting:$this.hasClass("ui-unselecting")
18805});
18806});
18807};
18808this.refresh();
18809this._mouseInit();
18810this.helper=$("<div>");
18811this._addClass(this.helper,"ui-selectable-helper");
18812},
18813_destroy:function(){
18814this.selectees.removeData("selectable-item");
18815this._mouseDestroy();
18816},
18817_mouseStart:function(event){
18818var that=this,
18819options=this.options;
18820this.opos=[event.pageX,event.pageY];
18821this.elementPos=$(this.element[0]).offset();
18822if(this.options.disabled){
18823return;
18824}
18825this.selectees=$(options.filter,this.element[0]);
18826this._trigger("start",event);
18827$(options.appendTo).append(this.helper);
18828this.helper.css({
18829"left":event.pageX,
18830"top":event.pageY,
18831"width":0,
18832"height":0
18833});
18834if(options.autoRefresh){
18835this.refresh();
18836}
18837this.selectees.filter(".ui-selected").each(function(){
18838var selectee=$.data(this,"selectable-item");
18839selectee.startselected=true;
18840if(!event.metaKey&&!event.ctrlKey){
18841that._removeClass(selectee.$element,"ui-selected");
18842selectee.selected=false;
18843that._addClass(selectee.$element,"ui-unselecting");
18844selectee.unselecting=true;
18845that._trigger("unselecting",event,{
18846unselecting:selectee.element
18847});
18848}
18849});
18850$(event.target).parents().addBack().each(function(){
18851var doSelect,
18852selectee=$.data(this,"selectable-item");
18853if(selectee){
18854doSelect=(!event.metaKey&&!event.ctrlKey)||
18855!selectee.$element.hasClass("ui-selected");
18856that._removeClass(selectee.$element,doSelect?"ui-unselecting":"ui-selected")
18857._addClass(selectee.$element,doSelect?"ui-selecting":"ui-unselecting");
18858selectee.unselecting=!doSelect;
18859selectee.selecting=doSelect;
18860selectee.selected=doSelect;
18861if(doSelect){
18862that._trigger("selecting",event,{
18863selecting:selectee.element
18864});
18865}else{
18866that._trigger("unselecting",event,{
18867unselecting:selectee.element
18868});
18869}
18870return false;
18871}
18872});
18873},
18874_mouseDrag:function(event){
18875this.dragged=true;
18876if(this.options.disabled){
18877return;
18878}
18879var tmp,
18880that=this,
18881options=this.options,
18882x1=this.opos[0],
18883y1=this.opos[1],
18884x2=event.pageX,
18885y2=event.pageY;
18886if(x1>x2){
18887tmp=x2;x2=x1;x1=tmp;
18888}
18889if(y1>y2){
18890tmp=y2;y2=y1;y1=tmp;
18891}
18892this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});
18893this.selectees.each(function(){
18894var selectee=$.data(this,"selectable-item"),
18895hit=false,
18896offset={};
18897if(!selectee||selectee.element===that.element[0]){
18898return;
18899}
18900offset.left=selectee.left+that.elementPos.left;
18901offset.right=selectee.right+that.elementPos.left;
18902offset.top=selectee.top+that.elementPos.top;
18903offset.bottom=selectee.bottom+that.elementPos.top;
18904if(options.tolerance==="touch"){
18905hit=(!(offset.left>x2||offset.right<x1||offset.top>y2||
18906offset.bottom<y1));
18907}else if(options.tolerance==="fit"){
18908hit=(offset.left>x1&&offset.right<x2&&offset.top>y1&&
18909offset.bottom<y2);
18910}
18911if(hit){
18912if(selectee.selected){
18913that._removeClass(selectee.$element,"ui-selected");
18914selectee.selected=false;
18915}
18916if(selectee.unselecting){
18917that._removeClass(selectee.$element,"ui-unselecting");
18918selectee.unselecting=false;
18919}
18920if(!selectee.selecting){
18921that._addClass(selectee.$element,"ui-selecting");
18922selectee.selecting=true;
18923that._trigger("selecting",event,{
18924selecting:selectee.element
18925});
18926}
18927}else{
18928if(selectee.selecting){
18929if((event.metaKey||event.ctrlKey)&&selectee.startselected){
18930that._removeClass(selectee.$element,"ui-selecting");
18931selectee.selecting=false;
18932that._addClass(selectee.$element,"ui-selected");
18933selectee.selected=true;
18934}else{
18935that._removeClass(selectee.$element,"ui-selecting");
18936selectee.selecting=false;
18937if(selectee.startselected){
18938that._addClass(selectee.$element,"ui-unselecting");
18939selectee.unselecting=true;
18940}
18941that._trigger("unselecting",event,{
18942unselecting:selectee.element
18943});
18944}
18945}
18946if(selectee.selected){
18947if(!event.metaKey&&!event.ctrlKey&&!selectee.startselected){
18948that._removeClass(selectee.$element,"ui-selected");
18949selectee.selected=false;
18950that._addClass(selectee.$element,"ui-unselecting");
18951selectee.unselecting=true;
18952that._trigger("unselecting",event,{
18953unselecting:selectee.element
18954});
18955}
18956}
18957}
18958});
18959return false;
18960},
18961_mouseStop:function(event){
18962var that=this;
18963this.dragged=false;
18964$(".ui-unselecting",this.element[0]).each(function(){
18965var selectee=$.data(this,"selectable-item");
18966that._removeClass(selectee.$element,"ui-unselecting");
18967selectee.unselecting=false;
18968selectee.startselected=false;
18969that._trigger("unselected",event,{
18970unselected:selectee.element
18971});
18972});
18973$(".ui-selecting",this.element[0]).each(function(){
18974var selectee=$.data(this,"selectable-item");
18975that._removeClass(selectee.$element,"ui-selecting")
18976._addClass(selectee.$element,"ui-selected");
18977selectee.selecting=false;
18978selectee.selected=true;
18979selectee.startselected=true;
18980that._trigger("selected",event,{
18981selected:selectee.element
18982});
18983});
18984this._trigger("stop",event);
18985this.helper.remove();
18986return false;
18987}
18988});
18989var widgetsSelectmenu=$.widget("ui.selectmenu",[$.ui.formResetMixin,{
18990version:"1.14.1",
18991defaultElement:"<select>",
18992options:{
18993appendTo:null,
18994classes:{
18995"ui-selectmenu-button-open":"ui-corner-top",
18996"ui-selectmenu-button-closed":"ui-corner-all"
18997},
18998disabled:null,
18999icons:{
19000button:"ui-icon-triangle-1-s"
19001},
19002position:{
19003my:"left top",
19004at:"left bottom",
19005collision:"none"
19006},
19007width:false,
19008change:null,
19009close:null,
19010focus:null,
19011open:null,
19012select:null
19013},
19014_create:function(){
19015var selectmenuId=this.element.uniqueId().attr("id");
19016this.ids={
19017element:selectmenuId,
19018button:selectmenuId+"-button",
19019menu:selectmenuId+"-menu"
19020};
19021this._drawButton();
19022this._drawMenu();
19023this._bindFormResetHandler();
19024this._rendered=false;
19025this.menuItems=$();
19026},
19027_drawButton:function(){
19028var icon,
19029that=this,
19030item=this._parseOption(
19031this.element.find("option:selected"),
19032this.element[0].selectedIndex
19033);
19034this.labels=this.element.labels().attr("for",this.ids.button);
19035this._on(this.labels,{
19036click:function(event){
19037this.button.trigger("focus");
19038event.preventDefault();
19039}
19040});
19041this.element.hide();
19042this.button=$("<span>",{
19043tabindex:this.options.disabled?-1:0,
19044id:this.ids.button,
19045role:"combobox",
19046"aria-expanded":"false",
19047"aria-autocomplete":"list",
19048"aria-owns":this.ids.menu,
19049"aria-haspopup":"true",
19050title:this.element.attr("title")
19051})
19052.insertAfter(this.element);
19053this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed",
19054"ui-button ui-widget");
19055icon=$("<span>").appendTo(this.button);
19056this._addClass(icon,"ui-selectmenu-icon","ui-icon "+this.options.icons.button);
19057this.buttonItem=this._renderButtonItem(item)
19058.appendTo(this.button);
19059if(this.options.width!==false){
19060this._resizeButton();
19061}
19062this._on(this.button,this._buttonEvents);
19063this.button.one("focusin",function(){
19064if(!that._rendered){
19065that._refreshMenu();
19066}
19067});
19068},
19069_drawMenu:function(){
19070var that=this;
19071this.menu=$("<ul>",{
19072"aria-hidden":"true",
19073"aria-labelledby":this.ids.button,
19074id:this.ids.menu
19075});
19076this.menuWrap=$("<div>").append(this.menu);
19077this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front");
19078this.menuWrap.appendTo(this._appendTo());
19079this.menuInstance=this.menu
19080.menu({
19081classes:{
19082"ui-menu":"ui-corner-bottom"
19083},
19084role:"listbox",
19085select:function(event,ui){
19086event.preventDefault();
19087that._select(ui.item.data("ui-selectmenu-item"),event);
19088},
19089focus:function(event,ui){
19090var item=ui.item.data("ui-selectmenu-item");
19091if(that.focusIndex!=null&&item.index!==that.focusIndex){
19092that._trigger("focus",event,{item:item});
19093if(!that.isOpen){
19094that._select(item,event);
19095}
19096}
19097that.focusIndex=item.index;
19098that.button.attr("aria-activedescendant",
19099that.menuItems.eq(item.index).attr("id"));
19100}
19101})
19102.menu("instance");
19103this.menuInstance._off(this.menu,"mouseleave");
19104this.menuInstance._closeOnDocumentClick=function(){
19105return false;
19106};
19107this.menuInstance._isDivider=function(){
19108return false;
19109};
19110},
19111refresh:function(){
19112this._refreshMenu();
19113this.buttonItem.replaceWith(
19114this.buttonItem=this._renderButtonItem(
19115this._getSelectedItem().data("ui-selectmenu-item")||{}
19116)
19117);
19118if(this.options.width===null){
19119this._resizeButton();
19120}
19121},
19122_refreshMenu:function(){
19123var item,
19124options=this.element.find("option");
19125this.menu.empty();
19126this._parseOptions(options);
19127this._renderMenu(this.menu,this.items);
19128this.menuInstance.refresh();
19129this.menuItems=this.menu.find("li")
19130.not(".ui-selectmenu-optgroup")
19131.find(".ui-menu-item-wrapper");
19132this._rendered=true;
19133if(!options.length){
19134return;
19135}
19136item=this._getSelectedItem();
19137this.menuInstance.focus(null,item);
19138this._setAria(item.data("ui-selectmenu-item"));
19139this._setOption("disabled",this.element.prop("disabled"));
19140},
19141open:function(event){
19142if(this.options.disabled){
19143return;
19144}
19145if(!this._rendered){
19146this._refreshMenu();
19147}else{
19148this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active");
19149this.menuInstance.focus(null,this._getSelectedItem());
19150}
19151if(!this.menuItems.length){
19152return;
19153}
19154this.isOpen=true;
19155this._toggleAttr();
19156this._resizeMenu();
19157this._position();
19158this._on(this.document,this._documentClick);
19159this._trigger("open",event);
19160},
19161_position:function(){
19162this.menuWrap.position($.extend({of:this.button},this.options.position));
19163},
19164close:function(event){
19165if(!this.isOpen){
19166return;
19167}
19168this.isOpen=false;
19169this._toggleAttr();
19170this.range=null;
19171this._off(this.document);
19172this._trigger("close",event);
19173},
19174widget:function(){
19175return this.button;
19176},
19177menuWidget:function(){
19178return this.menu;
19179},
19180_renderButtonItem:function(item){
19181var buttonItem=$("<span>");
19182this._setText(buttonItem,item.label);
19183this._addClass(buttonItem,"ui-selectmenu-text");
19184return buttonItem;
19185},
19186_renderMenu:function(ul,items){
19187var that=this,
19188currentOptgroup="";
19189$.each(items,function(index,item){
19190var li;
19191if(item.optgroup!==currentOptgroup){
19192li=$("<li>",{
19193text:item.optgroup
19194});
19195that._addClass(li,"ui-selectmenu-optgroup","ui-menu-divider"+
19196(item.element.parent("optgroup").prop("disabled")?
19197" ui-state-disabled":
19198""));
19199li.appendTo(ul);
19200currentOptgroup=item.optgroup;
19201}
19202that._renderItemData(ul,item);
19203});
19204},
19205_renderItemData:function(ul,item){
19206return this._renderItem(ul,item).data("ui-selectmenu-item",item);
19207},
19208_renderItem:function(ul,item){
19209var li=$("<li>"),
19210wrapper=$("<div>",{
19211title:item.element.attr("title")
19212});
19213if(item.disabled){
19214this._addClass(li,null,"ui-state-disabled");
19215}
19216if(item.hidden){
19217li.prop("hidden",true);
19218}else{
19219this._setText(wrapper,item.label);
19220}
19221return li.append(wrapper).appendTo(ul);
19222},
19223_setText:function(element,value){
19224if(value){
19225element.text(value);
19226}else{
19227element.html("&#160;");
19228}
19229},
19230_move:function(direction,event){
19231var item,next,
19232filter=".ui-menu-item";
19233if(this.isOpen){
19234item=this.menuItems.eq(this.focusIndex).parent("li");
19235}else{
19236item=this.menuItems.eq(this.element[0].selectedIndex).parent("li");
19237filter+=":not(.ui-state-disabled)";
19238}
19239if(direction==="first"||direction==="last"){
19240next=item[direction==="first"?"prevAll":"nextAll"](filter).eq(-1);
19241}else{
19242next=item[direction+"All"](filter).eq(0);
19243}
19244if(next.length){
19245this.menuInstance.focus(event,next);
19246}
19247},
19248_getSelectedItem:function(){
19249return this.menuItems.eq(this.element[0].selectedIndex).parent("li");
19250},
19251_toggle:function(event){
19252this[this.isOpen?"close":"open"](event);
19253},
19254_setSelection:function(){
19255var selection;
19256if(!this.range){
19257return;
19258}
19259selection=window.getSelection();
19260selection.removeAllRanges();
19261selection.addRange(this.range);
19262},
19263_documentClick:{
19264mousedown:function(event){
19265if(!this.isOpen){
19266return;
19267}
19268if(!$(event.target).closest(".ui-selectmenu-menu, #"+
19269CSS.escape(this.ids.button)).length){
19270this.close(event);
19271}
19272}
19273},
19274_buttonEvents:{
19275mousedown:function(){
19276var selection=window.getSelection();
19277if(selection.rangeCount){
19278this.range=selection.getRangeAt(0);
19279}
19280},
19281click:function(event){
19282this._setSelection();
19283this._toggle(event);
19284},
19285keydown:function(event){
19286var preventDefault=true;
19287switch(event.keyCode){
19288case $.ui.keyCode.TAB:
19289case $.ui.keyCode.ESCAPE:
19290this.close(event);
19291preventDefault=false;
19292break;
19293case $.ui.keyCode.ENTER:
19294if(this.isOpen){
19295this._selectFocusedItem(event);
19296}
19297break;
19298case $.ui.keyCode.UP:
19299if(event.altKey){
19300this._toggle(event);
19301}else{
19302this._move("prev",event);
19303}
19304break;
19305case $.ui.keyCode.DOWN:
19306if(event.altKey){
19307this._toggle(event);
19308}else{
19309this._move("next",event);
19310}
19311break;
19312case $.ui.keyCode.SPACE:
19313if(this.isOpen){
19314this._selectFocusedItem(event);
19315}else{
19316this._toggle(event);
19317}
19318break;
19319case $.ui.keyCode.LEFT:
19320this._move("prev",event);
19321break;
19322case $.ui.keyCode.RIGHT:
19323this._move("next",event);
19324break;
19325case $.ui.keyCode.HOME:
19326case $.ui.keyCode.PAGE_UP:
19327this._move("first",event);
19328break;
19329case $.ui.keyCode.END:
19330case $.ui.keyCode.PAGE_DOWN:
19331this._move("last",event);
19332break;
19333default:
19334this.menu.trigger(event);
19335preventDefault=false;
19336}
19337if(preventDefault){
19338event.preventDefault();
19339}
19340}
19341},
19342_selectFocusedItem:function(event){
19343var item=this.menuItems.eq(this.focusIndex).parent("li");
19344if(!item.hasClass("ui-state-disabled")){
19345this._select(item.data("ui-selectmenu-item"),event);
19346}
19347},
19348_select:function(item,event){
19349var oldIndex=this.element[0].selectedIndex;
19350this.element[0].selectedIndex=item.index;
19351this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(item));
19352this._setAria(item);
19353this._trigger("select",event,{item:item});
19354if(item.index!==oldIndex){
19355this._trigger("change",event,{item:item});
19356}
19357this.close(event);
19358},
19359_setAria:function(item){
19360var id=this.menuItems.eq(item.index).attr("id");
19361this.button.attr({
19362"aria-labelledby":id,
19363"aria-activedescendant":id
19364});
19365this.menu.attr("aria-activedescendant",id);
19366},
19367_setOption:function(key,value){
19368if(key==="icons"){
19369var icon=this.button.find("span.ui-icon");
19370this._removeClass(icon,null,this.options.icons.button)
19371._addClass(icon,null,value.button);
19372}
19373this._super(key,value);
19374if(key==="appendTo"){
19375this.menuWrap.appendTo(this._appendTo());
19376}
19377if(key==="width"){
19378this._resizeButton();
19379}
19380},
19381_setOptionDisabled:function(value){
19382this._super(value);
19383this.menuInstance.option("disabled",value);
19384this.button.attr("aria-disabled",value);
19385this._toggleClass(this.button,null,"ui-state-disabled",value);
19386this.element.prop("disabled",value);
19387if(value){
19388this.button.attr("tabindex",-1);
19389this.close();
19390}else{
19391this.button.attr("tabindex",0);
19392}
19393},
19394_appendTo:function(){
19395var element=this.options.appendTo;
19396if(element){
19397element=element.jquery||element.nodeType?
19398$(element):
19399this.document.find(element).eq(0);
19400}
19401if(!element||!element[0]){
19402element=this.element.closest(".ui-front, dialog");
19403}
19404if(!element.length){
19405element=this.document[0].body;
19406}
19407return element;
19408},
19409_toggleAttr:function(){
19410this.button.attr("aria-expanded",this.isOpen);
19411this._removeClass(this.button,"ui-selectmenu-button-"+
19412(this.isOpen?"closed":"open"))
19413._addClass(this.button,"ui-selectmenu-button-"+
19414(this.isOpen?"open":"closed"))
19415._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen);
19416this.menu.attr("aria-hidden",!this.isOpen);
19417},
19418_resizeButton:function(){
19419var width=this.options.width;
19420if(width===false){
19421this.button.css("width","");
19422return;
19423}
19424if(width===null){
19425width=this.element.show().outerWidth();
19426this.element.hide();
19427}
19428this.button.outerWidth(width);
19429},
19430_resizeMenu:function(){
19431this.menu.outerWidth(Math.max(
19432this.button.outerWidth(),
19433this.menu.width("").outerWidth()
19434));
19435},
19436_getCreateOptions:function(){
19437var options=this._super();
19438options.disabled=this.element.prop("disabled");
19439return options;
19440},
19441_parseOptions:function(options){
19442var that=this,
19443data=[];
19444options.each(function(index,item){
19445data.push(that._parseOption($(item),index));
19446});
19447this.items=data;
19448},
19449_parseOption:function(option,index){
19450var optgroup=option.parent("optgroup");
19451return{
19452element:option,
19453index:index,
19454value:option.val(),
19455label:option.text(),
19456hidden:optgroup.prop("hidden")||option.prop("hidden"),
19457optgroup:optgroup.attr("label")||"",
19458disabled:optgroup.prop("disabled")||option.prop("disabled")
19459};
19460},
19461_destroy:function(){
19462this._unbindFormResetHandler();
19463this.menuWrap.remove();
19464this.button.remove();
19465this.element.show();
19466this.element.removeUniqueId();
19467this.labels.attr("for",this.ids.element);
19468}
19469}]);
19470var widgetsSlider=$.widget("ui.slider",$.ui.mouse,{
19471version:"1.14.1",
19472widgetEventPrefix:"slide",
19473options:{
19474animate:false,
19475classes:{
19476"ui-slider":"ui-corner-all",
19477"ui-slider-handle":"ui-corner-all",
19478"ui-slider-range":"ui-corner-all ui-widget-header"
19479},
19480distance:0,
19481max:100,
19482min:0,
19483orientation:"horizontal",
19484range:false,
19485step:1,
19486value:0,
19487values:null,
19488change:null,
19489slide:null,
19490start:null,
19491stop:null
19492},
19493numPages:5,
19494_create:function(){
19495this._keySliding=false;
19496this._mouseSliding=false;
19497this._animateOff=true;
19498this._handleIndex=null;
19499this._detectOrientation();
19500this._mouseInit();
19501this._calculateNewMax();
19502this._addClass("ui-slider ui-slider-"+this.orientation,
19503"ui-widget ui-widget-content");
19504this._refresh();
19505this._animateOff=false;
19506},
19507_refresh:function(){
19508this._createRange();
19509this._createHandles();
19510this._setupEvents();
19511this._refreshValue();
19512},
19513_createHandles:function(){
19514var i,handleCount,
19515options=this.options,
19516existingHandles=this.element.find(".ui-slider-handle"),
19517handle="<span tabindex='0'></span>",
19518handles=[];
19519handleCount=(options.values&&options.values.length)||1;
19520if(existingHandles.length>handleCount){
19521existingHandles.slice(handleCount).remove();
19522existingHandles=existingHandles.slice(0,handleCount);
19523}
19524for(i=existingHandles.length;i<handleCount;i++){
19525handles.push(handle);
19526}
19527this.handles=existingHandles.add($(handles.join("")).appendTo(this.element));
19528this._addClass(this.handles,"ui-slider-handle","ui-state-default");
19529this.handle=this.handles.eq(0);
19530this.handles.each(function(i){
19531$(this)
19532.data("ui-slider-handle-index",i)
19533.attr("tabIndex",0);
19534});
19535},
19536_createRange:function(){
19537var options=this.options;
19538if(options.range){
19539if(options.range===true){
19540if(!options.values){
19541options.values=[this._valueMin(),this._valueMin()];
19542}else if(options.values.length&&options.values.length!==2){
19543options.values=[options.values[0],options.values[0]];
19544}else if(Array.isArray(options.values)){
19545options.values=options.values.slice(0);
19546}
19547}
19548if(!this.range||!this.range.length){
19549this.range=$("<div>")
19550.appendTo(this.element);
19551this._addClass(this.range,"ui-slider-range");
19552}else{
19553this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max");
19554this.range.css({
19555"left":"",
19556"bottom":""
19557});
19558}
19559if(options.range==="min"||options.range==="max"){
19560this._addClass(this.range,"ui-slider-range-"+options.range);
19561}
19562}else{
19563if(this.range){
19564this.range.remove();
19565}
19566this.range=null;
19567}
19568},
19569_setupEvents:function(){
19570this._off(this.handles);
19571this._on(this.handles,this._handleEvents);
19572this._hoverable(this.handles);
19573this._focusable(this.handles);
19574},
19575_destroy:function(){
19576this.handles.remove();
19577if(this.range){
19578this.range.remove();
19579}
19580this._mouseDestroy();
19581},
19582_mouseCapture:function(event){
19583var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,
19584that=this,
19585o=this.options;
19586if(o.disabled){
19587return false;
19588}
19589this.elementSize={
19590width:this.element.outerWidth(),
19591height:this.element.outerHeight()
19592};
19593this.elementOffset=this.element.offset();
19594position={x:event.pageX,y:event.pageY};
19595normValue=this._normValueFromMouse(position);
19596distance=this._valueMax()-this._valueMin()+1;
19597this.handles.each(function(i){
19598var thisDistance=Math.abs(normValue-that.values(i));
19599if((distance>thisDistance)||
19600(distance===thisDistance&&
19601(i===that._lastChangedValue||that.values(i)===o.min))){
19602distance=thisDistance;
19603closestHandle=$(this);
19604index=i;
19605}
19606});
19607allowed=this._start(event,index);
19608if(allowed===false){
19609return false;
19610}
19611this._mouseSliding=true;
19612this._handleIndex=index;
19613this._addClass(closestHandle,null,"ui-state-active");
19614closestHandle.trigger("focus");
19615offset=closestHandle.offset();
19616mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle");
19617this._clickOffset=mouseOverHandle?{left:0,top:0}:{
19618left:event.pageX-offset.left-(closestHandle.width()/2),
19619top:event.pageY-offset.top-
19620(closestHandle.height()/2)-
19621(parseInt(closestHandle.css("borderTopWidth"),10)||0)-
19622(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+
19623(parseInt(closestHandle.css("marginTop"),10)||0)
19624};
19625if(!this.handles.hasClass("ui-state-hover")){
19626this._slide(event,index,normValue);
19627}
19628this._animateOff=true;
19629return true;
19630},
19631_mouseStart:function(){
19632return true;
19633},
19634_mouseDrag:function(event){
19635var position={x:event.pageX,y:event.pageY},
19636normValue=this._normValueFromMouse(position);
19637this._slide(event,this._handleIndex,normValue);
19638return false;
19639},
19640_mouseStop:function(event){
19641this._removeClass(this.handles,null,"ui-state-active");
19642this._mouseSliding=false;
19643this._stop(event,this._handleIndex);
19644this._change(event,this._handleIndex);
19645this._handleIndex=null;
19646this._clickOffset=null;
19647this._animateOff=false;
19648return false;
19649},
19650_detectOrientation:function(){
19651this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal";
19652},
19653_normValueFromMouse:function(position){
19654var pixelTotal,
19655pixelMouse,
19656percentMouse,
19657valueTotal,
19658valueMouse;
19659if(this.orientation==="horizontal"){
19660pixelTotal=this.elementSize.width;
19661pixelMouse=position.x-this.elementOffset.left-
19662(this._clickOffset?this._clickOffset.left:0);
19663}else{
19664pixelTotal=this.elementSize.height;
19665pixelMouse=position.y-this.elementOffset.top-
19666(this._clickOffset?this._clickOffset.top:0);
19667}
19668percentMouse=(pixelMouse/pixelTotal);
19669if(percentMouse>1){
19670percentMouse=1;
19671}
19672if(percentMouse<0){
19673percentMouse=0;
19674}
19675if(this.orientation==="vertical"){
19676percentMouse=1-percentMouse;
19677}
19678valueTotal=this._valueMax()-this._valueMin();
19679valueMouse=this._valueMin()+percentMouse*valueTotal;
19680return this._trimAlignValue(valueMouse);
19681},
19682_uiHash:function(index,value,values){
19683var uiHash={
19684handle:this.handles[index],
19685handleIndex:index,
19686value:value!==undefined?value:this.value()
19687};
19688if(this._hasMultipleValues()){
19689uiHash.value=value!==undefined?value:this.values(index);
19690uiHash.values=values||this.values();
19691}
19692return uiHash;
19693},
19694_hasMultipleValues:function(){
19695return this.options.values&&this.options.values.length;
19696},
19697_start:function(event,index){
19698return this._trigger("start",event,this._uiHash(index));
19699},
19700_slide:function(event,index,newVal){
19701var allowed,otherVal,
19702currentValue=this.value(),
19703newValues=this.values();
19704if(this._hasMultipleValues()){
19705otherVal=this.values(index?0:1);
19706currentValue=this.values(index);
19707if(this.options.values.length===2&&this.options.range===true){
19708newVal=index===0?Math.min(otherVal,newVal):Math.max(otherVal,newVal);
19709}
19710newValues[index]=newVal;
19711}
19712if(newVal===currentValue){
19713return;
19714}
19715allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));
19716if(allowed===false){
19717return;
19718}
19719if(this._hasMultipleValues()){
19720this.values(index,newVal);
19721}else{
19722this.value(newVal);
19723}
19724},
19725_stop:function(event,index){
19726this._trigger("stop",event,this._uiHash(index));
19727},
19728_change:function(event,index){
19729if(!this._keySliding&&!this._mouseSliding){
19730this._lastChangedValue=index;
19731this._trigger("change",event,this._uiHash(index));
19732}
19733},
19734value:function(newValue){
19735if(arguments.length){
19736this.options.value=this._trimAlignValue(newValue);
19737this._refreshValue();
19738this._change(null,0);
19739return;
19740}
19741return this._value();
19742},
19743values:function(index,newValue){
19744var vals,
19745newValues,
19746i;
19747if(arguments.length>1){
19748this.options.values[index]=this._trimAlignValue(newValue);
19749this._refreshValue();
19750this._change(null,index);
19751return;
19752}
19753if(arguments.length){
19754if(Array.isArray(arguments[0])){
19755vals=this.options.values;
19756newValues=arguments[0];
19757for(i=0;i<vals.length;i+=1){
19758vals[i]=this._trimAlignValue(newValues[i]);
19759this._change(null,i);
19760}
19761this._refreshValue();
19762}else{
19763if(this._hasMultipleValues()){
19764return this._values(index);
19765}else{
19766return this.value();
19767}
19768}
19769}else{
19770return this._values();
19771}
19772},
19773_setOption:function(key,value){
19774var i,
19775valsLength=0;
19776if(key==="range"&&this.options.range===true){
19777if(value==="min"){
19778this.options.value=this._values(0);
19779this.options.values=null;
19780}else if(value==="max"){
19781this.options.value=this._values(this.options.values.length-1);
19782this.options.values=null;
19783}
19784}
19785if(Array.isArray(this.options.values)){
19786valsLength=this.options.values.length;
19787}
19788this._super(key,value);
19789switch(key){
19790case"orientation":
19791this._detectOrientation();
19792this._removeClass("ui-slider-horizontal ui-slider-vertical")
19793._addClass("ui-slider-"+this.orientation);
19794this._refreshValue();
19795if(this.options.range){
19796this._refreshRange(value);
19797}
19798this.handles.css(value==="horizontal"?"bottom":"left","");
19799break;
19800case"value":
19801this._animateOff=true;
19802this._refreshValue();
19803this._change(null,0);
19804this._animateOff=false;
19805break;
19806case"values":
19807this._animateOff=true;
19808this._refreshValue();
19809for(i=valsLength-1;i>=0;i--){
19810this._change(null,i);
19811}
19812this._animateOff=false;
19813break;
19814case"step":
19815case"min":
19816case"max":
19817this._animateOff=true;
19818this._calculateNewMax();
19819this._refreshValue();
19820this._animateOff=false;
19821break;
19822case"range":
19823this._animateOff=true;
19824this._refresh();
19825this._animateOff=false;
19826break;
19827}
19828},
19829_setOptionDisabled:function(value){
19830this._super(value);
19831this._toggleClass(null,"ui-state-disabled",!!value);
19832},
19833_value:function(){
19834var val=this.options.value;
19835val=this._trimAlignValue(val);
19836return val;
19837},
19838_values:function(index){
19839var val,
19840vals,
19841i;
19842if(arguments.length){
19843val=this.options.values[index];
19844val=this._trimAlignValue(val);
19845return val;
19846}else if(this._hasMultipleValues()){
19847vals=this.options.values.slice();
19848for(i=0;i<vals.length;i+=1){
19849vals[i]=this._trimAlignValue(vals[i]);
19850}
19851return vals;
19852}else{
19853return[];
19854}
19855},
19856_trimAlignValue:function(val){
19857if(val<=this._valueMin()){
19858return this._valueMin();
19859}
19860if(val>=this._valueMax()){
19861return this._valueMax();
19862}
19863var step=(this.options.step>0)?this.options.step:1,
19864valModStep=(val-this._valueMin())%step,
19865alignValue=val-valModStep;
19866if(Math.abs(valModStep)*2>=step){
19867alignValue+=(valModStep>0)?step:(-step);
19868}
19869return parseFloat(alignValue.toFixed(5));
19870},
19871_calculateNewMax:function(){
19872var max=this.options.max,
19873min=this._valueMin(),
19874step=this.options.step,
19875aboveMin=Math.round((max-min)/step)*step;
19876max=aboveMin+min;
19877if(max>this.options.max){
19878max-=step;
19879}
19880this.max=parseFloat(max.toFixed(this._precision()));
19881},
19882_precision:function(){
19883var precision=this._precisionOf(this.options.step);
19884if(this.options.min!==null){
19885precision=Math.max(precision,this._precisionOf(this.options.min));
19886}
19887return precision;
19888},
19889_precisionOf:function(num){
19890var str=num.toString(),
19891decimal=str.indexOf(".");
19892return decimal===-1?0:str.length-decimal-1;
19893},
19894_valueMin:function(){
19895return this.options.min;
19896},
19897_valueMax:function(){
19898return this.max;
19899},
19900_refreshRange:function(orientation){
19901if(orientation==="vertical"){
19902this.range.css({"width":"","left":""});
19903}
19904if(orientation==="horizontal"){
19905this.range.css({"height":"","bottom":""});
19906}
19907},
19908_refreshValue:function(){
19909var lastValPercent,valPercent,value,valueMin,valueMax,
19910oRange=this.options.range,
19911o=this.options,
19912that=this,
19913animate=(!this._animateOff)?o.animate:false,
19914_set={};
19915if(this._hasMultipleValues()){
19916this.handles.each(function(i){
19917valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-
19918that._valueMin())*100;
19919_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";
19920$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);
19921if(that.options.range===true){
19922if(that.orientation==="horizontal"){
19923if(i===0){
19924that.range.stop(1,1)[animate?"animate":"css"]({
19925left:valPercent+"%"
19926},o.animate);
19927}
19928if(i===1){
19929that.range[animate?"animate":"css"]({
19930width:(valPercent-lastValPercent)+"%"
19931},{
19932queue:false,
19933duration:o.animate
19934});
19935}
19936}else{
19937if(i===0){
19938that.range.stop(1,1)[animate?"animate":"css"]({
19939bottom:(valPercent)+"%"
19940},o.animate);
19941}
19942if(i===1){
19943that.range[animate?"animate":"css"]({
19944height:(valPercent-lastValPercent)+"%"
19945},{
19946queue:false,
19947duration:o.animate
19948});
19949}
19950}
19951}
19952lastValPercent=valPercent;
19953});
19954}else{
19955value=this.value();
19956valueMin=this._valueMin();
19957valueMax=this._valueMax();
19958valPercent=(valueMax!==valueMin)?
19959(value-valueMin)/(valueMax-valueMin)*100:
199600;
19961_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";
19962this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);
19963if(oRange==="min"&&this.orientation==="horizontal"){
19964this.range.stop(1,1)[animate?"animate":"css"]({
19965width:valPercent+"%"
19966},o.animate);
19967}
19968if(oRange==="max"&&this.orientation==="horizontal"){
19969this.range.stop(1,1)[animate?"animate":"css"]({
19970width:(100-valPercent)+"%"
19971},o.animate);
19972}
19973if(oRange==="min"&&this.orientation==="vertical"){
19974this.range.stop(1,1)[animate?"animate":"css"]({
19975height:valPercent+"%"
19976},o.animate);
19977}
19978if(oRange==="max"&&this.orientation==="vertical"){
19979this.range.stop(1,1)[animate?"animate":"css"]({
19980height:(100-valPercent)+"%"
19981},o.animate);
19982}
19983}
19984},
19985_handleEvents:{
19986keydown:function(event){
19987var allowed,curVal,newVal,step,
19988index=$(event.target).data("ui-slider-handle-index");
19989switch(event.keyCode){
19990case $.ui.keyCode.HOME:
19991case $.ui.keyCode.END:
19992case $.ui.keyCode.PAGE_UP:
19993case $.ui.keyCode.PAGE_DOWN:
19994case $.ui.keyCode.UP:
19995case $.ui.keyCode.RIGHT:
19996case $.ui.keyCode.DOWN:
19997case $.ui.keyCode.LEFT:
19998event.preventDefault();
19999if(!this._keySliding){
20000this._keySliding=true;
20001this._addClass($(event.target),null,"ui-state-active");
20002allowed=this._start(event,index);
20003if(allowed===false){
20004return;
20005}
20006}
20007break;
20008}
20009step=this.options.step;
20010if(this._hasMultipleValues()){
20011curVal=newVal=this.values(index);
20012}else{
20013curVal=newVal=this.value();
20014}
20015switch(event.keyCode){
20016case $.ui.keyCode.HOME:
20017newVal=this._valueMin();
20018break;
20019case $.ui.keyCode.END:
20020newVal=this._valueMax();
20021break;
20022case $.ui.keyCode.PAGE_UP:
20023newVal=this._trimAlignValue(
20024curVal+((this._valueMax()-this._valueMin())/this.numPages)
20025);
20026break;
20027case $.ui.keyCode.PAGE_DOWN:
20028newVal=this._trimAlignValue(
20029curVal-((this._valueMax()-this._valueMin())/this.numPages));
20030break;
20031case $.ui.keyCode.UP:
20032case $.ui.keyCode.RIGHT:
20033if(curVal===this._valueMax()){
20034return;
20035}
20036newVal=this._trimAlignValue(curVal+step);
20037break;
20038case $.ui.keyCode.DOWN:
20039case $.ui.keyCode.LEFT:
20040if(curVal===this._valueMin()){
20041return;
20042}
20043newVal=this._trimAlignValue(curVal-step);
20044break;
20045}
20046this._slide(event,index,newVal);
20047},
20048keyup:function(event){
20049var index=$(event.target).data("ui-slider-handle-index");
20050if(this._keySliding){
20051this._keySliding=false;
20052this._stop(event,index);
20053this._change(event,index);
20054this._removeClass($(event.target),null,"ui-state-active");
20055}
20056}
20057}
20058});
20059var widgetsSortable=$.widget("ui.sortable",$.ui.mouse,{
20060version:"1.14.1",
20061widgetEventPrefix:"sort",
20062ready:false,
20063options:{
20064appendTo:"parent",
20065axis:false,
20066connectWith:false,
20067containment:false,
20068cursor:"auto",
20069cursorAt:false,
20070dropOnEmpty:true,
20071forcePlaceholderSize:false,
20072forceHelperSize:false,
20073grid:false,
20074handle:false,
20075helper:"original",
20076items:"> *",
20077opacity:false,
20078placeholder:false,
20079revert:false,
20080scroll:true,
20081scrollSensitivity:20,
20082scrollSpeed:20,
20083scope:"default",
20084tolerance:"intersect",
20085zIndex:1000,
20086activate:null,
20087beforeStop:null,
20088change:null,
20089deactivate:null,
20090out:null,
20091over:null,
20092receive:null,
20093remove:null,
20094sort:null,
20095start:null,
20096stop:null,
20097update:null
20098},
20099_isOverAxis:function(x,reference,size){
20100return(x>=reference)&&(x<(reference+size));
20101},
20102_isFloating:function(item){
20103return(/left|right/).test(item.css("float"))||
20104(/inline|table-cell/).test(item.css("display"));
20105},
20106_create:function(){
20107this.containerCache={};
20108this._addClass("ui-sortable");
20109this.refresh();
20110this.offset=this.element.offset();
20111this._mouseInit();
20112this._setHandleClassName();
20113this.ready=true;
20114},
20115_setOption:function(key,value){
20116this._super(key,value);
20117if(key==="handle"){
20118this._setHandleClassName();
20119}
20120},
20121_setHandleClassName:function(){
20122var that=this;
20123this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");
20124$.each(this.items,function(){
20125that._addClass(
20126this.instance.options.handle?
20127this.item.find(this.instance.options.handle):
20128this.item,
20129"ui-sortable-handle"
20130);
20131});
20132},
20133_destroy:function(){
20134this._mouseDestroy();
20135for(var i=this.items.length-1;i>=0;i--){
20136this.items[i].item.removeData(this.widgetName+"-item");
20137}
20138return this;
20139},
20140_mouseCapture:function(event,overrideHandle){
20141var currentItem=null,
20142validHandle=false,
20143that=this;
20144if(this.reverting){
20145return false;
20146}
20147if(this.options.disabled||this.options.type==="static"){
20148return false;
20149}
20150this._refreshItems(event);
20151$(event.target).parents().each(function(){
20152if($.data(this,that.widgetName+"-item")===that){
20153currentItem=$(this);
20154return false;
20155}
20156});
20157if($.data(event.target,that.widgetName+"-item")===that){
20158currentItem=$(event.target);
20159}
20160if(!currentItem){
20161return false;
20162}
20163if(this.options.handle&&!overrideHandle){
20164$(this.options.handle,currentItem).find("*").addBack().each(function(){
20165if(this===event.target){
20166validHandle=true;
20167}
20168});
20169if(!validHandle){
20170return false;
20171}
20172}
20173this.currentItem=currentItem;
20174this._removeCurrentsFromItems();
20175return true;
20176},
20177_mouseStart:function(event,overrideHandle,noActivation){
20178var i,body,
20179o=this.options;
20180this.currentContainer=this;
20181this.refreshPositions();
20182this.appendTo=$(o.appendTo!=="parent"?
20183o.appendTo:
20184this.currentItem.parent());
20185this.helper=this._createHelper(event);
20186this._cacheHelperProportions();
20187this._cacheMargins();
20188this.offset=this.currentItem.offset();
20189this.offset={
20190top:this.offset.top-this.margins.top,
20191left:this.offset.left-this.margins.left
20192};
20193$.extend(this.offset,{
20194click:{
20195left:event.pageX-this.offset.left,
20196top:event.pageY-this.offset.top
20197},
20198relative:this._getRelativeOffset()
20199});
20200this.helper.css("position","absolute");
20201this.cssPosition=this.helper.css("position");
20202if(o.cursorAt){
20203this._adjustOffsetFromHelper(o.cursorAt);
20204}
20205this.domPosition={
20206prev:this.currentItem.prev()[0],
20207parent:this.currentItem.parent()[0]
20208};
20209if(this.helper[0]!==this.currentItem[0]){
20210this.currentItem.hide();
20211}
20212this._createPlaceholder();
20213this.scrollParent=this.placeholder.scrollParent();
20214$.extend(this.offset,{
20215parent:this._getParentOffset()
20216});
20217if(o.containment){
20218this._setContainment();
20219}
20220if(o.cursor&&o.cursor!=="auto"){
20221body=this.document.find("body");
20222this._storedStylesheet=
20223$("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(body);
20224}
20225if(o.zIndex){
20226if(this.helper.css("zIndex")){
20227this._storedZIndex=this.helper.css("zIndex");
20228}
20229this.helper.css("zIndex",o.zIndex);
20230}
20231if(o.opacity){
20232if(this.helper.css("opacity")){
20233this._storedOpacity=this.helper.css("opacity");
20234}
20235this.helper.css("opacity",o.opacity);
20236}
20237if(this.scrollParent[0]!==this.document[0]&&
20238this.scrollParent[0].tagName!=="HTML"){
20239this.overflowOffset=this.scrollParent.offset();
20240}
20241this._trigger("start",event,this._uiHash());
20242if(!this._preserveHelperProportions){
20243this._cacheHelperProportions();
20244}
20245if(!noActivation){
20246for(i=this.containers.length-1;i>=0;i--){
20247this.containers[i]._trigger("activate",event,this._uiHash(this));
20248}
20249}
20250if($.ui.ddmanager){
20251$.ui.ddmanager.current=this;
20252}
20253if($.ui.ddmanager&&!o.dropBehaviour){
20254$.ui.ddmanager.prepareOffsets(this,event);
20255}
20256this.dragging=true;
20257this._addClass(this.helper,"ui-sortable-helper");
20258if(!this.helper.parent().is(this.appendTo)){
20259this.helper.detach().appendTo(this.appendTo);
20260this.offset.parent=this._getParentOffset();
20261}
20262this.position=this.originalPosition=this._generatePosition(event);
20263this.originalPageX=event.pageX;
20264this.originalPageY=event.pageY;
20265this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute");
20266this._mouseDrag(event);
20267return true;
20268},
20269_scroll:function(event){
20270var o=this.options,
20271scrolled=false;
20272if(this.scrollParent[0]!==this.document[0]&&
20273this.scrollParent[0].tagName!=="HTML"){
20274if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-
20275event.pageY<o.scrollSensitivity){
20276this.scrollParent[0].scrollTop=
20277scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;
20278}else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){
20279this.scrollParent[0].scrollTop=
20280scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;
20281}
20282if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-
20283event.pageX<o.scrollSensitivity){
20284this.scrollParent[0].scrollLeft=scrolled=
20285this.scrollParent[0].scrollLeft+o.scrollSpeed;
20286}else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){
20287this.scrollParent[0].scrollLeft=scrolled=
20288this.scrollParent[0].scrollLeft-o.scrollSpeed;
20289}
20290}else{
20291if(event.pageY-this.document.scrollTop()<o.scrollSensitivity){
20292scrolled=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed);
20293}else if(this.window.height()-(event.pageY-this.document.scrollTop())<
20294o.scrollSensitivity){
20295scrolled=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed);
20296}
20297if(event.pageX-this.document.scrollLeft()<o.scrollSensitivity){
20298scrolled=this.document.scrollLeft(
20299this.document.scrollLeft()-o.scrollSpeed
20300);
20301}else if(this.window.width()-(event.pageX-this.document.scrollLeft())<
20302o.scrollSensitivity){
20303scrolled=this.document.scrollLeft(
20304this.document.scrollLeft()+o.scrollSpeed
20305);
20306}
20307}
20308return scrolled;
20309},
20310_mouseDrag:function(event){
20311var i,item,itemElement,intersection,
20312o=this.options;
20313this.position=this._generatePosition(event);
20314this.positionAbs=this._convertPositionTo("absolute");
20315if(!this.options.axis||this.options.axis!=="y"){
20316this.helper[0].style.left=this.position.left+"px";
20317}
20318if(!this.options.axis||this.options.axis!=="x"){
20319this.helper[0].style.top=this.position.top+"px";
20320}
20321if(o.scroll){
20322if(this._scroll(event)!==false){
20323this._refreshItemPositions(true);
20324if($.ui.ddmanager&&!o.dropBehaviour){
20325$.ui.ddmanager.prepareOffsets(this,event);
20326}
20327}
20328}
20329this.dragDirection={
20330vertical:this._getDragVerticalDirection(),
20331horizontal:this._getDragHorizontalDirection()
20332};
20333for(i=this.items.length-1;i>=0;i--){
20334item=this.items[i];
20335itemElement=item.item[0];
20336intersection=this._intersectsWithPointer(item);
20337if(!intersection){
20338continue;
20339}
20340if(item.instance!==this.currentContainer){
20341continue;
20342}
20343if(itemElement!==this.currentItem[0]&&
20344this.placeholder[intersection===1?
20345"next":"prev"]()[0]!==itemElement&&
20346!$.contains(this.placeholder[0],itemElement)&&
20347(this.options.type==="semi-dynamic"?
20348!$.contains(this.element[0],itemElement):
20349true
20350)
20351){
20352this.direction=intersection===1?"down":"up";
20353if(this.options.tolerance==="pointer"||
20354this._intersectsWithSides(item)){
20355this._rearrange(event,item);
20356}else{
20357break;
20358}
20359this._trigger("change",event,this._uiHash());
20360break;
20361}
20362}
20363this._contactContainers(event);
20364if($.ui.ddmanager){
20365$.ui.ddmanager.drag(this,event);
20366}
20367this._trigger("sort",event,this._uiHash());
20368this.lastPositionAbs=this.positionAbs;
20369return false;
20370},
20371_mouseStop:function(event,noPropagation){
20372if(!event){
20373return;
20374}
20375if($.ui.ddmanager&&!this.options.dropBehaviour){
20376$.ui.ddmanager.drop(this,event);
20377}
20378if(this.options.revert){
20379var that=this,
20380cur=this.placeholder.offset(),
20381axis=this.options.axis,
20382animation={};
20383if(!axis||axis==="x"){
20384animation.left=cur.left-this.offset.parent.left-this.margins.left+
20385(this.offsetParent[0]===this.document[0].body?
203860:
20387this.offsetParent[0].scrollLeft
20388);
20389}
20390if(!axis||axis==="y"){
20391animation.top=cur.top-this.offset.parent.top-this.margins.top+
20392(this.offsetParent[0]===this.document[0].body?
203930:
20394this.offsetParent[0].scrollTop
20395);
20396}
20397this.reverting=true;
20398$(this.helper).animate(
20399animation,
20400parseInt(this.options.revert,10)||500,
20401function(){
20402that._clear(event);
20403}
20404);
20405}else{
20406this._clear(event,noPropagation);
20407}
20408return false;
20409},
20410cancel:function(){
20411if(this.dragging){
20412this._mouseUp(new $.Event("mouseup",{target:null}));
20413if(this.options.helper==="original"){
20414this.currentItem.css(this._storedCSS);
20415this._removeClass(this.currentItem,"ui-sortable-helper");
20416}else{
20417this.currentItem.show();
20418}
20419for(var i=this.containers.length-1;i>=0;i--){
20420this.containers[i]._trigger("deactivate",null,this._uiHash(this));
20421if(this.containers[i].containerCache.over){
20422this.containers[i]._trigger("out",null,this._uiHash(this));
20423this.containers[i].containerCache.over=0;
20424}
20425}
20426}
20427if(this.placeholder){
20428if(this.placeholder[0].parentNode){
20429this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
20430}
20431if(this.options.helper!=="original"&&this.helper&&
20432this.helper[0].parentNode){
20433this.helper.remove();
20434}
20435$.extend(this,{
20436helper:null,
20437dragging:false,
20438reverting:false,
20439_noFinalSort:null
20440});
20441if(this.domPosition.prev){
20442$(this.domPosition.prev).after(this.currentItem);
20443}else{
20444$(this.domPosition.parent).prepend(this.currentItem);
20445}
20446}
20447return this;
20448},
20449serialize:function(o){
20450var items=this._getItemsAsjQuery(o&&o.connected),
20451str=[];
20452o=o||{};
20453$(items).each(function(){
20454var res=($(o.item||this).attr(o.attribute||"id")||"")
20455.match(o.expression||(/(.+)[\-=_](.+)/));
20456if(res){
20457str.push(
20458(o.key||res[1]+"[]")+
20459"="+(o.key&&o.expression?res[1]:res[2]));
20460}
20461});
20462if(!str.length&&o.key){
20463str.push(o.key+"=");
20464}
20465return str.join("&");
20466},
20467toArray:function(o){
20468var items=this._getItemsAsjQuery(o&&o.connected),
20469ret=[];
20470o=o||{};
20471items.each(function(){
20472ret.push($(o.item||this).attr(o.attribute||"id")||"");
20473});
20474return ret;
20475},
20476_intersectsWith:function(item){
20477var x1=this.positionAbs.left,
20478x2=x1+this.helperProportions.width,
20479y1=this.positionAbs.top,
20480y2=y1+this.helperProportions.height,
20481l=item.left,
20482r=l+item.width,
20483t=item.top,
20484b=t+item.height,
20485dyClick=this.offset.click.top,
20486dxClick=this.offset.click.left,
20487isOverElementHeight=(this.options.axis==="x")||((y1+dyClick)>t&&
20488(y1+dyClick)<b),
20489isOverElementWidth=(this.options.axis==="y")||((x1+dxClick)>l&&
20490(x1+dxClick)<r),
20491isOverElement=isOverElementHeight&&isOverElementWidth;
20492if(this.options.tolerance==="pointer"||
20493this.options.forcePointerForContainers||
20494(this.options.tolerance!=="pointer"&&
20495this.helperProportions[this.floating?"width":"height"]>
20496item[this.floating?"width":"height"])
20497){
20498return isOverElement;
20499}else{
20500return(l<x1+(this.helperProportions.width/2)&&
20501x2-(this.helperProportions.width/2)<r&&
20502t<y1+(this.helperProportions.height/2)&&
20503y2-(this.helperProportions.height/2)<b);
20504
20505}
20506},
20507_intersectsWithPointer:function(item){
20508var verticalDirection,horizontalDirection,
20509isOverElementHeight=(this.options.axis==="x")||
20510this._isOverAxis(
20511this.positionAbs.top+this.offset.click.top,item.top,item.height),
20512isOverElementWidth=(this.options.axis==="y")||
20513this._isOverAxis(
20514this.positionAbs.left+this.offset.click.left,item.left,item.width),
20515isOverElement=isOverElementHeight&&isOverElementWidth;
20516if(!isOverElement){
20517return false;
20518}
20519verticalDirection=this.dragDirection.vertical;
20520horizontalDirection=this.dragDirection.horizontal;
20521return this.floating?
20522((horizontalDirection==="right"||verticalDirection==="down")?2:1):
20523(verticalDirection&&(verticalDirection==="down"?2:1));
20524},
20525_intersectsWithSides:function(item){
20526var isOverBottomHalf=this._isOverAxis(this.positionAbs.top+
20527this.offset.click.top,item.top+(item.height/2),item.height),
20528isOverRightHalf=this._isOverAxis(this.positionAbs.left+
20529this.offset.click.left,item.left+(item.width/2),item.width),
20530verticalDirection=this.dragDirection.vertical,
20531horizontalDirection=this.dragDirection.horizontal;
20532if(this.floating&&horizontalDirection){
20533return((horizontalDirection==="right"&&isOverRightHalf)||
20534(horizontalDirection==="left"&&!isOverRightHalf));
20535}else{
20536return verticalDirection&&((verticalDirection==="down"&&isOverBottomHalf)||
20537(verticalDirection==="up"&&!isOverBottomHalf));
20538}
20539},
20540_getDragVerticalDirection:function(){
20541var delta=this.positionAbs.top-this.lastPositionAbs.top;
20542return delta!==0&&(delta>0?"down":"up");
20543},
20544_getDragHorizontalDirection:function(){
20545var delta=this.positionAbs.left-this.lastPositionAbs.left;
20546return delta!==0&&(delta>0?"right":"left");
20547},
20548refresh:function(event){
20549this._refreshItems(event);
20550this._setHandleClassName();
20551this.refreshPositions();
20552return this;
20553},
20554_connectWith:function(){
20555var options=this.options;
20556return options.connectWith.constructor===String?
20557[options.connectWith]:
20558options.connectWith;
20559},
20560_getItemsAsjQuery:function(connected){
20561var i,j,cur,inst,
20562items=[],
20563queries=[],
20564connectWith=this._connectWith();
20565if(connectWith&&connected){
20566for(i=connectWith.length-1;i>=0;i--){
20567cur=$(connectWith[i],this.document[0]);
20568for(j=cur.length-1;j>=0;j--){
20569inst=$.data(cur[j],this.widgetFullName);
20570if(inst&&inst!==this&&!inst.options.disabled){
20571queries.push([typeof inst.options.items==="function"?
20572inst.options.items.call(inst.element):
20573$(inst.options.items,inst.element)
20574.not(".ui-sortable-helper")
20575.not(".ui-sortable-placeholder"),inst]);
20576}
20577}
20578}
20579}
20580queries.push([typeof this.options.items==="function"?
20581this.options.items
20582.call(this.element,null,{options:this.options,item:this.currentItem}):
20583$(this.options.items,this.element)
20584.not(".ui-sortable-helper")
20585.not(".ui-sortable-placeholder"),this]);
20586function addItems(){
20587items.push(this);
20588}
20589for(i=queries.length-1;i>=0;i--){
20590queries[i][0].each(addItems);
20591}
20592return $(items);
20593},
20594_removeCurrentsFromItems:function(){
20595var list=this.currentItem.find(":data("+this.widgetName+"-item)");
20596this.items=$.grep(this.items,function(item){
20597for(var j=0;j<list.length;j++){
20598if(list[j]===item.item[0]){
20599return false;
20600}
20601}
20602return true;
20603});
20604},
20605_refreshItems:function(event){
20606this.items=[];
20607this.containers=[this];
20608var i,j,cur,inst,targetData,_queries,item,queriesLength,
20609items=this.items,
20610queries=[[typeof this.options.items==="function"?
20611this.options.items.call(this.element[0],event,{item:this.currentItem}):
20612$(this.options.items,this.element),this]],
20613connectWith=this._connectWith();
20614if(connectWith&&this.ready){
20615for(i=connectWith.length-1;i>=0;i--){
20616cur=$(connectWith[i],this.document[0]);
20617for(j=cur.length-1;j>=0;j--){
20618inst=$.data(cur[j],this.widgetFullName);
20619if(inst&&inst!==this&&!inst.options.disabled){
20620queries.push([typeof inst.options.items==="function"?
20621inst.options.items
20622.call(inst.element[0],event,{item:this.currentItem}):
20623$(inst.options.items,inst.element),inst]);
20624this.containers.push(inst);
20625}
20626}
20627}
20628}
20629for(i=queries.length-1;i>=0;i--){
20630targetData=queries[i][1];
20631_queries=queries[i][0];
20632for(j=0,queriesLength=_queries.length;j<queriesLength;j++){
20633item=$(_queries[j]);
20634item.data(this.widgetName+"-item",targetData);
20635items.push({
20636item:item,
20637instance:targetData,
20638width:0,height:0,
20639left:0,top:0
20640});
20641}
20642}
20643},
20644_refreshItemPositions:function(fast){
20645var i,item,t,p;
20646for(i=this.items.length-1;i>=0;i--){
20647item=this.items[i];
20648if(this.currentContainer&&item.instance!==this.currentContainer&&
20649item.item[0]!==this.currentItem[0]){
20650continue;
20651}
20652t=this.options.toleranceElement?
20653$(this.options.toleranceElement,item.item):
20654item.item;
20655if(!fast){
20656item.width=t.outerWidth();
20657item.height=t.outerHeight();
20658}
20659p=t.offset();
20660item.left=p.left;
20661item.top=p.top;
20662}
20663},
20664refreshPositions:function(fast){
20665this.floating=this.items.length?
20666this.options.axis==="x"||this._isFloating(this.items[0].item):
20667false;
20668if(this.offsetParent&&this.helper){
20669this.offset.parent=this._getParentOffset();
20670}
20671this._refreshItemPositions(fast);
20672var i,p;
20673if(this.options.custom&&this.options.custom.refreshContainers){
20674this.options.custom.refreshContainers.call(this);
20675}else{
20676for(i=this.containers.length-1;i>=0;i--){
20677p=this.containers[i].element.offset();
20678this.containers[i].containerCache.left=p.left;
20679this.containers[i].containerCache.top=p.top;
20680this.containers[i].containerCache.width=
20681this.containers[i].element.outerWidth();
20682this.containers[i].containerCache.height=
20683this.containers[i].element.outerHeight();
20684}
20685}
20686return this;
20687},
20688_createPlaceholder:function(that){
20689that=that||this;
20690var className,nodeName,
20691o=that.options;
20692if(!o.placeholder||o.placeholder.constructor===String){
20693className=o.placeholder;
20694nodeName=that.currentItem[0].nodeName.toLowerCase();
20695o.placeholder={
20696element:function(){
20697var element=$("<"+nodeName+">",that.document[0]);
20698that._addClass(element,"ui-sortable-placeholder",
20699className||that.currentItem[0].className)
20700._removeClass(element,"ui-sortable-helper");
20701if(nodeName==="tbody"){
20702that._createTrPlaceholder(
20703that.currentItem.find("tr").eq(0),
20704$("<tr>",that.document[0]).appendTo(element)
20705);
20706}else if(nodeName==="tr"){
20707that._createTrPlaceholder(that.currentItem,element);
20708}else if(nodeName==="img"){
20709element.attr("src",that.currentItem.attr("src"));
20710}
20711if(!className){
20712element.css("visibility","hidden");
20713}
20714return element;
20715},
20716update:function(container,p){
20717if(className&&!o.forcePlaceholderSize){
20718return;
20719}
20720if(!p.height()||(o.forcePlaceholderSize&&
20721(nodeName==="tbody"||nodeName==="tr"))){
20722p.height(
20723that.currentItem.innerHeight()-
20724parseInt(that.currentItem.css("paddingTop")||0,10)-
20725parseInt(that.currentItem.css("paddingBottom")||0,10));
20726}
20727if(!p.width()){
20728p.width(
20729that.currentItem.innerWidth()-
20730parseInt(that.currentItem.css("paddingLeft")||0,10)-
20731parseInt(that.currentItem.css("paddingRight")||0,10));
20732}
20733}
20734};
20735}
20736that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));
20737that.currentItem.after(that.placeholder);
20738o.placeholder.update(that,that.placeholder);
20739},
20740_createTrPlaceholder:function(sourceTr,targetTr){
20741var that=this;
20742sourceTr.children().each(function(){
20743$("<td>&#160;</td>",that.document[0])
20744.attr("colspan",$(this).attr("colspan")||1)
20745.appendTo(targetTr);
20746});
20747},
20748_contactContainers:function(event){
20749var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,
20750floating,axis,
20751innermostContainer=null,
20752innermostIndex=null;
20753for(i=this.containers.length-1;i>=0;i--){
20754if($.contains(this.currentItem[0],this.containers[i].element[0])){
20755continue;
20756}
20757if(this._intersectsWith(this.containers[i].containerCache)){
20758if(innermostContainer&&
20759$.contains(
20760this.containers[i].element[0],
20761innermostContainer.element[0])){
20762continue;
20763}
20764innermostContainer=this.containers[i];
20765innermostIndex=i;
20766}else{
20767if(this.containers[i].containerCache.over){
20768this.containers[i]._trigger("out",event,this._uiHash(this));
20769this.containers[i].containerCache.over=0;
20770}
20771}
20772}
20773if(!innermostContainer){
20774return;
20775}
20776if(this.containers.length===1){
20777if(!this.containers[innermostIndex].containerCache.over){
20778this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));
20779this.containers[innermostIndex].containerCache.over=1;
20780}
20781}else{
20782dist=10000;
20783itemWithLeastDistance=null;
20784floating=innermostContainer.floating||this._isFloating(this.currentItem);
20785posProperty=floating?"left":"top";
20786sizeProperty=floating?"width":"height";
20787axis=floating?"pageX":"pageY";
20788for(j=this.items.length-1;j>=0;j--){
20789if(!$.contains(
20790this.containers[innermostIndex].element[0],this.items[j].item[0])
20791){
20792continue;
20793}
20794if(this.items[j].item[0]===this.currentItem[0]){
20795continue;
20796}
20797cur=this.items[j].item.offset()[posProperty];
20798nearBottom=false;
20799if(event[axis]-cur>this.items[j][sizeProperty]/2){
20800nearBottom=true;
20801}
20802if(Math.abs(event[axis]-cur)<dist){
20803dist=Math.abs(event[axis]-cur);
20804itemWithLeastDistance=this.items[j];
20805this.direction=nearBottom?"up":"down";
20806}
20807}
20808if(!itemWithLeastDistance&&!this.options.dropOnEmpty){
20809return;
20810}
20811if(this.currentContainer===this.containers[innermostIndex]){
20812if(!this.currentContainer.containerCache.over){
20813this.containers[innermostIndex]._trigger("over",event,this._uiHash());
20814this.currentContainer.containerCache.over=1;
20815}
20816return;
20817}
20818if(itemWithLeastDistance){
20819this._rearrange(event,itemWithLeastDistance,null,true);
20820}else{
20821this._rearrange(event,null,this.containers[innermostIndex].element,true);
20822}
20823this._trigger("change",event,this._uiHash());
20824this.containers[innermostIndex]._trigger("change",event,this._uiHash(this));
20825this.currentContainer=this.containers[innermostIndex];
20826this.options.placeholder.update(this.currentContainer,this.placeholder);
20827this.scrollParent=this.placeholder.scrollParent();
20828if(this.scrollParent[0]!==this.document[0]&&
20829this.scrollParent[0].tagName!=="HTML"){
20830this.overflowOffset=this.scrollParent.offset();
20831}
20832this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));
20833this.containers[innermostIndex].containerCache.over=1;
20834}
20835},
20836_createHelper:function(event){
20837var o=this.options,
20838helper=typeof o.helper==="function"?
20839$(o.helper.apply(this.element[0],[event,this.currentItem])):
20840(o.helper==="clone"?this.currentItem.clone():this.currentItem);
20841if(!helper.parents("body").length){
20842this.appendTo[0].appendChild(helper[0]);
20843}
20844if(helper[0]===this.currentItem[0]){
20845this._storedCSS={
20846width:this.currentItem[0].style.width,
20847height:this.currentItem[0].style.height,
20848position:this.currentItem.css("position"),
20849top:this.currentItem.css("top"),
20850left:this.currentItem.css("left")
20851};
20852}
20853if(!helper[0].style.width||o.forceHelperSize){
20854helper.width(this.currentItem.width());
20855}
20856if(!helper[0].style.height||o.forceHelperSize){
20857helper.height(this.currentItem.height());
20858}
20859return helper;
20860},
20861_adjustOffsetFromHelper:function(obj){
20862if(typeof obj==="string"){
20863obj=obj.split(" ");
20864}
20865if(Array.isArray(obj)){
20866obj={left:+obj[0],top:+obj[1]||0};
20867}
20868if("left"in obj){
20869this.offset.click.left=obj.left+this.margins.left;
20870}
20871if("right"in obj){
20872this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;
20873}
20874if("top"in obj){
20875this.offset.click.top=obj.top+this.margins.top;
20876}
20877if("bottom"in obj){
20878this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;
20879}
20880},
20881_getParentOffset:function(){
20882this.offsetParent=this.helper.offsetParent();
20883var po=this.offsetParent.offset();
20884if(this.cssPosition==="absolute"&&this.scrollParent[0]!==this.document[0]&&
20885$.contains(this.scrollParent[0],this.offsetParent[0])){
20886po.left+=this.scrollParent.scrollLeft();
20887po.top+=this.scrollParent.scrollTop();
20888}
20889if(this.offsetParent[0]===this.document[0].body){
20890po={top:0,left:0};
20891}
20892return{
20893top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),
20894left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)
20895};
20896},
20897_getRelativeOffset:function(){
20898if(this.cssPosition==="relative"){
20899var p=this.currentItem.position();
20900return{
20901top:p.top-(parseInt(this.helper.css("top"),10)||0)+
20902this.scrollParent.scrollTop(),
20903left:p.left-(parseInt(this.helper.css("left"),10)||0)+
20904this.scrollParent.scrollLeft()
20905};
20906}else{
20907return{top:0,left:0};
20908}
20909},
20910_cacheMargins:function(){
20911this.margins={
20912left:(parseInt(this.currentItem.css("marginLeft"),10)||0),
20913top:(parseInt(this.currentItem.css("marginTop"),10)||0)
20914};
20915},
20916_cacheHelperProportions:function(){
20917this.helperProportions={
20918width:this.helper.outerWidth(),
20919height:this.helper.outerHeight()
20920};
20921},
20922_setContainment:function(){
20923var ce,co,over,
20924o=this.options;
20925if(o.containment==="parent"){
20926o.containment=this.helper[0].parentNode;
20927}
20928if(o.containment==="document"||o.containment==="window"){
20929this.containment=[
209300-this.offset.relative.left-this.offset.parent.left,
209310-this.offset.relative.top-this.offset.parent.top,
20932o.containment==="document"?
20933this.document.width():
20934this.window.width()-this.helperProportions.width-this.margins.left,
20935(o.containment==="document"?
20936(this.document.height()||document.body.parentNode.scrollHeight):
20937this.window.height()||this.document[0].body.parentNode.scrollHeight
20938)-this.helperProportions.height-this.margins.top
20939];
20940}
20941if(!(/^(document|window|parent)$/).test(o.containment)){
20942ce=$(o.containment)[0];
20943co=$(o.containment).offset();
20944over=($(ce).css("overflow")!=="hidden");
20945this.containment=[
20946co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+
20947(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,
20948co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+
20949(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,
20950co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-
20951(parseInt($(ce).css("borderLeftWidth"),10)||0)-
20952(parseInt($(ce).css("paddingRight"),10)||0)-
20953this.helperProportions.width-this.margins.left,
20954co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-
20955(parseInt($(ce).css("borderTopWidth"),10)||0)-
20956(parseInt($(ce).css("paddingBottom"),10)||0)-
20957this.helperProportions.height-this.margins.top
20958];
20959}
20960},
20961_convertPositionTo:function(d,pos){
20962if(!pos){
20963pos=this.position;
20964}
20965var mod=d==="absolute"?1:-1,
20966scroll=this.cssPosition==="absolute"&&
20967!(this.scrollParent[0]!==this.document[0]&&
20968$.contains(this.scrollParent[0],this.offsetParent[0]))?
20969this.offsetParent:
20970this.scrollParent,
20971scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);
20972return{
20973top:(
20974pos.top+
20975this.offset.relative.top*mod+
20976this.offset.parent.top*mod-
20977((this.cssPosition==="fixed"?
20978-this.scrollParent.scrollTop():
20979(scrollIsRootNode?0:scroll.scrollTop()))*mod)
20980),
20981left:(
20982pos.left+
20983this.offset.relative.left*mod+
20984this.offset.parent.left*mod-
20985((this.cssPosition==="fixed"?
20986-this.scrollParent.scrollLeft():scrollIsRootNode?0:
20987scroll.scrollLeft())*mod)
20988)
20989};
20990},
20991_generatePosition:function(event){
20992var top,left,
20993o=this.options,
20994pageX=event.pageX,
20995pageY=event.pageY,
20996scroll=this.cssPosition==="absolute"&&
20997!(this.scrollParent[0]!==this.document[0]&&
20998$.contains(this.scrollParent[0],this.offsetParent[0]))?
20999this.offsetParent:
21000this.scrollParent,
21001scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);
21002if(this.cssPosition==="relative"&&!(this.scrollParent[0]!==this.document[0]&&
21003this.scrollParent[0]!==this.offsetParent[0])){
21004this.offset.relative=this._getRelativeOffset();
21005}
21006if(this.originalPosition){
21007if(this.containment){
21008if(event.pageX-this.offset.click.left<this.containment[0]){
21009pageX=this.containment[0]+this.offset.click.left;
21010}
21011if(event.pageY-this.offset.click.top<this.containment[1]){
21012pageY=this.containment[1]+this.offset.click.top;
21013}
21014if(event.pageX-this.offset.click.left>this.containment[2]){
21015pageX=this.containment[2]+this.offset.click.left;
21016}
21017if(event.pageY-this.offset.click.top>this.containment[3]){
21018pageY=this.containment[3]+this.offset.click.top;
21019}
21020}
21021if(o.grid){
21022top=this.originalPageY+Math.round((pageY-this.originalPageY)/
21023o.grid[1])*o.grid[1];
21024pageY=this.containment?
21025((top-this.offset.click.top>=this.containment[1]&&
21026top-this.offset.click.top<=this.containment[3])?
21027top:
21028((top-this.offset.click.top>=this.containment[1])?
21029top-o.grid[1]:top+o.grid[1])):
21030top;
21031left=this.originalPageX+Math.round((pageX-this.originalPageX)/
21032o.grid[0])*o.grid[0];
21033pageX=this.containment?
21034((left-this.offset.click.left>=this.containment[0]&&
21035left-this.offset.click.left<=this.containment[2])?
21036left:
21037((left-this.offset.click.left>=this.containment[0])?
21038left-o.grid[0]:left+o.grid[0])):
21039left;
21040}
21041}
21042return{
21043top:(
21044pageY-
21045this.offset.click.top-
21046this.offset.relative.top-
21047this.offset.parent.top+
21048((this.cssPosition==="fixed"?
21049-this.scrollParent.scrollTop():
21050(scrollIsRootNode?0:scroll.scrollTop())))
21051),
21052left:(
21053pageX-
21054this.offset.click.left-
21055this.offset.relative.left-
21056this.offset.parent.left+
21057((this.cssPosition==="fixed"?
21058-this.scrollParent.scrollLeft():
21059scrollIsRootNode?0:scroll.scrollLeft()))
21060)
21061};
21062},
21063_rearrange:function(event,i,a,hardRefresh){
21064if(a){
21065a[0].appendChild(this.placeholder[0]);
21066}else{
21067i.item[0].parentNode.insertBefore(this.placeholder[0],
21068(this.direction==="down"?i.item[0]:i.item[0].nextSibling));
21069}
21070this.counter=this.counter?++this.counter:1;
21071var counter=this.counter;
21072this._delay(function(){
21073if(counter===this.counter){
21074this.refreshPositions(!hardRefresh);
21075}
21076});
21077},
21078_clear:function(event,noPropagation){
21079this.reverting=false;
21080var i,
21081delayedTriggers=[];
21082if(!this._noFinalSort&&this.currentItem.parent().length){
21083this.placeholder.before(this.currentItem);
21084}
21085this._noFinalSort=null;
21086if(this.helper[0]===this.currentItem[0]){
21087for(i in this._storedCSS){
21088if(this._storedCSS[i]==="auto"||this._storedCSS[i]==="static"){
21089this._storedCSS[i]="";
21090}
21091}
21092this.currentItem.css(this._storedCSS);
21093this._removeClass(this.currentItem,"ui-sortable-helper");
21094}else{
21095this.currentItem.show();
21096}
21097if(this.fromOutside&&!noPropagation){
21098delayedTriggers.push(function(event){
21099this._trigger("receive",event,this._uiHash(this.fromOutside));
21100});
21101}
21102if((this.fromOutside||
21103this.domPosition.prev!==
21104this.currentItem.prev().not(".ui-sortable-helper")[0]||
21105this.domPosition.parent!==this.currentItem.parent()[0])&&!noPropagation){
21106delayedTriggers.push(function(event){
21107this._trigger("update",event,this._uiHash());
21108});
21109}
21110if(this!==this.currentContainer){
21111if(!noPropagation){
21112delayedTriggers.push(function(event){
21113this._trigger("remove",event,this._uiHash());
21114});
21115delayedTriggers.push((function(c){
21116return function(event){
21117c._trigger("receive",event,this._uiHash(this));
21118};
21119}).call(this,this.currentContainer));
21120delayedTriggers.push((function(c){
21121return function(event){
21122c._trigger("update",event,this._uiHash(this));
21123};
21124}).call(this,this.currentContainer));
21125}
21126}
21127function delayEvent(type,instance,container){
21128return function(event){
21129container._trigger(type,event,instance._uiHash(instance));
21130};
21131}
21132for(i=this.containers.length-1;i>=0;i--){
21133if(!noPropagation){
21134delayedTriggers.push(delayEvent("deactivate",this,this.containers[i]));
21135}
21136if(this.containers[i].containerCache.over){
21137delayedTriggers.push(delayEvent("out",this,this.containers[i]));
21138this.containers[i].containerCache.over=0;
21139}
21140}
21141if(this._storedStylesheet){
21142this._storedStylesheet.remove();
21143this._storedStylesheet=null;
21144}
21145if(this._storedOpacity){
21146this.helper.css("opacity",this._storedOpacity);
21147}
21148if(this._storedZIndex){
21149this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex);
21150}
21151this.dragging=false;
21152if(!noPropagation){
21153this._trigger("beforeStop",event,this._uiHash());
21154}
21155this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
21156if(!this.cancelHelperRemoval){
21157if(this.helper[0]!==this.currentItem[0]){
21158this.helper.remove();
21159}
21160this.helper=null;
21161}
21162if(!noPropagation){
21163for(i=0;i<delayedTriggers.length;i++){
21164delayedTriggers[i].call(this,event);
21165}
21166this._trigger("stop",event,this._uiHash());
21167}
21168this.fromOutside=false;
21169return!this.cancelHelperRemoval;
21170},
21171_trigger:function(){
21172if($.Widget.prototype._trigger.apply(this,arguments)===false){
21173this.cancel();
21174}
21175},
21176_uiHash:function(_inst){
21177var inst=_inst||this;
21178return{
21179helper:inst.helper,
21180placeholder:inst.placeholder||$([]),
21181position:inst.position,
21182originalPosition:inst.originalPosition,
21183offset:inst.positionAbs,
21184item:inst.currentItem,
21185sender:_inst?_inst.element:null
21186};
21187}
21188});
21189function spinnerModifier(fn){
21190return function(){
21191var previous=this.element.val();
21192fn.apply(this,arguments);
21193this._refresh();
21194if(previous!==this.element.val()){
21195this._trigger("change");
21196}
21197};
21198}
21199$.widget("ui.spinner",{
21200version:"1.14.1",
21201defaultElement:"<input>",
21202widgetEventPrefix:"spin",
21203options:{
21204classes:{
21205"ui-spinner":"ui-corner-all",
21206"ui-spinner-down":"ui-corner-br",
21207"ui-spinner-up":"ui-corner-tr"
21208},
21209culture:null,
21210icons:{
21211down:"ui-icon-triangle-1-s",
21212up:"ui-icon-triangle-1-n"
21213},
21214incremental:true,
21215max:null,
21216min:null,
21217numberFormat:null,
21218page:10,
21219step:1,
21220change:null,
21221spin:null,
21222start:null,
21223stop:null
21224},
21225_create:function(){
21226this._setOption("max",this.options.max);
21227this._setOption("min",this.options.min);
21228this._setOption("step",this.options.step);
21229if(this.value()!==""){
21230this._value(this.element.val(),true);
21231}
21232this._draw();
21233this._on(this._events);
21234this._refresh();
21235this._on(this.window,{
21236beforeunload:function(){
21237this.element.removeAttr("autocomplete");
21238}
21239});
21240},
21241_getCreateOptions:function(){
21242var options=this._super();
21243var element=this.element;
21244$.each(["min","max","step"],function(i,option){
21245var value=element.attr(option);
21246if(value!=null&&value.length){
21247options[option]=value;
21248}
21249});
21250return options;
21251},
21252_events:{
21253keydown:function(event){
21254if(this._start(event)&&this._keydown(event)){
21255event.preventDefault();
21256}
21257},
21258keyup:"_stop",
21259focus:function(){
21260this.previous=this.element.val();
21261},
21262blur:function(event){
21263this._stop();
21264this._refresh();
21265if(this.previous!==this.element.val()){
21266this._trigger("change",event);
21267}
21268},
21269mousewheel:function(event,delta){
21270var activeElement=this.document[0].activeElement;
21271var isActive=this.element[0]===activeElement;
21272if(!isActive||!delta){
21273return;
21274}
21275if(!this.spinning&&!this._start(event)){
21276return false;
21277}
21278this._spin((delta>0?1:-1)*this.options.step,event);
21279clearTimeout(this.mousewheelTimer);
21280this.mousewheelTimer=this._delay(function(){
21281if(this.spinning){
21282this._stop(event);
21283}
21284},100);
21285event.preventDefault();
21286},
21287"mousedown .ui-spinner-button":function(event){
21288var previous;
21289previous=this.element[0]===this.document[0].activeElement?
21290this.previous:this.element.val();
21291function checkFocus(){
21292var isActive=this.element[0]===this.document[0].activeElement;
21293if(!isActive){
21294this.element.trigger("focus");
21295this.previous=previous;
21296}
21297}
21298event.preventDefault();
21299checkFocus.call(this);
21300if(this._start(event)===false){
21301return;
21302}
21303this._repeat(null,$(event.currentTarget)
21304.hasClass("ui-spinner-up")?1:-1,event);
21305},
21306"mouseup .ui-spinner-button":"_stop",
21307"mouseenter .ui-spinner-button":function(event){
21308if(!$(event.currentTarget).hasClass("ui-state-active")){
21309return;
21310}
21311if(this._start(event)===false){
21312return false;
21313}
21314this._repeat(null,$(event.currentTarget)
21315.hasClass("ui-spinner-up")?1:-1,event);
21316},
21317"mouseleave .ui-spinner-button":"_stop"
21318},
21319_enhance:function(){
21320this.uiSpinner=this.element
21321.attr("autocomplete","off")
21322.wrap("<span>")
21323.parent()
21324.append(
21325"<a></a><a></a>"
21326);
21327},
21328_draw:function(){
21329this._enhance();
21330this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content");
21331this._addClass("ui-spinner-input");
21332this.element.attr("role","spinbutton");
21333this.buttons=this.uiSpinner.children("a")
21334.attr("tabIndex",-1)
21335.attr("aria-hidden",true)
21336.button({
21337classes:{
21338"ui-button":""
21339}
21340});
21341this._removeClass(this.buttons,"ui-corner-all");
21342this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up");
21343this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down");
21344this.buttons.first().button({
21345"icon":this.options.icons.up,
21346"showLabel":false
21347});
21348this.buttons.last().button({
21349"icon":this.options.icons.down,
21350"showLabel":false
21351});
21352if(this.buttons.height()>Math.ceil(this.uiSpinner.height()*0.5)&&
21353this.uiSpinner.height()>0){
21354this.uiSpinner.height(this.uiSpinner.height());
21355}
21356},
21357_keydown:function(event){
21358var options=this.options,
21359keyCode=$.ui.keyCode;
21360switch(event.keyCode){
21361case keyCode.UP:
21362this._repeat(null,1,event);
21363return true;
21364case keyCode.DOWN:
21365this._repeat(null,-1,event);
21366return true;
21367case keyCode.PAGE_UP:
21368this._repeat(null,options.page,event);
21369return true;
21370case keyCode.PAGE_DOWN:
21371this._repeat(null,-options.page,event);
21372return true;
21373}
21374return false;
21375},
21376_start:function(event){
21377if(!this.spinning&&this._trigger("start",event)===false){
21378return false;
21379}
21380if(!this.counter){
21381this.counter=1;
21382}
21383this.spinning=true;
21384return true;
21385},
21386_repeat:function(i,steps,event){
21387i=i||500;
21388clearTimeout(this.timer);
21389this.timer=this._delay(function(){
21390this._repeat(40,steps,event);
21391},i);
21392this._spin(steps*this.options.step,event);
21393},
21394_spin:function(step,event){
21395var value=this.value()||0;
21396if(!this.counter){
21397this.counter=1;
21398}
21399value=this._adjustValue(value+step*this._increment(this.counter));
21400if(!this.spinning||this._trigger("spin",event,{value:value})!==false){
21401this._value(value);
21402this.counter++;
21403}
21404},
21405_increment:function(i){
21406var incremental=this.options.incremental;
21407if(incremental){
21408return typeof incremental==="function"?
21409incremental(i):
21410Math.floor(i*i*i/50000-i*i/ 500 + 17 * i /200+1);
21411}
21412return 1;
21413},
21414_precision:function(){
21415var precision=this._precisionOf(this.options.step);
21416if(this.options.min!==null){
21417precision=Math.max(precision,this._precisionOf(this.options.min));
21418}
21419return precision;
21420},
21421_precisionOf:function(num){
21422var str=num.toString(),
21423decimal=str.indexOf(".");
21424return decimal===-1?0:str.length-decimal-1;
21425},
21426_adjustValue:function(value){
21427var base,aboveMin,
21428options=this.options;
21429base=options.min!==null?options.min:0;
21430aboveMin=value-base;
21431aboveMin=Math.round(aboveMin/options.step)*options.step;
21432value=base+aboveMin;
21433value=parseFloat(value.toFixed(this._precision()));
21434if(options.max!==null&&value>options.max){
21435return options.max;
21436}
vendor: 4,894 bytes, lines 21437-21649
21437if(options.min!==null&&value<options.min){
21438return options.min;
21439}
21440return value;
21441},
21442_stop:function(event){
21443if(!this.spinning){
21444return;
21445}
21446clearTimeout(this.timer);
21447clearTimeout(this.mousewheelTimer);
21448this.counter=0;
21449this.spinning=false;
21450this._trigger("stop",event);
21451},
21452_setOption:function(key,value){
21453var prevValue,first,last;
21454if(key==="culture"||key==="numberFormat"){
21455prevValue=this._parse(this.element.val());
21456this.options[key]=value;
21457this.element.val(this._format(prevValue));
21458return;
21459}
21460if(key==="max"||key==="min"||key==="step"){
21461if(typeof value==="string"){
21462value=this._parse(value);
21463}
21464}
21465if(key==="icons"){
21466first=this.buttons.first().find(".ui-icon");
21467this._removeClass(first,null,this.options.icons.up);
21468this._addClass(first,null,value.up);
21469last=this.buttons.last().find(".ui-icon");
21470this._removeClass(last,null,this.options.icons.down);
21471this._addClass(last,null,value.down);
21472}
21473this._super(key,value);
21474},
21475_setOptionDisabled:function(value){
21476this._super(value);
21477this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!value);
21478this.element.prop("disabled",!!value);
21479this.buttons.button(value?"disable":"enable");
21480},
21481_setOptions:spinnerModifier(function(options){
21482this._super(options);
21483}),
21484_parse:function(val){
21485if(typeof val==="string"&&val!==""){
21486val=window.Globalize&&this.options.numberFormat?
21487Globalize.parseFloat(val,10,this.options.culture):+val;
21488}
21489return val===""||isNaN(val)?null:val;
21490},
21491_format:function(value){
21492if(value===""){
21493return"";
21494}
21495return window.Globalize&&this.options.numberFormat?
21496Globalize.format(value,this.options.numberFormat,this.options.culture):
21497value;
21498},
21499_refresh:function(){
21500this.element.attr({
21501"aria-valuemin":this.options.min,
21502"aria-valuemax":this.options.max,
21503"aria-valuenow":this._parse(this.element.val())
21504});
21505},
21506isValid:function(){
21507var value=this.value();
21508if(value===null){
21509return false;
21510}
21511return value===this._adjustValue(value);
21512},
21513_value:function(value,allowAny){
21514var parsed;
21515if(value!==""){
21516parsed=this._parse(value);
21517if(parsed!==null){
21518if(!allowAny){
21519parsed=this._adjustValue(parsed);
21520}
21521value=this._format(parsed);
21522}
21523}
21524this.element.val(value);
21525this._refresh();
21526},
21527_destroy:function(){
21528this.element
21529.prop("disabled",false)
21530.removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow");
21531this.uiSpinner.replaceWith(this.element);
21532},
21533stepUp:spinnerModifier(function(steps){
21534this._stepUp(steps);
21535}),
21536_stepUp:function(steps){
21537if(this._start()){
21538this._spin((steps||1)*this.options.step);
21539this._stop();
21540}
21541},
21542stepDown:spinnerModifier(function(steps){
21543this._stepDown(steps);
21544}),
21545_stepDown:function(steps){
21546if(this._start()){
21547this._spin((steps||1)*-this.options.step);
21548this._stop();
21549}
21550},
21551pageUp:spinnerModifier(function(pages){
21552this._stepUp((pages||1)*this.options.page);
21553}),
21554pageDown:spinnerModifier(function(pages){
21555this._stepDown((pages||1)*this.options.page);
21556}),
21557value:function(newVal){
21558if(!arguments.length){
21559return this._parse(this.element.val());
21560}
21561spinnerModifier(this._value).call(this,newVal);
21562},
21563widget:function(){
21564return this.uiSpinner;
21565}
21566});
21567if($.uiBackCompat===true){
21568$.widget("ui.spinner",$.ui.spinner,{
21569_enhance:function(){
21570this.uiSpinner=this.element
21571.attr("autocomplete","off")
21572.wrap(this._uiSpinnerHtml())
21573.parent()
21574.append(this._buttonHtml());
21575},
21576_uiSpinnerHtml:function(){
21577return"<span>";
21578},
21579_buttonHtml:function(){
21580return"<a></a><a></a>";
21581}
21582});
21583}
21584var widgetsSpinner=$.ui.spinner;
21585$.widget("ui.tabs",{
21586version:"1.14.1",
21587delay:300,
21588options:{
21589active:null,
21590classes:{
21591"ui-tabs":"ui-corner-all",
21592"ui-tabs-nav":"ui-corner-all",
21593"ui-tabs-panel":"ui-corner-bottom",
21594"ui-tabs-tab":"ui-corner-top"
21595},
21596collapsible:false,
21597event:"click",
21598heightStyle:"content",
21599hide:null,
21600show:null,
21601activate:null,
21602beforeActivate:null,
21603beforeLoad:null,
21604load:null
21605},
21606_isLocal:(function(){
21607var rhash=/#.*$/;
21608return function(anchor){
21609var anchorUrl,locationUrl;
21610anchorUrl=anchor.href.replace(rhash,"");
21611locationUrl=location.href.replace(rhash,"");
21612try{
21613anchorUrl=decodeURIComponent(anchorUrl);
21614}catch(error){}
21615try{
21616locationUrl=decodeURIComponent(locationUrl);
21617}catch(error){}
21618return anchor.hash.length>1&&anchorUrl===locationUrl;
21619};
21620})(),
21621_create:function(){
21622var that=this,
21623options=this.options;
21624this.running=false;
21625this._addClass("ui-tabs","ui-widget ui-widget-content");
21626this._toggleClass("ui-tabs-collapsible",null,options.collapsible);
21627this._processTabs();
21628options.active=this._initialActive();
21629if(Array.isArray(options.disabled)){
21630options.disabled=$.uniqueSort(options.disabled.concat(
21631$.map(this.tabs.filter(".ui-state-disabled"),function(li){
21632return that.tabs.index(li);
21633})
21634)).sort();
21635}
21636if(this.options.active!==false&&this.anchors.length){
21637this.active=this._findActive(options.active);
21638}else{
21639this.active=$();
21640}
21641this._refresh();
21642if(this.active.length){
21643this.load(options.active);
21644}
21645},
21646_initialActive:function(){
21647var active=this.options.active,
21648collapsible=this.options.collapsible,
21649locationHashDecoded=decodeURIComponent(location.hash.substring(1));
vendor: 22,610 bytes, lines 21650-22601
21650if(active===null){
21651if(locationHashDecoded){
21652this.tabs.each(function(i,tab){
21653if($(tab).attr("aria-controls")===locationHashDecoded){
21654active=i;
21655return false;
21656}
21657});
21658}
21659if(active===null){
21660active=this.tabs.index(this.tabs.filter(".ui-tabs-active"));
21661}
21662if(active===null||active===-1){
21663active=this.tabs.length?0:false;
21664}
21665}
21666if(active!==false){
21667active=this.tabs.index(this.tabs.eq(active));
21668if(active===-1){
21669active=collapsible?false:0;
21670}
21671}
21672if(!collapsible&&active===false&&this.anchors.length){
21673active=0;
21674}
21675return active;
21676},
21677_getCreateEventData:function(){
21678return{
21679tab:this.active,
21680panel:!this.active.length?$():this._getPanelForTab(this.active)
21681};
21682},
21683_tabKeydown:function(event){
21684var focusedTab=$(this.document[0].activeElement).closest("li"),
21685selectedIndex=this.tabs.index(focusedTab),
21686goingForward=true;
21687if(this._handlePageNav(event)){
21688return;
21689}
21690switch(event.keyCode){
21691case $.ui.keyCode.RIGHT:
21692case $.ui.keyCode.DOWN:
21693selectedIndex++;
21694break;
21695case $.ui.keyCode.UP:
21696case $.ui.keyCode.LEFT:
21697goingForward=false;
21698selectedIndex--;
21699break;
21700case $.ui.keyCode.END:
21701selectedIndex=this.anchors.length-1;
21702break;
21703case $.ui.keyCode.HOME:
21704selectedIndex=0;
21705break;
21706case $.ui.keyCode.SPACE:
21707event.preventDefault();
21708clearTimeout(this.activating);
21709this._activate(selectedIndex);
21710return;
21711case $.ui.keyCode.ENTER:
21712event.preventDefault();
21713clearTimeout(this.activating);
21714this._activate(selectedIndex===this.options.active?false:selectedIndex);
21715return;
21716default:
21717return;
21718}
21719event.preventDefault();
21720clearTimeout(this.activating);
21721selectedIndex=this._focusNextTab(selectedIndex,goingForward);
21722if(!event.ctrlKey&&!event.metaKey){
21723focusedTab.attr("aria-selected","false");
21724this.tabs.eq(selectedIndex).attr("aria-selected","true");
21725this.activating=this._delay(function(){
21726this.option("active",selectedIndex);
21727},this.delay);
21728}
21729},
21730_panelKeydown:function(event){
21731if(this._handlePageNav(event)){
21732return;
21733}
21734if(event.ctrlKey&&event.keyCode===$.ui.keyCode.UP){
21735event.preventDefault();
21736this.active.trigger("focus");
21737}
21738},
21739_handlePageNav:function(event){
21740if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP){
21741this._activate(this._focusNextTab(this.options.active-1,false));
21742return true;
21743}
21744if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN){
21745this._activate(this._focusNextTab(this.options.active+1,true));
21746return true;
21747}
21748},
21749_findNextTab:function(index,goingForward){
21750var lastTabIndex=this.tabs.length-1;
21751function constrain(){
21752if(index>lastTabIndex){
21753index=0;
21754}
21755if(index<0){
21756index=lastTabIndex;
21757}
21758return index;
21759}
21760while($.inArray(constrain(),this.options.disabled)!==-1){
21761index=goingForward?index+1:index-1;
21762}
21763return index;
21764},
21765_focusNextTab:function(index,goingForward){
21766index=this._findNextTab(index,goingForward);
21767this.tabs.eq(index).trigger("focus");
21768return index;
21769},
21770_setOption:function(key,value){
21771if(key==="active"){
21772this._activate(value);
21773return;
21774}
21775this._super(key,value);
21776if(key==="collapsible"){
21777this._toggleClass("ui-tabs-collapsible",null,value);
21778if(!value&&this.options.active===false){
21779this._activate(0);
21780}
21781}
21782if(key==="event"){
21783this._setupEvents(value);
21784}
21785if(key==="heightStyle"){
21786this._setupHeightStyle(value);
21787}
21788},
21789refresh:function(){
21790var options=this.options,
21791lis=this.tablist.children(":has(a[href])");
21792options.disabled=$.map(lis.filter(".ui-state-disabled"),function(tab){
21793return lis.index(tab);
21794});
21795this._processTabs();
21796if(options.active===false||!this.anchors.length){
21797options.active=false;
21798this.active=$();
21799}else if(this.active.length&&!$.contains(this.tablist[0],this.active[0])){
21800if(this.tabs.length===options.disabled.length){
21801options.active=false;
21802this.active=$();
21803}else{
21804this._activate(this._findNextTab(Math.max(0,options.active-1),false));
21805}
21806}else{
21807options.active=this.tabs.index(this.active);
21808}
21809this._refresh();
21810},
21811_refresh:function(){
21812this._setOptionDisabled(this.options.disabled);
21813this._setupEvents(this.options.event);
21814this._setupHeightStyle(this.options.heightStyle);
21815this.tabs.not(this.active).attr({
21816"aria-selected":"false",
21817"aria-expanded":"false",
21818tabIndex:-1
21819});
21820this.panels.not(this._getPanelForTab(this.active))
21821.hide()
21822.attr({
21823"aria-hidden":"true"
21824});
21825if(!this.active.length){
21826this.tabs.eq(0).attr("tabIndex",0);
21827}else{
21828this.active
21829.attr({
21830"aria-selected":"true",
21831"aria-expanded":"true",
21832tabIndex:0
21833});
21834this._addClass(this.active,"ui-tabs-active","ui-state-active");
21835this._getPanelForTab(this.active)
21836.show()
21837.attr({
21838"aria-hidden":"false"
21839});
21840}
21841},
21842_processTabs:function(){
21843var that=this,
21844prevTabs=this.tabs,
21845prevAnchors=this.anchors,
21846prevPanels=this.panels;
21847this.tablist=this._getList().attr("role","tablist");
21848this._addClass(this.tablist,"ui-tabs-nav",
21849"ui-helper-reset ui-helper-clearfix ui-widget-header");
21850this.tablist
21851.on("mousedown"+this.eventNamespace,"> li",function(event){
21852if($(this).is(".ui-state-disabled")){
21853event.preventDefault();
21854}
21855});
21856this.tabs=this.tablist.find("> li:has(a[href])")
21857.attr({
21858role:"tab",
21859tabIndex:-1
21860});
21861this._addClass(this.tabs,"ui-tabs-tab","ui-state-default");
21862this.anchors=this.tabs.map(function(){
21863return $("a",this)[0];
21864})
21865.attr({
21866tabIndex:-1
21867});
21868this._addClass(this.anchors,"ui-tabs-anchor");
21869this.panels=$();
21870this.anchors.each(function(i,anchor){
21871var selector,panel,panelId,
21872anchorId=$(anchor).uniqueId().attr("id"),
21873tab=$(anchor).closest("li"),
21874originalAriaControls=tab.attr("aria-controls");
21875if(that._isLocal(anchor)){
21876selector=decodeURIComponent(anchor.hash);
21877panelId=selector.substring(1);
21878panel=that.element.find("#"+CSS.escape(panelId));
21879}else{
21880panelId=tab.attr("aria-controls")||$({}).uniqueId()[0].id;
21881selector="#"+panelId;
21882panel=that.element.find(selector);
21883if(!panel.length){
21884panel=that._createPanel(panelId);
21885panel.insertAfter(that.panels[i-1]||that.tablist);
21886}
21887panel.attr("aria-live","polite");
21888}
21889if(panel.length){
21890that.panels=that.panels.add(panel);
21891}
21892if(originalAriaControls){
21893tab.data("ui-tabs-aria-controls",originalAriaControls);
21894}
21895tab.attr({
21896"aria-controls":panelId,
21897"aria-labelledby":anchorId
21898});
21899panel.attr("aria-labelledby",anchorId);
21900});
21901this.panels.attr("role","tabpanel");
21902this._addClass(this.panels,"ui-tabs-panel","ui-widget-content");
21903if(prevTabs){
21904this._off(prevTabs.not(this.tabs));
21905this._off(prevAnchors.not(this.anchors));
21906this._off(prevPanels.not(this.panels));
21907}
21908},
21909_getList:function(){
21910return this.tablist||this.element.find("ol, ul").eq(0);
21911},
21912_createPanel:function(id){
21913return $("<div>")
21914.attr("id",id)
21915.data("ui-tabs-destroy",true);
21916},
21917_setOptionDisabled:function(disabled){
21918var currentItem,li,i;
21919if(Array.isArray(disabled)){
21920if(!disabled.length){
21921disabled=false;
21922}else if(disabled.length===this.anchors.length){
21923disabled=true;
21924}
21925}
21926for(i=0;(li=this.tabs[i]);i++){
21927currentItem=$(li);
21928if(disabled===true||$.inArray(i,disabled)!==-1){
21929currentItem.attr("aria-disabled","true");
21930this._addClass(currentItem,null,"ui-state-disabled");
21931}else{
21932currentItem.removeAttr("aria-disabled");
21933this._removeClass(currentItem,null,"ui-state-disabled");
21934}
21935}
21936this.options.disabled=disabled;
21937this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,
21938disabled===true);
21939},
21940_setupEvents:function(event){
21941var events={};
21942if(event){
21943$.each(event.split(" "),function(index,eventName){
21944events[eventName]="_eventHandler";
21945});
21946}
21947this._off(this.anchors.add(this.tabs).add(this.panels));
21948this._on(true,this.anchors,{
21949click:function(event){
21950event.preventDefault();
21951}
21952});
21953this._on(this.anchors,events);
21954this._on(this.tabs,{keydown:"_tabKeydown"});
21955this._on(this.panels,{keydown:"_panelKeydown"});
21956this._focusable(this.tabs);
21957this._hoverable(this.tabs);
21958},
21959_setupHeightStyle:function(heightStyle){
21960var maxHeight,
21961parent=this.element.parent();
21962if(heightStyle==="fill"){
21963maxHeight=parent.height();
21964maxHeight-=this.element.outerHeight()-this.element.height();
21965this.element.siblings(":visible").each(function(){
21966var elem=$(this),
21967position=elem.css("position");
21968if(position==="absolute"||position==="fixed"){
21969return;
21970}
21971maxHeight-=elem.outerHeight(true);
21972});
21973this.element.children().not(this.panels).each(function(){
21974maxHeight-=$(this).outerHeight(true);
21975});
21976this.panels.each(function(){
21977$(this).height(Math.max(0,maxHeight-
21978$(this).innerHeight()+$(this).height()));
21979})
21980.css("overflow","auto");
21981}else if(heightStyle==="auto"){
21982maxHeight=0;
21983this.panels.each(function(){
21984maxHeight=Math.max(maxHeight,$(this).height("").height());
21985}).height(maxHeight);
21986}
21987},
21988_eventHandler:function(event){
21989var options=this.options,
21990active=this.active,
21991anchor=$(event.currentTarget),
21992tab=anchor.closest("li"),
21993clickedIsActive=tab[0]===active[0],
21994collapsing=clickedIsActive&&options.collapsible,
21995toShow=collapsing?$():this._getPanelForTab(tab),
21996toHide=!active.length?$():this._getPanelForTab(active),
21997eventData={
21998oldTab:active,
21999oldPanel:toHide,
22000newTab:collapsing?$():tab,
22001newPanel:toShow
22002};
22003event.preventDefault();
22004if(tab.hasClass("ui-state-disabled")||
22005tab.hasClass("ui-tabs-loading")||
22006this.running||
22007(clickedIsActive&&!options.collapsible)||
22008(this._trigger("beforeActivate",event,eventData)===false)){
22009return;
22010}
22011options.active=collapsing?false:this.tabs.index(tab);
22012this.active=clickedIsActive?$():tab;
22013if(this.xhr){
22014this.xhr.abort();
22015}
22016if(!toHide.length&&!toShow.length){
22017$.error("jQuery UI Tabs: Mismatching fragment identifier.");
22018}
22019if(toShow.length){
22020this.load(this.tabs.index(tab),event);
22021}
22022this._toggle(event,eventData);
22023},
22024_toggle:function(event,eventData){
22025var that=this,
22026toShow=eventData.newPanel,
22027toHide=eventData.oldPanel;
22028this.running=true;
22029function complete(){
22030that.running=false;
22031that._trigger("activate",event,eventData);
22032}
22033function show(){
22034that._addClass(eventData.newTab.closest("li"),"ui-tabs-active","ui-state-active");
22035if(toShow.length&&that.options.show){
22036that._show(toShow,that.options.show,complete);
22037}else{
22038toShow.show();
22039complete();
22040}
22041}
22042if(toHide.length&&this.options.hide){
22043this._hide(toHide,this.options.hide,function(){
22044that._removeClass(eventData.oldTab.closest("li"),
22045"ui-tabs-active","ui-state-active");
22046show();
22047});
22048}else{
22049this._removeClass(eventData.oldTab.closest("li"),
22050"ui-tabs-active","ui-state-active");
22051toHide.hide();
22052show();
22053}
22054toHide.attr("aria-hidden","true");
22055eventData.oldTab.attr({
22056"aria-selected":"false",
22057"aria-expanded":"false"
22058});
22059if(toShow.length&&toHide.length){
22060eventData.oldTab.attr("tabIndex",-1);
22061}else if(toShow.length){
22062this.tabs.filter(function(){
22063return $(this).attr("tabIndex")===0;
22064})
22065.attr("tabIndex",-1);
22066}
22067toShow.attr("aria-hidden","false");
22068eventData.newTab.attr({
22069"aria-selected":"true",
22070"aria-expanded":"true",
22071tabIndex:0
22072});
22073},
22074_activate:function(index){
22075var anchor,
22076active=this._findActive(index);
22077if(active[0]===this.active[0]){
22078return;
22079}
22080if(!active.length){
22081active=this.active;
22082}
22083anchor=active.find(".ui-tabs-anchor")[0];
22084this._eventHandler({
22085target:anchor,
22086currentTarget:anchor,
22087preventDefault:$.noop
22088});
22089},
22090_findActive:function(index){
22091return index===false?$():this.tabs.eq(index);
22092},
22093_getIndex:function(index){
22094if(typeof index==="string"){
22095index=this.anchors.index(this.anchors.filter("[href$='"+
22096CSS.escape(index)+"']"));
22097}
22098return index;
22099},
22100_destroy:function(){
22101if(this.xhr){
22102this.xhr.abort();
22103}
22104this.tablist
22105.removeAttr("role")
22106.off(this.eventNamespace);
22107this.anchors
22108.removeAttr("role tabIndex")
22109.removeUniqueId();
22110this.tabs.add(this.panels).each(function(){
22111if($.data(this,"ui-tabs-destroy")){
22112$(this).remove();
22113}else{
22114$(this).removeAttr("role tabIndex "+
22115"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded");
22116}
22117});
22118this.tabs.each(function(){
22119var li=$(this),
22120prev=li.data("ui-tabs-aria-controls");
22121if(prev){
22122li
22123.attr("aria-controls",prev)
22124.removeData("ui-tabs-aria-controls");
22125}else{
22126li.removeAttr("aria-controls");
22127}
22128});
22129this.panels.show();
22130if(this.options.heightStyle!=="content"){
22131this.panels.css("height","");
22132}
22133},
22134enable:function(index){
22135var disabled=this.options.disabled;
22136if(disabled===false){
22137return;
22138}
22139if(index===undefined){
22140disabled=false;
22141}else{
22142index=this._getIndex(index);
22143if(Array.isArray(disabled)){
22144disabled=$.map(disabled,function(num){
22145return num!==index?num:null;
22146});
22147}else{
22148disabled=$.map(this.tabs,function(li,num){
22149return num!==index?num:null;
22150});
22151}
22152}
22153this._setOptionDisabled(disabled);
22154},
22155disable:function(index){
22156var disabled=this.options.disabled;
22157if(disabled===true){
22158return;
22159}
22160if(index===undefined){
22161disabled=true;
22162}else{
22163index=this._getIndex(index);
22164if($.inArray(index,disabled)!==-1){
22165return;
22166}
22167if(Array.isArray(disabled)){
22168disabled=$.merge([index],disabled).sort();
22169}else{
22170disabled=[index];
22171}
22172}
22173this._setOptionDisabled(disabled);
22174},
22175load:function(index,event){
22176index=this._getIndex(index);
22177var that=this,
22178tab=this.tabs.eq(index),
22179anchor=tab.find(".ui-tabs-anchor"),
22180panel=this._getPanelForTab(tab),
22181eventData={
22182tab:tab,
22183panel:panel
22184},
22185complete=function(jqXHR,status){
22186if(status==="abort"){
22187that.panels.stop(false,true);
22188}
22189that._removeClass(tab,"ui-tabs-loading");
22190panel.removeAttr("aria-busy");
22191if(jqXHR===that.xhr){
22192delete that.xhr;
22193}
22194};
22195if(this._isLocal(anchor[0])){
22196return;
22197}
22198this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData));
22199if(this.xhr.statusText!=="canceled"){
22200this._addClass(tab,"ui-tabs-loading");
22201panel.attr("aria-busy","true");
22202this.xhr
22203.done(function(response,status,jqXHR){
22204panel.html(response);
22205that._trigger("load",event,eventData);
22206complete(jqXHR,status);
22207})
22208.fail(function(jqXHR,status){
22209complete(jqXHR,status);
22210});
22211}
22212},
22213_ajaxSettings:function(anchor,event,eventData){
22214var that=this;
22215return{
22216url:anchor.attr("href"),
22217beforeSend:function(jqXHR,settings){
22218return that._trigger("beforeLoad",event,
22219$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData));
22220}
22221};
22222},
22223_getPanelForTab:function(tab){
22224var id=$(tab).attr("aria-controls");
22225return this.element.find("#"+CSS.escape(id));
22226}
22227});
22228if($.uiBackCompat===true){
22229$.widget("ui.tabs",$.ui.tabs,{
22230_processTabs:function(){
22231this._superApply(arguments);
22232this._addClass(this.tabs,"ui-tab");
22233}
22234});
22235}
22236var widgetsTabs=$.ui.tabs;
22237$.widget("ui.tooltip",{
22238version:"1.14.1",
22239options:{
22240classes:{
22241"ui-tooltip":"ui-corner-all ui-widget-shadow"
22242},
22243content:function(){
22244var title=$(this).attr("title");
22245return $("<a>").text(title).html();
22246},
22247hide:true,
22248items:"[title]:not([disabled])",
22249position:{
22250my:"left top+15",
22251at:"left bottom",
22252collision:"flipfit flip"
22253},
22254show:true,
22255track:false,
22256close:null,
22257open:null
22258},
22259_addDescribedBy:function(elem,id){
22260var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);
22261describedby.push(id);
22262elem
22263.data("ui-tooltip-id",id)
22264.attr("aria-describedby",String.prototype.trim.call(describedby.join(" ")));
22265},
22266_removeDescribedBy:function(elem){
22267var id=elem.data("ui-tooltip-id"),
22268describedby=(elem.attr("aria-describedby")||"").split(/\s+/),
22269index=$.inArray(id,describedby);
22270if(index!==-1){
22271describedby.splice(index,1);
22272}
22273elem.removeData("ui-tooltip-id");
22274describedby=String.prototype.trim.call(describedby.join(" "));
22275if(describedby){
22276elem.attr("aria-describedby",describedby);
22277}else{
22278elem.removeAttr("aria-describedby");
22279}
22280},
22281_create:function(){
22282this._on({
22283mouseover:"open",
22284focusin:"open"
22285});
22286this.tooltips={};
22287this.parents={};
22288this.liveRegion=$("<div>")
22289.attr({
22290role:"log",
22291"aria-live":"assertive",
22292"aria-relevant":"additions"
22293})
22294.appendTo(this.document[0].body);
22295this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");
22296this.disabledTitles=$([]);
22297},
22298_setOption:function(key,value){
22299var that=this;
22300this._super(key,value);
22301if(key==="content"){
22302$.each(this.tooltips,function(id,tooltipData){
22303that._updateContent(tooltipData.element);
22304});
22305}
22306},
22307_setOptionDisabled:function(value){
22308this[value?"_disable":"_enable"]();
22309},
22310_disable:function(){
22311var that=this;
22312$.each(this.tooltips,function(id,tooltipData){
22313var event=$.Event("blur");
22314event.target=event.currentTarget=tooltipData.element[0];
22315that.close(event,true);
22316});
22317this.disabledTitles=this.disabledTitles.add(
22318this.element.find(this.options.items).addBack()
22319.filter(function(){
22320var element=$(this);
22321if(element.is("[title]")){
22322return element
22323.data("ui-tooltip-title",element.attr("title"))
22324.removeAttr("title");
22325}
22326})
22327);
22328},
22329_enable:function(){
22330this.disabledTitles.each(function(){
22331var element=$(this);
22332if(element.data("ui-tooltip-title")){
22333element.attr("title",element.data("ui-tooltip-title"));
22334}
22335});
22336this.disabledTitles=$([]);
22337},
22338open:function(event){
22339var that=this,
22340target=$(event?event.target:this.element)
22341.closest(this.options.items);
22342if(!target.length||target.data("ui-tooltip-id")){
22343return;
22344}
22345if(target.attr("title")){
22346target.data("ui-tooltip-title",target.attr("title"));
22347}
22348target.data("ui-tooltip-open",true);
22349if(event&&event.type==="mouseover"){
22350target.parents().each(function(){
22351var parent=$(this),
22352blurEvent;
22353if(parent.data("ui-tooltip-open")){
22354blurEvent=$.Event("blur");
22355blurEvent.target=blurEvent.currentTarget=this;
22356that.close(blurEvent,true);
22357}
22358if(parent.attr("title")){
22359parent.uniqueId();
22360that.parents[this.id]={
22361element:this,
22362title:parent.attr("title")
22363};
22364parent.attr("title","");
22365}
22366});
22367}
22368this._registerCloseHandlers(event,target);
22369this._updateContent(target,event);
22370},
22371_updateContent:function(target,event){
22372var content,
22373contentOption=this.options.content,
22374that=this,
22375eventType=event?event.type:null;
22376if(typeof contentOption==="string"||contentOption.nodeType||
22377contentOption.jquery){
22378return this._open(event,target,contentOption);
22379}
22380content=contentOption.call(target[0],function(response){
22381if(!target.data("ui-tooltip-open")){
22382return;
22383}
22384if(event){
22385event.type=eventType;
22386}
22387that._open(event,target,response);
22388});
22389if(content){
22390this._open(event,target,content);
22391}
22392},
22393_open:function(event,target,content){
22394var tooltipData,tooltip,delayedShow,a11yContent,
22395positionOption=$.extend({},this.options.position);
22396if(!content){
22397return;
22398}
22399tooltipData=this._find(target);
22400if(tooltipData){
22401tooltipData.tooltip.find(".ui-tooltip-content").html(content);
22402return;
22403}
22404if(target.is("[title]")){
22405if(event&&event.type==="mouseover"){
22406target.attr("title","");
22407}else{
22408target.removeAttr("title");
22409}
22410}
22411tooltipData=this._tooltip(target);
22412tooltip=tooltipData.tooltip;
22413this._addDescribedBy(target,tooltip.attr("id"));
22414tooltip.find(".ui-tooltip-content").html(content);
22415this.liveRegion.children().hide();
22416a11yContent=$("<div>").html(tooltip.find(".ui-tooltip-content").html());
22417a11yContent.removeAttr("name").find("[name]").removeAttr("name");
22418a11yContent.removeAttr("id").find("[id]").removeAttr("id");
22419a11yContent.appendTo(this.liveRegion);
22420function position(event){
22421positionOption.of=event;
22422if(tooltip.is(":hidden")){
22423return;
22424}
22425tooltip.position(positionOption);
22426}
22427if(this.options.track&&event&&/^mouse/.test(event.type)){
22428this._on(this.document,{
22429mousemove:position
22430});
22431position(event);
22432}else{
22433tooltip.position($.extend({
22434of:target
22435},this.options.position));
22436}
22437tooltip.hide();
22438this._show(tooltip,this.options.show);
22439if(this.options.track&&this.options.show&&this.options.show.delay){
22440delayedShow=this.delayedShow=setInterval(function(){
22441if(tooltip.is(":visible")){
22442position(positionOption.of);
22443clearInterval(delayedShow);
22444}
22445},13);
22446}
22447this._trigger("open",event,{tooltip:tooltip});
22448},
22449_registerCloseHandlers:function(event,target){
22450var events={
22451keyup:function(event){
22452if(event.keyCode===$.ui.keyCode.ESCAPE){
22453var fakeEvent=$.Event(event);
22454fakeEvent.currentTarget=target[0];
22455this.close(fakeEvent,true);
22456}
22457}
22458};
22459if(target[0]!==this.element[0]){
22460events.remove=function(){
22461var targetElement=this._find(target);
22462if(targetElement){
22463this._removeTooltip(targetElement.tooltip);
22464}
22465};
22466}
22467if(!event||event.type==="mouseover"){
22468events.mouseleave="close";
22469}
22470if(!event||event.type==="focusin"){
22471events.focusout="close";
22472}
22473this._on(true,target,events);
22474},
22475close:function(event){
22476var tooltip,
22477that=this,
22478target=$(event?event.currentTarget:this.element),
22479tooltipData=this._find(target);
22480if(!tooltipData){
22481target.removeData("ui-tooltip-open");
22482return;
22483}
22484tooltip=tooltipData.tooltip;
22485if(tooltipData.closing){
22486return;
22487}
22488clearInterval(this.delayedShow);
22489if(target.data("ui-tooltip-title")&&!target.attr("title")){
22490target.attr("title",target.data("ui-tooltip-title"));
22491}
22492this._removeDescribedBy(target);
22493tooltipData.hiding=true;
22494tooltip.stop(true);
22495this._hide(tooltip,this.options.hide,function(){
22496that._removeTooltip($(this));
22497});
22498target.removeData("ui-tooltip-open");
22499this._off(target,"mouseleave focusout keyup");
22500if(target[0]!==this.element[0]){
22501this._off(target,"remove");
22502}
22503this._off(this.document,"mousemove");
22504if(event&&event.type==="mouseleave"){
22505$.each(this.parents,function(id,parent){
22506$(parent.element).attr("title",parent.title);
22507delete that.parents[id];
22508});
22509}
22510tooltipData.closing=true;
22511this._trigger("close",event,{tooltip:tooltip});
22512if(!tooltipData.hiding){
22513tooltipData.closing=false;
22514}
22515},
22516_tooltip:function(element){
22517var tooltip=$("<div>").attr("role","tooltip"),
22518content=$("<div>").appendTo(tooltip),
22519id=tooltip.uniqueId().attr("id");
22520this._addClass(content,"ui-tooltip-content");
22521this._addClass(tooltip,"ui-tooltip","ui-widget ui-widget-content");
22522tooltip.appendTo(this._appendTo(element));
22523return this.tooltips[id]={
22524element:element,
22525tooltip:tooltip
22526};
22527},
22528_find:function(target){
22529var id=target.data("ui-tooltip-id");
22530return id?this.tooltips[id]:null;
22531},
22532_removeTooltip:function(tooltip){
22533clearInterval(this.delayedShow);
22534tooltip.remove();
22535delete this.tooltips[tooltip.attr("id")];
22536},
22537_appendTo:function(target){
22538var element=target.closest(".ui-front, dialog");
22539if(!element.length){
22540element=this.document[0].body;
22541}
22542return element;
22543},
22544_destroy:function(){
22545var that=this;
22546$.each(this.tooltips,function(id,tooltipData){
22547var event=$.Event("blur"),
22548element=tooltipData.element;
22549event.target=event.currentTarget=element[0];
22550that.close(event,true);
22551$("#"+id).remove();
22552if(element.data("ui-tooltip-title")){
22553if(!element.attr("title")){
22554element.attr("title",element.data("ui-tooltip-title"));
22555}
22556element.removeData("ui-tooltip-title");
22557}
22558});
22559this.liveRegion.remove();
22560}
22561});
22562if($.uiBackCompat===true){
22563$.widget("ui.tooltip",$.ui.tooltip,{
22564options:{
22565tooltipClass:null
22566},
22567_tooltip:function(){
22568var tooltipData=this._superApply(arguments);
22569if(this.options.tooltipClass){
22570tooltipData.tooltip.addClass(this.options.tooltipClass);
22571}
22572return tooltipData;
22573}
22574});
22575}
22576var widgetsTooltip=$.ui.tooltip;
22577});
22578
22579
22580/* plugins-dist/mediabox/lib/lity/lity.js?1790084230 */
22581
22582(function(window,factory){
22583if(typeof define==='function'&&define.amd){
22584define(['jquery'],function($){
22585return factory(window,$);
22586});
22587}else if(typeof module==='object'&&typeof module.exports==='object'){
22588module.exports=factory(window,require('jquery'));
22589}else{
22590window.lity=factory(window,window.jQuery||window.Zepto);
22591}
22592}(typeof window!=="undefined"?window:this,function(window,$){
22593'use strict';
22594var document=window.document;
22595var _win=$(window);
22596var _deferred=$.Deferred;
22597var _html=$('html');
22598var _instances=[];
22599var _attrAriaHidden='aria-hidden';
22600var _dataAriaHidden='lity-'+_attrAriaHidden;
22601var _focusableElementsSelector='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not
22601([tabindex^="-"])';
22602var _defaultOptions={
22603esc:true,
22604handler:null,
22605handlers:{
22606image:imageHandler,
22607inline:inlineHandler,
22608iframe:iframeHandler
22609},
22610forceFocusInside:false,
22611template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'
22612};
22613var _imageRegexp=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
22614var _transitionEndEvent=(function(){
22615var el=document.createElement('div');
22616var transEndEventNames={
22617WebkitTransition:'webkitTransitionEnd',
22618MozTransition:'transitionend',
22619OTransition:'oTransitionEnd otransitionend',
22620transition:'transitionend'
22621};
22622for(var name in transEndEventNames){
22623if(el.style[name]!==undefined){
22624return transEndEventNames[name];
22625}
22626}
22627return false;
22628})();
22629function transitionEnd(element){
22630var deferred=_deferred();
22631if(!_transitionEndEvent||!element.length){
22632deferred.resolve();
22633}else{
22634element.one(_transitionEndEvent,deferred.resolve);
22635setTimeout(deferred.resolve,500);
22636}
22637return deferred.promise();
22638}
22639function settings(currSettings,key,value){
22640if(arguments.length===1){
22641return $.extend({},currSettings);
22642}
22643if(typeof key==='string'){
22644if(typeof value==='undefined'){
22645return typeof currSettings[key]==='undefined'
22646?null
22647:currSettings[key];
22648}
22649currSettings[key]=value;
22650}else{
22651$.extend(currSettings,key);
22652}
22653return this;
22654}
22655function parseQueryParams(params){
22656var pos=params.indexOf('?');
22657if(pos>-1){
22658params=params.substr(pos+1);
22659}
22660var pairs=decodeURI(params.split('#')[0]).split('&');
22661var obj={},p;
22662for(var i=0,n=pairs.length;i<n;i++){
22663if(!pairs[i]){
22664continue;
22665}
22666p=pairs[i].split('=');
22667obj[p[0]]=p[1];
22668}
22669return obj;
22670}
22671function appendQueryParams(url,params){
22672if(!params){
22673return url;
22674}
22675if('string'===$.type(params)){
22676params=parseQueryParams(params);
22677}
22678if(url.indexOf('?')>-1){
22679var split=url.split('?');
22680url=split.shift();
22681params=$.extend(
22682{},
22683parseQueryParams(split[0]),
22684params
22685)
22686}
22687return url+'?'+$.param(params);
22688}
22689function transferHash(originalUrl,newUrl){
22690var pos=originalUrl.indexOf('#');
22691if(-1===pos){
22692return newUrl;
22693}
22694if(pos>0){
22695originalUrl=originalUrl.substr(pos);
22696}
22697return newUrl+originalUrl;
22698}
22699function iframe(iframeUrl,instance,queryParams,hashUrl){
22700instance&&instance.element().addClass('lity-iframe');
22701if(queryParams){
22702iframeUrl=appendQueryParams(iframeUrl,queryParams);
22703}
22704if(hashUrl){
22705iframeUrl=transferHash(hashUrl,iframeUrl);
22706}
22707return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+iframeUrl+'"/></div>';
22708}
22709function error(msg){
22710return $('<span class="lity-error"></span>').append(msg);
22711}
22712function imageHandler(target,instance){
22713var desc=(instance.opener()&&instance.opener().data('lity-desc'))||'Image with no description';
22714var img=$('<img src="'+target+'" alt="'+desc+'"/>');
22715var deferred=_deferred();
22716var failed=function(){
22717deferred.reject(error('Failed loading image'));
22718};
22719img
22720.on('load',function(){
22721if(this.naturalWidth===0){
22722return failed();
22723}
22724deferred.resolve(img);
22725})
22726.on('error',failed)
22727;
22728return deferred.promise();
22729}
22730imageHandler.test=function(target){
22731return _imageRegexp.test(target);
22732};
22733function inlineHandler(target,instance){
22734var el,placeholder,hasHideClass;
22735try{
22736el=$(target);
22737}catch(e){
22738return false;
22739}
22740if(!el.length){
22741return false;
22742}
22743placeholder=$('<i style="display:none !important"></i>');
22744hasHideClass=el.hasClass('lity-hide');
22745instance
22746.element()
22747.one('lity:remove',function(){
22748placeholder
22749.before(el)
22750.remove()
22751;
22752if(hasHideClass&&!el.closest('.lity-content').length){
22753el.addClass('lity-hide');
22754}
22755})
22756;
22757return el
22758.removeClass('lity-hide')
22759.after(placeholder)
22760;
22761}
22762function iframeHandler(target,instance){
22763return iframe(target,instance);
22764}
22765function winHeight(){
22766return document.documentElement.clientHeight
22767?document.documentElement.clientHeight
22768:Math.round(_win.height());
22769}
22770function keydown(e){
22771var current=currentInstance();
22772if(!current){
22773return;
22774}
22775if(e.keyCode===27&&!!current.options('esc')){
22776current.close();
22777}
22778if(e.keyCode===9){
22779handleTabKey(e,current);
22780}
22781}
22782function handleTabKey(e,instance){
22783var focusableElements=instance.element().find(_focusableElementsSelector);
22784var focusedIndex=focusableElements.index(document.activeElement);
22785if(e.shiftKey&&focusedIndex<=0){
22786focusableElements.get(focusableElements.length-1).focus();
22787e.preventDefault();
22788}else if(!e.shiftKey&&focusedIndex===focusableElements.length-1){
22789focusableElements.get(0).focus();
22790e.preventDefault();
22791}
22792if(focusedIndex===-1&&instance.options().forceFocusInside){
22793focusableElements.get(0).focus();
22794e.preventDefault();
22795}
22796}
22797function resize(){
22798$.each(_instances,function(i,instance){
22799instance.resize();
22800});
22801}
22802function registerInstance(instanceToRegister){
22803if(1===_instances.unshift(instanceToRegister)){
22804_html.addClass('lity-active');
22805_win
22806.on({
22807resize:resize,
22808keydown:keydown
22809})
22810;
22811}
22812$('body > *').not(instanceToRegister.element())
22813.addClass('lity-hidden')
22814.each(function(){
22815var el=$(this);
22816if(undefined!==el.data(_dataAriaHidden)){
22817return;
22818}
22819el.data(_dataAriaHidden,el.attr(_attrAriaHidden)||null);
22820})
22821.attr(_attrAriaHidden,'true')
22822;
22823}
22824function removeInstance(instanceToRemove){
22825var show;
22826instanceToRemove
22827.element()
22828.attr(_attrAriaHidden,'true')
22829;
22830if(1===_instances.length){
22831_html.removeClass('lity-active');
22832_win
22833.off({
22834resize:resize,
22835keydown:keydown
22836})
22837;
22838}
22839_instances=$.grep(_instances,function(instance){
22840return instanceToRemove!==instance;
22841});
22842if(!!_instances.length){
22843show=_instances[0].element();
22844}else{
22845show=$('.lity-hidden');
22846}
22847show
22848.removeClass('lity-hidden')
22849.each(function(){
22850var el=$(this),oldAttr=el.data(_dataAriaHidden);
22851if(!oldAttr){
22852el.removeAttr(_attrAriaHidden);
22853}else{
22854el.attr(_attrAriaHidden,oldAttr);
22855}
22856el.removeData(_dataAriaHidden);
22857})
22858;
22859}
22860function currentInstance(){
22861if(0===_instances.length){
22862return null;
22863}
22864return _instances[0];
22865}
22866function factory(target,instance,handlers,preferredHandler){
22867var handler='inline',content;
22868var currentHandlers=$.extend({},handlers);
22869if(preferredHandler&&currentHandlers[preferredHandler]){
22870content=currentHandlers[preferredHandler](target,instance);
22871handler=preferredHandler;
22872}else{
22873$.each(['inline','iframe'],function(i,name){
22874delete currentHandlers[name];
22875currentHandlers[name]=handlers[name];
22876});
22877$.each(currentHandlers,function(name,currentHandler){
22878if(!currentHandler){
22879return true;
22880}
22881if(
22882currentHandler.test&&
22883!currentHandler.test(target,instance)
22884){
22885return true;
22886}
22887content=currentHandler(target,instance);
22888if(false!==content){
22889handler=name;
22890return false;
22891}
22892});
22893}
22894return{handler:handler,content:content||''};
22895}
22896function Lity(target,options,opener,activeElement){
22897var self=this;
22898var result;
22899var isReady=false;
22900var isClosed=false;
22901var element;
22902var content;
22903options=$.extend(
22904{},
22905_defaultOptions,
22906options
22907);
22908element=$(options.template);
22909self.element=function(){
22910return element;
22911};
22912self.opener=function(){
22913return opener;
22914};
22915self.content=function(){
22916return content;
22917};
22918self.options=$.proxy(settings,self,options);
22919self.handlers=$.proxy(settings,self,options.handlers);
22920self.resize=function(){
22921if(!isReady||isClosed){
22922return;
22923}
22924content
22925.css('max-height',winHeight()+'px')
22926.trigger('lity:resize',[self])
22927;
22928};
22929self.close=function(){
22930if(isClosed){
22931return;
22932}
22933isClosed=true;
22934removeInstance(self);
22935var deferred=_deferred();
22936if(
22937activeElement&&
22938(
22939document.activeElement===element[0]||
22940$.contains(element[0],document.activeElement)
22941)
22942){
22943try{
22944activeElement.focus();
22945}catch(e){
22946}
22947}
22948var trigerable=(content?content:element);
22949trigerable.trigger('lity:close',[self]);
22950element
22951.removeClass('lity-opened')
22952.addClass('lity-closed')
22953;
22954transitionEnd(trigerable.add(element))
22955.always(function(){
22956trigerable.trigger('lity:remove',[self]);
22957element.remove();
22958element=undefined;
22959deferred.resolve();
22960})
22961;
22962return deferred.promise();
22963};
22964result=factory(target,self,options.handlers,options.handler);
22965element
22966.attr(_attrAriaHidden,'false')
22967.addClass('lity-loading lity-opened lity-'+result.handler)
22968.appendTo('body')
22969.focus()
22970.on('click','[data-lity-close]',function(e){
22971if($(e.target).is('[data-lity-close]')){
22972self.close();
22973}
22974})
22975.trigger('lity:open',[self])
22976;
22977registerInstance(self);
22978$.when(result.content)
22979.always(ready)
22980;
22981function ready(result){
22982if(isClosed){
22983return;
22984}
22985content=$(result)
22986.css('max-height',winHeight()+'px')
22987;
22988element
22989.find('.lity-loader')
22990.each(function(){
22991var loader=$(this);
22992transitionEnd(loader)
22993.always(function(){
22994loader.remove();
22995})
22996;
22997})
22998;
22999element
23000.removeClass('lity-loading')
23001.find('.lity-content')
23002.empty()
23003.append(content)
23004;
23005isReady=true;
23006content
23007.trigger('lity:ready',[self])
23008;
23009}
23010}
23011function lity(target,options,opener){
23012if(!target.preventDefault){
23013opener=$(opener);
23014}else{
23015target.preventDefault();
23016opener=$(this);
23017target=opener.data('lity-target')||opener.attr('href')||opener.attr('src');
23018}
23019var instance=new Lity(
23020target,
23021$.extend(
23022{},
23023opener.data('lity-options')||opener.data('lity'),
23024options
23025),
23026opener,
23027document.activeElement
23028);
23029if(!target.preventDefault){
23030return instance;
23031}
23032}
23033lity.version='3.0.0-dev';
23034lity.options=$.proxy(settings,lity,_defaultOptions);
23035lity.handlers=$.proxy(settings,lity,_defaultOptions.handlers);
23036lity.current=currentInstance;
23037lity.iframe=iframe;
23038$(document).on('click.lity','[data-lity]',lity);
23039return lity;
23040}));
23041
23042
23043/* plugins-dist/mediabox/lity/js/lity.mediabox.js?1790084230 */
23044;
23045(function($){
23046var litySpip={
23047nameSpace:'mediabox',
23048config:{
23049forceFocusInside:true,
23050},
23051strings:{
23052},
23053callbacks:{
23054onOpen:[],
23055onShow:[],
23056onClose:[]
23057},
23058focusedItem:[],
23059isTransition:false,
23060adjustHeight:function(instance){
23061var $content=instance.content();
23062var $containerHeight=instance.element().find('.lity-container').height();
23063if($containerHeight){
23064var h=Math.round($containerHeight)+'px';
23065$content
23066.css('max-height',h)
23067.find('[data-'+litySpip.nameSpace+'-force-max-height]')
23068.css('max-height',h);
23069}
23070},
23071template:function(cfg,type,groupName,groupPosition,groupLength){
23072var className='';
23073if(!!cfg.className){
23074className=' '+cfg.className;
23075}
23076if(cfg.transitionOnOpen){
23077className+=' lity-transition-on-open-'+cfg.transitionOnOpen;
23078}
23079if(!!cfg.noTransition){
23080className+=' lity-no-transition';
23081}
23082if(!!cfg.slideShow){
23083className+=' lity-slideshow';
23084}
23085var styles=[];
23086var styles_container='';
23087var styles_content='';
23088if(cfg.sideBar){
23089className+=' lity-sidebar lity-sidebar-'+cfg.sideBar;
23090if(cfg.sideBar==='start'||cfg.sideBar==='end'){
23091className+=' lity-sidebar-inline';
23092cfg.height='100vh';
23093cfg.maxHeight='100vh';
23094}
23095if(cfg.sideBar==='top'||cfg.sideBar==='bottom'){
23096className+=' lity-sidebar-block';
23097cfg.width='100vw';
23098cfg.maxWidth='100vw';
23099}
23100}
23101if(cfg.maxWidth){
23102styles.push("max-width:"+cfg.maxWidth.replace("%","vw"));
23103}
23104if(cfg.maxHeight){
23105styles.push("max-height:"+cfg.maxHeight.replace("%","vh"));
23106}
23107if(cfg.width){
23108styles.push("width:"+cfg.width.replace("%","vw"));
23109className+=' lity-width-set';
23110}
23111if(cfg.height){
23112styles.push("height:"+cfg.height.replace("%","vh"));
23113className+=' lity-height-set';
23114if(cfg.minHeight){
23115styles.push("min-height:"+cfg.minHeight.replace("%","vh"));
23116}
23117}
23118if(styles.length){
23119styles_container=' style="'+styles.join(';')+'"';
23120}
23121styles=[];
23122var max;
23123if(cfg.minWidth){
23124max=(cfg.maxWidth?cfg.maxWidth.replace("%","vw"):'95vw');
23125styles.push("min-width:min("+max+","+cfg.minWidth.replace("%","vw")+')');
23126}
23127if(cfg.minHeight&&!cfg.height){
23128max=(cfg.maxHeight?cfg.maxHeight.replace("%","vw"):'95vh');
23129styles.push("min-height:min("+max+","+cfg.minHeight.replace("%","vh")+')');
23130}
23131if(styles.length){
23132styles_content=' style="'+styles.join(';')+'"';
23133}
23134var button_next_prev='',
23135button_start_stop='',
23136group_info_text='',
23137group_info='';
23138if(groupName&&groupLength){
23139if(groupLength>1){
23140var newPosition=(groupPosition<=0?groupLength-1:groupPosition-1);
23141button_next_prev+='<button class="lity-previous" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'" aria-label="'+litySpip.strings.previous+'" data-lity-previous'
23142+'><b title="'+litySpip.strings.previous+'">❮</b></button>';
23143newPosition=(groupPosition>=groupLength-1?0:groupPosition+1);
23144button_next_prev+='<button class="lity-next" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'"  aria-label="'+litySpip.strings.next+'" data-lity-next'
23145+'><b title="'+litySpip.strings.next+'">❯</b></button>';
23146}
23147group_info_text=" "+litySpip.strings.current;
23148group_info_text=group_info_text.replace('{current}',(groupPosition+1)+'');
23149group_info_text=group_info_text.replace('{total}',groupLength+'');
23150button_start_stop+='<button class="lity-start-stop" type="button" data-lity-stop-start>'
23151+'<b class="lity-start" aria-label="'+litySpip.strings.slideshowStart+'" title="'+litySpip.strings.slideshowStart+'">▶</b>'
23152+'<b class="lity-stop" aria-label="'+litySpip.strings.slideshowStop+'" title="'+litySpip.strings.slideshowStop+'">□</b>'
23153+'</button>';
23154group_info='<div class="lity-group-caption">'
23155+'<span class="lity-group-start-stop">'+button_start_stop+'</span>'
23156+'<span class="lity-group-current">'+group_info_text+'</span>'
23157+'<span class="lity-group-next-prev">'+button_next_prev+'</span>'
23158+'<span class="lity-group-progress-bar"><span class="lity-group-progress-bar-status" style="width:0"></span></span>'
23159+'</div>';
23160}
23161var close_button_aria_label=litySpip.strings.close+' ('+litySpip.strings.press_escape+')';
23162var dialog_title=(type==='image'?litySpip.strings.dialog_title_med:litySpip.strings.dialog_title_def);
23163dialog_title+=group_info_text+' ('+litySpip.strings.press_escape+')';
23164var t=
23165'<dialog class="box_mediabox box_modalbox lity'+className+'" role="dialog" aria-label="'+dialog_title+'" tabindex="-1">'
23166+'<div class="lity-wrap"'+(cfg.overlayClose===false?'':' data-lity-close')+' role="document">'
23167+'<div class="lity-loader" aria-hidden="true" aria-label="'+litySpip.strings.loading+'"><span class="box-loading"></span></div>'
23168+'<div class="lity-container"'+styles_container+'>'
23169+'<button class="lity-close" type="button" aria-label="'+close_button_aria_label+'" data-lity-close><b data-lity-close title="'+litySpip.strings.close+'">&times;</b></button>'
23170+'<div class="lity-content"'+styles_content+'></div>'
23171+group_info
23172+'</div>'
23173+'</div>'
23174+'</dialog>';
23175return t;
23176},
23177failHandler:function(target,instance){
23178return'<div class="error lity-error">Failed loading content</div>';
23179},
23180ajaxHandler:function(target,instance){
23181var selector,
23182off=target.indexOf(" ");
23183if(off>-1){
23184selector=target.slice(off);
23185selector=selector.match(/[^\x20\t\r\n\f]+/g)||[];
23186selector=selector.join(" ");
23187target=target.slice(0,off);
23188}
23189if(jQuery.spip.preloaded_urls[target]){
23190var content=jQuery.spip.preloaded_urls[target];
23191if(selector){
23192content=$("<div>").append($.parseHTML(content)).find(selector);
23193}
23194return $('<div class="lity-content-inner"></div>').append(content);
23195}
23196var _deferred=$.Deferred;
23197var deferred=_deferred();
23198var failed=function(){
23199deferred.reject($('<span class="error lity-error"></span>').append('Failed loading ajax'));
23200};
23201$.get(target)
23202.done(function(content){
23203jQuery.spip.preloaded_urls[target]=content;
23204if(selector){
23205content=$("<div>").append($.parseHTML(content)).find(selector);
23206}
23207deferred.resolve($('<div class="lity-content-inner"></div>').append(content));
23208})
23209.fail(failed);
23210return deferred.promise();
23211},
23212imageBuildContent:function(img,desc,longdesc,defaultCaptionClass){
23213img.attr('alt',desc?desc:'');
23214desc=(longdesc?longdesc:desc);
23215if(desc){
23216defaultCaptionClass=(defaultCaptionClass?defaultCaptionClass:'expanded');
23217var id='lity-image-caption-'+Date.now().toString(36)+Math.random().toString(36).substr(2);
23218img.attr('aria-describedby',id);
23219img=$('<figure class="lity-image-figure"></figure>').append(img).append('<figcaption id="'+id+'" class="lity-image-caption '+defaultCaptionClass+'"><div class="lity-image-caption-text">'+desc+'</div></figcaption>');
23220}
23221else{
23222img=$('<figure class="lity-image-figure"></figure>').append(img);
23223}
23224return img;
23225},
23226imageHandler:function(target,instance){
23227var _deferred=$.Deferred;
23228var desc='';
23229var longdesc='';
23230var defaultCaptionClass=(instance.options().defaultCaptionState==='min'?'min':'expanded');
23231var opener=instance.opener();
23232if(opener){
23233desc=opener.attr('title')||$('img[alt]',opener).eq(0).attr('alt')||'';
23234var by=opener.attr('aria-describedby')||$('img[aria-describedby]',opener).eq(0).attr('aria-describedby')||'';
23235if(by){
23236longdesc=$('#'+by).html();
23237longdesc=longdesc.trim();
23238}
23239if(!desc){
23240desc=desc||instance.opener().attr('aria-label')||'';
23241}
23242desc=desc.trim();
23243}
23244var img;
23245var cache=opener.data('lity-image-cache')||{};
23246if(cache[target]){
23247img=cache[target];
23248img=litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass);
23249return img;
23250}
23251img=$('<img src="'+target+'" class="lity-image-img" data-'+litySpip.nameSpace+'-force-max-height />');
23252var deferred=_deferred();
23253var failed=function(){
23254deferred.reject($('<span class="error lity-error"></span>').append('Failed loading image'));
23255};
23256img
23257.on('load',function(){
23258if(this.naturalWidth===0){
23259img.attr("style","width:25vw;");
23260}
23261cache[target]=img;
23262opener.data('lity-image-cache',cache);
23263deferred.resolve(litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass));
23264})
23265.on('error',failed)
23266;
23267return deferred.promise();
23268},
23269groupElements:function(groupName){
23270return $('.lity-enabled[data-'+litySpip.nameSpace+'-group'+'='+groupName+']');
23271},
23272eventSet:{},
23273setEvents:function(what){
23274if(!litySpip.eventSet[what]){
23275switch(what){
23276case'opener':
23277$(document).on('click','.lity-enabled',litySpip.onClickOpener);
23278break;
23279case'listener':
23280$(document).on('click','.lity-previous,.lity-next',litySpip.onPrevNext);
23281$(document).on('click','.lity-start-stop',litySpip.onSlideShowToggle);
23282$(window).on('keyup',litySpip.onKeyUp);
23283$(document).on('click','.lity-image-caption',litySpip.onCaptionToggle);
23284break;
23285}
23286litySpip.eventSet[what]=true;
23287}
23288},
23289onKeyUp:function(event){
23290var c={37:"previous",39:"next"}[event.keyCode];
23291if(c){
23292var current=lity.current();
23293if(current){
23294jQuery('.lity-'+c,current.element()).trigger('click');
23295}
23296}
23297},
23298onCaptionToggle:function(event){
23299var $caption=$(this);
23300$caption.toggleClass('min expanded');
23301},
23302openerFromPrevNext($button){
23303var groupName=$button.data('group-name');
23304var groupPosition=$button.data('group-position');
23305return litySpip.groupElements(groupName).eq(groupPosition);
23306},
23307onPrevNext:function(event){
23308var $button=$(this);
23309var newEl=litySpip.openerFromPrevNext($button);
23310if(newEl){
23311var element=lity.current().element();
23312litySpip.isTransition={oldClosed:false,newOpened:true};
23313element.addClass('lity-no-transition').css('visibility','hidden');
23314litySpip.slideshowStop(element);
23315var options={transitionOnOpen:$button.is('.lity-next')?'slide-from-right':'slide-from-left'};
23316if(element.is('.lity-slideshow')){
23317options.slideShow=true;
23318}
23319lity.current().close();
23320litySpip.elementOpener(newEl,options);
23321}
23322},
23323slideshowStart:function(element){
23324var $progress=element.find('.lity-group-progress-bar-status');
23325$progress.attr('style','');
23326$progress.css('width','100%');
23327var delay=litySpip.config.slideshowSpeed;
23328setTimeout(function(){
23329$progress.css('transition','width '+((delay-200)/1000)+'s linear');
23330$progress.css('width','0');
23331},200);
23332timer=setTimeout(function(){element.find('.lity-next').trigger('click')},delay);
23333element.data('lity-timer',timer);
23334$('.lity-start',element).attr('aria-hidden','true');
23335$('.lity-stop',element).attr('aria-hidden','false');
23336jQuery('.lity-start-stop',element).focus();
23337},
23338slideshowStop:function(element){
23339timer=element.data('lity-timer');
23340if(timer){
23341clearTimeout(timer);
23342}
23343},
23344onSlideShowToggle:function(event){
23345var $button=$(this);
23346var element=$button.closest('.lity');
23347var slideShowState=(element.is('.lity-slideshow')?true:false);
23348var timer;
23349if(!slideShowState){
23350litySpip.slideshowStart(element);
23351}
23352else{
23353litySpip.slideshowStop(element);
23354$('.lity-start',element).attr('aria-hidden','false');
23355$('.lity-stop',element).attr('aria-hidden','true');
23356}
23357element.toggleClass('lity-slideshow');
23358},
23359onClickOpener:function(event){
23360event.preventDefault();
23361var opener=$(this);
23362litySpip.elementOpener(opener);
23363},
23364elementOpener:function(opener,options){
23365var cfg=opener.data('mediabox-options');
23366if(options){
23367cfg=$.extend({},cfg,options);
23368}
23369var target=opener.data('href-popin')||opener.data('href')||opener.attr('href')||opener.attr('src');
23370litySpip.lityOpener(target,cfg,opener.get(0));
23371},
23372lityOpener:function(target,cfg,opener){
23373litySpip.setEvents('listener');
23374if(!litySpip.isTransition){
23375litySpip.callbacks.onOpen.push(cfg.onOpen||false);
23376litySpip.callbacks.onShow.push(cfg.onShow||false);
23377litySpip.callbacks.onClose.push(cfg.onClose||false);
23378litySpip.focusedItem.push($(document.activeElement));
23379}
23380var type=cfg.type||'';
23381if(!type&&opener){
23382type=$(opener).data(litySpip.nameSpace+'-type')||'';
23383}
23384var handlers=lity.handlers();
23385if(type==='ajax'){
23386handlers.ajax=litySpip.ajaxHandler;
23387}
23388handlers.image=litySpip.imageHandler;
23389if(type==='inline'){
23390var el=[];
23391try{
23392el=$(target);
23393}catch(e){
23394el=[];
23395}
23396if(!el.length){
23397handlers.inline=litySpip.failHandler;
23398}
23399}
23400cfg=$.extend({handlers:handlers},cfg);
23401if(type&&['image','inline','ajax','iframe'].indexOf(type)!==-1){
23402cfg.handler=type;
23403}
23404if(opener&&typeof($.parseMediaboxOptions)!=="undefined"){
23405cfg=$.extend(cfg,$.parseMediaboxOptions(litySpip.nameSpace,opener));
23406}
23407if(!!cfg.preloadOnly){
23408litySpip.lityPreLoader(target,cfg,opener);
23409}
23410else{
23411var groupPosition=0;
23412var groupLength=0;
23413if(opener){
23414var groupName=cfg.rel||(opener?$(opener).data(litySpip.nameSpace+'-group'):'');
23415if(groupName){
23416var elements=litySpip.groupElements(groupName);
23417groupPosition=elements.index($(opener));
23418groupLength=elements.length;
23419}
23420}
23421cfg=$.extend({template:litySpip.template(cfg,type,groupName,groupPosition,groupLength)},cfg);
23422if(cfg.samePopin){
23423var l=lity.current();
23424if(l){
23425l.close();
23426}
23427}
23428lity(target,cfg,opener);
23429}
23430},
23431lityPreLoader:function(target,cfg,opener){
23432if(cfg.handler&&cfg.handlers[cfg.handler]){
23433if(cfg.handler==='image'||cfg.handler==='ajax'){
23434var instance={
23435opener:function(){return $(opener);},
23436options:function(){return cfg}
23437};
23438var content=cfg.handlers[cfg.handler](target,instance);
23439}
23440}
23441},
23442ajaxReloadElements:function(elements){
23443const targets=elements
23444.split(',')
23445.map(s=>s.trim())
23446.filter(Boolean);
23447targets.forEach(function(target){
23448try{
23449if(/^[.#[]/.test(target)){
23450const $element=$(target);
23451if($element.length){
23452$element.ajaxReload();
23453}
23454}else{
23455ajaxReload(target);
23456}
23457}catch(e){
23458console.warn("Mediabox ajaxReloadElements : erreur lors du traitement de '"+target+"'.",e);
23459}
23460});
23461}
23462}
23463jQuery.fn.extend({
23464mediabox:function(options){
23465var cfg=$.extend({},litySpip.config,options);
23466if(this===jQuery.fn){
23467var href=cfg.href||"";
23468litySpip.lityOpener(href,cfg,null);
23469return this;
23470}else{
23471if(cfg.rel){
23472this.attr('data-'+litySpip.nameSpace+'-group',cfg.rel);
23473}
23474else{
23475this.each(function(){
23476var rel=$(this).attr('rel');
23477if(rel){
23478$(this).attr('data-'+litySpip.nameSpace+'-group',rel);
23479}
23480});
23481}
23482litySpip.setEvents('opener');
23483this
23484.data('mediabox-options',cfg)
23485.addClass('lity-enabled');
23486(cfg.preload?this:this.filter('[data-'+litySpip.nameSpace+'-preload]')).each(function(){
23487litySpip.elementOpener($(this),{preloadOnly:true});
23488});
23489return this;
23490}
23491},
23492mediaboxClose:function(){
23493var $current=lity.current();
23494if($current){
23495$current.close();
23496return true;
23497}
23498return false;
23499}
23500});
23501var initConfig=function(){
23502var b=typeof(mediabox_settings)=='object'?mediabox_settings:{};
23503litySpip.nameSpace=b.ns?b.ns:'mediabox';
23504litySpip.strings.slideshowStart=b.str_ssStart;
23505litySpip.strings.slideshowStop=b.str_ssStop;
23506litySpip.strings.current=b.str_cur;
23507litySpip.strings.previous=b.str_prev;
23508litySpip.strings.next=b.str_next;
23509litySpip.strings.close=b.str_close;
23510litySpip.strings.loading=b.str_loading;
23511litySpip.strings.press_escape=b.str_petc;
23512litySpip.strings.dialog_title_def=b.str_dialTitDef;
23513litySpip.strings.dialog_title_med=b.str_dialTitMed;
23514litySpip.config.slideshowSpeed=(b.lity.slideshow_speed?b.lity.slideshow_speed:5000);
23515litySpip.config.defaultCaptionState=(b.lity.defaultCaptionState?b.lity.defaultCaptionState:'expanded');
23516var styles={
23517'container':'',
23518'content':'',
23519};
23520var max;
23521if(b.lity.minWidth){
23522max=(b.lity.maxWidth?b.lity.maxWidth.replace('%','vw'):'95vw');
23523styles.content+="min-width:min("+max+","+b.lity.minWidth.replace('%','vw')+');';
23524}
23525if(b.lity.maxWidth){
23526styles.container+="max-width:"+b.lity.maxWidth.replace('%','vw')+';';
23527}
23528if(b.lity.minHeight){
23529max=(b.lity.maxHeight?b.lity.maxHeight.replace('%','vw'):'95vh');
23530styles.content+="min-height:min("+max+","+b.lity.minHeight.replace('%','vh')+');';
23531}
23532if(b.lity.maxHeight){
23533styles.container+="max-height:"+b.lity.maxHeight.replace('%','vh')+';';
23534}
23535var insert='';
23536for(let key in styles){
23537if(styles[key]){
23538insert+='.box_mediabox .lity-'+key+'{'+styles[key]+'}';
23539}
23540}
23541if(b.lity.opacite){
23542insert+='.box_mediabox:before{opacity:'+b.lity.opacite+'}';
23543}
23544if(insert){
23545$('head').append($('<style type="text/css">'+insert+'</style>'));
23546}
23547$(document).on('lity:open',function(event,instance){
23548if(document.fullscreenElement){
23549document.fullscreenElement.appendChild(instance.element().get(0));
23550}
23551if(!instance.element().is('.lity-slideshow')){
23552jQuery('.lity-close',instance.element()).focus();
23553}
23554if(!litySpip.isTransition){
23555var callback=litySpip.callbacks.onOpen.pop();
23556if(callback){
23557callback(event,instance);
23558}
23559}
23560});
23561$(document).on('lity:ready',function(event,instance){
23562litySpip.adjustHeight(instance);
23563if(jQuery.spip){
23564jQuery.spip.triggerAjaxLoad(instance.element().get(0))
23565}
23566if(instance.element().addClass('lity-ready').is('.lity-slideshow')){
23567litySpip.slideshowStart(instance.element());
23568}
23569if(!litySpip.isTransition){
23570var callback=litySpip.callbacks.onShow.pop();
23571if(callback){
23572callback(event,instance);
23573}
23574}
23575else{
23576litySpip.isTransition.newOpened=true;
23577if(litySpip.isTransition.oldClosed){
23578litySpip.isTransition=false;
23579}
23580instance.content().trigger('lity:resize',[instance]);
23581}
23582var $next=instance.element().find('.lity-next');
23583if($next.length){
23584$next=litySpip.openerFromPrevNext($next);
23585if($next){
23586litySpip.elementOpener($next,{preloadOnly:true});
23587}
23588}
23589});
23590$(document).on('lity:close',function(event,instance){
23591if(!litySpip.isTransition){
23592if(litySpip.callbacks.onShow.length>litySpip.callbacks.onOpen.length){
23593litySpip.callbacks.onShow.pop();
23594}
23595var callback=litySpip.callbacks.onClose.pop();
23596if(callback){
23597callback(event,instance);
23598}
23599let options=instance.options();
23600let ajaxReloadArgs=options.ajaxReloadOnClose;
23601if(ajaxReloadArgs&&typeof(ajaxReloadArgs)==='string'){
23602litySpip.ajaxReloadElements(ajaxReloadArgs);
23603}
23604}
23605});
23606$(document).on('lity:remove',function(event,instance){
23607if(!litySpip.isTransition){
23608var focused=litySpip.focusedItem.pop();
23609if(focused){
23610try{
23611focused.focus();
23612}catch(e){
23613}
23614}
23615}
23616else{
23617litySpip.isTransition.oldClosed=true;
23618if(litySpip.isTransition.newOpened){
23619litySpip.isTransition=false;
23620}
23621}
23622});
23623$(document).on('lity:resize',function(event,instance){
23624litySpip.adjustHeight(instance);
23625});
23626}
23627initConfig();
23628})(jQuery);
23629
23630
23631/* plugins-dist/mediabox/javascript/spip.mediabox.js?1790084230 */
23632(function($){
23633$.mediabox
23634=function(options){
23635if(typeof(mediabox_autodetect_href)=='function'
23636&&options.href
23637&&!options.type){
23638options.type=mediabox_autodetect_href(options.href);
23639}
23640$.fn.mediabox(options);
23641};
23642$.modalboxload=$.modalbox=function(href,options){$.mediabox($.extend({href:href,overlayClose:true},options));};
23643$.modalboxclose=$.mediaboxClose=$.fn.mediaboxClose;
23644$.parseMediaboxOptions=function(nameSpace,opener){
23645var options={};
23646var data2options={
23647"width":"width",
23648"height":"height",
23649"min-width":"minWidth",
23650"min-height":"minHeight",
23651"max-width":"maxWidth",
23652"max-height":"maxHeight",
23653"caption-state":"defaultCaptionState",
23654"sidebar":"sideBar",
23655"class":"className",
23656"ajaxreload-on-close":"ajaxReloadOnClose",
23657};
23658var v;
23659for(var o in data2options){
23660v=($(opener).data(nameSpace+'-'+o)||'');
23661if(v){
23662options[data2options[o]]=v;
23663}
23664}
23665if(!options.length){
23666var eltclass=$(opener).prop('class');
23667if(eltclass){
23668if(eltclass.indexOf("boxWidth-")!==-1){
23669var w=eltclass.match(/boxWidth-([^\s'">]*)/);
23670w=w[1].replace(/pc/,'%');
23671options["width"]=w;
23672}
23673if(eltclass.indexOf("boxHeight-")!==-1){
23674var h=eltclass.match(/boxHeight-([^\s'">]*)/);
23675h=h[1].replace(/pc/,'%');
23676options["height"]=h;
23677}
23678if(eltclass.indexOf("boxIframe")!==-1){
23679options["type"]='iframe';
23680}
23681if(eltclass.indexOf("boxInline")!==-1){
23682options["type"]='inline';
23683}
23684}
23685}
23686data2options={"same-popin":"samePopin","type":"type"};
23687for(var o in data2options){
23688v=($(opener).data(nameSpace+'-'+o)||'');
23689if(v){
23690options[data2options[o]]=v;
23691}
23692}
23693return options;
23694}
23695})(jQuery);
23696var mediaboxInit=function(){
23697var b=$.extend({},mediabox_settings);
23698if(b.ns!=='box'){
23699$('[data-box-type]').each(function(i,e){
23700var $e=$(e);
23701var d=$e.attr('data-box-type');
23702$e.removeAttr('data-box-type').attr('data-'+b.ns+'-type',d);
23703});
23704}
23705if(b.auto_detect){
23706var $popins=$('[data-href-popin],[data-'+b.ns+'-type]'+(window.var_zajax_content?',[data-var_zajax],a.popin':''))
23707.add(b.sel_c)
23708.not(ajaxbloc_selecteur,'.ajaxbloc','.hasbox');
23709$popins.each(function(i,e){
23710var $e=$(e);
23711var url=$e.attr('href')||"./";
23712var popin=$e.attr('data-href-popin');
23713var type=$e.attr('data-'+b.ns+'-type')||'';
23714if(!popin){
23715var env=$e.attr('data-ajax-env');
23716if(env){
23717url=parametre_url(parametre_url(url,'var_ajax',1),'var_ajax_env',env)
23718$e.removeAttr('data-ajax-env');
23719type='ajax';
23720}
23721var za=$e.attr('data-var_zajax');
23722if(za!==undefined||$e.hasClass('popin')){
23723if(za==='content'&&window.var_zajax_content){
23724za=window.var_zajax_content;
23725}
23726url=parametre_url(url,'var_zajax',za||window.var_zajax_content);
23727$e.removeAttr('data-var_zajax');
23728type='ajax';
23729}
23730if((url!==$e.attr('href')||(!popin&&type))&&url!=="./"){
23731$e.attr('data-href-popin',url);
23732}
23733}
23734url=popin||url;
23735if(!type){
23736var attrs=$e.data();
23737var types=['inline','html','iframe','image','ajax'];
23738types.some(function(e){
23739var k=b.ns+e.charAt(0).toUpperCase()+e.slice(1);
23740if(attrs[k]){
23741type=e;
23742return true;
23743}
23744});
23745}
23746if(!type&&typeof(mediabox_autodetect_href)=='function'){
23747type=mediabox_autodetect_href(url);
23748}
23749if(!type||$e.hasClass('boxIframe')){
23750type="iframe";
23751$e.removeClass('boxIframe');
23752}
23753$e.attr('data-'+b.ns+'-type',type);
23754});
23755}
23756if(b.sel_g){
23757var $items=$();
23758$(b.sel_g).each(function(i,e){
23759$items=$items.add(
23760$(this).is('a[type^=\'image\']')
23761?$(this)
23762:$(this).find('a[type^=\'image\']')
23763);
23764});
23765$items
23766.not('.hasbox')
23767.removeAttr('onclick')
23768.mediabox({rel:'galerieauto',slideshow:true,slideshowAuto:false,type:'image'})
23769.addClass('hasbox');
23770}
23771if(b.tt_img){
23772$('a[type^="image"],a[href$=".png"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".svg"],a[href$=".webp"]')
23773.not('.hasbox')
23774.removeAttr('onclick')
23775.mediabox({type:'image'})
23776.addClass('hasbox')
23777;
23778}
23779$(b.sel_c)
23780.not('.hasbox')
23781.mediabox()
23782.addClass('hasbox')
23783;
23784$('[data-href-popin]',this)
23785.not('.hasbox')
23786.click(function(){if($.modalbox)$.modalbox($(this).attr('data-href-popin'),$.parseMediaboxOptions(b.ns,this));return false;})
23787.addClass('hasbox');
23788};
23789(function($){
23790if(typeof onAjaxLoad=='function')onAjaxLoad(mediaboxInit);
23791$(mediaboxInit);
23792})(jQuery);
23793function mediabox_autodetect_href(href,options){
23794options=$.extend({
23795breakMode:true,
23796tests:{
23797image:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
23798inline:/^[#.]\w/,
23799html:/^\s*<[\w!][^<]*>/,
23800ajax:/((\?|&(amp;)?)var_z?ajax=|cache-ajaxload\/)/i,
23801iframe:/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/i,
23802},
23803},options);
23804var matched=options.breakMode?false:[];
23805$.each(options.tests,function(type,regex){
23806if(href.match(regex)&&!href.match('/File:[^/]+(\\#|[?]|$)')){
23807if(options.breakMode){
23808matched=type;
23809return false;
23810}else{
23811matched.push(type);
23812}
23813}
23814});
23815return matched;
23816};
23817
23818
23819/* plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1790084230 */
23820
23821;(function($){
23822$.fn.markItUp=function(settings,extraSettings){
23823var method,params,options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false;
23824markitup_prompt=false;
23825if(typeof settings=='string'){
23826method=settings;
23827params=extraSettings;
23828}
23829options={id:'',
23830nameSpace:'',
23831root:'',
23832lang:'',
23833previewHandler:false,
23834previewInWindow:'',
23835previewInElement:'',
23836previewAutoRefresh:true,
23837previewPosition:'after',
23838previewTemplatePath:'~/templates/preview.html',
23839previewParser:false,
23840previewParserPath:'',
23841previewParserVar:'data',
23842previewParserAjaxType:'POST',
23843resizeHandle:true,
23844beforeInsert:'',
23845afterInsert:'',
23846onEnter:{},
23847onShiftEnter:{},
23848onCtrlEnter:{},
23849onTab:{},
23850markupSet:[{}]
23851};
23852$.extend(options,settings,extraSettings);
23853if(!options.root){
23854$('script').each(function(a,tag){
23855var miuScript=$(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
23856if(miuScript!==null){
23857options.root=miuScript[1];
23858}
23859});
23860}
23861var uaMatch=function(ua){
23862ua=ua.toLowerCase();
23863var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
23864ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
23865[];
23866return{
23867browser:match[1]||"",
23868version:match[2]||"0"
23869};
23870};
23871var matched=uaMatch(navigator.userAgent);
23872var browser={};
23873if(matched.browser){
23874browser[matched.browser]=true;
23875browser.version=matched.version;
23876}
23877if(browser.chrome){
23878browser.webkit=true;
23879}else if(browser.webkit){
23880browser.safari=true;
23881}
23882return this.each(function(){
23883var $$,textarea,levels,scrollPosition,caretPosition,
23884clicked,hash,header,footer,previewWindow,template,iFrame,abort,
23885before,after;
23886$$=$(this);
23887textarea=this;
23888levels=[];
23889abort=false;
23890scrollPosition=caretPosition=0;
23891caretOffset=-1;
23892options.previewParserPath=localize(options.previewParserPath);
23893options.previewTemplatePath=localize(options.previewTemplatePath);
23894if(method){
23895switch(method){
23896case'remove':
23897remove();
23898break;
23899case'insert':
23900markup(params);
23901break;
23902default:
23903$.error('Method '+method+' does not exist on jQuery.markItUp');
23904}
23905return;
23906}
23907function localize(data,inText){
23908if(inText){
23909return data.replace(/("|')~\//g,"$1"+options.root);
23910}
23911return data.replace(/^~\//,options.root);
23912}
23913function init(){
23914id='';nameSpace='';
23915if(options.id){
23916id='id="'+options.id+'"';
23917}else if($$.attr("id")){
23918id='id="markItUp'+($$.attr("id").substr(0,1).toUpperCase())+($$.attr("id").substr(1))+'"';
23919}
23920if(options.nameSpace){
23921nameSpace='class="'+options.nameSpace+'"';
23922}
23923currentScrollPosition=$$.scrollTop();
23924$$.wrap('<div '+nameSpace+'></div>');
23925$$.wrap('<div '+id+' class="markItUp"></div>');
23926$$.wrap('<div class="markItUpContainer"></div>');
23927$$.addClass("markItUpEditor");
23928$$.scrollTop(currentScrollPosition);
23929header=$('<div class="markItUpHeader"></div>').insertBefore($$);
23930$(dropMenus(options.markupSet)).appendTo(header);
23931$(header).find("li.markItUpDropMenu ul:empty").parent().remove();
23932footer=$('<div class="markItUpFooter"></div>').insertAfter($$);
23933if(options.resizeHandle===true&&browser.safari!==true){
23934resizeHandle=$('<div class="markItUpResizeHandle"></div>')
23935.insertAfter($$)
23936.on("mousedown.markItUp",function(e){
23937var h=$$.height(),y=e.clientY,mouseMove,mouseUp;
23938mouseMove=function(e){
23939$$.css("height",Math.max(20,e.clientY+h-y)+"px");
23940return false;
23941};
23942mouseUp=function(e){
23943$("html").off("mousemove.markItUp",mouseMove).off("mouseup.markItUp",mouseUp);
23944return false;
23945};
23946$("html").on("mousemove.markItUp",mouseMove).on("mouseup.markItUp",mouseUp);
23947});
23948footer.append(resizeHandle);
23949}
23950$$.on('keydown.markItUp',keyPressed).on('keyup',keyPressed);
23951$$.on("insertion.markItUp",function(e,settings){
23952if(settings.target!==false){
23953get();
23954}
23955if(textarea===$.markItUp.focused){
23956markup(settings);
23957}
23958});
23959$$.on('focus.markItUp',function(){
23960$.markItUp.focused=this;
23961});
23962if(options.previewInElement){
23963refreshPreview();
23964}
23965}
23966function dropMenus(markupSet){
23967var ul=$('<ul></ul>'),i=0;
23968var lang=($$.attr('lang')||options.lang);
23969$('li:hover > ul',ul).css('display','block');
23970$.each(markupSet,function(){
23971var button=this,t='',title,li,j;
23972if((!lang||!button.lang||($.inArray(lang,button.lang)!=-1))
23973&&(!button.lang_not||($.inArray(lang,button.lang_not)==-1))){
23974button.title?title=(button.key)?(button.title||'')+' [Ctrl+'+button.key+']':(button.title||''):title=(button.key)?(button.name||'')+' [Ctrl+'+button.key+']':(button.name||'');
23975key=(button.key)?'accesskey="'+button.key+'"':'';
23976if(button.separator){
23977li=$('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
23978}else{
23979i++;
23980for(j=levels.length-1;j>=0;j--){
23981t+=levels[j]+"-";
23982}
23983li=$('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="#" '+key+' title="'+title+'"><em>'+(button.name||'')+'</em></a></li>')
23984.on("contextmenu.markItUp",function(){
23985return false;
23986}).on('click.markItUp',function(e){
23987e.preventDefault();
23988}).on("focusin.markItUp",function(){
23989setTimeout(function(){
23990$$.focus();
23991},0);
23992}).on('mouseup',function(e){
23993if(button.call){
23994eval(button.call)(e);
23995}
23996setTimeout(function(){markup(button)},1);
23997return false;
23998}).on('mouseenter.markItUp',function(){
23999$('> a',this).addClass('active');
24000$('> ul',this).addClass('expanded');
24001$(document).one('click',function(){
24002$('ul a',header).removeClass('active');
24003$('ul ul',header).removeClass('expanded');
24004}
24005);
24006}).on('mouseleave.markItUp',function(){
24007$('> a',this).removeClass('active');
24008$('> ul',this).removeClass('expanded');
24009}).appendTo(ul);
24010if(button.dropMenu){
24011levels.push(i);
24012$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
24013}
24014}
24015}
24016});
24017levels.pop();
24018return ul;
24019}
24020function magicMarkups(string){
24021if(string){
24022string=string.toString();
24023string=string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
24024function(x,a){
24025var b=a.split('|!|');
24026if(altKey===true){
24027return(b[1]!==undefined)?b[1]:b[0];
24028}else{
24029return(b[1]===undefined)?"":b[0];
24030}
24031}
24032);
24033string=string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
24034function(x,a){
24035var b=a.split(':!:');
24036if(abort===true){
24037return false;
24038}
24039markitup_prompt=true;
24040value=prompt(b[0],(b[1])?b[1]:'');
24041if(value===null){
24042abort=true;
24043}
24044setTimeout(function(){markitup_prompt=false;},500);
24045return value;
24046}
24047);
24048return string;
24049}
24050return"";
24051}
24052function prepare(action){
24053if($.isFunction(action)){
24054action=action(hash);
24055}
24056return magicMarkups(action);
24057}
24058function build(string){
24059var openWith=prepare(clicked.openWith);
24060var placeHolder=prepare(clicked.placeHolder);
24061var replaceWith=prepare(clicked.replaceWith);
24062var closeWith=prepare(clicked.closeWith);
24063var openBlockWith=prepare(clicked.openBlockWith);
24064var closeBlockWith=prepare(clicked.closeBlockWith);
24065var multiline=clicked.multiline;
24066if(replaceWith!==""){
24067block=openWith+replaceWith+closeWith;
24068}else if(selection===''&&placeHolder!==''){
24069block=openWith+placeHolder+closeWith;
24070}else if(multiline===true){
24071string=string||selection;
24072var lines=[string],blocks=[];
24073if(multiline===true){
24074lines=string.split(/\r?\n/);
24075}
24076for(var l=0;l<lines.length;l++){
24077line=lines[l];
24078var trailingSpaces;
24079if(trailingSpaces=line.match(/ *$/)){
24080blocks.push(openWith+line.replace(/ *$/g,'')+closeWith+trailingSpaces);
24081}else{
24082blocks.push(openWith+line+closeWith);
24083}
24084}
24085block=blocks.join("\n");
24086}else{
24087block=openWith+(string||selection)+closeWith;
24088}
24089block=openBlockWith+block+closeBlockWith;
24090return{block:block,
24091openBlockWith:openBlockWith,
24092openWith:openWith,
24093replaceWith:replaceWith,
24094placeHolder:placeHolder,
24095closeWith:closeWith,
24096closeBlockWith:closeBlockWith
24097};
24098}
24099function selectWord(){
24100selectionBeforeAfter(/\s|[.,;:!¡?¿()]/);
24101selectionSave();
24102}
24103function selectLine(){
24104selectionBeforeAfter(/\r?\n/);
24105selectionSave();
24106}
24107function selectionRemoveLast(pattern){
24108if(!pattern)pattern=/\s/;
24109last=selection[selection.length-1];
24110if(last&&last.match(pattern)){
24111set(caretPosition,selection.length-1);
24112get();
24113$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
24114}
24115}
24116function selectionBeforeAfter(pattern){
24117if(!pattern)pattern=/\s/;
24118sautAvantIE=sautApresIE=0;
24119if(browser.msie){
24120lenSelection=selection.length-fixIeBug(selection);
24121if(caretPosition){
24122set(caretPosition-1,2);
24123sautAvantIE=fixIeBug(document.selection.createRange().text);
24124}
24125set(caretPosition,2);
24126sautApresIE=fixIeBug(document.selection.createRange().text);
24127set(0,caretPosition);
24128before=document.selection.createRange().text;
24129set(caretPosition+lenSelection,textarea.value.length);
24130after=document.selection.createRange().text;
24131set(caretPosition,lenSelection);
24132selection=document.selection.createRange().text;
24133}else{
24134before=textarea.value.substring(0,caretPosition);
24135after=textarea.value.substring(caretPosition+selection.length-fixIeBug(selection));
24136}
24137before=before.split(pattern);
24138after=after.split(pattern);
24139if(sautAvantIE)before.push("");
24140if(sautApresIE)after.unshift("");
24141}
24142function selectionSave(){
24143nb_before=before?before[before.length-1].length:0;
24144nb_after=after?after[0].length:0;
24145nb=nb_before+selection.length+nb_after-fixIeBug(selection);
24146caretPosition=caretPosition-nb_before;
24147set(caretPosition,nb);
24148get();
24149$.extend(hash,{selection:selection,caretPosition:caretPosition,scrollPosition:scrollPosition});
24150}
24151function markup(button){
24152var len,j,n,i;
24153hash=clicked=button;
24154get();
24155$.extend(hash,{line:"",
24156root:options.root,
24157textarea:textarea,
24158selection:(selection||''),
24159caretPosition:caretPosition,
24160ctrlKey:ctrlKey,
24161shiftKey:shiftKey,
24162altKey:altKey
24163}
24164);
24165if(button.selectionType){
24166if(button.selectionType=="word"){
24167if(!selection){
24168selectWord();
24169}else{
24170selectionRemoveLast(/\s/);
24171}
24172}
24173if(button.selectionType=="line"){
24174selectLine();
24175}
24176if(button.selectionType=="return"){
24177if(!browser.msie){
24178selectionBeforeAfter(/\r?\n/);
24179before_last=before[before.length-1];
24180after='';
24181if(r=before_last.match(/^-([*#]+) ?(.*)$/)){
24182if(r[2]){
24183button.replaceWith="\n-"+r[1]+' ';
24184before_last='';
24185}else{
24186button.replaceWith="\n";
24187}
24188}else{
24189before_last='';
24190button.replaceWith="\n";
24191}
24192before[before.length-1]=before_last;
24193selectionSave();
24194}
24195}
24196}
24197prepare(options.beforeInsert);
24198prepare(clicked.beforeInsert);
24199if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
24200prepare(clicked.beforeMultiInsert);
24201}
24202$.extend(hash,{line:1});
24203if((ctrlKey===true&&shiftKey===true)||button.forceMultiline===true){
24204lines=selection.split(/\r?\n/);
24205for(j=0,n=lines.length,i=0;i<n;i++){
24206if(n==1||$.trim(lines[i])!==''){
24207$.extend(hash,{line:++j,selection:lines[i]});
24208lines[i]=build(lines[i]).block;
24209}else{
24210lines[i]="";
24211}
24212}
24213string={block:lines.join('\n')};
24214start=caretPosition;
24215len=string.block.length+((browser.opera)?n-1:0);
24216}else if(ctrlKey===true){
24217string=build(selection);
24218start=caretPosition+string.openWith.length;
24219len=string.block.length-string.openWith.length-string.closeWith.length;
24220len=len-(string.block.match(/ $/)?1:0);
24221len-=fixIeBug(string.block);
24222}else if(shiftKey===true){
24223string=build(selection);
24224start=caretPosition;
24225len=string.block.length;
24226len-=fixIeBug(string.block);
24227}else{
24228string=build(selection);
24229start=caretPosition+string.block.length;
24230len=0;
24231start-=fixIeBug(string.block);
24232}
24233if((selection===''&&string.replaceWith==='')){
24234caretOffset+=fixOperaBug(string.block);
24235start=caretPosition+string.openBlockWith.length+string.openWith.length;
24236len=string.block.length-string.openBlockWith.length-string.openWith.length-string.closeWith.length-string.closeBlockWith.length;
24237caretOffset=$$.val().substring(caretPosition,$$.val().length).length;
24238caretOffset-=fixOperaBug($$.val().substring(0,caretPosition));
24239}
24240$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
24241if(string.block!==selection&&abort===false){
24242insert(string.block);
24243set(start,len);
24244}else{
24245caretOffset=-1;
24246}
24247get();
24248$.extend(hash,{line:'',selection:selection});
24249if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
24250prepare(clicked.afterMultiInsert);
24251}
24252prepare(clicked.afterInsert);
24253prepare(options.afterInsert);
24254if(previewWindow&&options.previewAutoRefresh){
24255refreshPreview();
24256}
24257textarea.dispatchEvent(new Event('input'));
24258shiftKey=altKey=ctrlKey=abort=false;
24259}
24260function fixOperaBug(string){
24261if(browser.opera){
24262return string.length-string.replace(/\n*/g,'').length;
24263}
24264return 0;
24265}
24266function fixIeBug(string){
24267if(browser.msie){
24268return string.length-string.replace(/\r*/g,'').length;
24269}
24270return 0;
24271}
24272function insert(block){
24273if(document.selection){
24274var newSelection=document.selection.createRange();
24275newSelection.text=block;
24276}else{
24277textarea.value=textarea.value.substring(0,caretPosition)+block+textarea.value.substring(caretPosition+selection.length,textarea.value.length);
24278}
24279}
24280function set(start,len){
24281if(textarea.createTextRange){
24282if(browser.opera&&browser.version>=9.5&&len==0){
24283return false;
24284}
24285range=textarea.createTextRange();
24286range.collapse(true);
24287range.moveStart('character',start);
24288range.moveEnd('character',len);
24289range.select();
24290}else if(textarea.setSelectionRange){
24291textarea.setSelectionRange(start,start+len);
24292}
24293textarea.scrollTop=scrollPosition;
24294textarea.focus();
24295}
24296function get(){
24297textarea.focus();
24298scrollPosition=textarea.scrollTop;
24299if(document.selection){
24300selection=document.selection.createRange().text;
24301if(browser.msie){
24302var range=document.selection.createRange(),rangeCopy=range.duplicate();
24303rangeCopy.moveToElementText(textarea);
24304caretPosition=-1;
24305while(rangeCopy.inRange(range)){
24306rangeCopy.moveStart('character');
24307caretPosition++;
24308}
24309}else{
24310caretPosition=textarea.selectionStart;
24311}
24312}else{
24313caretPosition=textarea.selectionStart;
24314selection=textarea.value.substring(caretPosition,textarea.selectionEnd);
24315}
24316return selection;
24317}
24318function preview(){
24319if(typeof options.previewHandler==='function'){
24320previewWindow=true;
24321}else if(options.previewInElement){
24322previewWindow=$(options.previewInElement);
24323}else if(!previewWindow||previewWindow.closed){
24324if(options.previewInWindow){
24325previewWindow=window.open('','preview',options.previewInWindow);
24326$(window).unload(function(){
24327previewWindow.close();
24328});
24329}else{
24330iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>');
24331if(options.previewPosition=='after'){
24332iFrame.insertAfter(footer);
24333}else{
24334iFrame.insertBefore(header);
24335}
24336previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1];
24337}
24338}else if(altKey===true){
24339if(iFrame){
24340iFrame.remove();
24341}else{
24342previewWindow.close();
24343}
24344previewWindow=iFrame=false;
24345}
24346if(!options.previewAutoRefresh){
24347refreshPreview();
24348}
24349if(options.previewInWindow){
24350previewWindow.focus();
24351}
24352}
24353function refreshPreview(){
24354renderPreview();
24355}
24356function renderPreview(){
24357var phtml;
24358var parsedData=$$.val();
24359if(options.previewParser&&typeof options.previewParser==='function'){
24360parsedData=options.previewParser(parsedData);
24361}
24362if(options.previewHandler&&typeof options.previewHandler==='function'){
24363options.previewHandler(parsedData);
24364}else if(options.previewParserPath!==''){
24365$.ajax({
24366type:options.previewParserAjaxType,
24367dataType:'text',
24368global:false,
24369url:options.previewParserPath,
24370data:options.previewParserVar+'='+encodeURIComponent(parsedData),
24371success:function(data){
24372writeInPreview(localize(data,1));
24373}
24374});
24375}else{
24376if(!template){
24377$.ajax({
24378url:options.previewTemplatePath,
24379dataType:'text',
24380global:false,
24381success:function(data){
24382writeInPreview(localize(data,1).replace(/<!-- content -->/g,parsedData));
24383}
24384});
24385}
24386}
24387return false;
24388}
24389function writeInPreview(data){
24390if(options.previewInElement){
24391$(options.previewInElement).html(data);
24392}else if(previewWindow&&previewWindow.document){
24393try{
24394sp=previewWindow.document.documentElement.scrollTop
24395}catch(e){
24396sp=0;
24397}
24398previewWindow.document.open();
24399previewWindow.document.write(data);
24400previewWindow.document.close();
24401previewWindow.document.documentElement.scrollTop=sp;
24402}
24403}
24404function keyPressed(e){
24405shiftKey=e.shiftKey;
24406altKey=e.altKey;
24407ctrlKey=(!(e.altKey&&e.ctrlKey))?(e.ctrlKey||e.metaKey):false;
24408if(e.type==='keydown'){
24409if(ctrlKey===true){
24410li=$('a[accesskey="'+((e.keyCode==13)?'\\n':String.fromCharCode(e.keyCode))+'"]',header).parent('li');
24411if(li.length!==0){
24412ctrlKey=false;
24413setTimeout(function(){
24414li.triggerHandler('mouseup');
24415},1);
24416return false;
24417}
24418}
24419if(!browser.opera){
24420if(e.keyCode===13||e.keyCode===10){
24421if(ctrlKey===true){
24422ctrlKey=false;
24423markup(options.onCtrlEnter);
24424if(!options.onCtrlEnter.keepDefault){
24425textarea.dispatchEvent(new Event('input'));
24426}
24427return options.onCtrlEnter.keepDefault;
24428}else if(shiftKey===true){
24429shiftKey=false;
24430markup(options.onShiftEnter);
24431if(!options.onShiftEnter.keepDefault){
24432textarea.dispatchEvent(new Event('input'));
24433}
24434return options.onShiftEnter.keepDefault;
24435}else{
24436markup(options.onEnter);
24437if(!options.onEnter.keepDefault){
24438textarea.dispatchEvent(new Event('input'));
24439}
24440return options.onEnter.keepDefault;
24441}
24442}
24443if(e.keyCode===9){
24444if(shiftKey==true||ctrlKey==true||altKey==true){
24445return false;
24446}
24447if(caretOffset!==-1){
24448get();
24449caretOffset=$$.val().length-caretOffset;
24450set(caretOffset,0);
24451caretOffset=-1;
24452return false;
24453}else{
24454markup(options.onTab);
24455return options.onTab.keepDefault;
24456}
24457}
24458}
24459}
24460}
24461function remove(){
24462$$.off(".markItUp").removeClass('markItUpEditor');
24463$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
24464var relativeRef=$$.parent('div').parent('div.markItUp').parent('div');
24465if(relativeRef.length){
24466relativeRef.replaceWith($$);
24467}
24468$$.data('markItUp',null);
24469}
24470init();
24471});
24472};
24473$.fn.markItUpRemove=function(){
24474return this.each(function(){
24475$(this).markItUp('remove');
24476}
24477);
24478};
24479$.markItUp=function(settings){
24480var options={target:false};
24481$.extend(options,settings);
24482if(options.target){
24483return $(options.target).each(function(){
24484$(this).focus();
24485$(this).trigger('insertion',[options]);
24486});
24487}else{
24488$('textarea').trigger('insertion',[options]);
24489}
24490};
24491})(jQuery);
24492
24493
24494/* plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1790084230 */
24495;(function($){
24496$.fn.previsu_spip=function(settings){
24497var options;
24498options={
24499previewParserPath:'',
24500previewParserVar:'data',
24501textEditer:'Editer',
24502textVoir:'Voir',
24503textFullScreen:'Plein écran'
24504};
24505$.extend(options,settings);
24506return this.each(function(){
24507var $$,textarea,tabs,preview;
24508$$=$(this);
24509textarea=this;
24510function init(){
24511$$.addClass("pp_previsualisation");
24512if(!$$.parent().has('.markItUpContainer').length){
24513$$.barre_outils('vide');
24514}
24515var mark=$$.parent();
24516tabs=$('<div class="markItUpTabs"></div>').prependTo(mark);
24517$(tabs).append(
24518'<a href="#fullscreen" class="fullscreen">'+options.textFullScreen+'</a>'+
24519'<a href="#previsuVoir" class="previsuVoir">'+options.textVoir+'</a>'+
24520'<a href="#previsuEditer" class="previsuEditer on">'+options.textEditer+'</a>'
24521);
24522preview=$('<div class="markItUpPreview"></div>').insertAfter(mark.find('.markItUpHeader'));
24523preview.hide();
24524var is_full_screen=false;
24525var objet=mark.parents('.formulaire_spip')[0].className.match(/formulaire_editer_(\w+)/);
24526objet=(objet?objet[1]:'');
24527var champ=mark.parents('.editer')[0].className.match(/editer_(\w+)/);
24528champ=(champ?champ[1].toUpperCase():'');
24529var textarea=mark.find('textarea.pp_previsualisation');
24530var preview=mark.find('.markItUpPreview');
24531var dir=textarea.attr('dir');
24532if(dir){
24533preview.attr('dir',dir);
24534}
24535tabs.find('.fullscreen').click(function(){
24536if(!mark.is('.fullscreen')){
24537textarea.data('height-origin',textarea.css('height'));
24538}
24539mark.toggleClass('fullscreen');
24540if(mark.is('.fullscreen')){
24541$('body').addClass('markitup-fullscreen');
24542is_full_screen=true;
24543mark.find('.markItUpHeader a').show();
24544if(!mark.is('.livepreview')){
24545var original_texte="";
24546function refresh_preview(){
24547var texte=textarea.val();
24548if(original_texte==texte){
24549return;
24550}
24551renderPreview(preview.addClass('ajaxLoad'),texte,champ,objet);
24552original_texte=texte;
24553}
24554var timerPreview=null;
24555mark.addClass('livepreview').find('.markItUpEditor').on('keyup click change focus refreshpreview',function(e){
24556if(is_full_screen){
24557if(timerPreview)clearTimeout(timerPreview);
24558timerPreview=setTimeout(refresh_preview,500);
24559}
24560});
24561$(window).on('keyup',function(e){
24562if(is_full_screen){
24563if(e.type=='keyup'&&e.keyCode==27&&!markitup_prompt){
24564mark.removeClass('fullscreen');
24565$('body').removeClass('markitup-fullscreen');
24566textarea.css('height',textarea.data('height-origin'));
24567is_full_screen=false;
24568}
24569}
24570});
24571}
24572mark.find('.markItUpEditor').trigger('refreshpreview');
24573}
24574else{
24575$('body').removeClass('markitup-fullscreen');
24576textarea.css('height',textarea.data('height-origin'));
24577if($(this).next().hasClass('on')){
24578mark.find('.markItUpHeader a').hide();
24579}
24580is_full_screen=false;
24581}
24582return false;
24583});
24584tabs.find('.previsuVoir').click(function(){
24585preview.height(
24586mark.find('.markItUpEditor').height()
24587+mark.find('.markItUpFooter').height()
24588);
24589mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').hide();
24590$(this).addClass('on').next().removeClass('on');
24591renderPreview(
24592preview.show().addClass('ajaxLoad'),
24593mark.find('textarea.pp_previsualisation').val(),
24594champ,
24595objet,
24596false
24597);
24598return false;
24599});
24600tabs.find('.previsuEditer').click(function(){
24601mark.find('.markItUpPreview').hide();
24602mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').show();
24603$(this).addClass('on').prev().removeClass('on');
24604return false;
24605});
24606}
24607function renderPreview(node,val,champ,objet,async){
24608if(options.previewParserPath!==''){
24609$.ajax({
24610type:'POST',
24611async:typeof(async)=="undefined"?true:async,
24612url:options.previewParserPath,
24613data:'champ='+champ
24614+'&objet='+objet
24615+'&'+options.previewParserVar+'='+encodeURIComponent(val),
24616success:function(data){
24617node.html(data).removeClass('ajaxLoad');
24618$("a",node).attr("target","blank");
24619$(":input",node).attr("disabled","disabled");
24620}
24621});
24622}
24623}
24624init();
24625});
24626};
24627})(jQuery);
24628
24629
24630/* local/cache-js/jsdyn-javascript_porte_plume_start_js-53e35563.js?1790190082 */
24631
24632barre_outils_edition={
24633"nameSpace":"edition",
24634"previewAutoRefresh":false,
24635"onEnter":{
24636"keepDefault":false,
24637"selectionType":"return",
24638"replaceWith":"\n"
24639},
24640"onShiftEnter":{
24641"keepDefault":false,
24642"replaceWith":"\n_ "
24643},
24644"onCtrlEnter":{
24645"keepDefault":false,
24646"replaceWith":"\n\n"
24647},
24648"markupSet":[
24649{
24650"name":"Transformer en {{{intertitre}}}",
24651"key":"H",
24652"className":"outil_header1",
24653"openWith":"\n{{{",
24654"closeWith":"}}}\n",
24655"selectionType":"line",
24656"dropMenu":[
24657{
24658"id":"intertitre",
24659"name":"Transformer en {{{intertitre}}}",
24660"className":"outil_intertitre1",
24661"openWith":"\n{{{",
24662"closeWith":"}}}\n",
24663"display":true,
24664"selectionType":"line"
24665},
24666{
24667"id":"intertitre2",
24668"name":"Transformer en {{{**intertitre niveau deux}}}",
24669"className":"outil_intertitre2",
24670"openWith":"\n{{{**",
24671"closeWith":"}}}\n",
24672"display":true,
24673"selectionType":"line"
24674},
24675{
24676"id":"intertitre3",
24677"name":"Transformer en {{{***intertitre niveau trois}}}",
24678"className":"outil_intertitre3",
24679"openWith":"\n{{{***",
24680"closeWith":"}}}\n",
24681"display":true,
24682"selectionType":"line"
24683},
24684{
24685"id":"alignerdroite",
24686"name":"[\/Aligne \u00e0 droite\/] le paragraphe",
24687"className":"outil_alignerdroite",
24688"openWith":"\n[\/",
24689"closeWith":"\/]\n",
24690"display":true,
24691"selectionType":"line"
24692},
24693{
24694"id":"alignergauche",
24695"name":"[!Aligne \u00e0 gauche\u00a0!] le paragraphe",
24696"className":"outil_alignergauche",
24697"openWith":"\n[!",
24698"closeWith":"!]\n",
24699"display":true,
24700"lang":[
24701"ar",
24702"fa"
24703],
24704"selectionType":"line"
24705},
24706{
24707"id":"cadretexte",
24708"name":"[(Encadrer)] le paragraphe",
24709"className":"outil_cadretexte",
24710"openWith":"\n[(",
24711"closeWith":")]\n",
24712"display":true,
24713"selectionType":"line"
24714},
24715{
24716"id":"barre_cadre",
24717"name":"Placer dans une <cadre>zone de saisie de texte<\/cadre>",
24718"className":"outil_barre_cadre",
24719"openWith":"\n<cadre>",
24720"closeWith":"<\/cadre>\n",
24721"display":true,
24722"selectionType":"line"
24723},
24724{
24725"id":"blocs_bloc",
24726"name":"Ins\u00e9rer un bloc repli\u00e9",
24727"className":"blocs_bloc",
24728"replaceWith":"\n<bloc>Un titre\n\nPlacez votre texte ici\n<\/bloc>\n",
24729"display":true
24730},
24731{
24732"id":"blocs_visible",
24733"name":"Ins\u00e9rer un bloc d\u00e9pli\u00e9",
24734"className":"blocs_visible",
24735"replaceWith":"\n<visible>Un titre\n\nPlacez votre texte ici\n<\/visible>\n",
24736"display":true
24737}
24738]
24739},
24740{
24741"name":"Mettre en {{gras}}",
24742"key":"B",
24743"className":"outil_bold",
24744"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');},
24745"selectionType":"word",
24746"dropMenu":[
24747{
24748"id":"italic",
24749"name":"Mettre en {italique}",
24750"key":"I",
24751"className":"outil_italic",
24752"replaceWith":function(h){return espace_si_accolade(h,'{','}');},
24753"display":true,
24754"selectionType":"word"
24755},
24756{
24757"id":"petitescapitales",
24758"name":"Mettre le texte en <sc>petites capitales<\/sc>",
24759"className":"outil_petitescapitales",
24760"openWith":"<sc>",
24761"closeWith":"<\/sc>",
24762"display":true,
24763"selectionType":"word"
24764},
24765{
24766"id":"stroke_through_et",
24767"name":"<del>Barrer<\/del> le texte",
24768"className":"outil_stroke_through_et",
24769"openWith":"<del>",
24770"closeWith":"<\/del>",
24771"display":true,
24772"selectionType":"word"
24773},
24774{
24775"id":"miseenevidence",
24776"name":"Mettre le texte en [*\u00e9vidence*]",
24777"className":"outil_miseenevidence",
24778"openWith":"[*",
24779"closeWith":"*]",
24780"display":true,
24781"selectionType":"word"
24782},
24783{
24784"id":"miseenevidence2",
24785"name":"Mettre le texte en [**\u00e9vidence*] (2e couleur)",
24786"className":"outil_miseenevidence2",
24787"openWith":"[**",
24788"closeWith":"*]",
24789"display":true,
24790"selectionType":"word"
24791},
24792{
24793"id":"exposant",
24794"name":"Mettre le texte en <sup>exposant<\/sup>",
24795"className":"outil_exposant",
24796"openWith":"<sup>",
24797"closeWith":"<\/sup>",
24798"display":true,
24799"selectionType":"word"
24800},
24801{
24802"id":"indice",
24803"name":"Mettre le texte en <sub>indice<\/sub>",
24804"className":"outil_indice",
24805"openWith":"<sub>",
24806"closeWith":"<\/sub>",
24807"display":true,
24808"selectionType":"word"
24809},
24810{
24811"id":"barre_code",
24812"name":"Mettre en forme un <code>code informatique<\/code>",
24813"className":"outil_barre_code",
24814"openWith":"<code>",
24815"closeWith":"<\/code>",
24816"display":true,
24817"selectionType":"word"
24818}
24819]
24820},
24821{
24822"name":"Mettre en liste",
24823"className":"outil_liste_ul separateur_avant",
24824"replaceWith":function(h){return outil_liste(h,'*');},
24825"selectionType":"line",
24826"forceMultiline":true,
24827"dropMenu":[
24828{
24829"id":"liste_ol",
24830"name":"Mettre en liste num\u00e9rot\u00e9e",
24831"className":"outil_liste_ol",
24832"replaceWith":function(h){return outil_liste(h,'#');},
24833"display":true,
24834"selectionType":"line",
24835"forceMultiline":true
24836},
24837{
24838"id":"desindenter",
24839"name":"D\u00e9sindenter une liste",
24840"className":"outil_desindenter",
24841"replaceWith":function(h){return outil_desindenter(h);},
24842"display":true,
24843"selectionType":"line",
24844"forceMultiline":true
24845},
24846{
24847"id":"indenter",
24848"name":"Indenter une liste",
24849"className":"outil_indenter",
24850"replaceWith":function(h){return outil_indenter(h);},
24851"display":true,
24852"selectionType":"line",
24853"forceMultiline":true
24854}
24855]
24856},
24857{
24858"name":"Transformer en [lien hypertexte->http:\/\/...]",
24859"key":"L",
24860"className":"outil_link separateur separateur_apres sepLink",
24861"openWith":"[",
24862"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]",
24863"dropMenu":[
24864{
24865"id":"notes",
24866"name":"Transformer en [[Note de bas de page]]",
24867"className":"outil_notes",
24868"openWith":"[[",
24869"closeWith":"]]",
24870"display":true,
24871"selectionType":"word"
24872}
24873]
24874},
24875{
24876"name":"Ins\u00e9rer\/modifier (le s\u00e9lectionner avant) un tableau",
24877"className":"outil_barre_tableau separateur_avant",
24878"replaceWith":function(markitup){zone_selection=markitup.textarea;jQuery.modalboxload('https://apmep.fr/spip.php?page=typoenluminee_tableau_edit&modalbox=oui',{minWidth:'90%',minHeight:'90%',iframe:true,type:'iframe'});},
24879"selectionType":"line"
24880},
24881{
24882"name":"<quote>Citer un message<\/quote>",
24883"key":"Q",
24884"className":"outil_quote separateur separateur_apres sepGuillemets",
24885"openWith":"<quote>",
24886"closeWith":"<\/quote>",
24887"selectionType":"word",
24888"dropMenu":[
24889{
24890"id":"barre_poesie",
24891"name":"Mettre en forme comme une <poesie>po\u00e9sie<\/poesie>",
24892"className":"outil_barre_poesie",
24893"openWith":"\n<poesie>\n",
24894"closeWith":"\n<\/poesie>\n",
24895"display":true,
24896"selectionType":"word"
24897}
24898]
24899},
24900{
24901"name":"Choisir un bloc",
24902"className":"outil_bloc",
24903"beforeInsert":function(h){return jQuery.modalboxload('https://apmep.fr/ecrire/?exec=cibloc_popin2-choisir_bloc&var_zajax=contenu',{trapFocus:false});}
24904},
24905{
24906"name":"Choisir une ic\u00f4ne",
24907"className":"outil_icone",
24908"beforeInsert":function(h){return jQuery.modalboxload('https://apmep.fr/ecrire/?exec=cibloc_popin2-choisir_icone&var_zajax=contenu',{trapFocus:false});}
24909},
24910{
24911"name":"Ins\u00e9rer un bouton",
24912"className":"outil_bouton",
24913"beforeInsert":function(h){return jQuery.modalboxload('https://apmep.fr/ecrire/?exec=cibloc_popin2-choisir_bouton&var_zajax=contenu',{trapFocus:false});}
24914},
24915{
24916"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
24917"className":"outil_guillemets",
24918"openWith":"«",
24919"closeWith":"»",
24920"lang":[
24921"fr",
24922"eo",
24923"cpf",
24924"ar",
24925"es"
24926],
24927"selectionType":"word",
24928"dropMenu":[
24929{
24930"id":"guillemets_simples",
24931"name":"Entourer de \u201cguillemets de second niveau\u201d",
24932"className":"outil_guillemets_simples",
24933"openWith":"“",
24934"closeWith":"”",
24935"display":true,
24936"lang":[
24937"fr",
24938"eo",
24939"cpf",
24940"ar",
24941"es"
24942],
24943"selectionType":"word"
24944}
24945]
24946},
24947{
24948"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
24949"className":"outil_guillemets_de",
24950"openWith":"„",
24951"closeWith":"“",
24952"lang":[
24953"bg",
24954"de",
24955"pl",
24956"hr",
24957"src"
24958],
24959"selectionType":"word",
24960"dropMenu":[
24961{
24962"id":"guillemets_de_simples",
24963"name":"Entourer de \u201cguillemets de second niveau\u201d",
24964"className":"outil_guillemets_de_simples",
24965"openWith":"&sbquo;",
24966"closeWith":"‘",
24967"display":true,
24968"lang":[
24969"bg",
24970"de",
24971"pl",
24972"hr",
24973"src"
24974],
24975"selectionType":"word"
24976}
24977]
24978},
24979{
24980"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
24981"className":"outil_guillemets_simples separateur_avant",
24982"openWith":"“",
24983"closeWith":"”",
24984"lang_not":[
24985"fr",
24986"eo",
24987"cpf",
24988"ar",
24989"es",
24990"bg",
24991"de",
24992"pl",
24993"hr",
24994"src"
24995],
24996"selectionType":"word",
24997"dropMenu":[
24998{
24999"id":"guillemets_autres_simples",
25000"name":"Entourer de \u201cguillemets de second niveau\u201d",
25001"className":"outil_guillemets_uniques",
25002"openWith":"‘",
25003"closeWith":"’",
25004"display":true,
25005"lang_not":[
25006"fr",
25007"eo",
25008"cpf",
25009"ar",
25010"es",
25011"bg",
25012"de",
25013"pl",
25014"hr",
25015"src"
25016],
25017"selectionType":"word"
25018}
25019]
25020},
25021{
25022"name":"Ins\u00e9rer des caract\u00e8res sp\u00e9cifiques",
25023"className":"outil_caracteres separateur separateur_apres sepCaracteres",
25024"dropMenu":[
25025{
25026"id":"A_grave",
25027"name":"Ins\u00e9rer un \u00c0",
25028"className":"outil_a_maj_grave",
25029"replaceWith":"À",
25030"display":true,
25031"lang":[
25032"fr",
25033"eo",
25034"cpf"
25035]
25036},
25037{
25038"id":"E_aigu",
25039"name":"Ins\u00e9rer un \u00c9",
25040"className":"outil_e_maj_aigu",
25041"replaceWith":"É",
25042"display":true,
25043"lang":[
25044"fr",
25045"eo",
25046"cpf"
25047]
25048},
25049{
25050"id":"E_grave",
25051"name":"Ins\u00e9rer un \u00c8",
25052"className":"outil_e_maj_grave",
25053"replaceWith":"È",
25054"display":true,
25055"lang":[
25056"fr",
25057"eo",
25058"cpf"
25059]
25060},
25061{
25062"id":"aelig",
25063"name":"Ins\u00e9rer un \u00e6",
25064"className":"outil_aelig",
25065"replaceWith":"æ",
25066"display":true,
25067"lang":[
25068"fr",
25069"eo",
25070"cpf"
25071]
25072},
25073{
25074"id":"AElig",
25075"name":"Ins\u00e9rer un \u00c6",
25076"className":"outil_aelig_maj",
25077"replaceWith":"Æ",
25078"display":true,
25079"lang":[
25080"fr",
25081"eo",
25082"cpf"
25083]
25084},
25085{
25086"id":"oe",
25087"name":"Ins\u00e9rer un \u0153",
25088"className":"outil_oe",
25089"replaceWith":"œ",
25090"display":true,
25091"lang":[
25092"fr"
25093]
25094},
25095{
25096"id":"OE",
25097"name":"Ins\u00e9rer un \u0152",
25098"className":"outil_oe_maj",
25099"replaceWith":"Œ",
25100"display":true,
25101"lang":[
25102"fr"
25103]
25104},
25105{
25106"id":"Ccedil",
25107"name":"Ins\u00e9rer un \u00c7",
25108"className":"outil_ccedil_maj",
25109"replaceWith":"Ç",
25110"display":true,
25111"lang":[
25112"fr",
25113"eo",
25114"cpf"
25115]
25116},
25117{
25118"id":"uppercase",
25119"name":"Passer en majuscules",
25120"className":"outil_uppercase",
25121"replaceWith":function(markitup){return markitup.selection.toUpperCase()},
25122"display":true,
25123"lang":[
25124"fr",
25125"en"
25126]
25127},
25128{
25129"id":"lowercase",
25130"name":"Passer en minuscules",
25131"className":"outil_lowercase",
25132"replaceWith":function(markitup){return markitup.selection.toLowerCase()},
25133"display":true,
25134"lang":[
25135"fr",
25136"en"
25137]
25138}
25139]
25140}
25141]
25142}
25143function outil_liste(h,c){
25144if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){
25145r[1]=r[1].replace(/[#*]/g,c);
25146s='-'+r[1]+' '+r[2];
25147}else{
25148s='-'+c+' '+s;
25149}
25150return s;
25151}
25152function outil_indenter(h){
25153if(s=h.selection){
25154if(s.substr(0,2)=='-*'){
25155s='-**'+s.substr(2);
25156}else if(s.substr(0,2)=='-#'){
25157s='-##'+s.substr(2);
25158}else{
25159s='-* '+s;
25160}
25161}
25162return s;
25163}
25164function outil_desindenter(h){
25165if(s=h.selection){
25166if(s.substr(0,3)=='-**'){
25167s='-*'+s.substr(3);
25168}else if(s.substr(0,3)=='-* '){
25169s=s.substr(3);
25170}else if(s.substr(0,3)=='-##'){
25171s='-#'+s.substr(3);
25172}else if(s.substr(0,3)=='-# '){
25173s=s.substr(3);
25174}
25175}
25176return s;
25177}
25178function espace_si_accolade(h,openWith,closeWith){
25179if(s=h.selection){
25180if(s.charAt(0)=='{'){
25181return openWith+' '+s+' '+closeWith;
25182}
25183else if(c=h.textarea.selectionStart){
25184if(h.textarea.value.charAt(c-1)=='{'){
25185return' '+openWith+s+closeWith+' ';
25186}
25187}
25188}
25189return openWith+s+closeWith;
25190}
25191barre_outils_forum={
25192"nameSpace":"forum",
25193"previewAutoRefresh":false,
25194"onEnter":{
25195"keepDefault":false,
25196"selectionType":"return",
25197"replaceWith":"\n"
25198},
25199"onShiftEnter":{
25200"keepDefault":false,
25201"replaceWith":"\n_ "
25202},
25203"onCtrlEnter":{
25204"keepDefault":false,
25205"replaceWith":"\n\n"
25206},
25207"markupSet":[
25208{
25209"name":"Mettre en {{gras}}",
25210"key":"B",
25211"className":"outil_bold",
25212"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');},
25213"selectionType":"word"
25214},
25215{
25216"name":"Mettre en {italique}",
25217"key":"I",
25218"className":"outil_italic separateur_avant",
25219"replaceWith":function(h){return espace_si_accolade(h,'{','}');},
25220"selectionType":"word"
25221},
25222{
25223"name":"Transformer en [lien hypertexte->http:\/\/...]",
25224"key":"L",
25225"className":"outil_link separateur separateur_apres sepLink separateur_avant",
25226"openWith":"[",
25227"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]"
25228},
25229{
25230"name":"<quote>Citer un message<\/quote>",
25231"key":"Q",
25232"className":"outil_quote separateur separateur_apres sepGuillemets",
25233"openWith":"\n<quote>",
25234"closeWith":"<\/quote>\n",
25235"selectionType":"word"
25236},
25237{
25238"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
25239"className":"outil_guillemets",
25240"openWith":"«",
25241"closeWith":"»",
25242"lang":[
25243"fr",
25244"eo",
25245"cpf",
25246"ar",
25247"es"
25248],
25249"selectionType":"word",
25250"dropMenu":[
25251{
25252"id":"guillemets_simples",
25253"name":"Entourer de \u201cguillemets de second niveau\u201d",
25254"className":"outil_guillemets_simples",
25255"openWith":"“",
25256"closeWith":"”",
25257"display":true,
25258"lang":[
25259"fr",
25260"eo",
25261"cpf",
25262"ar",
25263"es"
25264],
25265"selectionType":"word"
25266}
25267]
25268},
25269{
25270"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
25271"className":"outil_guillemets_de",
25272"openWith":"„",
25273"closeWith":"“",
25274"lang":[
25275"bg",
25276"de",
25277"pl",
25278"hr",
25279"src"
25280],
25281"selectionType":"word",
25282"dropMenu":[
25283{
25284"id":"guillemets_de_simples",
25285"name":"Entourer de \u201cguillemets de second niveau\u201d",
25286"className":"outil_guillemets_de_simples",
25287"openWith":"&sbquo;",
25288"closeWith":"‘",
25289"display":true,
25290"lang":[
25291"bg",
25292"de",
25293"pl",
25294"hr",
25295"src"
25296],
25297"selectionType":"word"
25298}
25299]
25300},
25301{
25302"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
25303"className":"outil_guillemets_simples separateur_avant",
25304"openWith":"“",
25305"closeWith":"”",
25306"lang_not":[
25307"fr",
25308"eo",
25309"cpf",
25310"ar",
25311"es",
25312"bg",
25313"de",
25314"pl",
25315"hr",
25316"src"
25317],
25318"selectionType":"word",
25319"dropMenu":[
25320{
25321"id":"guillemets_autres_simples",
25322"name":"Entourer de \u201cguillemets de second niveau\u201d",
25323"className":"outil_guillemets_uniques",
25324"openWith":"‘",
25325"closeWith":"’",
25326"display":true,
25327"lang_not":[
25328"fr",
25329"eo",
25330"cpf",
25331"ar",
25332"es",
25333"bg",
25334"de",
25335"pl",
25336"hr",
25337"src"
25338],
25339"selectionType":"word"
25340}
25341]
25342}
25343]
25344}
25345function outil_liste(h,c){
25346if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){
25347r[1]=r[1].replace(/[#*]/g,c);
25348s='-'+r[1]+' '+r[2];
25349}else{
25350s='-'+c+' '+s;
25351}
25352return s;
25353}
25354function outil_indenter(h){
25355if(s=h.selection){
25356if(s.substr(0,2)=='-*'){
25357s='-**'+s.substr(2);
25358}else if(s.substr(0,2)=='-#'){
25359s='-##'+s.substr(2);
25360}else{
25361s='-* '+s;
25362}
25363}
25364return s;
25365}
25366function outil_desindenter(h){
25367if(s=h.selection){
25368if(s.substr(0,3)=='-**'){
25369s='-*'+s.substr(3);
25370}else if(s.substr(0,3)=='-* '){
25371s=s.substr(3);
25372}else if(s.substr(0,3)=='-##'){
25373s='-#'+s.substr(3);
25374}else if(s.substr(0,3)=='-# '){
25375s=s.substr(3);
25376}
25377}
25378return s;
25379}
25380function espace_si_accolade(h,openWith,closeWith){
25381if(s=h.selection){
25382if(s.charAt(0)=='{'){
25383return openWith+' '+s+' '+closeWith;
25384}
25385else if(c=h.textarea.selectionStart){
25386if(h.textarea.value.charAt(c-1)=='{'){
25387return' '+openWith+s+closeWith+' ';
25388}
25389}
25390}
25391return openWith+s+closeWith;
25392}
25393barre_outils_vide={
25394"nameSpace":"vide",
25395"previewAutoRefresh":false,
25396"markupSet":[]
25397}
25398;(function($){
25399$.fn.barre_outils=function(nom,settings){
25400options={
25401lang:'fr'
25402};
25403$.extend(options,settings);
25404return $(this)
25405.not('.markItUpEditor, .no_barre')
25406.markItUp(eval('barre_outils_'+nom),{lang:options.lang})
25407.trigger('markItUpEditor.loaded')
25408.parent().find('.markItUpButton a').attr('tabindex',-1)
25409.end();
25410};
25411$.fn.barre_previsualisation=function(settings){
25412options={
25413previewParserPath:"index.php?action=porte_plume_previsu",
25414textEditer:"Modifier",
25415textVoir:"Voir"
25416};
25417$.extend(options,settings);
25418return $(this)
25419.not('.pp_previsualisation, .no_previsualisation')
25420.previsu_spip(options)
25421.trigger('markItUpPreview.loaded')
25422.parent().find('.markItUpTabs a').attr('tabindex',-1)
25423.end();
25424};
25425$(window).on('load',function(){
25426function barrebouilles(){
25427$('.formulaire_spip textarea.inserer_barre_forum').barre_outils('forum');
25428$('.formulaire_spip textarea.inserer_barre_edition').barre_outils('edition');
25429$('.formulaire_spip textarea.inserer_previsualisation').barre_previsualisation();
25430$('textarea.textarea_forum').barre_outils('forum');
25431$('.formulaire_forum textarea[name=texte]').barre_outils('forum');
25432$('.formulaire_spip textarea[name=texte]')
25433.barre_outils('edition').end()
25434.barre_previsualisation();
25435}
25436barrebouilles();
25437onAjaxLoad(barrebouilles);
25438});
25439})(jQuery);
25440
25441
25442/* prive/javascript/js.cookie.js?1790084230 */
25443
25444;
25445(function(global,factory){
25446typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():
25447typeof define==='function'&&define.amd?define(factory):
25448(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){
25449var current=global.Cookies;
25450var exports=global.Cookies=factory();
25451exports.noConflict=function(){global.Cookies=current;return exports;};
25452})());
25453})(this,(function(){'use strict';
25454function assign(target){
25455for(var i=1;i<arguments.length;i++){
25456var source=arguments[i];
25457for(var key in source){
25458target[key]=source[key];
25459}
25460}
25461return target
25462}
25463var defaultConverter={
25464read:function(value){
25465if(value[0]==='"'){
25466value=value.slice(1,-1);
25467}
25468return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)
25469},
25470write:function(value){
25471return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
25472decodeURIComponent
25473)
25474}
25475};
25476function init(converter,defaultAttributes){
25477function set(name,value,attributes){
25478if(typeof document==='undefined'){
25479return
25480}
25481attributes=assign({},defaultAttributes,attributes);
25482if(typeof attributes.expires==='number'){
25483attributes.expires=new Date(Date.now()+attributes.expires*864e5);
25484}
25485if(attributes.expires){
25486attributes.expires=attributes.expires.toUTCString();
25487}
25488name=encodeURIComponent(name)
25489.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent)
25490.replace(/[()]/g,escape);
25491var stringifiedAttributes='';
25492for(var attributeName in attributes){
25493if(!attributes[attributeName]){
25494continue
25495}
25496stringifiedAttributes+='; '+attributeName;
25497if(attributes[attributeName]===true){
25498continue
25499}
25500stringifiedAttributes+='='+attributes[attributeName].split(';')[0];
25501}
25502return(document.cookie=
25503name+'='+converter.write(value,name)+stringifiedAttributes)
25504}
25505function get(name){
25506if(typeof document==='undefined'||(arguments.length&&!name)){
25507return
25508}
25509var cookies=document.cookie?document.cookie.split('; '):[];
25510var jar={};
25511for(var i=0;i<cookies.length;i++){
25512var parts=cookies[i].split('=');
25513var value=parts.slice(1).join('=');
25514try{
25515var found=decodeURIComponent(parts[0]);
25516jar[found]=converter.read(value,found);
25517if(name===found){
25518break
25519}
25520}catch(e){}
25521}
25522return name?jar[name]:jar
25523}
25524return Object.create(
25525{
25526set,
25527get,
25528remove:function(name,attributes){
25529set(
25530name,
25531'',
25532assign({},attributes,{
25533expires:-1
25534})
25535);
25536},
25537withAttributes:function(attributes){
25538return init(this.converter,assign({},this.attributes,attributes))
25539},
25540withConverter:function(converter){
25541return init(assign({},this.converter,converter),this.attributes)
25542}
25543},
25544{
25545attributes:{value:Object.freeze(defaultAttributes)},
25546converter:{value:Object.freeze(converter)}
25547}
25548)
25549}
25550var api=init(defaultConverter,{path:'/'});
25551return api;
25552}));
25553
25554
25555/* local/cache-js/jsdyn-socialtags_js-623152f1.js?1790190082 */
25556
25557;var socialtags_addfavorite=function(u,t){
25558if(document.all)window.external.AddFavorite(u,t);
25559};
25560(function($){
25561var socialtags_init=function(){
25562var selector=$('.postmeta');
25563if(!selector.length)return;
25564var socialtags=[
25565{a:'mail',n:'Partage par email (mailto)',i:'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0cHgiIGhlaWdodD0iNjRweCI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO2ZpbGw6dXJsKCNTVkdJRF8xXyk7fQo8L3N0eWxlPgo8bGluZWFyR3JhZGllbnQgaWQ9IlNWR0lEXzFfIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjEzLjE0NzQiIHkxPSI0NS41NDQ5IiB4Mj0iNDMuNTU4OSIgeTI9IjIzLjYxNDciPgoJPHN0b3AgIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6IzMyNDY2NiIvPgoJPHN0b3AgIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6IzFDMkQ0NyIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTYuNiwyMi4xYzAtMi4yLTAuOS00LjMtMi40LTUuOGMtMS41LTEuNS0zLjYtMi40LTUuOC0yLjRjLTguNywwLTI0LjEsMC0zMi44LDBjLTIuMiwwLTQuMywwLjktNS44LDIuNAoJcy0yLjQsMy42LTIuNCw1LjhjMCw1LjcsMCwxNCwwLDE5LjdjMCwyLjIsMC45LDQuMywyLjQsNS44czMuNiwyLjQsNS44LDIuNGM4LjcsMCwyNC4xLDAsMzIuOCwwYzIuMiwwLDQuMy0wLjksNS44LTIuNAoJYzEuNS0xLjUsMi40LTMuNiwyLjQtNS44QzU2LjYsMzYuMSw1Ni42LDI3LjksNTYuNiwyMi4xeiBNMTMsMjEuOGMwLDAsOC40LDYuOSwxMy44LDExLjNjMywyLjUsNy40LDIuNSwxMC40LDAKCUM0Mi41LDI4LjgsNTEsMjEuNyw1MSwyMS43YzAuNy0wLjYsMC44LTEuNiwwLjItMi4zYy0wLjYtMC43LTEuNi0wLjgtMi4zLTAuMmMwLDAtOC40LDctMTMuOCwxMS40Yy0xLjgsMS41LTQuNSwxLjUtNi4zLDAKCUwxNS4xLDE5LjNjLTAuNy0wLjYtMS43LTAuNS0yLjMsMC4yQzEyLjMsMjAuMiwxMi4zLDIxLjIsMTMsMjEuOEwxMywyMS44eiIvPgo8ZyBpZD0iSWNvbiI+CjwvZz4KPC9zdmc+Cg==',w:64,h:64,u:'mailto:?subject=%t&body=%u',u_site:'https://www.apmep.fr'},
25566{a:'facebook',n:'Facebook',i:'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQgNjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY0IDY0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cgkuc3Qxe2ZpbGw6IzNBNTU5Rjt9Cjwvc3R5bGU+CjxnPgoJPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMzIiIGN5PSIzMiIgcj0iMjQuMSIvPgoJPGc+CgkJPHJlY3QgeT0iMCIgY2xhc3M9InN0MSIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzkuOSwzMy4xaC01LjJjMCw4LjQsMCwxOC42LDAsMTguNmgtNy42YzAsMCwwLTEwLjIsMC0xOC42aC0zLjZ2LTYuNmgzLjZ2LTQuM2MwLTMsMS4yLTcuNiw3LjYtNy42aDUuOHY2LjQKCQkJYzAsMC0zLjQsMC00LjEsMGMtMC42LDAtMS41LDAuMi0xLjUsMnYzLjhoNS41TDM5LjksMzMuMXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K',w:0,h:0,u:'https://www.facebook.com/sharer/sharer.php?u=%u&t=%t',u_site:'https://www.apmep.fr'},
25567{a:'linkedin',n:'LinkedIn',i:'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNj
25567QgNjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY0IDY0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6IzExN0JCODt9Cgkuc3Qxe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+CjxnIGlkPSJYTUxJRF8xNDMzXyI+Cgk8cmVjdCBpZD0iWE1MSURfMTQzOV8iIHk9IjAiIGNsYXNzPSJzdDAiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIvPgoJPGcgaWQ9IlhNTElEXzE0MzRfIj4KCQk8ZyBpZD0iWE1MSURfMTQzNl8iPgoJCQk8cmVjdCBpZD0iWE1MSURfMTQzOF8iIHg9IjE3LjUiIHk9IjI0LjciIGNsYXNzPSJzdDEiIHdpZHRoPSI2LjciIGhlaWdodD0iMjEuNCIvPgoJCQk8ZWxsaXBzZSBpZD0iWE1MSURfMTQzN18iIGNsYXNzPSJzdDEiIGN4PSIyMC45IiBjeT0iMTguMiIgcng9IjMuOCIgcnk9IjMuOCIvPgoJCTwvZz4KCQk8cGF0aCBpZD0iWE1MSURfMTQzNV8iIGNsYXNzPSJzdDEiIGQ9Ik0zNC44LDM0LjljMC0yLjksMS4zLTQuNyw0LjEtNC43YzIuNiwwLDMuNiwxLjksMy42LDQuN3MwLDExLjEsMCwxMS4xaDYuNwoJCQljMCwwLDAtNy43LDAtMTMuN3MtMy4yLTguNi03LjctOC42cy02LjQsMy42LTYuNCwzLjZ2LTIuOWgtNi40djIxLjRoNi40QzM0LjgsNDYuMywzNC44LDM4LjQsMzQuOCwzNC45eiIvPgoJPC9nPgo8L2c+Cjwvc3ZnPgo=',w:0,h:0,u:'https://www.linkedin.com/shareArticle?mini=true&url=%u&title=%t&source=%u_site&summary=%d',u_site:'https://www.apmep.fr'},
25568{a:'printer',n:'Imprimer la page',i:'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQgNjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY0IDY0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6dXJsKCNTVkdJRF8xXyk7fQo8L3N0eWxlPgo8ZyBpZD0iU2hvcGljb24iPgoJPGc+CgkJCgkJCTxsaW5lYXJHcmFkaWVudCBpZD0iU1ZHSURfMV8iIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iNyIgeTE9Ijc0IiB4Mj0iNTciIHkyPSI3NCIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIDAgLTQyKSI+CgkJCTxzdG9wICBvZmZzZXQ9IjAiIHN0eWxlPSJzdG9wLWNvbG9yOiMzMjQ2NjYiLz4KCQkJPHN0b3AgIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6IzFDMkQ0NyIvPgoJCTwvbGluZWFyR3JhZGllbnQ+CgkJPHBhdGggY2xhc3M9InN0MCIgZD0iTTUwLjIsMjJINDdWMTAuMkM0Nyw4LjQsNDUuNiw3LDQzLjgsN0gyMC4yQzE4LjQsNywxNyw4LjQsMTcsMTAuMlYyMmgtMy4yQzEwLDIyLDcsMjUuMSw3LDI4Ljh2MTUuNQoJCQlDNyw0NS44LDguMiw0Nyw5LjcsNDdIMTd2N2MwLDEuNywxLjMsMywzLDNoMjRjMS43LDAsMy0xLjMsMy0zdi03aDcuM2MxLjUsMCwyLjctMS4yLDIuNy0yLjdWMjguOEM1NywyNS4xLDUzLjksMjIsNTAuMiwyMnoKCQkJIE0yMiw1MlYzN2gyMHYxNUgyMnogTTUyLjIsMjkuMWMwLjEsMS41LTEuMiwyLjgtMi43LDIuN2MtMS4yLTAuMS0yLjMtMS4xLTIuMy0yLjNjLTAuMS0xLjUsMS4yLTIuOCwyLjctMi43CgkJCUM1MS4xLDI2LjksNTIuMSwyNy45LDUyLjIsMjkuMXogTTIyLDEyaDIwdjEwSDIyVjEyeiIvPgoJPC9nPgo8L2c+Cjwvc3ZnPgo=',w:0,h:0,u:'javascript:window.print()',u_site:'https://www.apmep.fr'},
25569{a:'twitter',n:'X',i:'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQgNjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY0IDY0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6IzBFMEYwRDt9Cgkuc3Qxe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+CjxnIGlkPSJYIj4KCTxyZWN0IHg9IjAiIHk9IjAiIGNsYXNzPSJzdDAiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIvPgoJPGcgaWQ9ImxheWVyMSI+CgkJPHBhdGggaWQ9InBhdGgxMDA5IiBjbGFzcz0ic3QxIiBkPSJNMTEuMywxMi41bDE2LDIxLjRsLTE2LDE3LjVoMy42bDE0LjEtMTUuMWwxMS4zLDE1LjFoMTIuNEwzNS44LDI4LjhsMTUtMTYuM2gtMy42TDM0LjIsMjYuNgoJCQlMMjMuNywxMi41SDExLjN6IE0xNi42LDE1LjRoNS44bDI1LDMzLjZoLTUuNUwxNi42LDE1LjR6Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+Cg==',w:0,h:0,u:'https://twitter.com/intent/tweet?text=%t&url=%u',u_site:'https://www.apmep.fr'}
25570];
25571var title=$('head > title').text()||'';
25572var description=($('meta[name=description]').attr('content')||'').substr(0,250);
25573var cano=$('link[rel=canonical]')[0];
25574var url=cano?cano.href:document.location.href.split("%23")[0].split("#")[0];
25575var ul=$('<ul><\/ul>');
25576var esc=function(x){return encodeURIComponent(x).replace(/\s/g,' ');};
25577var ref=document.referrer.match(/^.*\/\/([^\/]+)\//);
25578if(ref&&ref[1].match(/\.facebook\./))
25579Cookies.set('social_facebook',1,{path:'/',expires:30});
25580$.each(socialtags,function(){if(this.u){
25581if(this.a=='bookmark'&&!document.all)return;
25582$('<a rel="nofollow"><img class="socialtags-hovers" src="'+this.i+'" width="'+this.w+'" height="'+this.h+'" alt="'+this.a+'"\/><\/a>')
25583.attr('href',
25584this.u
25585.replace(/%u/g,esc(url))
25586.replace(/%t/g,esc(title))
25587.replace(/%d/g,esc(description))
25588.replace(/%u_site/g,esc(this.u_site))
25589)
25590.attr('title',this.n).wrap('<li class="'+this.a+'"><\/li>')
25591.parent().appendTo(ul);
25592}});
25593selector.append(ul.wrap('<div class="socialtags"><\/div>').parent());
25594};
25595$(function(){
25596$(socialtags_init);
25597});
25598})(jQuery);
25599
25600
25601/* plugins/auto/image_cliquable/v3.2.0/images-rwd/image-map-rwd.js?1740554348 */
25602
25603function updateImageMap($img){
25604var map=$img.attr("usemap");
25605if(!map)return;
25606var $map=$(map);
25607if(!$img.data("original-size")){
25608$img.data("original-size",{
25609width:$img.get(0).naturalWidth,
25610height:$img.get(0).naturalHeight,
25611});
25612}
25613var originalSize=$img.data("original-size");
25614var currentSize={
25615width:$img.width(),
25616height:$img.height(),
25617};
25618var widthRatio=currentSize.width/originalSize.width;
25619var heightRatio=currentSize.height/originalSize.height;
25620$map.find("area").each(function(){
25621var $area=$(this);
25622if(!$area.data("original-coords")){
25623$area.data("original-coords",$area.attr("coords"));
25624}
25625var coords=$area.data("original-coords").split(",");
25626var newCoords=coords.map(function(coord,i){
25627return Math.round(coord*(i%2===0?widthRatio:heightRatio));
25628});
25629$area.attr("coords",newCoords.join(","));
25630});
25631if($img.hasClass("maphilighted")){
25632$img.maphilight();
25633}
25634}
25635$("img[usemap]").each(function(){
25636var $img=$(this);
25637$img.on("load",function(){
25638updateImageMap($img);
25639});
25640if(this.complete){
25641updateImageMap($img);
25642}
25643});
25644var resizeTimeout;
25645$(window).on("resize",function(){
25646clearTimeout(resizeTimeout);
25647resizeTimeout=setTimeout(function(){
25648$("img[usemap]").each(function(){
25649updateImageMap($(this));
25650});
25651},5);
25652});
25653
25654
25655/* plugins/auto/image_cliquable/v3.2.0/maphilight/jquery.maphilight.min.js?1740554348 */
25656
25657!function(t,i){"function"==typeof define&&define.amd?define(["jquery"],i):i(t.jQuery)}(this,function(d){var l,c,f,p,u,g,m,e,v,w,y;if(c=!!document.createElement("canvas").getContext,l=function(){var t=document.createElement("div");t.innerHTML='<v:shape id="vml_flag1" adj="1" />';var i=t.firstChild;return i.style.behavior="url(#default#VML)",!i||"object"==typeof i.adj}(),c||l){if(c){e=function(t){return Math.max(0,Math.min(parseInt(t,16),255))},v=function(t,i){return"rgba("+e(t.substr(0,2))+","+e(t.substr(2,2))+","+e(t.substr(4,2))+","+i+")"},f=function(t){var i=d('<canvas style="width:'+d(t).width()+"px;height:"+d(t).height()+'px;"></canvas>').get(0);return i.getContext("2d").clearRect(0,0,d(t).width(),d(t).height()),i};function b(t,e,a,o,r){if(o=o||0,r=r||0,t.beginPath(),"rect"==e)t.rect(a[0]+o,a[1]+r,a[2]-a[0],a[3]-a[1]);else if("poly"==e)for(t.moveTo(a[0]+o,a[1]+r),i=2;i<a.length;i+=2)t.lineTo(a[i]+o,a[i+1]+r);else"circ"==e&&t.arc(a[0]+o,a[1]+r,a[2],0,2*Math.PI,!1);t.closePath()}p=function(t,i,e,a,o){var r=t.getContext("2d");if(a.shadow){r.save(),"inside"==a.shadowPosition&&(b(r,i,e),r.clip());var s=100*t.width,n=100*t.height;b(r,i,e,s,n),r.shadowOffsetX=a.shadowX-s,r.shadowOffsetY=a.shadowY-n,r.shadowBlur=a.shadowRadius,r.shadowColor=v(a.shadowColor,a.shadowOpacity);var h=a.shadowFrom;h||(h="outside"==a.shadowPosition?"fill":"stroke"),"stroke"==h?(r.strokeStyle="rgba(0,0,0,1)",r.stroke()):"fill"==h&&(r.fillStyle="rgba(0,0,0,1)",r.fill()),r.restore(),"outside"==a.shadowPosition&&(r.save(),b(r,i,e),r.globalCompositeOperation="destination-out",r.fillStyle="rgba(0,0,0,1);",r.fill(),r.restore())}r.save(),b(r,i,e),a.fill&&(r.fillStyle=v(a.fillColor,a.fillOpacity),r.fill()),a.stroke&&(r.strokeStyle=v(a.strokeColor,a.strokeOpacity),r.lineWidth=a.strokeWidth,r.stroke()),r.restore(),a.fade&&d(t).css("opacity",0).animate({opacity:1},100)},u=function(t){t.getContext("2d").clearRect(0,0,t.width,t.height)}}else f=function(t){return d('<var style="zoom:1;overflow:hidden;display:block;width:'+t.width+"px;height:"+t.height+'px;"></var>').get(0)},p=function(t,i,e,a,o){var r,s,n,h;for(var l in e)e[l]=parseInt(e[l],10);r='<v:fill color="#'+a.fillColor+'" opacity="'+(a.fill?a.fillOpacity:0)+'" />',s=a.stroke?'strokeweight="'+a.strokeWidth+'" stroked="t" strokecolor="#'+a.strokeColor+'"':'stroked="f"',n='<v:stroke opacity="'+a.strokeOpacity+'"/>',"rect"==i?h=d('<v:rect name="'+o+'" filled="t" '+s+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+e[0]+"px;top:"+e[1]+"px;width:"+(e[2]-e[0])+"px;height:"+(e[3]-e[1])+'px;"></v:rect>'):"poly"==i?h=d('<v:shape name="'+o+'" filled="t" '+s+' coordorigin="0,0" coordsize="'+t.width+","+t.height+'" path="m '+e[0]+","+e[1]+" l "+e.join(",")+' x e" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:'+t.width+"px;height:"+t.height+'px;"></v:shape>'):"circ"==i&&(h=d('<v:oval name="'+o+'" filled="t" '+s+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;
25657left:'+(e[0]-e[2])+"px;top:"+(e[1]-e[2])+"px;width:"+2*e[2]+"px;height:"+2*e[2]+'px;"></v:oval>')),h.get(0).innerHTML=r+n,d(t).append(h)},u=function(t){var i=d("<div>"+t.innerHTML+"</div>");i.children("[name=highlighted]").remove(),d(t).html(i.html())};g=function(t){var i,e,a=(t.getAttribute("shape")||"rect").toLowerCase().substr(0,4);if("defa"!==a){for(e=(t.getAttribute("coords")||"").split(","),i=0;i<e.length;i++)e[i]=parseFloat(e[i]);return[a,e]}},y=function(t,i){var e=d(t);return d.extend({},i,!!d.metadata&&e.metadata(),e.data("maphilight"))},w=function(t){return!!t.complete&&(void 0===t.naturalWidth||0!==t.naturalWidth)};var t=!(m={position:"absolute",left:0,top:0,padding:0,border:0});d.fn.maphilight=function(h){return h=d.extend({},d.fn.maphilight.defaults,h),c||t||(d(window).ready(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var t=document.createStyleSheet();d.each(["shape","rect","oval","circ","fill","stroke","imagedata","group","textbox"],function(){t.addRule("v\\:"+this,"behavior: url(#default#VML); antialias:true")})}),t=!0),this.each(function(){var e,t,r,s,n,a,i;if(e=d(this),!w(this))return window.setTimeout(function(){e.maphilight(h)},200);if(r=d.extend({},h,!!d.metadata&&e.metadata(),e.data("maphilight")),(i=e.get(0).getAttribute("usemap"))&&(s=d('map[name="'+i.substr(1)+'"]'),e.is('img,input[type="image"]')&&i&&0<s.length)){if(e.hasClass("maphilighted")){var o=e.parent();e.insertBefore(o),o.remove(),d(s).unbind(".maphilight")}this.src.replace(/[\n\r]/g,""),t=d("<div></div>").css({display:"block",background:'url("'+this.src+'")',"background-size":"contain","background-repeat":"no-repeat",position:"relative",padding:0,width:this.width,height:this.height}),r.wrapClass&&(!0===r.wrapClass?t.addClass(d(this).attr("class")):t.addClass(r.wrapClass)),e.before(t).css("opacity",1e-10).css(m).remove(),l&&e.css("filter","Alpha(opacity=0)"),t.append(e),n=f(this),d(n).css(m),n.height=this.height,n.width=this.width,d(s).bind("alwaysOn.maphilight",function(){a&&u(a),c||d(n).empty(),d(s).find("area[coords]").each(function(){var t,i;if((i=y(this,r)).alwaysOn){if(!a&&c&&(a=f(e[0]),d(a).css(m),a.width=e[0].width,a.height=e[0].height,e.before(a)),i.fade=i.alwaysOnFade,!(t=g(this)))return;p(c?a:n,t[0],t[1],i,"")}})}).trigger("alwaysOn.maphilight").bind("mouseover.maphilight focusin.maphilight",function(t){var i,e,a=t.target;if(!(e=y(a,r)).neverOn&&!e.alwaysOn){if(!(i=g(a)))return;if(p(n,i[0],i[1],e,"highlighted"),e.groupBy){"string"==typeof e.groupBy&&(e.groupBy=[e.groupBy]);var o=d(this);d.each(e.groupBy,function(t,i){var e;e=/^[a-zA-Z][\-a-zA-Z]+$/.test(i)?s.find("area["+i+'="'+o.attr(i)+'"]'):s.find(i);var a=this;e.each(function(){if(this!=a){var t=y(this,r);if(!t.neverOn&&!t.alwaysOn){var i=g(this);p(n,i[0],i[1],t,"highlighted")}}})})}c||d(n).append("<v:rect></v:rect>")}}).bind("mouseout.maphilight focusout.maphilight",function(t){u(n)}),e.before(n),e.addClass("maphilighted")}})},d.fn.maphilight.defaults={fill:!0,fillColor:"000000",fillOpacity:.2,stroke:!0,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,fade:!0,alwaysOn:!1,neverOn:!1,groupBy:!1,wrapClass:!0,shadow:!1,shadowX:0,shadowY:0,shadowRadius:6,shadowColor:"000000",shadowOpacity:.8,shadowPosition:"outside",shadowFrom:!1}}else d.fn.maphilight=function(){return this}});
25658
25659
25660/* plugins/auto/blocsdepliables/v1.4.2/js/blocs.js?1750452818 */
25661
25662if(typeof(bloc_actif)=='undefined')var bloc_actif='';
25663if(typeof(bloc_actif_num)=='undefined')var bloc_actif_num='';
25664jQuery.fn.blocs_toggle_slide_dist=function(selector){
25665this.toggleClass('blocs_slide');
25666if(typeof jQuery.fn.blocs_toggle_slide=='function')
25667return this.blocs_toggle_slide();
25668return this.is(".blocs_slide")?this.slideUp(blocs_slide):this.slideDown(blocs_slide);
25669};
25670jQuery.fn.blocs_set_title=function(selector){
25671var title=this.parent().find('.blocs_title:last').text();
25672if(!title)title=blocs_title_def;
25673title=title.split(blocs_title_sep);
25674this.children('a').attr('title',title[jQuery(this).is('.blocs_replie')?0:1]);
25675return this;
25676};
25677jQuery.fn.blocs_toggle=function(){
25678if(!this.length)return this;
25679var cible=this.is('.cs_blocs')?this.children('.blocs_titre').eq(0):this;
25680cible.toggleClass('blocs_replie').blocs_set_title();
25681var dest=this[0].id.match('^cs_bloc_id_')?jQuery('div.'+this[0].id):cible.next();
25682if(blocs_slide==='aucun'){
25683dest.toggleClass('blocs_invisible');
25684if(dest.is('div.blocs_resume'))dest.next().toggleClass('blocs_invisible');
25685}else{
25686dest.blocs_toggle_slide_dist();
25687if(dest.is('div.blocs_resume'))dest.next().blocs_toggle_slide_dist();
25688}
25689var lien=cible.children();
25690var url=lien.attr("href");
25691if(!url.includes('#_bloc_non_ajax')){
25692lien.attr("href",'javascript:;').addClass('ouvrir_fermer');
25693cible.parent().children(".blocs_destination")
25694.load(url);
25695}
25696return this;
25697};
25698jQuery.fn.blocs_replie_tout=function(){
25699if(blocs_replier_tout){
25700var cible=this.is('.cs_blocs')?this:this.parents('div.cs_blocs');
25701var lignee=cible.children('.blocs_titre');
25702jQuery('.blocs_titre').not('.blocs_replie').not(lignee).blocs_toggle(
25702);
25703}
25704return this;
25705}
25706var blocs_clic_ajax=null;
25707function blocs_init(){
25708jQuery('.blocs_titre',this).cs_todo()
25709.each(function(){
25710jQuery(this).blocs_set_title()
25711.find('a.ouvrir_fermer')
25712.on('click',function(){
25713jQuery(this).parent().blocs_replie_tout().blocs_toggle();
25714return false;
25715});
25716});
25717jQuery('.blocs_destination a.replier_bloc',this).cs_todo()
25718.click(function(){
25719s=jQuery(this).parents('.cs_blocs:first');
25720if(typeof jQuery.fn.scrollTo=="function")jQuery('body').scrollTo(s,500,
25721{margin:true,onAfter:function(){s.blocs_replie_tout().blocs_toggle();}});
25722else s.blocs_replie_tout().blocs_toggle();
25723return false;
25724});
25725var blocs=blocs_get_blocs(window.location,true);
25726if(blocs&&(this==document))blocs_clic_blocs(blocs,true);
25727blocs=blocs_get_blocs(window.location);
25728if(blocs&&(this==document))blocs_clic_blocs(blocs);
25729jQuery('.spip_note['+cs_sel_jQuery+'name^=nb], .spip_note['+cs_sel_jQuery+'id^=nb]').each(function(i){
25730jQuery(this).click(function(e){
25731var href=this.href.substring(this.href.lastIndexOf("#"));
25732href=jQuery(href).parents('.cs_blocs').eq(0).children('.blocs_titre').eq(0);
25733old_blocs_slide=blocs_slide;
25734if(blocs_slide!='aucun')blocs_slide=-1;
25735if(href.is('.blocs_replie'))href.click();
25736blocs_slide=old_blocs_slide;
25737return true;
25738});
25739});
25740}
25741var valStyle=document.createElement('style');
25742var valCss='div.blocs_invisible { display:none; }';
25743var valHead=document.head||document.getElementsByTagName('head')[0];
25744valHead.appendChild(valStyle);
25745valStyle.type='text/css';
25746valStyle.appendChild(document.createTextNode(valCss));
25747function cs_blocs_cookie(){
25748if(typeof jQuery.cookie!='function')return;
25749var blocs_cookie_name='blocs'+window.location.pathname+window.location.search
25750blocs_cookie_name=blocs_cookie_name.replace(/[ ;,=]/,'_');
25751var deplies=jQuery.cookie(blocs_cookie_name);
25752jQuery.cookie(blocs_cookie_name,null);
25753if(deplies)
25754jQuery(deplies).blocs_replie_tout().blocs_toggle();
25755jQuery(window).on('unload',function(){
25756jQuery.cookie(blocs_cookie_name,blocs_deplies());
25757});
25758}
25759function blocs_deplies(){
25760var deplies='';
25761jQuery('.cs_blocs').each(function(){
25762var numero=/cs_bloc\d+/.exec(this.className);
25763if(numero==null)return;
25764replie=jQuery(this).children('.blocs_titre').eq(0).is('.blocs_replie');
25765if(!replie)deplies+=(deplies.length?', ':'')+'div.'+numero[0];
25766});
25767return deplies.length?deplies:null;
25768}
25769function blocs_clic_blocs(liste,numerote){
25770var blocs=liste.split(',');
25771for(var i=0;i<blocs.length;i++)
25772(numerote)
25773?jQuery('div.cs_bloc'+blocs[i]+' .blocs_titre').eq(0).click()
25774:jQuery('div.cs_blocs .blocs_titre').eq(blocs[i]).click();
25775}
25776function blocs_get_blocs(url,numerote){
25777tab=numerote
25778?url.search.match(/[?&]deplier_num=([0-9,]*)/)||url.hash.match(/#deplier_num([0-9,]*)/)
25779:url.search.match(/[?&]deplier=([0-9,]*)/)||url.hash.match(/#deplier([0-9,]*)/);
25780return tab==null?(numerote?bloc_actif_num:bloc_actif):tab[1];
25781}
25782function blocs_get_pagination(url){
25783tab=url.match(/#pagination([0-9]+)/);
25784return tab==null?bloc_actif:tab[1];
25785}
25786var blocs_pagination=blocs_get_pagination(window.location.hash);
25787jQuery.fn.cs_todo=function(){
25788return this.not('.cs_done').addClass('cs_done');
25789};
25790var cs_sel_jQuery='';
25791jQuery(function($){
25792blocs_init.apply(document);
25793if(typeof onAjaxLoad=='function')onAjaxLoad(blocs_init);
25794if(blocs_js_cookie&&$('div.cs_blocs').length)$.getScript(blocs_js_cookie,cs_blocs_cookie);
25795var ancre=location.hash.substring(1);
25796if(ancre){
25797$('.cs_blocs').has('[name="'+ancre+'"]')
25798.find('.blocs_titre.blocs_replie').blocs_toggle();
25799$('.cs_blocs').has('#'+ancre)
25800.find('.blocs_titre.blocs_replie').blocs_toggle();
25801location=location;
25802}
25803});
25804
25805
25806/* plugins/auto/mathjax/v2.2.0/js/mathjax-start.js?1727708170 */
25807function mathjaxStart(){
25808if(typeof window.MathJaxLib!=="undefined"){
25809if(document.querySelector('.spip-math')){
25810var script=document.createElement('script');
25811script.src=window.MathJaxLib;
25812script.async=true;
25813document.head.appendChild(script);
25814delete window.MathJaxLib;
25815}
25816}
25817}
25818function mathjaxOnLoad(){
25819var node=((typeof jQuery!=="undefined"&&this instanceof jQuery)?this.get(0):this);
25820if(node.querySelector('.spip-math')){
25821if(typeof window.MathJaxLib!=="undefined"){
25822mathjaxStart();
25823}else{
25824MathJax.typeset(node.querySelectorAll('.spip-math'));
25825}
25826}
25827}
25828if(typeof jQuery!=="undefined"){
25829jQuery(mathjaxStart);
25830onAjaxLoad(mathjaxOnLoad);
25831}else{
25832document.addEventListener('DOMContentLoaded',mathjaxStart,false);
25833window.addEventListener("load",mathjaxStart,false);
25834}
25835
25836
25837/* local/cache-js/jsdyn-_js_cibloc_js-16ddeed9.js?1790237502 */
25838
25839var cibloc_accordeon_id=0;
25840var cibloc_question_id=0;
25841var cibloc_ancre=window.location.hash;
25842var cibloc_ancre_existe=false;
25843function cibloc_accordeon_replier_tout(id_question_click){
25844var bloc_id='';
25845var tableau='';
25846var tableau_click=id_question_click.split('-');
25847var id_bloc_click='';
25848if(typeof tableau_click[0]!=='undefined'&&typeof tableau_click[1]!=='undefined'){
25849id_bloc_click=tableau_click[0]+'-'+tableau_click[1];
25850}
25851var lesLiens=$('.cibloc_accordeon a.accordeon_lien');
25852for(var i=0;i<lesLiens.length;i++){
25853bloc_id='';
25854question_id=$(lesLiens[i]).attr('aria-controls');
25855tableau=question_id.split('-');
25856if(typeof tableau[0]!=='undefined'&&typeof tableau[1]!=='undefined'){
25857bloc_id=tableau[0]+'-'+tableau[1];
25858}
25859if(bloc_id==id_bloc_click){
25860$(lesLiens[i]).attr('aria-expanded','false');
25861$(lesLiens[i]).removeClass('expanded');
25862$('#'+question_id).attr('aria-hidden','true');
25863$('#'+question_id).css('display','none');
25864}
25865}
25866};
25867function cibloc_init_js(){
25868var intertitre="h2";
25869$('.cibloc_accordeon').each(function(){
25870cibloc_accordeon_id++;
25871cibloc_question_id=0;
25872$(this).find(intertitre).each(function(){
25873var $this=$(this);
25874cibloc_question_id++;
25875var prefixe='accordeon-'+cibloc_accordeon_id+'-';
25876var id=prefixe+cibloc_question_id;
25877var style=' style="display:none;"';
25878var ariahidden=' aria-hidden="true"';
25879var ariaexpanded=' aria-expanded="false"';
25880var lienclass=' class="accordeon_lien"';
25881if(cibloc_ancre){
25882if(cibloc_ancre=='#'+id){
25883style='';
25884ariahidden=' aria-hidden="false"';
25885ariaexpanded=' aria-expanded="true"';
25886lienclass=' class="accordeon_lien expanded"';
25887cibloc_ancre_existe=true;
25888}else if(cibloc_ancre.substring(1,prefixe.length+1)==prefixe){
25889cibloc_ancre_existe=true;
25890}
25891}
25892if(!cibloc_ancre_existe&&cibloc_question_id==1){
25893style='';
25894ariahidden=' aria-hidden="false"';
25895ariaexpanded=' aria-expanded="true"'
25896lienclass=' class="accordeon_lien expanded"';
25897}
25898$this.children("a.sommaire-back").css("display","none");
25899$this.nextUntil(intertitre).wrapAll('<div id="'+id+'"'+ariahidden+style+' class="cibloc_reponse">');
25900var reponse=$this.next();
25901if($this.parents().hasClass("cibloc_sans_vignette")){
25902$this.wrapInner('<span>');
25903$this.wrapInner('<span role="button" '+lienclass+ariaexpanded+' aria-controls="'+id+'">');
25904}else{
25905$this.wrapInner('<span>');
25906$this.wrapInner('<a href="#'+id+'" role="button" '+lienclass+ariaexpanded+' aria-controls="'+id+'">');
25907var lien=$this.children('a');
25908lien.on('click',function(event){
25909if($(this).attr('aria-expanded')==='false'){
25910cibloc_accordeon_replier_tout($(this).attr('aria-controls'));
25911$(this).attr('aria-expanded','true');
25912$(this).addClass('expanded');
25913reponse.attr('aria-hidden','false');
25914reponse.css('display','block');
25915event.preventDefault();
25916event.stopPropagation();
25917}else{
25918$(this).attr('aria-expanded','false');
25919$(this).removeClass('expanded');
25920reponse.attr('aria-hidden','true');
25921reponse.css('display','none');
25922event.preventDefault();
25923event.stopPropagation();
25924}
25925});
25926}
25927});
25928});
25929$('.cibloc_accordeon2').each(function(){
25930cibloc_accordeon_id++;
25931cibloc_question_id=0;
25932$(this).find(intertitre).each(function(){
25933var $this=$(this);
25934cibloc_question_id++;
25935var id='accordeon-'+cibloc_accordeon_id+'-'+cibloc_question_id;
25936var style=' style="display:none;"';
25937var ariahidden=' aria-hidden="true"';
25938var ariaexpanded=' aria-expanded="false"';
25939var lienclass=' class="accordeon_lien"';
25940if(cibloc_ancre&&cibloc_ancre=='#'+id){
25941style='';
25942ariahidden=' aria-hidden="false"';
25943ariaexpanded=' aria-expanded="true"';
25944lienclass=' class="accordeon_lien expanded"';
25945cibloc_ancre_existe=true;
25946}
25947$this.children("a.sommaire-back").css("display","none");
25948$this.nextUntil(intertitre).wrapAll('<div id="'+id+'"'+ariahidden+style+' class="cibloc_reponse">');
25949var reponse=$this.next();
25950if($this.parents().hasClass("cibloc_sans_vignette")){
25951$this.wrapInner('<span>');
25952$this.wrapInner('<span role="button" '+lienclass+ariaexpanded+' aria-controls="'+id+'">');
25953}else{
25954$this.wrapInner('<span>');
25955$this.wrapInner('<a href="#'+id+'" role="button" '+lienclass+ariaexpanded+' aria-controls="'+id+'">');
25956var lien=$this.children('a');
25957lien.on('click',function(event){
25958if($(this).attr('aria-expanded')==='false'){
25959$(this).attr('aria-expanded','true');
25960$(this).addClass('expanded');
25961reponse.attr('aria-hidden','false');
25962reponse.css('display','block');
25963event.preventDefault();
25964event.stopPropagation();
25965}else{
25966$(this).attr('aria-expanded','false');
25967$(this).removeClass('expanded');
25968reponse.attr('aria-hidden','true');
25969reponse.css('display','none');
25970event.preventDefault();
25971event.stopPropagation();
25972}
25973});
25974}
25975});
25976});
25977$('.cibloc_accordeon3').each(function(){
25978cibloc_accordeon_id++;
25979cibloc_question_id=0;
25980var lienclass=' class="accordeon_lien expanded"';
25981$(this).find(intertitre).each(function(){
25982var $this=$(this);
25983cibloc_question_id++;
25984var id='accordeon-'+cibloc_accordeon_id+'-'+cibloc_question_id;
25985$this.children("a.sommaire-back").css("display","none");
25986$this.nextUntil(intertitre).wrapAll('<div id="'+id+'" class="cibloc_reponse">');
25987if($this.parents().hasClass("cibloc_sans_vignette")){
25988$this.wrapInner('<span>');
25989$this.wrapInner('<span '+lienclass+'>');
25990}else{
25991$this.wrapInner('<span>');
25992$this.wrapInner('<a href="#'+id+'" '+lienclass+'>');
25993}
25994}
25994);
25995});
25996};
25997jQuery(document).ready(function(){
25998cibloc_init_js();
25999if(cibloc_ancre_existe){
26000$('html, body')
26001.stop()
26002.animate({scrollTop:$(cibloc_ancre).offset().top},500);
26003}
26004if("onhashchange"in window){
26005window.onhashchange=function(){
26006var nouvelle_ancre=window.location.hash;
26007var cible_id;
26008var reponse2;
26009if(nouvelle_ancre.substring(0,11)=='#accordeon-'){
26010cible_id=nouvelle_ancre.substring(1);
26011}else{
26012cible_id=$(nouvelle_ancre).children("a.accordeon_lien").attr('aria-controls');
26013}
26014if(cible_id){
26015cibloc_accordeon_replier_tout(cible_id);
26016var lesLiens2=$('.cibloc_accordeon a.accordeon_lien, .cibloc_accordeon2 a.accordeon_lien');
26017for(var i=0;i<lesLiens2.length;i++){
26018if($(lesLiens2[i]).attr('aria-controls')===cible_id){
26019reponse2=$('#'+cible_id);
26020$(lesLiens2[i]).attr('aria-expanded','true');
26021$(lesLiens2[i]).addClass('expanded');
26022reponse2.attr('aria-hidden','false');
26023reponse2.css('display','block');
26024$('html, body')
26025.stop()
26026.animate({scrollTop:$(reponse2).offset().top},500);
26027}
26028}
26029}
26030cibloc_ancre=nouvelle_ancre;
26031};
26032}
26033});
26034
26035
26036/* plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-collapse.js */
26037
26038!function($){
26039"use strict";
26040var Collapse=function(element,options){
26041this.$element=$(element)
26042this.options=$.extend({},$.fn.collapse.defaults,options)
26043if(this.options.parent){
26044this.$parent=$(this.options.parent)
26045}
26046this.options.toggle&&this.toggle()
26047}
26048Collapse.prototype={
26049constructor:Collapse
26050,dimension:function(){
26051var hasWidth=this.$element.hasClass('width')
26052return hasWidth?'width':'height'
26053}
26054,show:function(){
26055var dimension
26056,scroll
26057,actives
26058,hasData
26059if(this.transitioning||this.$element.hasClass('in'))return
26060dimension=this.dimension()
26061scroll=$.camelCase(['scroll',dimension].join('-'))
26062actives=this.$parent&&this.$parent.find('> .accordion-group > .in')
26063if(actives&&actives.length){
26064hasData=actives.data('collapse')
26065if(hasData&&hasData.transitioning)return
26066actives.collapse('hide')
26067hasData||actives.data('collapse',null)
26068}
26069this.$element[dimension](0)
26070this.transition('addClass',$.Event('show'),'shown')
26071$.support.transition&&this.$element[dimension](this.$element[0][scroll])
26072}
26073,hide:function(){
26074var dimension
26075if(this.transitioning||!this.$element.hasClass('in'))return
26076dimension=this.dimension()
26077this.reset(this.$element[dimension]())
26078this.transition('removeClass',$.Event('hide'),'hidden')
26079this.$element[dimension](0)
26080}
26081,reset:function(size){
26082var dimension=this.dimension()
26083this.$element
26084.removeClass('collapse')
26085[dimension](size||'auto')
26086[0].offsetWidth
26087this.$element[size!==null?'addClass':'removeClass']('collapse')
26088return this
26089}
26090,transition:function(method,startEvent,completeEvent){
26091var that=this
26092,complete=function(){
26093if(startEvent.type=='show')that.reset()
26094that.transitioning=0
26095that.$element.trigger(completeEvent)
26096}
26097this.$element.trigger(startEvent)
26098if(startEvent.isDefaultPrevented())return
26099this.transitioning=1
26100this.$element[method]('in')
26101$.support.transition&&this.$element.hasClass('collapse')?
26102this.$element.one($.support.transition.end,complete):
26103complete()
26104}
26105,toggle:function(){
26106this[this.$element.hasClass('in')?'hide':'show']()
26107}
26108}
26109var old=$.fn.collapse
26110$.fn.collapse=function(option){
26111return this.each(function(){
26112var $this=$(this)
26113,data=$this.data('collapse')
26114,options=$.extend({},$.fn.collapse.defaults,$this.data(),typeof option=='object'&&option)
26115if(!data)$this.data('collapse',(data=new Collapse(this,options)))
26116if(typeof option=='string')data[option]()
26117})
26118}
26119$.fn.collapse.defaults={
26120toggle:true
26121}
26122$.fn.collapse.Constructor=Collapse
26123$.fn.collapse.noConflict=function(){
26124$.fn.collapse=old
26125return this
26126}
26127$(document).on('click.collapse.data-api','[data-toggle=collapse]',function(e){
26128var $this=$(this),href
26129,target=$this.attr('data-target')
26130||e.preventDefault()
26131||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')
26132,option=$(target).data('collapse')?'toggle':$this.data()
26133$this[$(target).hasClass('in')?'addClass':'removeClass']('collapsed')
26134$(target).collapse(option)
26135})
26136}(window.jQuery);
26137
26138
26139/* plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-dropdown.js */
26140
26141!function($){
26142"use strict";
26143var toggle='[data-toggle=dropdown]'
26144,Dropdown=function(element){
26145var $el=$(element).on('click.dropdown.data-api',this.toggle)
26146$('html').on('click.dropdown.data-api',function(){
26147$el.parent().removeClass('open')
26148})
26149}
26150Dropdown.prototype={
26151constructor:Dropdown
26152,toggle:function(e){
26153var $this=$(this)
26154,$parent
26155,isActive
26156if($this.is('.disabled, :disabled'))return
26157$parent=getParent($this)
26158isActive=$parent.hasClass('open')
26159clearMenus()
26160if(!isActive){
26161$parent.toggleClass('open')
26162}
26163$this.focus()
26164return false
26165}
26166,keydown:function(e){
26167var $this
26168,$items
26169,$active
26170,$parent
26171,isActive
26172,index
26173if(!/(38|40|27)/.test(e.keyCode))return
26174$this=$(this)
26175e.preventDefault()
26176e.stopPropagation()
26177if($this.is('.disabled, :disabled'))return
26178$parent=getParent($this)
26179isActive=$parent.hasClass('open')
26180if(!isActive||(isActive&&e.keyCode==27)){
26181if(e.which==27)$parent.find(toggle).focus()
26182return $this.click()
26183}
26184$items=$('[role=menu] li:not(.divider):visible a',$parent)
26185if(!$items.length)return
26186index=$items.index($items.filter(':focus'))
26187if(e.keyCode==38&&index>0)index--
26188if(e.keyCode==40&&index<$items.length-1)index++
26189if(!~index)index=0
26190$items
26191.eq(index)
26192.focus()
26193}
26194}
26195function clearMenus(){
26196$('.dropdown-backdrop').remove()
26197$(toggle).each(function(){
26198getParent($(this)).removeClass('open')
26199})
26200}
26201function getParent($this){
26202var selector=$this.attr('data-target')
26203,$parent
26204if(!selector){
26205selector=$this.attr('href')
26206selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')
26207}
26208if(selector&&selector!=='#'){
26209$parent=$(selector)
26210}
26211if(!$parent||!$parent.length)$parent=$this.parent()
26212return $parent
26213}
26214var old=$.fn.dropdown
26215$.fn.dropdown=function(option){
26216return this.each(function(){
26217var $this=$(this)
26218,data=$this.data('dropdown')
26219if(!data)$this.data('dropdown',(data=new Dropdown(this)))
26220if(typeof option=='string')data[option].call($this)
26221})
26222}
26223$.fn.dropdown.Constructor=Dropdown
26224$.fn.dropdown.noConflict=function(){
26225$.fn.dropdown=old
26226return this
26227}
26228$(document)
26229.on('click.dropdown.data-api',clearMenus)
26230.on('click.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()})
26231.on('click.dropdown.data-api','.dropdown-menu a',function(e){e.stopPropagation()})
26232.on('click.dropdown.data-api',toggle,Dropdown.prototype.toggle)
26233.on('keydown.dropdown.data-api',toggle+', [role=menu]',Dropdown.prototype.keydown)
26234}(window.jQuery);
26235
26236
26237/* plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-carousel.js */
26238
26239!function($){
26240"use strict";
26241var Carousel=function(element,options){
26242this.$element=$(element)
26243this.$indicators=this.$element.find('.carousel-indicators')
26244this.options=options
26245this.options.pause=='hover'&&this.$element
26246.on('mouseenter',$.proxy(this.pause,this))
26247.on('mouseleave',$.proxy(this.cycle,this))
26248}
26249Carousel.prototype={
26250cycle:function(e){
26251if(!e)this.paused=false
26252if(this.interval)clearInterval(this.interval);
26253this.options.interval
26254&&!this.paused
26255&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))
26256return this
26257}
26258,getActiveIndex:function(){
26259this.$active=this.$element.find('.item.active')
26260this.$items=this.$active.parent().children()
26261return this.$items.index(this.$active)
26262}
26263,to:function(pos){
26264var activeIndex=this.getActiveIndex()
26265,that=this
26266if(pos>(this.$items.length-1)||pos<0)return
26267if(this.sliding){
26268return this.$element.one('slid',function(){
26269that.to(pos)
26270})
26271}
26272if(activeIndex==pos){
26273return this.pause().cycle()
26274}
26275return this.slide(pos>activeIndex?'next':'prev',$(this.$items[pos]))
26276}
26277,pause:function(e){
26278if(!e)this.paused=true
26279if(this.$element.find('.next, .prev').length&&$.support.transition.end){
26280this.$element.trigger($.support.transition.end)
26281this.cycle(true)
26282}
26283clearInterval(this.interval)
26284this.interval=null
26285return this
26286}
26287,next:function(){
26288if(this.sliding)return
26289return this.slide('next')
26290}
26291,prev:function(){
26292if(this.sliding)return
26293return this.slide('prev')
26294}
26295,slide:function(type,next){
26296var $active=this.$element.find('.item.active')
26297,$next=next||$active[type]()
26298,isCycling=this.interval
26299,direction=type=='next'?'left':'right'
26300,fallback=type=='next'?'first':'last'
26301,that=this
26302,e
26303this.sliding=true
26304isCycling&&this.pause()
26305$next=$next.length?$next:this.$element.find('.item')[fallback]()
26306e=$.Event('slide',{
26307relatedTarget:$next[0]
26308,direction:direction
26309})
26310if($next.hasClass('active'))return
26311if(this.$indicators.length){
26312this.$indicators.find('.active').removeClass('active')
26313this.$element.one('slid',function(){
26314var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()])
26315$nextIndicator&&$nextIndicator.addClass('active')
26316})
26317}
26318if($.support.transition&&this.$element.hasClass('slide')){
26319this.$element.trigger(e)
26320if(e.isDefaultPrevented())return
26321$next.addClass(type)
26322$next[0].offsetWidth
26323$active.addClass(direction)
26324$next.addClass(direction)
26325this.$element.one($.support.transition.end,function(){
26326$next.removeClass([type,direction].join(' ')).addClass('active')
26327$active.removeClass(['active',direction].join(' '))
26328that.sliding=false
26329setTimeout(function(){that.$element.trigger('slid')},0)
26330})
26331}else{
26332this.$element.trigger(e)
26333if(e.isDefaultPrevented())return
26334$active.removeClass('active')
26335$next.addClass('active')
26336this.sliding=false
26337this.$element.trigger('slid')
26338}
26339isCycling&&this.cycle()
26340return this
26341}
26342}
26343var old=$.fn.carousel
26344$.fn.carousel=function(option){
26345return this.each(function(){
26346var $this=$(this)
26347,data=$this.data('carousel')
26348,options=$.extend({},$.fn.carousel.defaults,typeof option=='object'&&option)
26349,action=typeof option=='string'?option:options.slide
26350if(!data)$this.data('carousel',(data=new Carousel(this,options)))
26351if(typeof option=='number')data.to(option)
26352else if(action)data[action]()
26353else if(options.interval)data.pause().cycle()
26354})
26355}
26356$.fn.carousel.defaults={
26357interval:5000
26358,pause:'hover'
26359}
26360$.fn.carousel.Constructor=Carousel
26361$.fn.carousel.noConflict=function(){
26362$.fn.carousel=old
26363return this
26364}
26365$(document).on('click.carousel.data-api','[data-slide], [data-slide-to]',function(e){
26366var $this=$(this),href
26367,$target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))
26368,options=$.extend({},$target.data(),$this.data())
26369,slideIndex
26370$target.carousel(options)
26371if(slideIndex=$this.attr('data-slide-to')){
26372$target.data('carousel').pause().to(slideIndex).cycle()
26373}
26374e.preventDefault()
26375})
26376}(window.jQuery);
26377
26378
26379/* plugins/auto/bootstrap/v2.2.0/bootstrap/js/bootstrap-transition.js */
26380
26381!function($){
26382"use strict";
26383$(function(){
26384$.support.transition=(function(){
26385var transitionEnd=(function(){
26386var el=document.createElement('bootstrap')
26387,transEndEventNames={
26388'WebkitTransition':'webkitTransitionEnd'
26389,'MozTransition':'transitionend'
26390,'OTransition':'oTransitionEnd otransitionend'
26391,'transition':'transitionend'
26392}
26393,name
26394for(name in transEndEventNames){
26395if(el.style[name]!==undefined){
26396return transEndEventNames[name]
26397}
26398}
26399}())
26400return transitionEnd&&{
26401end:transitionEnd
26402}
26403})()
26404})
26405}(window.jQuery);
26406
26407
26408/* plugins/spipr-dane/js/menu.dropdown.js */
26409jQuery(function(){
26410jQuery('.navbar .menu-items .menu-items').closest('.navbar').each(function(){
26411jQuery(this)
26412.find('.menu-items').eq(0).hide()
26413.children('.item').children('.menu-items').parent().addClass('dropdown')
26414.children('.menu-items').addClass('dropdown-menu').removeClass('nav')
26415.siblings('a').addClass('dropdown-toggle').attr('data-toggle','dropdown').append('<b class="caret"></b>').dropdown()
26416.siblings('.menu-items')
26417;
26418jQuery(this).find('.menu-items').eq(0).addClass('span12').show();
26419});
26420});
26421
26422
26423/* plugins/spipr-dane/js/spipr-dane.js */
26424$(function(){
26425$('a.spip_out,.articles-virtuels a').attr("target","_blank");
26426$('.articles-virtuels a').addClass("spip_out");
26427$('#recherche').attr('autocapitalize','off').attr('autocorrect','off');
26428$('.bouton_print').on("click",function(){window.print();});
26429$("body").append("<div id='backtotop' title='Haut de page'><span><i class='fa fa-long-arrow-up'></i></span></div>");
26430$(window).scroll(function(){
26431if($('html').scrollTop()>300||$('body').scrollTop()>300){$('#backtotop').fadeIn();}
26432else{$('#backtotop').fadeOut();}
26433});
26434$('#backtotop').on('click',function(){
26435$('html,body').animate({scrollTop:0},900,function(){
26436$("html, body").off("scroll mousedown DOMMouseScroll mousewheel keyup");
26437});
26438return false;
26439});
26440if(!Cookies.get('stop-carousel')){
26441$('.carousel').carousel({interval:8000});
26442$('.carousel-pause-cancel').hide();
26443}
26444else{
26445$('.carousel-pause').hide();
26446}
26447$('.carousel-pause').on('click',function(){
26448$('.carousel').carousel('pause');
26449Cookies.set('stop-carousel',true,{expires:365});
26450$(this).hide();
26451$('.carousel-pause-cancel').show();
26452return false;
26453});
26454$('.carousel-pause-cancel').on('click',function(){
26455$.removeCookie('stop-carousel');
26456$('.carousel').carousel('next');
26457$('.carousel').carousel({interval:8000});
26458$(this).hide();
26459$('.carousel-pause').show();
26460return false;
26461});
26462if($('.menu-xl').length){
26463var style='';
26464$('.menu-xl').each(function(index){
26465$(this).children('ul').addClass('row-fluid xl-'+index).find('li').children('ul').show().removeClass('nav');
26466var x=$(this).position();x=x.left+10;x=parseInt(x);var xb=parseInt(x-1);
26467style+=".navbar .nav > li.menu-xl > .xl-"+index+".dropdown-menu::before{left:"+xb+"px;} .navbar .nav > li.menu-xl > .xl-"+index+".dropdown-menu::after{left:"+x+"px;}";
26468});
26469$("<style>"+style+"</style>").appendTo('head');
26470}
26471$(".menu_ouvrant").on('mouseover',function(){$(this).addClass('pseudo_link');})
26472.on('mouseout',function(){$(this).removeClass('pseudo_link');})
26473.on('click',function(){$(this).next().toggle("slow");});
26474callbackToggleBreves(true);
26475if(typeof onAjaxLoad=='function')onAjaxLoad(callbackToggleBreves);
26476});
26477$.removeCookie=function(key,options){
26478if(Cookies.get(key)===undefined){
26479return false;
26480}
26481Cookies.set(key,'',$.extend({},options,{expires:-1}));
26482return!Cookies.get(key);
26483};
26484function callbackToggleBreves(chargement){
26485if(chargement||$(this).parents().hasClass("breves")||$(this).parents().hasClass("noisette_liste_breves")){
26486$(".liste.breves li.item div.breve_content").css({display:'none'});
26487$(".liste.breves li.item .h3-like a").toggleClass('ouvrable');
26488$(".liste.breves li.item .h3-like").off("click");
26489$(".liste.breves li.item .h3-like").on("click",function(){
26490$(this).next().slideToggle();
26491$(this).children().toggleClass("ouvrable");
26492return false;
26493});
26494}
26495}
26496
26497
26498/* plugins/spipr-dane/js/dyslexie.js */
26499$(document).ready(function(){
26500var cookieDys=Cookies.get("police_dyslexie");
26501var cookieInterlignage=Cookies.get("accessibilite_interlignage");
26502var cookieJustification=Cookies.get("accessibilite_justification");
26503if(cookieDys!='2'){
26504$("body").removeClass("dyslexie");
26505$("input[type='radio'][id='police_dyslexie_oui']").attr("checked",false);
26506$("input[type='radio'][id='police_dyslexie_non']").attr("checked",true);
26507}
26508else{
26509$("body").addClass("dyslexie");
26510$("input[type='radio'][id='police_dyslexie_oui']").attr("checked",true);
26511$("input[type='radio'][id='police_dyslexie_non']").attr("checked",false);
26512}
26513if(cookieInterlignage!='2'){
26514$("body").removeClass("accessibilite_interlignage");
26515$("input[type='radio'][id='interlignage_double_oui']").attr("checked",false);
26516$("input[type='radio'][id='interlignage_double_non']").attr("checked",true);
26517}
26518else{
26519$("body").addClass("accessibilite_interlignage");
26520$("input[type='radio'][id='interlignage_double_oui']").attr("checked",true);
26521$("input[type='radio'][id='interlignage_double_non']").attr("checked",false);
26522}
26523if(cookieJustification!='2'){
26524$("body").addClass("accessibilite_justification");
26525$("input[type='radio'][id='accessibilite_justification_oui']").attr("checked",false);
26526$("input[type='radio'][id='accessibilite_justification_non']").attr("checked",true);
26527}
26528else{
26529$("body").removeClass("accessibilite_justification");
26530$("input[type='radio'][id='accessibilite_justification_oui']").attr("checked",true);
26531$("input[type='radio'][id='accessibilite_justification_non']").attr("checked",false);
26532}
26533$("li.element_dyslexie_oui").on("click",function(){
26534$("body").addClass("dyslexie");
26535Cookies.set("police_dyslexie",2,{expires:10});
26536$("input[type='radio'][id='police_dyslexie_oui']").attr("checked",true);
26537$("input[type='radio'][id='police_dyslexie_non']").attr("checked",false);
26538});
26539$("li.element_dyslexie_non").on("click",function(){
26540$("body").removeClass("dyslexie");
26541Cookies.set("police_dyslexie",1,{expires:10});
26542$("input[type='radio'][id='police_dyslexie_oui']").attr("checked",false);
26543$("input[type='radio'][id='police_dyslexie_non']").attr("checked",true);
26544});
26545$("li.accessibilite_interlignage_oui").on("click",function(){
26546$("body").addClass("accessibilite_interlignage");
26547Cookies.set("accessibilite_interlignage",2,{expires:10});
26548$("input[type='radio'][id='interlignage_double_oui']").attr("checked",true);
26549$("input[type='radio'][id='interlignage_double_non']").attr("checked",false);
26550});
26551$("li.accessibilite_interlignage_non").on("click",function(){
26552$("body").removeClass("accessibilite_interlignage");
26553Cookies.set("accessibilite_interlignage",1,{expires:10});
26554$("input[type='radio'][id='interlignage_double_oui']").attr("checked",false);
26555$("input[type='radio'][id='interlignage_double_non']").attr("checked",true);
26556});
26557$("li.accessibilite_justification_oui").on("click",function(){
26558$("body").removeClass("accessibilite_justification");
26559Cookies.set("accessibilite_justification",2,{expires:10});
26560$("input[type='radio'][id='accessibilite_justification_oui']").attr("checked",true);
26561$("input[type='radio'][id='accessibilite_justification_non']").attr("checked",false);
26562});
26563$("li.accessibilite_justification_non").on("click",function(){
26564$("body").addClass("accessibilite_justification");
26565Cookies.set("accessibilite_justification",1,{expires:10});
26566$("input[type='radio'][id='accessibilite_justification_oui']").attr("checked",false);
26567$("input[type='radio'][id='accessibilite_justification_non']").attr("checked",true);
26568});
26569});
26570
26571

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.