@lmjs/cli 1.0.50 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +5 -16
- package/dist/bin/commands.js +2 -0
- package/dist/lib/app.js +3 -0
- package/dist/lib/check-version.js +2 -0
- package/dist/lib/fcs.js +11 -0
- package/{lib → dist/lib}/files/build_serverless/.htaccess +0 -0
- package/{lib/files/build/src → dist/lib/files/build_serverless}/favicon.ico +0 -0
- package/{lib/files/build/src → dist/lib/files/build_serverless}/robots.txt +0 -0
- package/{lib/files/build/src → dist/lib/files/build_serverless}/sitemap.xml +0 -0
- package/dist/lib/files/layout.layout +4 -0
- package/dist/lib/files/libs/bea.css +1 -0
- package/dist/lib/files/libs/lm-with-plugins.js +539 -0
- package/dist/lib/files/libs/lm.js +30 -0
- package/dist/lib/files/libs/lumenjs-plugins.css +2822 -0
- package/{lib → dist/lib}/files/project/config.json +1 -1
- package/dist/lib/files/project/package.json +6 -0
- package/{lib → dist/lib}/files/project/src/404.html +1 -1
- package/{lib → dist/lib}/files/project/src/index.html +3 -3
- package/dist/lib/files/project/src/index.js +1 -0
- package/dist/lib/files/project/src/layouts/default.layout +4 -0
- package/{lib → dist/lib}/files/project/src/views/home.view +2 -3
- package/{lib → dist/lib}/files/sub_view.view +0 -0
- package/dist/lib/files/view.view +13 -0
- package/dist/lib/npm-bundle.js +1 -0
- package/dist/lib/plugins-esbuild-plugin.js +3 -0
- package/package.json +37 -19
- package/bin/commands.js +0 -2
- package/lib/app.js +0 -132
- package/lib/check-version.js +0 -28
- package/lib/fcs.js +0 -804
- package/lib/files/build/func.js +0 -102
- package/lib/files/build/package.json +0 -31
- package/lib/files/build/server.js +0 -58
- package/lib/files/build_serverless/favicon.ico +0 -0
- package/lib/files/build_serverless/robots.txt +0 -4
- package/lib/files/build_serverless/sitemap.xml +0 -9
- package/lib/files/project/src/index.js +0 -15
- package/lib/files/project/src/tpls/tpl1.tpl +0 -1
- package/lib/files/project/src/views/widgets/footer.view +0 -0
- package/lib/files/project/src/views/widgets/header.view +0 -0
- package/lib/files/project/src/views/widgets/nav.view +0 -0
- package/lib/files/tpl.tpl +0 -1
- package/lib/files/view.view +0 -14
- /package/{lib → dist/lib}/files/project/src/images/lumenjs.svg +0 -0
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
;/*!
|
|
2
|
+
* jQuery JavaScript Library v3.7.1
|
|
3
|
+
* https://jquery.com/
|
|
4
|
+
*
|
|
5
|
+
* Copyright OpenJS Foundation and other contributors
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://jquery.org/license
|
|
8
|
+
*
|
|
9
|
+
* Date: 2023-08-28T13:37Z
|
|
10
|
+
*/(function(global2,factory18){"use strict";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global2.document?factory18(global2,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document")}return factory18(w)}}else{factory18(global2)}})(typeof window!=="undefined"?window:this,function(window2,noGlobal){"use strict";var arr=[];var getProto=Object.getPrototypeOf;var slice=arr.slice;var flat=arr.flat?function(array){return arr.flat.call(array)}:function(array){return arr.concat.apply([],array)};var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};var isFunction=function isFunction2(obj){return typeof obj==="function"&&typeof obj.nodeType!=="number"&&typeof obj.item!=="function"};var isWindow=function isWindow2(obj){return obj!=null&&obj===obj.window};var document2=window2.document;var preservedScriptAttributes={type:true,src:true,nonce:true,noModule:true};function DOMEval(code,node,doc2){doc2=doc2||document2;var i2,val2,script=doc2.createElement("script");script.text=code;if(node){for(i2 in preservedScriptAttributes){val2=node[i2]||node.getAttribute&&node.getAttribute(i2);if(val2){script.setAttribute(i2,val2)}}}doc2.head.appendChild(script).parentNode.removeChild(script)}function toType(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj}var version="3.7.1",rhtmlSuffix=/HTML$/i,jQuery2=function(selector2,context){return new jQuery2.fn.init(selector2,context)};jQuery2.fn=jQuery2.prototype={jquery:version,constructor:jQuery2,length:0,toArray:function(){return slice.call(this)},get:function(num){if(num==null){return slice.call(this)}return num<0?this[num+this.length]:this[num]},pushStack:function(elems){var ret=jQuery2.merge(this.constructor(),elems);ret.prevObject=this;return ret},each:function(callback){return jQuery2.each(this,callback)},map:function(callback){return this.pushStack(jQuery2.map(this,function(elem,i2){return callback.call(elem,i2,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(jQuery2.grep(this,function(_elem,i2){return(i2+1)%2}))},odd:function(){return this.pushStack(jQuery2.grep(this,function(_elem,i2){return i2%2}))},eq:function(i2){var len=this.length,j=+i2+(i2<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor()},push,sort:arr.sort,splice:arr.splice};jQuery2.extend=jQuery2.fn.extend=function(){var options,name,src,copy,copyIsArray,clone2,target=arguments[0]||{},i2=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i2]||{};i2++}if(typeof target!=="object"&&!isFunction(target)){target={}}if(i2===length){target=this;i2--}for(;i2<length;i2++){if((options=arguments[i2])!=null){for(name in options){copy=options[name];if(name==="__proto__"||target===copy){continue}if(deep&©&&(jQuery2.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){src=target[name];if(copyIsArray&&!Array.isArray(src)){clone2=[]}else if(!copyIsArray&&!jQuery2.isPlainObject(src)){clone2={}}else{clone2=src}copyIsArray=false;target[name]=jQuery2.extend(deep,clone2,copy)}else if(copy!==void 0){target[name]=copy}}}}return target};jQuery2.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg)},noop:function(){},isPlainObject:function(obj){var proto,Ctor;if(!obj||toString.call(obj)!=="[object Object]"){return false}proto=getProto(obj);if(!proto){return true}Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},globalEval:function(code,options,doc2){DOMEval(code,{nonce:options&&options.nonce},doc2)},each:function(obj,callback){var length,i2=0;if(isArrayLike(obj)){length=obj.length;for(;i2<length;i2++){if(callback.call(obj[i2],i2,obj[i2])===false){break}}}else{for(i2 in obj){if(callback.call(obj[i2],i2,obj[i2])===false){break}}}return obj},text:function(elem){var node,ret="",i2=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i2++]){ret+=jQuery2.text(node)}}if(nodeType===1||nodeType===11){return elem.textContent}if(nodeType===9){return elem.documentElement.textContent}if(nodeType===3||nodeType===4){return elem.nodeValue}return ret},makeArray:function(arr2,results){var ret=results||[];if(arr2!=null){if(isArrayLike(Object(arr2))){jQuery2.merge(ret,typeof arr2==="string"?[arr2]:arr2)}else{push.call(ret,arr2)}}return ret},inArray:function(elem,arr2,i2){return arr2==null?-1:indexOf.call(arr2,elem,i2)},isXMLDoc:function(elem){var namespace=elem&&elem.namespaceURI,docElem=elem&&(elem.ownerDocument||elem).documentElement;return!rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML")},merge:function(first,second){var len=+second.length,j=0,i2=first.length;for(;j<len;j++){first[i2++]=second[j]}first.length=i2;return first},grep:function(elems,callback,invert){var callbackInverse,matches=[],i2=0,length=elems.length,callbackExpect=!invert;for(;i2<length;i2++){callbackInverse=!callback(elems[i2],i2);if(callbackInverse!==callbackExpect){matches.push(elems[i2])}}return matches},map:function(elems,callback,arg){var length,value,i2=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i2<length;i2++){value=callback(elems[i2],i2,arg);if(value!=null){ret.push(value)}}}else{for(i2 in elems){value=callback(elems[i2],i2,arg);if(value!=null){ret.push(value)}}}return flat(ret)},guid:1,support});if(typeof Symbol==="function"){jQuery2.fn[Symbol.iterator]=arr[Symbol.iterator]}jQuery2.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_i,name){class2type["[object "+name+"]"]=name.toLowerCase()});function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type2=toType(obj);if(isFunction(obj)||isWindow(obj)){return false}return type2==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj}function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()}var pop=arr.pop;var sort=arr.sort;var splice=arr.splice;var whitespace="[\\x20\\t\\r\\n\\f]";var rtrimCSS=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g");jQuery2.contains=function(a,b){var bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(a.contains?a.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))};var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function fcssescape(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"\uFFFD"}return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" "}return"\\"+ch}jQuery2.escapeSelector=function(sel){return(sel+"").replace(rcssescape,fcssescape)};var preferredDoc=document2,pushNative=push;(function(){var i2,Expr,outermostContext,sortInput,hasDuplicate,push2=pushNative,document3,documentElement2,documentIsHTML,rbuggyQSA,matches,expando=jQuery2.expando,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),nonnativeSelectorCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+attributes+")*)|.*)\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rdescend=new RegExp(whitespace+"|>"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rquickExpr2=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\([^\\r\\n\\f])","g"),funescape=function(escape,nonHex){var high="0x"+escape.slice(1)-65536;if(nonHex){return nonHex}return high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()},inDisabledFieldset=addCombinator(function(elem){return elem.disabled===true&&nodeName(elem,"fieldset")},{dir:"parentNode",next:"legend"});function safeActiveElement(){try{return document3.activeElement}catch(err){}}try{push2.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e2){push2={apply:function(target,els){pushNative.apply(target,slice.call(els))},call:function(target){pushNative.apply(target,slice.call(arguments,1))}}}function find(selector2,context,results,seed){var m,i3,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector2!=="string"||!selector2||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed){setDocument(context);context=context||document3;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr2.exec(selector2))){if(m=match[1]){if(nodeType===9){if(elem=context.getElementById(m)){if(elem.id===m){push2.call(results,elem);return results}}else{return results}}else{if(newContext&&(elem=newContext.getElementById(m))&&find.contains(context,elem)&&elem.id===m){push2.call(results,elem);return results}}}else if(match[2]){push2.apply(results,context.getElementsByTagName(selector2));return results}else if((m=match[3])&&context.getElementsByClassName){push2.apply(results,context.getElementsByClassName(m));return results}}if(!nonnativeSelectorCache[selector2+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector2))){newSelector=selector2;newContext=context;if(nodeType===1&&(rdescend.test(selector2)||rleadingCombinator.test(selector2))){newContext=rsibling.test(selector2)&&testContext(context.parentNode)||context;if(newContext!=context||!support.scope){if(nid=context.getAttribute("id")){nid=jQuery2.escapeSelector(nid)}else{context.setAttribute("id",nid=expando)}}groups=tokenize(selector2);i3=groups.length;while(i3--){groups[i3]=(nid?"#"+nid:":scope")+" "+toSelector(groups[i3])}newSelector=groups.join(",")}try{push2.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){nonnativeSelectorCache(selector2,true)}finally{if(nid===expando){context.removeAttribute("id")}}}}}return select(selector2.replace(rtrimCSS,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key2,value){if(keys.push(key2+" ")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key2+" "]=value}return cache}function markFunction(fn2){fn2[expando]=true;return fn2}function assert(fn2){var el2=document3.createElement("fieldset");try{return!!fn2(el2)}catch(e2){return false}finally{if(el2.parentNode){el2.parentNode.removeChild(el2)}el2=null}}function createInputPseudo(type2){return function(elem){return nodeName(elem,"input")&&elem.type===type2}}function createButtonPseudo(type2){return function(elem){return(nodeName(elem,"input")||nodeName(elem,"button"))&&elem.type===type2}}function createDisabledPseudo(disabled){return function(elem){if("form"in elem){if(elem.parentNode&&elem.disabled===false){if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled}else{return elem.disabled===disabled}}return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&inDisabledFieldset(elem)===disabled}return elem.disabled===disabled}else if("label"in elem){return elem.disabled===disabled}return false}}function createPositionalPseudo(fn2){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches2){var j,matchIndexes=fn2([],seed.length,argument),i3=matchIndexes.length;while(i3--){if(seed[j=matchIndexes[i3]]){seed[j]=!(matches2[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}function setDocument(node){var subWindow,doc2=node?node.ownerDocument||node:preferredDoc;if(doc2==document3||doc2.nodeType!==9||!doc2.documentElement){return document3}document3=doc2;documentElement2=document3.documentElement;documentIsHTML=!jQuery2.isXMLDoc(document3);matches=documentElement2.matches||documentElement2.webkitMatchesSelector||documentElement2.msMatchesSelector;if(documentElement2.msMatchesSelector&&preferredDoc!=document3&&(subWindow=document3.defaultView)&&subWindow.top!==subWindow){subWindow.addEventListener("unload",unloadHandler)}support.getById=assert(function(el2){documentElement2.appendChild(el2).id=jQuery2.expando;return!document3.getElementsByName||!document3.getElementsByName(jQuery2.expando).length});support.disconnectedMatch=assert(function(el2){return matches.call(el2,"*")});support.scope=assert(function(){return document3.querySelectorAll(":scope")});support.cssHas=assert(function(){try{document3.querySelector(":has(*,:jqfake)");return false}catch(e2){return true}});if(support.getById){Expr.filter.ID=function(id2){var attrId=id2.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}};Expr.find.ID=function(id2,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id2);return elem?[elem]:[]}}}else{Expr.filter.ID=function(id2){var attrId=id2.replace(runescape,funescape);return function(elem){var node2=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node2&&node2.value===attrId}};Expr.find.ID=function(id2,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node2,i3,elems,elem=context.getElementById(id2);if(elem){node2=elem.getAttributeNode("id");if(node2&&node2.value===id2){return[elem]}elems=context.getElementsByName(id2);i3=0;while(elem=elems[i3++]){node2=elem.getAttributeNode("id");if(node2&&node2.value===id2){return[elem]}}}return[]}}}Expr.find.TAG=function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else{return context.querySelectorAll(tag)}};Expr.find.CLASS=function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyQSA=[];assert(function(el2){var input;documentElement2.appendChild(el2).innerHTML="<a id='"+expando+"' href='' disabled='disabled'></a><select id='"+expando+"-\r\\' disabled='disabled'><option selected=''></option></select>";if(!el2.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!el2.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!el2.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}if(!el2.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}input=document3.createElement("input");input.setAttribute("type","hidden");el2.appendChild(input).setAttribute("name","D");documentElement2.appendChild(el2).disabled=true;if(el2.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled")}input=document3.createElement("input");input.setAttribute("name","");el2.appendChild(input);if(!el2.querySelectorAll("[name='']").length){rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+whitespace+`*(?:''|"")`)}});if(!support.cssHas){rbuggyQSA.push(":has")}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));sortOrder=function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)==(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===document3||a.ownerDocument==preferredDoc&&find.contains(preferredDoc,a)){return-1}if(b===document3||b.ownerDocument==preferredDoc&&find.contains(preferredDoc,b)){return 1}return sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0}return compare&4?-1:1};return document3}find.matches=function(expr,elements){return find(expr,null,null,elements)};find.matchesSelector=function(elem,expr){setDocument(elem);if(documentIsHTML&&!nonnativeSelectorCache[expr+" "]&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e2){nonnativeSelectorCache(expr,true)}}return find(expr,document3,null,[elem]).length>0};find.contains=function(context,elem){if((context.ownerDocument||context)!=document3){setDocument(context)}return jQuery2.contains(context,elem)};find.attr=function(elem,name){if((elem.ownerDocument||elem)!=document3){setDocument(elem)}var fn2=Expr.attrHandle[name.toLowerCase()],val2=fn2&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn2(elem,name,!documentIsHTML):void 0;if(val2!==void 0){return val2}return elem.getAttribute(name)};find.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};jQuery2.uniqueSort=function(results){var elem,duplicates=[],j=0,i3=0;hasDuplicate=!support.sortStable;sortInput=!support.sortStable&&slice.call(results,0);sort.call(results,sortOrder);if(hasDuplicate){while(elem=results[i3++]){if(elem===results[i3]){j=duplicates.push(i3)}}while(j--){splice.call(results,duplicates[j],1)}}sortInput=null;return results};jQuery2.fn.uniqueSort=function(){return this.pushStack(jQuery2.uniqueSort(slice.apply(this)))};Expr=jQuery2.expr={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){find.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3]){find.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr.CHILD.test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return nodeName(elem,expectedNodeName)}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=find.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";if(operator==="="){return result===check}if(operator==="!="){return result!==check}if(operator==="^="){return check&&result.indexOf(check)===0}if(operator==="*="){return check&&result.indexOf(check)>-1}if(operator==="$="){return check&&result.slice(-check.length)===check}if(operator==="~="){return(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1}if(operator==="|="){return result===check||result.slice(0,check.length+1)===check+"-"}return false}},CHILD:function(type2,what,_argument,first,last){var simple=type2.slice(0,3)!=="nth",forward=type2.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,_context,xml){var cache,outerCache,node,nodeIndex,start,dir2=simple!==forward?"nextSibling":"previousSibling",parent2=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent2){if(simple){while(dir2){node=elem;while(node=node[dir2]){if(ofType?nodeName(node,name):node.nodeType===1){return false}}start=dir2=type2==="only"&&!start&&"nextSibling"}return true}start=[forward?parent2.firstChild:parent2.lastChild];if(forward&&useCache){outerCache=parent2[expando]||(parent2[expando]={});cache=outerCache[type2]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent2.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir2]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){outerCache[type2]=[dirruns,nodeIndex,diff];break}}}else{if(useCache){outerCache=elem[expando]||(elem[expando]={});cache=outerCache[type2]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex}if(diff===false){while(node=++nodeIndex&&node&&node[dir2]||(diff=nodeIndex=0)||start.pop()){if((ofType?nodeName(node,name):node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});outerCache[type2]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn2=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||find.error("unsupported pseudo: "+pseudo);if(fn2[expando]){return fn2(argument)}if(fn2.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches2){var idx,matched=fn2(seed,argument),i3=matched.length;while(i3--){idx=indexOf.call(seed,matched[i3]);seed[idx]=!(matches2[idx]=matched[i3])}}):function(elem){return fn2(elem,0,args)}}return fn2}},pseudos:{not:markFunction(function(selector2){var input=[],results=[],matcher=compile(selector2.replace(rtrimCSS,"$1"));return matcher[expando]?markFunction(function(seed,matches2,_context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i3=seed.length;while(i3--){if(elem=unmatched[i3]){seed[i3]=!(matches2[i3]=elem)}}}):function(elem,_context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector2){return function(elem){return find(selector2,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||jQuery2.text(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){find.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window2.location&&window2.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===documentElement2},focus:function(elem){return elem===safeActiveElement()&&document3.hasFocus()&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(false),disabled:createDisabledPseudo(true),checked:function(elem){return nodeName(elem,"input")&&!!elem.checked||nodeName(elem,"option")&&!!elem.selected},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){return nodeName(elem,"input")&&elem.type==="button"||nodeName(elem,"button")},text:function(elem){var attr;return nodeName(elem,"input")&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(_matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(_matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i3=0;for(;i3<length;i3+=2){matchIndexes.push(i3)}return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){var i3=1;for(;i3<length;i3+=2){matchIndexes.push(i3)}return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i3;if(argument<0){i3=argument+length}else if(argument>length){i3=length}else{i3=argument}for(;--i3>=0;){matchIndexes.push(i3)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i3=argument<0?argument+length:argument;for(;++i3<length;){matchIndexes.push(i3)}return matchIndexes})}};Expr.pseudos.nth=Expr.pseudos.eq;for(i2 in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i2]=createInputPseudo(i2)}for(i2 in{submit:true,reset:true}){Expr.pseudos[i2]=createButtonPseudo(i2)}function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters;function tokenize(selector2,parseOnly){var matched,match,tokens,type2,soFar,groups,preFilters,cached=tokenCache[selector2+" "];if(cached){return parseOnly?0:cached.slice(0)}soFar=selector2;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar}groups.push(tokens=[])}matched=false;if(match=rleadingCombinator.exec(soFar)){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrimCSS," ")});soFar=soFar.slice(matched.length)}for(type2 in Expr.filter){if((match=matchExpr[type2].exec(soFar))&&(!preFilters[type2]||(match=preFilters[type2](match)))){matched=match.shift();tokens.push({value:matched,type:type2,matches:match});soFar=soFar.slice(matched.length)}}if(!matched){break}}if(parseOnly){return soFar.length}return soFar?find.error(selector2):tokenCache(selector2,groups).slice(0)}function toSelector(tokens){var i3=0,len=tokens.length,selector2="";for(;i3<len;i3++){selector2+=tokens[i3].value}return selector2}function addCombinator(matcher,combinator,base){var dir2=combinator.dir,skip=combinator.next,key2=skip||dir2,checkNonElements=base&&key2==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while(elem=elem[dir2]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml)}}return false}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];if(xml){while(elem=elem[dir2]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true}}}}else{while(elem=elem[dir2]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});if(skip&&nodeName(elem,skip)){elem=elem[dir2]||elem}else if((oldCache=outerCache[key2])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return newCache[2]=oldCache[2]}else{outerCache[key2]=newCache;if(newCache[2]=matcher(elem,context,xml)){return true}}}}}return false}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i3=matchers.length;while(i3--){if(!matchers[i3](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector2,contexts,results){var i3=0,len=contexts.length;for(;i3<len;i3++){find(selector2,contexts[i3],results)}return results}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i3=0,len=unmatched.length,mapped=map!=null;for(;i3<len;i3++){if(elem=unmatched[i3]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i3)}}}}return newUnmatched}function setMatcher(preFilter,selector2,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter)}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector)}return markFunction(function(seed,results,context,xml){var temp2,i3,elem,matcherOut,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector2||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector2)?condense(elems,preMap,preFilter,context,xml):elems;if(matcher){matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)?[]:results;matcher(matcherIn,matcherOut,context,xml)}else{matcherOut=matcherIn}if(postFilter){temp2=condense(matcherOut,postMap);postFilter(temp2,[],context,xml);i3=temp2.length;while(i3--){if(elem=temp2[i3]){matcherOut[postMap[i3]]=!(matcherIn[postMap[i3]]=elem)}}}if(seed){if(postFinder||preFilter){if(postFinder){temp2=[];i3=matcherOut.length;while(i3--){if(elem=matcherOut[i3]){temp2.push(matcherIn[i3]=elem)}}postFinder(null,matcherOut=[],temp2,xml)}i3=matcherOut.length;while(i3--){if((elem=matcherOut[i3])&&(temp2=postFinder?indexOf.call(seed,elem):preMap[i3])>-1){seed[temp2]=!(results[temp2]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push2.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i3=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!=outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i3<len;i3++){if(matcher=Expr.relative[tokens[i3].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)]}else{matcher=Expr.filter[tokens[i3].type].apply(null,tokens[i3].matches);if(matcher[expando]){j=++i3;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break}}return setMatcher(i3>1&&elementMatcher(matchers),i3>1&&toSelector(tokens.slice(0,i3-1).concat({value:tokens[i3-2].type===" "?"*":""})).replace(rtrimCSS,"$1"),matcher,i3<j&&matcherFromTokens(tokens.slice(i3,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i3="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context==document3||context||outermost}for(;i3!==len&&(elem=elems[i3])!=null;i3++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!=document3){setDocument(elem);xml=!documentIsHTML}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document3,xml)){push2.call(results,elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i3;if(bySet&&i3!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i3--){if(!(unmatched[i3]||setMatched[i3])){setMatched[i3]=pop.call(results)}}}setMatched=condense(setMatched)}push2.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){jQuery2.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}function compile(selector2,match){var i3,setMatchers=[],elementMatchers=[],cached=compilerCache[selector2+" "];if(!cached){if(!match){match=tokenize(selector2)}i3=match.length;while(i3--){cached=matcherFromTokens(match[i3]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector2,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector2}return cached}function select(selector2,context,results,seed){var i3,tokens,token,type2,find2,compiled=typeof selector2==="function"&&selector2,match=!seed&&tokenize(selector2=compiled.selector||selector2);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector2=selector2.slice(tokens.shift().value.length)}i3=matchExpr.needsContext.test(selector2)?0:tokens.length;while(i3--){token=tokens[i3];if(Expr.relative[type2=token.type]){break}if(find2=Expr.find[type2]){if(seed=find2(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i3,1);selector2=seed.length&&toSelector(tokens);if(!selector2){push2.apply(results,seed);return results}break}}}}(compiled||compile(selector2,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector2)&&testContext(context.parentNode)||context);return results}support.sortStable=expando.split("").sort(sortOrder).join("")===expando;setDocument();support.sortDetached=assert(function(el2){return el2.compareDocumentPosition(document3.createElement("fieldset"))&1});jQuery2.find=find;jQuery2.expr[":"]=jQuery2.expr.pseudos;jQuery2.unique=jQuery2.uniqueSort;find.compile=compile;find.select=select;find.setDocument=setDocument;find.tokenize=tokenize;find.escape=jQuery2.escapeSelector;find.getText=jQuery2.text;find.isXML=jQuery2.isXMLDoc;find.selectors=jQuery2.expr;find.support=jQuery2.support;find.uniqueSort=jQuery2.uniqueSort})();var dir=function(elem,dir2,until){var matched=[],truncate=until!==void 0;while((elem=elem[dir2])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery2(elem).is(until)){break}matched.push(elem)}}return matched};var siblings=function(n2,elem){var matched=[];for(;n2;n2=n2.nextSibling){if(n2.nodeType===1&&n2!==elem){matched.push(n2)}}return matched};var rneedsContext=jQuery2.expr.match.needsContext;var rsingleTag=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function winnow(elements,qualifier,not){if(isFunction(qualifier)){return jQuery2.grep(elements,function(elem,i2){return!!qualifier.call(elem,i2,elem)!==not})}if(qualifier.nodeType){return jQuery2.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier!=="string"){return jQuery2.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not})}return jQuery2.filter(qualifier,elements,not)}jQuery2.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}if(elems.length===1&&elem.nodeType===1){return jQuery2.find.matchesSelector(elem,expr)?[elem]:[]}return jQuery2.find.matches(expr,jQuery2.grep(elems,function(elem2){return elem2.nodeType===1}))};jQuery2.fn.extend({find:function(selector2){var i2,ret,len=this.length,self2=this;if(typeof selector2!=="string"){return this.pushStack(jQuery2(selector2).filter(function(){for(i2=0;i2<len;i2++){if(jQuery2.contains(self2[i2],this)){return true}}}))}ret=this.pushStack([]);for(i2=0;i2<len;i2++){jQuery2.find(selector2,self2[i2],ret)}return len>1?jQuery2.uniqueSort(ret):ret},filter:function(selector2){return this.pushStack(winnow(this,selector2||[],false))},not:function(selector2){return this.pushStack(winnow(this,selector2||[],true))},is:function(selector2){return!!winnow(this,typeof selector2==="string"&&rneedsContext.test(selector2)?jQuery2(selector2):selector2||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init2=jQuery2.fn.init=function(selector2,context,root){var match,elem;if(!selector2){return this}root=root||rootjQuery;if(typeof selector2==="string"){if(selector2[0]==="<"&&selector2[selector2.length-1]===">"&&selector2.length>=3){match=[null,selector2,null]}else{match=rquickExpr.exec(selector2)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery2?context[0]:context;jQuery2.merge(this,jQuery2.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document2,true));if(rsingleTag.test(match[1])&&jQuery2.isPlainObject(context)){for(match in context){if(isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document2.getElementById(match[2]);if(elem){this[0]=elem;this.length=1}return this}}else if(!context||context.jquery){return(context||root).find(selector2)}else{return this.constructor(context).find(selector2)}}else if(selector2.nodeType){this[0]=selector2;this.length=1;return this}else if(isFunction(selector2)){return root.ready!==void 0?root.ready(selector2):selector2(jQuery2)}return jQuery2.makeArray(selector2,this)};init2.prototype=jQuery2.fn;rootjQuery=jQuery2(document2);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery2.fn.extend({has:function(target){var targets=jQuery2(target,this),l=targets.length;return this.filter(function(){var i2=0;for(;i2<l;i2++){if(jQuery2.contains(this,targets[i2])){return true}}})},closest:function(selectors,context){var cur,i2=0,l=this.length,matched=[],targets=typeof selectors!=="string"&&jQuery2(selectors);if(!rneedsContext.test(selectors)){for(;i2<l;i2++){for(cur=this[i2];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(targets?targets.index(cur)>-1:cur.nodeType===1&&jQuery2.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}}return this.pushStack(matched.length>1?jQuery2.uniqueSort(matched):matched)},index:function(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery2(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector2,context){return this.pushStack(jQuery2.uniqueSort(jQuery2.merge(this.get(),jQuery2(selector2,context))))},addBack:function(selector2){return this.add(selector2==null?this.prevObject:this.prevObject.filter(selector2))}});function sibling(cur,dir2){while((cur=cur[dir2])&&cur.nodeType!==1){}return cur}jQuery2.each({parent:function(elem){var parent2=elem.parentNode;return parent2&&parent2.nodeType!==11?parent2:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,_i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,_i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,_i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){if(elem.contentDocument!=null&&getProto(elem.contentDocument)){return elem.contentDocument}if(nodeName(elem,"template")){elem=elem.content||elem}return jQuery2.merge([],elem.childNodes)}},function(name,fn2){jQuery2.fn[name]=function(until,selector2){var matched=jQuery2.map(this,fn2,until);if(name.slice(-5)!=="Until"){selector2=until}if(selector2&&typeof selector2==="string"){matched=jQuery2.filter(selector2,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery2.uniqueSort(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnothtmlwhite=/[^\x20\t\r\n\f]+/g;function createOptions(options){var object={};jQuery2.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true});return object}jQuery2.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery2.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=locked||options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false}}}if(!options.memory){memory=false}firing=false;if(locked){if(memory){list=[]}else{list=""}}},self2={add:function(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory)}(function add(args){jQuery2.each(args,function(_,arg){if(isFunction(arg)){if(!options.unique||!self2.has(arg)){list.push(arg)}}else if(arg&&arg.length&&toType(arg)!=="string"){add(arg)}})})(arguments);if(memory&&!firing){fire()}}return this},remove:function(){jQuery2.each(arguments,function(_,arg){var index2;while((index2=jQuery2.inArray(arg,list,index2))>-1){list.splice(index2,1);if(index2<=firingIndex){firingIndex--}}});return this},has:function(fn2){return fn2?jQuery2.inArray(fn2,list)>-1:list.length>0},empty:function(){if(list){list=[]}return this},disable:function(){locked=queue=[];list=memory="";return this},disabled:function(){return!list},lock:function(){locked=queue=[];if(!memory&&!firing){list=memory=""}return this},locked:function(){return!!locked},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire()}}return this},fire:function(){self2.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self2};function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&isFunction(method=value.promise)){method.call(value).done(resolve).fail(reject)}else if(value&&isFunction(method=value.then)){method.call(value,resolve,reject)}else{resolve.apply(void 0,[value].slice(noValue))}}catch(value2){reject.apply(void 0,[value2])}}jQuery2.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery2.Callbacks("memory"),jQuery2.Callbacks("memory"),2],["resolve","done",jQuery2.Callbacks("once memory"),jQuery2.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery2.Callbacks("once memory"),jQuery2.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},"catch":function(fn2){return promise.then(null,fn2)},pipe:function(){var fns=arguments;return jQuery2.Deferred(function(newDefer){jQuery2.each(tuples,function(_i,tuple){var fn2=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn2&&fn2.apply(this,arguments);if(returned&&isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject)}else{newDefer[tuple[0]+"With"](this,fn2?[returned]:arguments)}})});fns=null}).promise()},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred2,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(depth<maxDepth){return}returned=handler.apply(that,args);if(returned===deferred2.promise()){throw new TypeError("Thenable self-resolution")}then=returned&&(typeof returned==="object"||typeof returned==="function")&&returned.then;if(isFunction(then)){if(special){then.call(returned,resolve(maxDepth,deferred2,Identity,special),resolve(maxDepth,deferred2,Thrower,special))}else{maxDepth++;then.call(returned,resolve(maxDepth,deferred2,Identity,special),resolve(maxDepth,deferred2,Thrower,special),resolve(maxDepth,deferred2,Identity,deferred2.notifyWith))}}else{if(handler!==Identity){that=void 0;args=[returned]}(special||deferred2.resolveWith)(that,args)}},process=special?mightThrow:function(){try{mightThrow()}catch(e2){if(jQuery2.Deferred.exceptionHook){jQuery2.Deferred.exceptionHook(e2,process.error)}if(depth+1>=maxDepth){if(handler!==Thrower){that=void 0;args=[e2]}deferred2.rejectWith(that,args)}}};if(depth){process()}else{if(jQuery2.Deferred.getErrorHook){process.error=jQuery2.Deferred.getErrorHook()}else if(jQuery2.Deferred.getStackHook){process.error=jQuery2.Deferred.getStackHook()}window2.setTimeout(process)}}}return jQuery2.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower))}).promise()},promise:function(obj){return obj!=null?jQuery2.extend(obj,promise):promise}},deferred={};jQuery2.each(tuples,function(i2,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[3-i2][2].disable,tuples[3-i2][3].disable,tuples[0][2].lock,tuples[0][3].lock)}list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?void 0:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(singleValue){var remaining=arguments.length,i2=remaining,resolveContexts=Array(i2),resolveValues=slice.call(arguments),primary=jQuery2.Deferred(),updateFunc=function(i3){return function(value){resolveContexts[i3]=this;resolveValues[i3]=arguments.length>1?slice.call(arguments):value;if(!--remaining){primary.resolveWith(resolveContexts,resolveValues)}}};if(remaining<=1){adoptValue(singleValue,primary.done(updateFunc(i2)).resolve,primary.reject,!remaining);if(primary.state()==="pending"||isFunction(resolveValues[i2]&&resolveValues[i2].then)){return primary.then()}}while(i2--){adoptValue(resolveValues[i2],updateFunc(i2),primary.reject)}return primary.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery2.Deferred.exceptionHook=function(error,asyncError){if(window2.console&&window2.console.warn&&error&&rerrorNames.test(error.name)){window2.console.warn("jQuery.Deferred exception: "+error.message,error.stack,asyncError)}};jQuery2.readyException=function(error){window2.setTimeout(function(){throw error})};var readyList=jQuery2.Deferred();jQuery2.fn.ready=function(fn2){readyList.then(fn2).catch(function(error){jQuery2.readyException(error)});return this};jQuery2.extend({isReady:false,readyWait:1,ready:function(wait2){if(wait2===true?--jQuery2.readyWait:jQuery2.isReady){return}jQuery2.isReady=true;if(wait2!==true&&--jQuery2.readyWait>0){return}readyList.resolveWith(document2,[jQuery2])}});jQuery2.ready.then=readyList.then;function completed(){document2.removeEventListener("DOMContentLoaded",completed);window2.removeEventListener("load",completed);jQuery2.ready()}if(document2.readyState==="complete"||document2.readyState!=="loading"&&!document2.documentElement.doScroll){window2.setTimeout(jQuery2.ready)}else{document2.addEventListener("DOMContentLoaded",completed);window2.addEventListener("load",completed)}var access=function(elems,fn2,key2,value,chainable,emptyGet,raw){var i2=0,len=elems.length,bulk=key2==null;if(toType(key2)==="object"){chainable=true;for(i2 in key2){access(elems,fn2,i2,key2[i2],true,emptyGet,raw)}}else if(value!==void 0){chainable=true;if(!isFunction(value)){raw=true}if(bulk){if(raw){fn2.call(elems,value);fn2=null}else{bulk=fn2;fn2=function(elem,_key,value2){return bulk.call(jQuery2(elem),value2)}}}if(fn2){for(;i2<len;i2++){fn2(elems[i2],key2,raw?value:value.call(elems[i2],i2,fn2(elems[i2],key2)))}}}if(chainable){return elems}if(bulk){return fn2.call(elems)}return len?fn2(elems[0],key2):emptyGet};var rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g;function fcamelCase(_all,letter){return letter.toUpperCase()}function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)}var acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType};function Data(){this.expando=jQuery2.expando+Data.uid++}Data.uid=1;Data.prototype={cache:function(owner){var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value}else{Object.defineProperty(owner,this.expando,{value,configurable:true})}}}return value},set:function(owner,data2,value){var prop,cache=this.cache(owner);if(typeof data2==="string"){cache[camelCase(data2)]=value}else{for(prop in data2){cache[camelCase(prop)]=data2[prop]}}return cache},get:function(owner,key2){return key2===void 0?this.cache(owner):owner[this.expando]&&owner[this.expando][camelCase(key2)]},access:function(owner,key2,value){if(key2===void 0||key2&&typeof key2==="string"&&value===void 0){return this.get(owner,key2)}this.set(owner,key2,value);return value!==void 0?value:key2},remove:function(owner,key2){var i2,cache=owner[this.expando];if(cache===void 0){return}if(key2!==void 0){if(Array.isArray(key2)){key2=key2.map(camelCase)}else{key2=camelCase(key2);key2=key2 in cache?[key2]:key2.match(rnothtmlwhite)||[]}i2=key2.length;while(i2--){delete cache[key2[i2]]}}if(key2===void 0||jQuery2.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=void 0}else{delete owner[this.expando]}}},hasData:function(owner){var cache=owner[this.expando];return cache!==void 0&&!jQuery2.isEmptyObject(cache)}};var dataPriv=new Data;var dataUser=new Data;var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function getData(data2){if(data2==="true"){return true}if(data2==="false"){return false}if(data2==="null"){return null}if(data2===+data2+""){return+data2}if(rbrace.test(data2)){return JSON.parse(data2)}return data2}function dataAttr(elem,key2,data2){var name;if(data2===void 0&&elem.nodeType===1){name="data-"+key2.replace(rmultiDash,"-$&").toLowerCase();data2=elem.getAttribute(name);if(typeof data2==="string"){try{data2=getData(data2)}catch(e2){}dataUser.set(elem,key2,data2)}else{data2=void 0}}return data2}jQuery2.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem)},data:function(elem,name,data2){return dataUser.access(elem,name,data2)},removeData:function(elem,name){dataUser.remove(elem,name)},_data:function(elem,name,data2){return dataPriv.access(elem,name,data2)},_removeData:function(elem,name){dataPriv.remove(elem,name)}});jQuery2.fn.extend({data:function(key2,value){var i2,name,data2,elem=this[0],attrs2=elem&&elem.attributes;if(key2===void 0){if(this.length){data2=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i2=attrs2.length;while(i2--){if(attrs2[i2]){name=attrs2[i2].name;if(name.indexOf("data-")===0){name=camelCase(name.slice(5));dataAttr(elem,name,data2[name])}}}dataPriv.set(elem,"hasDataAttrs",true)}}return data2}if(typeof key2==="object"){return this.each(function(){dataUser.set(this,key2)})}return access(this,function(value2){var data3;if(elem&&value2===void 0){data3=dataUser.get(elem,key2);if(data3!==void 0){return data3}data3=dataAttr(elem,key2);if(data3!==void 0){return data3}return}this.each(function(){dataUser.set(this,key2,value2)})},null,value,arguments.length>1,null,true)},removeData:function(key2){return this.each(function(){dataUser.remove(this,key2)})}});jQuery2.extend({queue:function(elem,type2,data2){var queue;if(elem){type2=(type2||"fx")+"queue";queue=dataPriv.get(elem,type2);if(data2){if(!queue||Array.isArray(data2)){queue=dataPriv.access(elem,type2,jQuery2.makeArray(data2))}else{queue.push(data2)}}return queue||[]}},dequeue:function(elem,type2){type2=type2||"fx";var queue=jQuery2.queue(elem,type2),startLength=queue.length,fn2=queue.shift(),hooks=jQuery2._queueHooks(elem,type2),next=function(){jQuery2.dequeue(elem,type2)};if(fn2==="inprogress"){fn2=queue.shift();startLength--}if(fn2){if(type2==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn2.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type2){var key2=type2+"queueHooks";return dataPriv.get(elem,key2)||dataPriv.access(elem,key2,{empty:jQuery2.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type2+"queue",key2])})})}});jQuery2.fn.extend({queue:function(type2,data2){var setter=2;if(typeof type2!=="string"){data2=type2;type2="fx";setter--}if(arguments.length<setter){return jQuery2.queue(this[0],type2)}return data2===void 0?this:this.each(function(){var queue=jQuery2.queue(this,type2,data2);jQuery2._queueHooks(this,type2);if(type2==="fx"&&queue[0]!=="inprogress"){jQuery2.dequeue(this,type2)}})},dequeue:function(type2){return this.each(function(){jQuery2.dequeue(this,type2)})},clearQueue:function(type2){return this.queue(type2||"fx",[])},promise:function(type2,obj){var tmp,count=1,defer2=jQuery2.Deferred(),elements=this,i2=this.length,resolve=function(){if(!--count){defer2.resolveWith(elements,[elements])}};if(typeof type2!=="string"){obj=type2;type2=void 0}type2=type2||"fx";while(i2--){tmp=dataPriv.get(elements[i2],type2+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer2.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var documentElement=document2.documentElement;var isAttached=function(elem){return jQuery2.contains(elem.ownerDocument,elem)},composed={composed:true};if(documentElement.getRootNode){isAttached=function(elem){return jQuery2.contains(elem.ownerDocument,elem)||elem.getRootNode(composed)===elem.ownerDocument}}var isHiddenWithinTree=function(elem,el2){elem=el2||elem;return elem.style.display==="none"||elem.style.display===""&&isAttached(elem)&&jQuery2.css(elem,"display")==="none"};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery2.css(elem,prop,"")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery2.cssNumber[prop]?"":"px"),initialInUnit=elem.nodeType&&(jQuery2.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery2.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){initial=initial/2;unit=unit||initialInUnit[3];initialInUnit=+initial||1;while(maxIterations--){jQuery2.style(elem,prop,initialInUnit+unit);if((1-scale)*(1-(scale=currentValue()/initial||.5))<=0){maxIterations=0}initialInUnit=initialInUnit/scale}initialInUnit=initialInUnit*2;jQuery2.style(elem,prop,initialInUnit+unit);valueParts=valueParts||[]}if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted}}return adjusted}var defaultDisplayMap={};function getDefaultDisplay(elem){var temp2,doc2=elem.ownerDocument,nodeName2=elem.nodeName,display=defaultDisplayMap[nodeName2];if(display){return display}temp2=doc2.body.appendChild(doc2.createElement(nodeName2));display=jQuery2.css(temp2,"display");temp2.parentNode.removeChild(temp2);if(display==="none"){display="block"}defaultDisplayMap[nodeName2]=display;return display}function showHide(elements,show){var display,elem,values=[],index2=0,length=elements.length;for(;index2<length;index2++){elem=elements[index2];if(!elem.style){continue}display=elem.style.display;if(show){if(display==="none"){values[index2]=dataPriv.get(elem,"display")||null;if(!values[index2]){elem.style.display=""}}if(elem.style.display===""&&isHiddenWithinTree(elem)){values[index2]=getDefaultDisplay(elem)}}else{if(display!=="none"){values[index2]="none";dataPriv.set(elem,"display",display)}}}for(index2=0;index2<length;index2++){if(values[index2]!=null){elements[index2].style.display=values[index2]}}return elements}jQuery2.fn.extend({show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHiddenWithinTree(this)){jQuery2(this).show()}else{jQuery2(this).hide()}})}});var rcheckableType=/^(?:checkbox|radio)$/i;var rtagName=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var rscriptType=/^$|^module$|\/(?:java|ecma)script/i;(function(){var fragment=document2.createDocumentFragment(),div=fragment.appendChild(document2.createElement("div")),input=document2.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;div.innerHTML="<option></option>";support.option=!!div.lastChild})();var wrapMap={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!support.option){wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"]}function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*")}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*")}else{ret=[]}if(tag===void 0||tag&&nodeName(context,tag)){return jQuery2.merge([context],ret)}return ret}function setGlobalEval(elems,refElements){var i2=0,l=elems.length;for(;i2<l;i2++){dataPriv.set(elems[i2],"globalEval",!refElements||dataPriv.get(refElements[i2],"globalEval"))}}var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,attached,j,fragment=context.createDocumentFragment(),nodes2=[],i2=0,l=elems.length;for(;i2<l;i2++){elem=elems[i2];if(elem||elem===0){if(toType(elem)==="object"){jQuery2.merge(nodes2,elem.nodeType?[elem]:elem)}else if(!rhtml.test(elem)){nodes2.push(context.createTextNode(elem))}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery2.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery2.merge(nodes2,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}fragment.textContent="";i2=0;while(elem=nodes2[i2++]){if(selection&&jQuery2.inArray(elem,selection)>-1){if(ignored){ignored.push(elem)}continue}attached=isAttached(elem);tmp=getAll(fragment.appendChild(elem),"script");if(attached){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment}var rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function on(elem,types2,selector2,data2,fn2,one){var origFn,type2;if(typeof types2==="object"){if(typeof selector2!=="string"){data2=data2||selector2;selector2=void 0}for(type2 in types2){on(elem,type2,selector2,data2,types2[type2],one)}return elem}if(data2==null&&fn2==null){fn2=selector2;data2=selector2=void 0}else if(fn2==null){if(typeof selector2==="string"){fn2=data2;data2=void 0}else{fn2=data2;data2=selector2;selector2=void 0}}if(fn2===false){fn2=returnFalse}else if(!fn2){return elem}if(one===1){origFn=fn2;fn2=function(event){jQuery2().off(event);return origFn.apply(this,arguments)};fn2.guid=origFn.guid||(origFn.guid=jQuery2.guid++)}return elem.each(function(){jQuery2.event.add(this,types2,fn2,data2,selector2)})}jQuery2.event={global:{},add:function(elem,types2,handler,data2,selector2){var handleObjIn,eventHandle,tmp,events,t2,handleObj,special,handlers,type2,namespaces,origType,elemData=dataPriv.get(elem);if(!acceptData(elem)){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector2=handleObjIn.selector}if(selector2){jQuery2.find.matchesSelector(documentElement,selector2)}if(!handler.guid){handler.guid=jQuery2.guid++}if(!(events=elemData.events)){events=elemData.events=Object.create(null)}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e2){return typeof jQuery2!=="undefined"&&jQuery2.event.triggered!==e2.type?jQuery2.event.dispatch.apply(elem,arguments):void 0}}types2=(types2||"").match(rnothtmlwhite)||[""];t2=types2.length;while(t2--){tmp=rtypenamespace.exec(types2[t2])||[];type2=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type2){continue}special=jQuery2.event.special[type2]||{};type2=(selector2?special.delegateType:special.bindType)||type2;special=jQuery2.event.special[type2]||{};handleObj=jQuery2.extend({type:type2,origType,data:data2,handler,guid:handler.guid,selector:selector2,needsContext:selector2&&jQuery2.expr.match.needsContext.test(selector2),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type2])){handlers=events[type2]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data2,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type2,eventHandle)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector2){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery2.event.global[type2]=true}},remove:function(elem,types2,handler,selector2,mappedTypes){var j,origCount,tmp,events,t2,handleObj,special,handlers,type2,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return}types2=(types2||"").match(rnothtmlwhite)||[""];t2=types2.length;while(t2--){tmp=rtypenamespace.exec(types2[t2])||[];type2=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type2){for(type2 in events){jQuery2.event.remove(elem,type2+types2[t2],handler,selector2,true)}continue}special=jQuery2.event.special[type2]||{};type2=(selector2?special.delegateType:special.bindType)||type2;handlers=events[type2]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector2||selector2===handleObj.selector||selector2==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery2.removeEvent(elem,type2,elemData.handle)}delete events[type2]}}if(jQuery2.isEmptyObject(events)){dataPriv.remove(elem,"handle events")}},dispatch:function(nativeEvent){var i2,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),event=jQuery2.event.fix(nativeEvent),handlers=(dataPriv.get(this,"events")||Object.create(null))[event.type]||[],special=jQuery2.event.special[event.type]||{};args[0]=event;for(i2=1;i2<arguments.length;i2++){args[i2]=arguments[i2]}event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery2.event.handlers.call(this,event,handlers);i2=0;while((matched=handlerQueue[i2++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||handleObj.namespace===false||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery2.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==void 0){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i2,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!(event.type==="click"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i2=0;i2<delegateCount;i2++){handleObj=handlers[i2];sel=handleObj.selector+" ";if(matchedSelectors[sel]===void 0){matchedSelectors[sel]=handleObj.needsContext?jQuery2(sel,this).index(cur)>-1:jQuery2.find(sel,this,null,[cur]).length}if(matchedSelectors[sel]){matchedHandlers.push(handleObj)}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers})}}}}cur=this;if(delegateCount<handlers.length){handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)})}return handlerQueue},addProp:function(name,hook){Object.defineProperty(jQuery2.Event.prototype,name,{enumerable:true,configurable:true,get:isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent)}}:function(){if(this.originalEvent){return this.originalEvent[name]}},set:function(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value})}})},fix:function(originalEvent){return originalEvent[jQuery2.expando]?originalEvent:new jQuery2.Event(originalEvent)},special:{load:{noBubble:true},click:{setup:function(data2){var el2=this||data2;if(rcheckableType.test(el2.type)&&el2.click&&nodeName(el2,"input")){leverageNative(el2,"click",true)}return false},trigger:function(data2){var el2=this||data2;if(rcheckableType.test(el2.type)&&el2.click&&nodeName(el2,"input")){leverageNative(el2,"click")}return true},_default:function(event){var target=event.target;return rcheckableType.test(target.type)&&target.click&&nodeName(target,"input")&&dataPriv.get(target,"click")||nodeName(target,"a")}},beforeunload:{postDispatch:function(event){if(event.result!==void 0&&event.originalEvent){event.originalEvent.returnValue=event.result}}}}};function leverageNative(el2,type2,isSetup){if(!isSetup){if(dataPriv.get(el2,type2)===void 0){jQuery2.event.add(el2,type2,returnTrue)}return}dataPriv.set(el2,type2,false);jQuery2.event.add(el2,type2,{namespace:false,handler:function(event){var result,saved=dataPriv.get(this,type2);if(event.isTrigger&1&&this[type2]){if(!saved){saved=slice.call(arguments);dataPriv.set(this,type2,saved);this[type2]();result=dataPriv.get(this,type2);dataPriv.set(this,type2,false);if(saved!==result){event.stopImmediatePropagation();event.preventDefault();return result}}else if((jQuery2.event.special[type2]||{}).delegateType){event.stopPropagation()}}else if(saved){dataPriv.set(this,type2,jQuery2.event.trigger(saved[0],saved.slice(1),this));event.stopPropagation();event.isImmediatePropagationStopped=returnTrue}}})}jQuery2.removeEvent=function(elem,type2,handle){if(elem.removeEventListener){elem.removeEventListener(type2,handle)}};jQuery2.Event=function(src,props2){if(!(this instanceof jQuery2.Event)){return new jQuery2.Event(src,props2)}if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===void 0&&src.returnValue===false?returnTrue:returnFalse;this.target=src.target&&src.target.nodeType===3?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget}else{this.type=src}if(props2){jQuery2.extend(this,props2)}this.timeStamp=src&&src.timeStamp||Date.now();this[jQuery2.expando]=true};jQuery2.Event.prototype={constructor:jQuery2.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function(){var e2=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e2&&!this.isSimulated){e2.preventDefault()}},stopPropagation:function(){var e2=this.originalEvent;this.isPropagationStopped=returnTrue;if(e2&&!this.isSimulated){e2.stopPropagation()}},stopImmediatePropagation:function(){var e2=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e2&&!this.isSimulated){e2.stopImmediatePropagation()}this.stopPropagation()}};jQuery2.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,"char":true,code:true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:true},jQuery2.event.addProp);jQuery2.each({focus:"focusin",blur:"focusout"},function(type2,delegateType){function focusMappedHandler(nativeEvent){if(document2.documentMode){var handle=dataPriv.get(this,"handle"),event=jQuery2.event.fix(nativeEvent);event.type=nativeEvent.type==="focusin"?"focus":"blur";event.isSimulated=true;handle(nativeEvent);if(event.target===event.currentTarget){handle(event)}}else{jQuery2.event.simulate(delegateType,nativeEvent.target,jQuery2.event.fix(nativeEvent))}}jQuery2.event.special[type2]={setup:function(){var attaches;leverageNative(this,type2,true);if(document2.documentMode){attaches=dataPriv.get(this,delegateType);if(!attaches){this.addEventListener(delegateType,focusMappedHandler)}dataPriv.set(this,delegateType,(attaches||0)+1)}else{return false}},trigger:function(){leverageNative(this,type2);return true},teardown:function(){var attaches;if(document2.documentMode){attaches=dataPriv.get(this,delegateType)-1;if(!attaches){this.removeEventListener(delegateType,focusMappedHandler);dataPriv.remove(this,delegateType)}else{dataPriv.set(this,delegateType,attaches)}}else{return false}},_default:function(event){return dataPriv.get(event.target,type2)},delegateType};jQuery2.event.special[delegateType]={setup:function(){var doc2=this.ownerDocument||this.document||this,dataHolder=document2.documentMode?this:doc2,attaches=dataPriv.get(dataHolder,delegateType);if(!attaches){if(document2.documentMode){this.addEventListener(delegateType,focusMappedHandler)}else{doc2.addEventListener(type2,focusMappedHandler,true)}}dataPriv.set(dataHolder,delegateType,(attaches||0)+1)},teardown:function(){var doc2=this.ownerDocument||this.document||this,dataHolder=document2.documentMode?this:doc2,attaches=dataPriv.get(dataHolder,delegateType)-1;if(!attaches){if(document2.documentMode){this.removeEventListener(delegateType,focusMappedHandler)}else{doc2.removeEventListener(type2,focusMappedHandler,true)}dataPriv.remove(dataHolder,delegateType)}else{dataPriv.set(dataHolder,delegateType,attaches)}}}});jQuery2.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery2.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||related!==target&&!jQuery2.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});jQuery2.fn.extend({on:function(types2,selector2,data2,fn2){return on(this,types2,selector2,data2,fn2)},one:function(types2,selector2,data2,fn2){return on(this,types2,selector2,data2,fn2,1)},off:function(types2,selector2,fn2){var handleObj,type2;if(types2&&types2.preventDefault&&types2.handleObj){handleObj=types2.handleObj;jQuery2(types2.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if(typeof types2==="object"){for(type2 in types2){this.off(type2,selector2,types2[type2])}return this}if(selector2===false||typeof selector2==="function"){fn2=selector2;selector2=void 0}if(fn2===false){fn2=returnFalse}return this.each(function(){jQuery2.event.remove(this,types2,fn2,selector2)})}});var rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery2(elem).children("tbody")[0]||elem}return elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){if((elem.type||"").slice(0,5)==="true/"){elem.type=elem.type.slice(5)}else{elem.removeAttribute("type")}return elem}function cloneCopyEvent(src,dest){var i2,l,type2,pdataOld,udataOld,udataCur,events;if(dest.nodeType!==1){return}if(dataPriv.hasData(src)){pdataOld=dataPriv.get(src);events=pdataOld.events;if(events){dataPriv.remove(dest,"handle events");for(type2 in events){for(i2=0,l=events[type2].length;i2<l;i2++){jQuery2.event.add(dest,type2,events[type2][i2])}}}}if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery2.extend({},udataOld);dataUser.set(dest,udataCur)}}function fixInput(src,dest){var nodeName2=dest.nodeName.toLowerCase();if(nodeName2==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked}else if(nodeName2==="input"||nodeName2==="textarea"){dest.defaultValue=src.defaultValue}}function domManip(collection,args,callback,ignored){args=flat(args);var fragment,first,scripts,hasScripts,node,doc2,i2=0,l=collection.length,iNoClone=l-1,value=args[0],valueIsFunction=isFunction(value);if(valueIsFunction||l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value)){return collection.each(function(index2){var self2=collection.eq(index2);if(valueIsFunction){args[0]=value.call(this,index2,self2.html())}domManip(self2,args,callback,ignored)})}if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first||ignored){scripts=jQuery2.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i2<l;i2++){node=fragment;if(i2!==iNoClone){node=jQuery2.clone(node,true,true);if(hasScripts){jQuery2.merge(scripts,getAll(node,"script"))}}callback.call(collection[i2],node,i2)}if(hasScripts){doc2=scripts[scripts.length-1].ownerDocument;jQuery2.map(scripts,restoreScript);for(i2=0;i2<hasScripts;i2++){node=scripts[i2];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery2.contains(doc2,node)){if(node.src&&(node.type||"").toLowerCase()!=="module"){if(jQuery2._evalUrl&&!node.noModule){jQuery2._evalUrl(node.src,{nonce:node.nonce||node.getAttribute("nonce")},doc2)}}else{DOMEval(node.textContent.replace(rcleanScript,""),node,doc2)}}}}}}return collection}function remove(elem,selector2,keepData){var node,nodes2=selector2?jQuery2.filter(selector2,elem):elem,i2=0;for(;(node=nodes2[i2])!=null;i2++){if(!keepData&&node.nodeType===1){jQuery2.cleanData(getAll(node))}if(node.parentNode){if(keepData&&isAttached(node)){setGlobalEval(getAll(node,"script"))}node.parentNode.removeChild(node)}}return elem}jQuery2.extend({htmlPrefilter:function(html){return html},clone:function(elem,dataAndEvents,deepDataAndEvents){var i2,l,srcElements,destElements,clone2=elem.cloneNode(true),inPage=isAttached(elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery2.isXMLDoc(elem)){destElements=getAll(clone2);srcElements=getAll(elem);for(i2=0,l=srcElements.length;i2<l;i2++){fixInput(srcElements[i2],destElements[i2])}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone2);for(i2=0,l=srcElements.length;i2<l;i2++){cloneCopyEvent(srcElements[i2],destElements[i2])}}else{cloneCopyEvent(elem,clone2)}}destElements=getAll(clone2,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone2},cleanData:function(elems){var data2,elem,type2,special=jQuery2.event.special,i2=0;for(;(elem=elems[i2])!==void 0;i2++){if(acceptData(elem)){if(data2=elem[dataPriv.expando]){if(data2.events){for(type2 in data2.events){if(special[type2]){jQuery2.event.remove(elem,type2)}else{jQuery2.removeEvent(elem,type2,data2.handle)}}}elem[dataPriv.expando]=void 0}if(elem[dataUser.expando]){elem[dataUser.expando]=void 0}}}}});jQuery2.fn.extend({detach:function(selector2){return remove(this,selector2,true)},remove:function(selector2){return remove(this,selector2)},text:function(value){return access(this,function(value2){return value2===void 0?jQuery2.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value2}})},null,value,arguments.length)},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},empty:function(){var elem,i2=0;for(;(elem=this[i2])!=null;i2++){if(elem.nodeType===1){jQuery2.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery2.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value2){var elem=this[0]||{},i2=0,l=this.length;if(value2===void 0&&elem.nodeType===1){return elem.innerHTML}if(typeof value2==="string"&&!rnoInnerhtml.test(value2)&&!wrapMap[(rtagName.exec(value2)||["",""])[1].toLowerCase()]){value2=jQuery2.htmlPrefilter(value2);try{for(;i2<l;i2++){elem=this[i2]||{};if(elem.nodeType===1){jQuery2.cleanData(getAll(elem,false));elem.innerHTML=value2}}elem=0}catch(e2){}}if(elem){this.empty().append(value2)}},null,value,arguments.length)},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent2=this.parentNode;if(jQuery2.inArray(this,ignored)<0){jQuery2.cleanData(getAll(this));if(parent2){parent2.replaceChild(elem,this)}}},ignored)}});jQuery2.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery2.fn[name]=function(selector2){var elems,ret=[],insert=jQuery2(selector2),last=insert.length-1,i2=0;for(;i2<=last;i2++){elems=i2===last?this:this.clone(true);jQuery2(insert[i2])[original](elems);push.apply(ret,elems.get())}return this.pushStack(ret)}});var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var rcustomProp=/^--/;var getStyles=function(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window2}return view.getComputedStyle(elem)};var swap=function(elem,options,callback){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.call(elem);for(name in options){elem.style[name]=old[name]}return ret};var rboxStyle=new RegExp(cssExpand.join("|"),"i");(function(){function computeStyleTests(){if(!div){return}container.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";div.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";documentElement.appendChild(container).appendChild(div);var divStyle=window2.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;div.style.right="60%";pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;div.style.position="absolute";scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12;documentElement.removeChild(container);div=null}function roundPixelMeasures(measure){return Math.round(parseFloat(measure))}var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,reliableTrDimensionsVal,reliableMarginLeftVal,container=document2.createElement("div"),div=document2.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";jQuery2.extend(support,{boxSizingReliable:function(){computeStyleTests();return boxSizingReliableVal},pixelBoxStyles:function(){computeStyleTests();return pixelBoxStylesVal},pixelPosition:function(){computeStyleTests();return pixelPositionVal},reliableMarginLeft:function(){computeStyleTests();return reliableMarginLeftVal},scrollboxSize:function(){computeStyleTests();return scrollboxSizeVal},reliableTrDimensions:function(){var table,tr,trChild,trStyle;if(reliableTrDimensionsVal==null){table=document2.createElement("table");tr=document2.createElement("tr");trChild=document2.createElement("div");table.style.cssText="position:absolute;left:-11111px;border-collapse:separate";tr.style.cssText="box-sizing:content-box;border:1px solid";tr.style.height="1px";trChild.style.height="9px";trChild.style.display="block";documentElement.appendChild(table).appendChild(tr).appendChild(trChild);trStyle=window2.getComputedStyle(tr);reliableTrDimensionsVal=parseInt(trStyle.height,10)+parseInt(trStyle.borderTopWidth,10)+parseInt(trStyle.borderBottomWidth,10)===tr.offsetHeight;documentElement.removeChild(table)}return reliableTrDimensionsVal}})})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,isCustomProp=rcustomProp.test(name),style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name];if(isCustomProp&&ret){ret=ret.replace(rtrimCSS,"$1")||void 0}if(ret===""&&!isAttached(elem)){ret=jQuery2.style(elem,name)}if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==void 0?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}var cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document2.createElement("div").style,vendorProps={};function vendorPropName(name){var capName=name[0].toUpperCase()+name.slice(1),i2=cssPrefixes.length;while(i2--){name=cssPrefixes[i2]+capName;if(name in emptyStyle){return name}}}function finalPropName(name){var final=jQuery2.cssProps[name]||vendorProps[name];if(final){return final}if(name in emptyStyle){return name}return vendorProps[name]=vendorPropName(name)||name}var rdisplayswap=/^(none|table(?!-c[ea]).+)/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"};function setPositiveNumber(_elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value}function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i2=dimension==="width"?1:0,extra=0,delta=0,marginDelta=0;if(box===(isBorderBox?"border":"content")){return 0}for(;i2<4;i2+=2){if(box==="margin"){marginDelta+=jQuery2.css(elem,box+cssExpand[i2],true,styles)}if(!isBorderBox){delta+=jQuery2.css(elem,"padding"+cssExpand[i2],true,styles);if(box!=="padding"){delta+=jQuery2.css(elem,"border"+cssExpand[i2]+"Width",true,styles)}else{extra+=jQuery2.css(elem,"border"+cssExpand[i2]+"Width",true,styles)}}else{if(box==="content"){delta-=jQuery2.css(elem,"padding"+cssExpand[i2],true,styles)}if(box!=="margin"){delta-=jQuery2.css(elem,"border"+cssExpand[i2]+"Width",true,styles)}}}if(!isBorderBox&&computedVal>=0){delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-computedVal-delta-extra-.5))||0}return delta+marginDelta}function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),boxSizingNeeded=!support.boxSizingReliable()||extra,isBorderBox=boxSizingNeeded&&jQuery2.css(elem,"boxSizing",false,styles)==="border-box",valueIsBorderBox=isBorderBox,val2=curCSS(elem,dimension,styles),offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);if(rnumnonpx.test(val2)){if(!extra){return val2}val2="auto"}if((!support.boxSizingReliable()&&isBorderBox||!support.reliableTrDimensions()&&nodeName(elem,"tr")||val2==="auto"||!parseFloat(val2)&&jQuery2.css(elem,"display",false,styles)==="inline")&&elem.getClientRects().length){isBorderBox=jQuery2.css(elem,"boxSizing",false,styles)==="border-box";valueIsBorderBox=offsetProp in elem;if(valueIsBorderBox){val2=elem[offsetProp]}}val2=parseFloat(val2)||0;return val2+boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val2)+"px"}jQuery2.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{animationIterationCount:true,aspectRatio:true,borderImageSlice:true,columnCount:true,flexGrow:true,flexShrink:true,fontWeight:true,gridArea:true,gridColumn:true,gridColumnEnd:true,gridColumnStart:true,gridRow:true,gridRowEnd:true,gridRowStart:true,lineHeight:true,opacity:true,order:true,orphans:true,scale:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeMiterlimit:true,strokeOpacity:true},cssProps:{},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return}var ret,type2,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery2.cssHooks[name]||jQuery2.cssHooks[origName];if(value!==void 0){type2=typeof value;if(type2==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type2="number"}if(value==null||value!==value){return}if(type2==="number"&&!isCustomProp){value+=ret&&ret[3]||(jQuery2.cssNumber[origName]?"":"px")}if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit"}if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==void 0){if(isCustomProp){style.setProperty(name,value)}else{style[name]=value}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==void 0){return ret}return style[name]}},css:function(elem,name,extra,styles){var val2,num,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery2.cssHooks[name]||jQuery2.cssHooks[origName];if(hooks&&"get"in hooks){val2=hooks.get(elem,true,extra)}if(val2===void 0){val2=curCSS(elem,name,styles)}if(val2==="normal"&&name in cssNormalTransform){val2=cssNormalTransform[name]}if(extra===""||extra){num=parseFloat(val2);return extra===true||isFinite(num)?num||0:val2}return val2}});jQuery2.each(["height","width"],function(_i,dimension){jQuery2.cssHooks[dimension]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery2.css(elem,"display"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra)}):getWidthOrHeight(elem,dimension,extra)}},set:function(elem,value,extra){var matches,styles=getStyles(elem),scrollboxSizeBuggy=!support.scrollboxSize()&&styles.position==="absolute",boxSizingNeeded=scrollboxSizeBuggy||extra,isBorderBox=boxSizingNeeded&&jQuery2.css(elem,"boxSizing",false,styles)==="border-box",subtract=extra?boxModelAdjustment(elem,dimension,extra,isBorderBox,styles):0;if(isBorderBox&&scrollboxSizeBuggy){subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-parseFloat(styles[dimension])-boxModelAdjustment(elem,dimension,"border",false,styles)-.5)}if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[dimension]=value;value=jQuery2.css(elem,dimension)}return setPositiveNumber(elem,value,subtract)}}});jQuery2.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left}))+"px"}});jQuery2.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery2.cssHooks[prefix+suffix]={expand:function(value){var i2=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i2<4;i2++){expanded[prefix+cssExpand[i2]+suffix]=parts[i2]||parts[i2-2]||parts[0]}return expanded}};if(prefix!=="margin"){jQuery2.cssHooks[prefix+suffix].set=setPositiveNumber}});jQuery2.fn.extend({css:function(name,value){return access(this,function(elem,name2,value2){var styles,len,map={},i2=0;if(Array.isArray(name2)){styles=getStyles(elem);len=name2.length;for(;i2<len;i2++){map[name2[i2]]=jQuery2.css(elem,name2[i2],false,styles)}return map}return value2!==void 0?jQuery2.style(elem,name2,value2):jQuery2.css(elem,name2)},name,value,arguments.length>1)}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery2.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery2.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery2.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery2.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop]}result=jQuery2.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result},set:function(tween){if(jQuery2.fx.step[tween.prop]){jQuery2.fx.step[tween.prop](tween)}else if(tween.elem.nodeType===1&&(jQuery2.cssHooks[tween.prop]||tween.elem.style[finalPropName(tween.prop)]!=null)){jQuery2.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery2.easing={linear:function(p){return p},swing:function(p){return .5-Math.cos(p*Math.PI)/2},_default:"swing"};jQuery2.fx=Tween.prototype.init;jQuery2.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document2.hidden===false&&window2.requestAnimationFrame){window2.requestAnimationFrame(schedule)}else{window2.setTimeout(schedule,jQuery2.fx.interval)}jQuery2.fx.tick()}}function createFxNow(){window2.setTimeout(function(){fxNow=void 0});return fxNow=Date.now()}function genFx(type2,includeWidth){var which,i2=0,attrs2={height:type2};includeWidth=includeWidth?1:0;for(;i2<4;i2+=2-includeWidth){which=cssExpand[i2];attrs2["margin"+which]=attrs2["padding"+which]=type2}if(includeWidth){attrs2.opacity=attrs2.width=type2}return attrs2}function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index2=0,length=collection.length;for(;index2<length;index2++){if(tween=collection[index2].call(animation,prop,value)){return tween}}}function defaultPrefilter(elem,props2,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props2||"height"in props2,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery2._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire()}}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery2.queue(elem,"fx").length){hooks.empty.fire()}})})}for(prop in props2){value=props2[prop];if(rfxtypes.test(value)){delete props2[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==void 0){hidden=true}else{continue}}orig[prop]=dataShow&&dataShow[prop]||jQuery2.style(elem,prop)}}propTween=!jQuery2.isEmptyObject(props2);if(!propTween&&jQuery2.isEmptyObject(orig)){return}if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display")}display=jQuery2.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery2.css(elem,"display");showHide([elem])}}if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery2.css(elem,"float")==="none"){if(!propTween){anim.done(function(){style.display=restoreDisplay});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display}}style.display="inline-block"}}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}propTween=false;for(prop in orig){if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden}}else{dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay})}if(toggle){dataShow.hidden=!hidden}if(hidden){showHide([elem],true)}anim.done(function(){if(!hidden){showHide([elem])}dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery2.style(elem,prop,orig[prop])}})}propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0}}}}function propFilter(props2,specialEasing){var index2,name,easing,value,hooks;for(index2 in props2){name=camelCase(index2);easing=specialEasing[name];value=props2[index2];if(Array.isArray(value)){easing=value[1];value=props2[index2]=value[0]}if(index2!==name){props2[name]=value;delete props2[index2]}hooks=jQuery2.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props2[name];for(index2 in value){if(!(index2 in props2)){props2[index2]=value[index2];specialEasing[index2]=easing}}}else{specialEasing[name]=easing}}}function Animation(elem,properties,options){var result,stopped,index2=0,length=Animation.prefilters.length,deferred=jQuery2.Deferred().always(function(){delete tick2.elem}),tick2=function(){if(stopped){return false}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp2=remaining/animation.duration||0,percent=1-temp2,index3=0,length2=animation.tweens.length;for(;index3<length2;index3++){animation.tweens[index3].run(percent)}deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length2){return remaining}if(!length2){deferred.notifyWith(elem,[animation,1,0])}deferred.resolveWith(elem,[animation]);return false},animation=deferred.promise({elem,props:jQuery2.extend({},properties),opts:jQuery2.extend(true,{specialEasing:{},easing:jQuery2.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery2.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function(gotoEnd){var index3=0,length2=gotoEnd?animation.tweens.length:0;if(stopped){return this}stopped=true;for(;index3<length2;index3++){animation.tweens[index3].run(1)}if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd])}else{deferred.rejectWith(elem,[animation,gotoEnd])}return this}}),props2=animation.props;propFilter(props2,animation.opts.specialEasing);for(;index2<length;index2++){result=Animation.prefilters[index2].call(animation,elem,props2,animation.opts);if(result){if(isFunction(result.stop)){jQuery2._queueHooks(animation.elem,animation.opts.queue).stop=result.stop.bind(result)}return result}}jQuery2.map(props2,createTween,animation);if(isFunction(animation.opts.start)){animation.opts.start.call(elem,animation)}animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery2.fx.timer(jQuery2.extend(tick2,{elem,anim:animation,queue:animation.opts.queue}));return animation}jQuery2.Animation=jQuery2.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween}]},tweener:function(props2,callback){if(isFunction(props2)){callback=props2;props2=["*"]}else{props2=props2.match(rnothtmlwhite)}var prop,index2=0,length=props2.length;for(;index2<length;index2++){prop=props2[index2];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback)}},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){if(prepend){Animation.prefilters.unshift(callback)}else{Animation.prefilters.push(callback)}}});jQuery2.speed=function(speed,easing,fn2){var opt=speed&&typeof speed==="object"?jQuery2.extend({},speed):{complete:fn2||!fn2&&easing||isFunction(speed)&&speed,duration:speed,easing:fn2&&easing||easing&&!isFunction(easing)&&easing};if(jQuery2.fx.off){opt.duration=0}else{if(typeof opt.duration!=="number"){if(opt.duration in jQuery2.fx.speeds){opt.duration=jQuery2.fx.speeds[opt.duration]}else{opt.duration=jQuery2.fx.speeds._default}}}if(opt.queue==null||opt.queue===true){opt.queue="fx"}opt.old=opt.complete;opt.complete=function(){if(isFunction(opt.old)){opt.old.call(this)}if(opt.queue){jQuery2.dequeue(this,opt.queue)}};return opt};jQuery2.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery2.isEmptyObject(prop),optall=jQuery2.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery2.extend({},prop),optall);if(empty||dataPriv.get(this,"finish")){anim.stop(true)}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type2,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type2!=="string"){gotoEnd=clearQueue;clearQueue=type2;type2=void 0}if(clearQueue){this.queue(type2||"fx",[])}return this.each(function(){var dequeue=true,index2=type2!=null&&type2+"queueHooks",timers=jQuery2.timers,data2=dataPriv.get(this);if(index2){if(data2[index2]&&data2[index2].stop){stopQueue(data2[index2])}}else{for(index2 in data2){if(data2[index2]&&data2[index2].stop&&rrun.test(index2)){stopQueue(data2[index2])}}}for(index2=timers.length;index2--;){if(timers[index2].elem===this&&(type2==null||timers[index2].queue===type2)){timers[index2].anim.stop(gotoEnd);dequeue=false;timers.splice(index2,1)}}if(dequeue||!gotoEnd){jQuery2.dequeue(this,type2)}})},finish:function(type2){if(type2!==false){type2=type2||"fx"}return this.each(function(){var index2,data2=dataPriv.get(this),queue=data2[type2+"queue"],hooks=data2[type2+"queueHooks"],timers=jQuery2.timers,length=queue?queue.length:0;data2.finish=true;jQuery2.queue(this,type2,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true)}for(index2=timers.length;index2--;){if(timers[index2].elem===this&&timers[index2].queue===type2){timers[index2].anim.stop(true);timers.splice(index2,1)}}for(index2=0;index2<length;index2++){if(queue[index2]&&queue[index2].finish){queue[index2].finish.call(this)}}delete data2.finish})}});jQuery2.each(["toggle","show","hide"],function(_i,name){var cssFn=jQuery2.fn[name];jQuery2.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery2.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props2){jQuery2.fn[name]=function(speed,easing,callback){return this.animate(props2,speed,easing,callback)}});jQuery2.timers=[];jQuery2.fx.tick=function(){var timer,i2=0,timers=jQuery2.timers;fxNow=Date.now();for(;i2<timers.length;i2++){timer=timers[i2];if(!timer()&&timers[i2]===timer){timers.splice(i2--,1)}}if(!timers.length){jQuery2.fx.stop()}fxNow=void 0};jQuery2.fx.timer=function(timer){jQuery2.timers.push(timer);jQuery2.fx.start()};jQuery2.fx.interval=13;jQuery2.fx.start=function(){if(inProgress){return}inProgress=true;schedule()};jQuery2.fx.stop=function(){inProgress=null};jQuery2.fx.speeds={slow:600,fast:200,_default:400};jQuery2.fn.delay=function(time,type2){time=jQuery2.fx?jQuery2.fx.speeds[time]||time:time;type2=type2||"fx";return this.queue(type2,function(next,hooks){var timeout=window2.setTimeout(next,time);hooks.stop=function(){window2.clearTimeout(timeout)}})};(function(){var input=document2.createElement("input"),select=document2.createElement("select"),opt=select.appendChild(document2.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;input=document2.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t"})();var boolHook,attrHandle=jQuery2.expr.attrHandle;jQuery2.fn.extend({attr:function(name,value){return access(this,jQuery2.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery2.removeAttr(this,name)})}});jQuery2.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute==="undefined"){return jQuery2.prop(elem,name,value)}if(nType!==1||!jQuery2.isXMLDoc(elem)){hooks=jQuery2.attrHooks[name.toLowerCase()]||(jQuery2.expr.match.bool.test(name)?boolHook:void 0)}if(value!==void 0){if(value===null){jQuery2.removeAttr(elem,name);return}if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==void 0){return ret}elem.setAttribute(name,value+"");return value}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}ret=jQuery2.find.attr(elem,name);return ret==null?void 0:ret},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val2=elem.value;elem.setAttribute("type",value);if(val2){elem.value=val2}return value}}}},removeAttr:function(elem,value){var name,i2=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i2++]){elem.removeAttribute(name)}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery2.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery2.each(jQuery2.expr.match.bool.source.match(/\w+/g),function(_i,name){var getter=attrHandle[name]||jQuery2.find.attr;attrHandle[name]=function(elem,name2,isXML){var ret,handle,lowercaseName=name2.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name2,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery2.fn.extend({prop:function(name,value){return access(this,jQuery2.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery2.propFix[name]||name]})}});jQuery2.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(nType!==1||!jQuery2.isXMLDoc(elem)){name=jQuery2.propFix[name]||name;hooks=jQuery2.propHooks[name]}if(value!==void 0){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==void 0){return ret}return elem[name]=value}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}return elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery2.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10)}if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0}return-1}}},propFix:{"for":"htmlFor","class":"className"}});if(!support.optSelected){jQuery2.propHooks.selected={get:function(elem){var parent2=elem.parentNode;if(parent2&&parent2.parentNode){parent2.parentNode.selectedIndex}return null},set:function(elem){var parent2=elem.parentNode;if(parent2){parent2.selectedIndex;if(parent2.parentNode){parent2.parentNode.selectedIndex}}}}}jQuery2.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery2.propFix[this.toLowerCase()]=this});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ")}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||""}function classesToArray(value){if(Array.isArray(value)){return value}if(typeof value==="string"){return value.match(rnothtmlwhite)||[]}return[]}jQuery2.fn.extend({addClass:function(value){var classNames,cur,curValue,className,i2,finalValue;if(isFunction(value)){return this.each(function(j){jQuery2(this).addClass(value.call(this,j,getClass(this)))})}classNames=classesToArray(value);if(classNames.length){return this.each(function(){curValue=getClass(this);cur=this.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){for(i2=0;i2<classNames.length;i2++){className=classNames[i2];if(cur.indexOf(" "+className+" ")<0){cur+=className+" "}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){this.setAttribute("class",finalValue)}}})}return this},removeClass:function(value){var classNames,cur,curValue,className,i2,finalValue;if(isFunction(value)){return this.each(function(j){jQuery2(this).removeClass(value.call(this,j,getClass(this)))})}if(!arguments.length){return this.attr("class","")}classNames=classesToArray(value);if(classNames.length){return this.each(function(){curValue=getClass(this);cur=this.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){for(i2=0;i2<classNames.length;i2++){className=classNames[i2];while(cur.indexOf(" "+className+" ")>-1){cur=cur.replace(" "+className+" "," ")}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){this.setAttribute("class",finalValue)}}})}return this},toggleClass:function(value,stateVal){var classNames,className,i2,self2,type2=typeof value,isValidValue=type2==="string"||Array.isArray(value);if(isFunction(value)){return this.each(function(i3){jQuery2(this).toggleClass(value.call(this,i3,getClass(this),stateVal),stateVal)})}if(typeof stateVal==="boolean"&&isValidValue){return stateVal?this.addClass(value):this.removeClass(value)}classNames=classesToArray(value);return this.each(function(){if(isValidValue){self2=jQuery2(this);for(i2=0;i2<classNames.length;i2++){className=classNames[i2];if(self2.hasClass(className)){self2.removeClass(className)}else{self2.addClass(className)}}}else if(value===void 0||type2==="boolean"){className=getClass(this);if(className){dataPriv.set(this,"__className__",className)}if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"")}}})},hasClass:function(selector2){var className,elem,i2=0;className=" "+selector2+" ";while(elem=this[i2++]){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true}}return false}});var rreturn=/\r/g;jQuery2.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery2.valHooks[elem.type]||jQuery2.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==void 0){return ret}ret=elem.value;if(typeof ret==="string"){return ret.replace(rreturn,"")}return ret==null?"":ret}return}valueIsFunction=isFunction(value);return this.each(function(i2){var val2;if(this.nodeType!==1){return}if(valueIsFunction){val2=value.call(this,i2,jQuery2(this).val())}else{val2=value}if(val2==null){val2=""}else if(typeof val2==="number"){val2+=""}else if(Array.isArray(val2)){val2=jQuery2.map(val2,function(value2){return value2==null?"":value2+""})}hooks=jQuery2.valHooks[this.type]||jQuery2.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val2,"value")===void 0){this.value=val2}})}});jQuery2.extend({valHooks:{option:{get:function(elem){var val2=jQuery2.find.attr(elem,"value");return val2!=null?val2:stripAndCollapse(jQuery2.text(elem))}},select:{get:function(elem){var value,option,i2,options=elem.options,index2=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index2+1:options.length;if(index2<0){i2=max}else{i2=one?index2:0}for(;i2<max;i2++){option=options[i2];if((option.selected||i2===index2)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){value=jQuery2(option).val();if(one){return value}values.push(value)}}return values},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery2.makeArray(value),i2=options.length;while(i2--){option=options[i2];if(option.selected=jQuery2.inArray(jQuery2.valHooks.option.get(option),values)>-1){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery2.each(["radio","checkbox"],function(){jQuery2.valHooks[this]={set:function(elem,value){if(Array.isArray(value)){return elem.checked=jQuery2.inArray(jQuery2(elem).val(),value)>-1}}};if(!support.checkOn){jQuery2.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});var location2=window2.location;var nonce={guid:Date.now()};var rquery=/\?/;jQuery2.parseXML=function(data2){var xml,parserErrorElem;if(!data2||typeof data2!=="string"){return null}try{xml=new window2.DOMParser().parseFromString(data2,"text/xml")}catch(e2){}parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0];if(!xml||parserErrorElem){jQuery2.error("Invalid XML: "+(parserErrorElem?jQuery2.map(parserErrorElem.childNodes,function(el2){return el2.textContent}).join("\n"):data2))}return xml};var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e2){e2.stopPropagation()};jQuery2.extend(jQuery2.event,{trigger:function(event,data2,elem,onlyHandlers){var i2,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document2],type2=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=lastElement=tmp=elem=elem||document2;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type2+jQuery2.event.triggered)){return}if(type2.indexOf(".")>-1){namespaces=type2.split(".");type2=namespaces.shift();namespaces.sort()}ontype=type2.indexOf(":")<0&&"on"+type2;event=event[jQuery2.expando]?event:new jQuery2.Event(type2,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=void 0;if(!event.target){event.target=elem}data2=data2==null?[event]:jQuery2.makeArray(data2,[event]);special=jQuery2.event.special[type2]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data2)===false){return}if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){bubbleType=special.delegateType||type2;if(!rfocusMorph.test(bubbleType+type2)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document2)){eventPath.push(tmp.defaultView||tmp.parentWindow||window2)}}i2=0;while((cur=eventPath[i2++])&&!event.isPropagationStopped()){lastElement=cur;event.type=i2>1?bubbleType:special.bindType||type2;handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data2)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data2);if(event.result===false){event.preventDefault()}}}event.type=type2;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data2)===false)&&acceptData(elem)){if(ontype&&isFunction(elem[type2])&&!isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery2.event.triggered=type2;if(event.isPropagationStopped()){lastElement.addEventListener(type2,stopPropagationCallback)}elem[type2]();if(event.isPropagationStopped()){lastElement.removeEventListener(type2,stopPropagationCallback)}jQuery2.event.triggered=void 0;if(tmp){elem[ontype]=tmp}}}}return event.result},simulate:function(type2,elem,event){var e2=jQuery2.extend(new jQuery2.Event,event,{type:type2,isSimulated:true});jQuery2.event.trigger(e2,null,elem)}});jQuery2.fn.extend({trigger:function(type2,data2){return this.each(function(){jQuery2.event.trigger(type2,data2,this)})},triggerHandler:function(type2,data2){var elem=this[0];if(elem){return jQuery2.event.trigger(type2,data2,elem,true)}}});var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery2.each(obj,function(i2,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"&&v!=null?i2:"")+"]",v,traditional,add)}})}else if(!traditional&&toType(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}jQuery2.param=function(a,traditional){var prefix,s=[],add=function(key2,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key2)+"="+encodeURIComponent(value==null?"":value)};if(a==null){return""}if(Array.isArray(a)||a.jquery&&!jQuery2.isPlainObject(a)){jQuery2.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&")};jQuery2.fn.extend({serialize:function(){return jQuery2.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery2.prop(this,"elements");return elements?jQuery2.makeArray(elements):this}).filter(function(){var type2=this.type;return this.name&&!jQuery2(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type2)&&(this.checked||!rcheckableType.test(type2))}).map(function(_i,elem){var val2=jQuery2(this).val();if(val2==null){return null}if(Array.isArray(val2)){return jQuery2.map(val2,function(val3){return{name:elem.name,value:val3.replace(rCRLF,"\r\n")}})}return{name:elem.name,value:val2.replace(rCRLF,"\r\n")}}).get()}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document2.createElement("a");originAnchor.href=location2.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i2=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func)){while(dataType=dataTypes[i2++]){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery2.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else if(seekingTransport){return!(selected=dataTypeOrTransport)}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key2,deep,flatOptions=jQuery2.ajaxSettings.flatOptions||{};for(key2 in src){if(src[key2]!==void 0){(flatOptions[key2]?target:deep||(deep={}))[key2]=src[key2]}}if(deep){jQuery2.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type2,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===void 0){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type2 in contents){if(contents[type2]&&contents[type2].test(ct)){dataTypes.unshift(type2);break}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0]}else{for(type2 in responses){if(!dataTypes[0]||s.converters[type2+" "+dataTypes[0]]){finalDataType=type2;break}if(!firstDataType){firstDataType=type2}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}}if(conv!==true){if(conv&&s.throws){response=conv(response)}else{try{response=conv(response)}catch(e2){return{state:"parsererror",error:conv?e2:"No conversion from "+prev+" to "+current}}}}}}}return{state:"success",data:response}}jQuery2.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location2.href,type:"GET",isLocal:rlocalProtocol.test(location2.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery2.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings2){return settings2?ajaxExtend(ajaxExtend(target,jQuery2.ajaxSettings),settings2):ajaxExtend(jQuery2.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=void 0}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed2,fireGlobals,i2,uncached,s=jQuery2.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery2(callbackContext):jQuery2.event,deferred=jQuery2.Deferred(),completeDeferred=jQuery2.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key2){var match;if(completed2){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()+" "]=(responseHeaders[match[1].toLowerCase()+" "]||[]).concat(match[2])}}match=responseHeaders[key2.toLowerCase()+" "]}return match==null?null:match.join(", ")},getAllResponseHeaders:function(){return completed2?responseHeadersString:null},setRequestHeader:function(name,value){if(completed2==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type2){if(completed2==null){s.mimeType=type2}return this},statusCode:function(map){var code;if(map){if(completed2){jqXHR.always(map[jqXHR.status])}else{for(code in map){statusCode[code]=[statusCode[code],map[code]]}}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR);s.url=((url||s.url||location2.href)+"").replace(rprotocol,location2.protocol+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];if(s.crossDomain==null){urlAnchor=document2.createElement("a");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host}catch(e2){s.crossDomain=true}}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery2.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed2){return jqXHR}fireGlobals=jQuery2.event&&s.global;if(fireGlobals&&jQuery2.active++===0){jQuery2.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,"");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data&&(s.processData||typeof s.data==="string")){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data}if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce.guid+++uncached}s.url=cacheURL+uncached}else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+")}if(s.ifModified){if(jQuery2.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery2.lastModified[cacheURL])}if(jQuery2.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery2.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i2 in s.headers){jqXHR.setRequestHeader(i2,s.headers[i2])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed2)){return jqXHR.abort()}strAbort="abort";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(completed2){return jqXHR}if(s.async&&s.timeout>0){timeoutTimer=window2.setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{completed2=false;transport.send(requestHeaders,done)}catch(e2){if(completed2){throw e2}done(-1,e2)}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed2){return}completed2=true;if(timeoutTimer){window2.clearTimeout(timeoutTimer)}transport=void 0;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}if(!isSuccess&&jQuery2.inArray("script",s.dataTypes)>-1&&jQuery2.inArray("json",s.dataTypes)<0){s.converters["text script"]=function(){}}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery2.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery2.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=void 0;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!--jQuery2.active){jQuery2.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data2,callback){return jQuery2.get(url,data2,callback,"json")},getScript:function(url,callback){return jQuery2.get(url,void 0,callback,"script")}});jQuery2.each(["get","post"],function(_i,method){jQuery2[method]=function(url,data2,callback,type2){if(isFunction(data2)){type2=type2||callback;callback=data2;data2=void 0}return jQuery2.ajax(jQuery2.extend({url,type:method,dataType:type2,data:data2,success:callback},jQuery2.isPlainObject(url)&&url))}});jQuery2.ajaxPrefilter(function(s){var i2;for(i2 in s.headers){if(i2.toLowerCase()==="content-type"){s.contentType=s.headers[i2]||""}}});jQuery2._evalUrl=function(url,options,doc2){return jQuery2.ajax({url,type:"GET",dataType:"script",cache:true,async:false,global:false,converters:{"text script":function(){}},dataFilter:function(response){jQuery2.globalEval(response,options,doc2)}})};jQuery2.fn.extend({wrapAll:function(html){var wrap;if(this[0]){if(isFunction(html)){html=html.call(this[0])}wrap=jQuery2(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(isFunction(html)){return this.each(function(i2){jQuery2(this).wrapInner(html.call(this,i2))})}return this.each(function(){var self2=jQuery2(this),contents=self2.contents();if(contents.length){contents.wrapAll(html)}else{self2.append(html)}})},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each(function(i2){jQuery2(this).wrapAll(htmlIsFunction?html.call(this,i2):html)})},unwrap:function(selector2){this.parent(selector2).not("body").each(function(){jQuery2(this).replaceWith(this.childNodes)});return this}});jQuery2.expr.pseudos.hidden=function(elem){return!jQuery2.expr.pseudos.visible(elem)};jQuery2.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)};jQuery2.ajaxSettings.xhr=function(){try{return new window2.XMLHttpRequest}catch(e2){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery2.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery2.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i2,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i2 in options.xhrFields){xhr[i2]=options.xhrFields[i2]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i2 in headers){xhr.setRequestHeader(i2,headers[i2])}callback=function(type2){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type2==="abort"){xhr.abort()}else if(type2==="error"){if(typeof xhr.status!=="number"){complete(0,"error")}else{complete(xhr.status,xhr.statusText)}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders())}}}};xhr.onload=callback();errorCallback=xhr.onerror=xhr.ontimeout=callback("error");if(xhr.onabort!==void 0){xhr.onabort=errorCallback}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window2.setTimeout(function(){if(callback){errorCallback()}})}}}callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e2){if(callback){throw e2}}},abort:function(){if(callback){callback()}}}}});jQuery2.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false}});jQuery2.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){jQuery2.globalEval(text);return text}}});jQuery2.ajaxPrefilter("script",function(s){if(s.cache===void 0){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery2.ajaxTransport("script",function(s){if(s.crossDomain||s.scriptAttrs){var script,callback;return{send:function(_,complete){script=jQuery2("<script>").attr(s.scriptAttrs||{}).prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type)}});document2.head.appendChild(script[0])},abort:function(){if(callback){callback()}}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery2.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery2.expando+"_"+nonce.guid++;this[callback]=true;return callback}});jQuery2.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName)}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName}s.converters["script json"]=function(){if(!responseContainer){jQuery2.error(callbackName+" was not called")}return responseContainer[0]};s.dataTypes[0]="json";overwritten=window2[callbackName];window2[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){if(overwritten===void 0){jQuery2(window2).removeProp(callbackName)}else{window2[callbackName]=overwritten}if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&isFunction(overwritten)){overwritten(responseContainer[0])}responseContainer=overwritten=void 0});return"script"}});support.createHTMLDocument=(function(){var body=document2.implementation.createHTMLDocument("").body;body.innerHTML="<form></form><form></form>";return body.childNodes.length===2})();jQuery2.parseHTML=function(data2,context,keepScripts){if(typeof data2!=="string"){return[]}if(typeof context==="boolean"){keepScripts=context;context=false}var base,parsed,scripts;if(!context){if(support.createHTMLDocument){context=document2.implementation.createHTMLDocument("");base=context.createElement("base");base.href=document2.location.href;context.head.appendChild(base)}else{context=document2}}parsed=rsingleTag.exec(data2);scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])]}parsed=buildFragment([data2],context,scripts);if(scripts&&scripts.length){jQuery2(scripts).remove()}return jQuery2.merge([],parsed.childNodes)};jQuery2.fn.load=function(url,params,callback){var selector2,type2,response,self2=this,off=url.indexOf(" ");if(off>-1){selector2=stripAndCollapse(url.slice(off));url=url.slice(0,off)}if(isFunction(params)){callback=params;params=void 0}else if(params&&typeof params==="object"){type2="POST"}if(self2.length>0){jQuery2.ajax({url,type:type2||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments;self2.html(selector2?jQuery2("<div>").append(jQuery2.parseHTML(responseText)).find(selector2):responseText)}).always(callback&&function(jqXHR,status){self2.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR])})})}return this};jQuery2.expr.pseudos.animated=function(elem){return jQuery2.grep(jQuery2.timers,function(fn2){return elem===fn2.elem}).length};jQuery2.offset={setOffset:function(elem,options,i2){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery2.css(elem,"position"),curElem=jQuery2(elem),props2={};if(position==="static"){elem.style.position="relative"}curOffset=curElem.offset();curCSSTop=jQuery2.css(elem,"top");curCSSLeft=jQuery2.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0}if(isFunction(options)){options=options.call(elem,i2,jQuery2.extend({},curOffset))}if(options.top!=null){props2.top=options.top-curOffset.top+curTop}if(options.left!=null){props2.left=options.left-curOffset.left+curLeft}if("using"in options){options.using.call(elem,props2)}else{curElem.css(props2)}}};jQuery2.fn.extend({offset:function(options){if(arguments.length){return options===void 0?this:this.each(function(i2){jQuery2.offset.setOffset(this,options,i2)})}var rect,win,elem=this[0];if(!elem){return}if(!elem.getClientRects().length){return{top:0,left:0}}rect=elem.getBoundingClientRect();win=elem.ownerDocument.defaultView;return{top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset}},position:function(){if(!this[0]){return}var offsetParent,offset,doc2,elem=this[0],parentOffset={top:0,left:0};if(jQuery2.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect()}else{offset=this.offset();doc2=elem.ownerDocument;offsetParent=elem.offsetParent||doc2.documentElement;while(offsetParent&&(offsetParent===doc2.body||offsetParent===doc2.documentElement)&&jQuery2.css(offsetParent,"position")==="static"){offsetParent=offsetParent.parentNode}if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){parentOffset=jQuery2(offsetParent).offset();parentOffset.top+=jQuery2.css(offsetParent,"borderTopWidth",true);parentOffset.left+=jQuery2.css(offsetParent,"borderLeftWidth",true)}}return{top:offset.top-parentOffset.top-jQuery2.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery2.css(elem,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery2.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent}return offsetParent||documentElement})}});jQuery2.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery2.fn[method]=function(val2){return access(this,function(elem,method2,val3){var win;if(isWindow(elem)){win=elem}else if(elem.nodeType===9){win=elem.defaultView}if(val3===void 0){return win?win[prop]:elem[method2]}if(win){win.scrollTo(!top?val3:win.pageXOffset,top?val3:win.pageYOffset)}else{elem[method2]=val3}},method,val2,arguments.length)}});jQuery2.each(["top","left"],function(_i,prop){jQuery2.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery2(elem).position()[prop]+"px":computed}})});jQuery2.each({Height:"height",Width:"width"},function(name,type2){jQuery2.each({padding:"inner"+name,content:type2,"":"outer"+name},function(defaultExtra,funcName){jQuery2.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type3,value2){var doc2;if(isWindow(elem)){return funcName.indexOf("outer")===0?elem["inner"+name]:elem.document.documentElement["client"+name]}if(elem.nodeType===9){doc2=elem.documentElement;return Math.max(elem.body["scroll"+name],doc2["scroll"+name],elem.body["offset"+name],doc2["offset"+name],doc2["client"+name])}return value2===void 0?jQuery2.css(elem,type3,extra):jQuery2.style(elem,type3,value2,extra)},type2,chainable?margin:void 0,chainable)}})});jQuery2.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_i,type2){jQuery2.fn[type2]=function(fn2){return this.on(type2,fn2)}});jQuery2.fn.extend({bind:function(types2,data2,fn2){return this.on(types2,null,data2,fn2)},unbind:function(types2,fn2){return this.off(types2,null,fn2)},delegate:function(selector2,types2,data2,fn2){return this.on(types2,selector2,data2,fn2)},undelegate:function(selector2,types2,fn2){return arguments.length===1?this.off(selector2,"**"):this.off(types2,selector2||"**",fn2)},hover:function(fnOver,fnOut){return this.on("mouseenter",fnOver).on("mouseleave",fnOut||fnOver)}});jQuery2.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(_i,name){jQuery2.fn[name]=function(data2,fn2){return arguments.length>0?this.on(name,null,data2,fn2):this.trigger(name)}});var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;jQuery2.proxy=function(fn2,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn2[context];context=fn2;fn2=tmp}if(!isFunction(fn2)){return void 0}args=slice.call(arguments,2);proxy=function(){return fn2.apply(context||this,args.concat(slice.call(arguments)))};proxy.guid=fn2.guid=fn2.guid||jQuery2.guid++;return proxy};jQuery2.holdReady=function(hold){if(hold){jQuery2.readyWait++}else{jQuery2.ready(true)}};jQuery2.isArray=Array.isArray;jQuery2.parseJSON=JSON.parse;jQuery2.nodeName=nodeName;jQuery2.isFunction=isFunction;jQuery2.isWindow=isWindow;jQuery2.camelCase=camelCase;jQuery2.type=toType;jQuery2.now=Date.now;jQuery2.isNumeric=function(obj){var type2=jQuery2.type(obj);return(type2==="number"||type2==="string")&&!isNaN(obj-parseFloat(obj))};jQuery2.trim=function(text){return text==null?"":(text+"").replace(rtrim,"$1")};if(typeof define==="function"&&define.amd){define("jquery",[],function(){return jQuery2})}var _jQuery=window2.jQuery,_$=window2.$;jQuery2.noConflict=function(deep){if(window2.$===jQuery2){window2.$=_$}if(deep&&window2.jQuery===jQuery2){window2.jQuery=_jQuery}return jQuery2};if(typeof noGlobal==="undefined"){window2.jQuery=window2.$=jQuery2}return jQuery2});;jQuery.fn.hasAttr=function(name){return!!(this[0]&&this[0].getAttribute(name)!=null)};;/*!
|
|
11
|
+
* Select2 4.1.0
|
|
12
|
+
* https://select2.github.io
|
|
13
|
+
*
|
|
14
|
+
* Released under the MIT license
|
|
15
|
+
* https://github.com/select2/select2/blob/master/LICENSE.md
|
|
16
|
+
*/;(function(factory18){if(typeof define==="function"&&define.amd){define(["jquery"],factory18)}else if(typeof module==="object"&&module.exports){module.exports=function(root,jQuery2){if(jQuery2===void 0){if(typeof window!=="undefined"){jQuery2=require("jquery")}else{jQuery2=require("jquery")(root)}}factory18(jQuery2);return jQuery2}}else{factory18(jQuery)}})(function(jQuery2){var S2=(function(){if(jQuery2&&jQuery2.fn&&jQuery2.fn.select2&&jQuery2.fn.select2.amd){var S22=jQuery2.fn.select2.amd}var S22;(function(){if(!S22||!S22.requirejs){if(!S22){S22={}}else{require2=S22}/**
|
|
17
|
+
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
|
18
|
+
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
|
19
|
+
*/var requirejs,require2,define2;(function(undef){var main,req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop)}function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i2,j,part,normalizedBaseParts,baseParts=baseName&&baseName.split("/"),map=config.map,starMap=map&&map["*"]||{};if(name){name=name.split("/");lastIndex=name.length-1;if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,"")}if(name[0].charAt(0)==="."&&baseParts){normalizedBaseParts=baseParts.slice(0,baseParts.length-1);name=normalizedBaseParts.concat(name)}for(i2=0;i2<name.length;i2++){part=name[i2];if(part==="."){name.splice(i2,1);i2-=1}else if(part===".."){if(i2===0||i2===1&&name[2]===".."||name[i2-1]===".."){continue}else if(i2>0){name.splice(i2-1,2);i2-=2}}}name=name.join("/")}if((baseParts||starMap)&&map){nameParts=name.split("/");for(i2=nameParts.length;i2>0;i2-=1){nameSegment=nameParts.slice(0,i2).join("/");if(baseParts){for(j=baseParts.length;j>0;j-=1){mapValue=map[baseParts.slice(0,j).join("/")];if(mapValue){mapValue=mapValue[nameSegment];if(mapValue){foundMap=mapValue;foundI=i2;break}}}}if(foundMap){break}if(!foundStarMap&&starMap&&starMap[nameSegment]){foundStarMap=starMap[nameSegment];starI=i2}}if(!foundMap&&foundStarMap){foundMap=foundStarMap;foundI=starI}if(foundMap){nameParts.splice(0,foundI,foundMap);name=nameParts.join("/")}}return name}function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);if(typeof args[0]!=="string"&&args.length===1){args.push(null)}return req.apply(undef,args.concat([relName,forceSync]))}}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(depName){return function(value){defined[depName]=value}}function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name];defining[name]=true;main.apply(undef,args)}if(!hasProp(defined,name)&&!hasProp(defining,name)){throw new Error("No "+name)}return defined[name]}function splitPrefix(name){var prefix,index2=name?name.indexOf("!"):-1;if(index2>-1){prefix=name.substring(0,index2);name=name.substring(index2+1,name.length)}return[prefix,name]}function makeRelParts(relName){return relName?splitPrefix(relName):[]}makeMap=function(name,relParts){var plugin,parts=splitPrefix(name),prefix=parts[0],relResourceName=relParts[1];name=parts[1];if(prefix){prefix=normalize(prefix,relResourceName);plugin=callDep(prefix)}if(prefix){if(plugin&&plugin.normalize){name=plugin.normalize(name,makeNormalize(relResourceName))}else{name=normalize(name,relResourceName)}}else{name=normalize(name,relResourceName);parts=splitPrefix(name);prefix=parts[0];name=parts[1];if(prefix){plugin=callDep(prefix)}}return{f:prefix?prefix+"!"+name:name,n:name,pr:prefix,p:plugin}};function makeConfig(name){return function(){return config&&config.config&&config.config[name]||{}}}handlers={require:function(name){return makeRequire(name)},exports:function(name){var e2=defined[name];if(typeof e2!=="undefined"){return e2}else{return defined[name]={}}},module:function(name){return{id:name,uri:"",exports:defined[name],config:makeConfig(name)}}};main=function(name,deps,callback,relName){var cjsModule,depName,ret,map,i2,relParts,args=[],callbackType=typeof callback,usingExports;relName=relName||name;relParts=makeRelParts(relName);if(callbackType==="undefined"||callbackType==="function"){deps=!deps.length&&callback.length?["require","exports","module"]:deps;for(i2=0;i2<deps.length;i2+=1){map=makeMap(deps[i2],relParts);depName=map.f;if(depName==="require"){args[i2]=handlers.require(name)}else if(depName==="exports"){args[i2]=handlers.exports(name);usingExports=true}else if(depName==="module"){cjsModule=args[i2]=handlers.module(name)}else if(hasProp(defined,depName)||hasProp(waiting,depName)||hasProp(defining,depName)){args[i2]=callDep(depName)}else if(map.p){map.p.load(map.n,makeRequire(relName,true),makeLoad(depName),{});args[i2]=defined[depName]}else{throw new Error(name+" missing "+depName)}}ret=callback?callback.apply(defined[name],args):void 0;if(name){if(cjsModule&&cjsModule.exports!==undef&&cjsModule.exports!==defined[name]){defined[name]=cjsModule.exports}else if(ret!==undef||!usingExports){defined[name]=ret}}}else if(name){defined[name]=callback}};requirejs=require2=req=function(deps,callback,relName,forceSync,alt){if(typeof deps==="string"){if(handlers[deps]){return handlers[deps](callback)}return callDep(makeMap(deps,makeRelParts(callback)).f)}else if(!deps.splice){config=deps;if(config.deps){req(config.deps,config.callback)}if(!callback){return}if(callback.splice){deps=callback;callback=relName;relName=null}else{deps=undef}}callback=callback||function(){};if(typeof relName==="function"){relName=forceSync;forceSync=alt}if(forceSync){main(undef,deps,callback,relName)}else{setTimeout(function(){main(undef,deps,callback,relName)},4)}return req};req.config=function(cfg){return req(cfg)};requirejs._defined=defined;define2=function(name,deps,callback){if(typeof name!=="string"){throw new Error("See almond README: incorrect module build, no module name")}if(!deps.splice){callback=deps;deps=[]}if(!hasProp(defined,name)&&!hasProp(waiting,name)){waiting[name]=[name,deps,callback]}};define2.amd={jQuery:true}})();S22.requirejs=requirejs;S22.require=require2;S22.define=define2}})();S22.define("almond",function(){});S22.define("jquery",[],function(){var _$=jQuery2||$;if(_$==null&&console&&console.error){console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page.")}return _$});S22.define("select2/utils",[],function(){var Utils={};Utils.Extend=function(ChildClass,SuperClass){var __hasProp={}.hasOwnProperty;function BaseConstructor(){this.constructor=ChildClass}for(var key2 in SuperClass){if(__hasProp.call(SuperClass,key2)){ChildClass[key2]=SuperClass[key2]}}BaseConstructor.prototype=SuperClass.prototype;ChildClass.prototype=new BaseConstructor;ChildClass.__super__=SuperClass.prototype;return ChildClass};function getMethods(theClass){var proto=theClass.prototype;var methods=[];for(var methodName in proto){var m=proto[methodName];if(typeof m!=="function"){continue}if(methodName==="constructor"){continue}methods.push(methodName)}return methods}Utils.Decorate=function(SuperClass,DecoratorClass){var decoratedMethods=getMethods(DecoratorClass);var superMethods=getMethods(SuperClass);function DecoratedClass(){var unshift=Array.prototype.unshift;var argCount=DecoratorClass.prototype.constructor.length;var calledConstructor=SuperClass.prototype.constructor;if(argCount>0){unshift.call(arguments,SuperClass.prototype.constructor);calledConstructor=DecoratorClass.prototype.constructor}calledConstructor.apply(this,arguments)}DecoratorClass.displayName=SuperClass.displayName;function ctr(){this.constructor=DecoratedClass}DecoratedClass.prototype=new ctr;for(var m=0;m<superMethods.length;m++){var superMethod=superMethods[m];DecoratedClass.prototype[superMethod]=SuperClass.prototype[superMethod]}var calledMethod=function(methodName){var originalMethod=function(){};if(methodName in DecoratedClass.prototype){originalMethod=DecoratedClass.prototype[methodName]}var decoratedMethod2=DecoratorClass.prototype[methodName];return function(){var unshift=Array.prototype.unshift;unshift.call(arguments,originalMethod);return decoratedMethod2.apply(this,arguments)}};for(var d=0;d<decoratedMethods.length;d++){var decoratedMethod=decoratedMethods[d];DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod)}return DecoratedClass};var Observable=function(){this.listeners={}};Observable.prototype.on=function(event,callback){this.listeners=this.listeners||{};if(event in this.listeners){this.listeners[event].push(callback)}else{this.listeners[event]=[callback]}};Observable.prototype.trigger=function(event){var slice=Array.prototype.slice;var params=slice.call(arguments,1);this.listeners=this.listeners||{};if(params==null){params=[]}if(params.length===0){params.push({})}params[0]._type=event;if(event in this.listeners){this.invoke(this.listeners[event],slice.call(arguments,1))}if("*"in this.listeners){this.invoke(this.listeners["*"],arguments)}};Observable.prototype.invoke=function(listeners,params){for(var i2=0,len=listeners.length;i2<len;i2++){listeners[i2].apply(this,params)}};Utils.Observable=Observable;Utils.generateChars=function(length){var chars="";for(var i2=0;i2<length;i2++){var randomChar=Math.floor(Math.random()*36);chars+=randomChar.toString(36)}return chars};Utils.bind=function(func,context){return function(){func.apply(context,arguments)}};Utils._convertData=function(data2){for(var originalKey in data2){var keys=originalKey.split("-");var dataLevel=data2;if(keys.length===1){continue}for(var k=0;k<keys.length;k++){var key2=keys[k];key2=key2.substring(0,1).toLowerCase()+key2.substring(1);if(!(key2 in dataLevel)){dataLevel[key2]={}}if(k==keys.length-1){dataLevel[key2]=data2[originalKey]}dataLevel=dataLevel[key2]}delete data2[originalKey]}return data2};Utils.hasScroll=function(index2,el2){var overflowX=el2.style.overflowX;var overflowY=el2.style.overflowY;if(overflowX===overflowY&&(overflowY==="hidden"||overflowY==="visible")){return false}if(overflowX==="scroll"||overflowY==="scroll"){return true}var computedEl=window.getComputedStyle(el2);return parseFloat(computedEl.height)<el2.scrollHeight||parseFloat(computedEl.width)<el2.scrollWidth};Utils.escapeMarkup=function(markup){var replaceMap={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if(typeof markup!=="string"){return markup}return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replaceMap[match]})};Utils.__cache={};var id2=0;Utils.GetUniqueElementId=function(element){var select2Id=element.getAttribute("data-select2-id");if(select2Id!=null){return select2Id}if(element.id){select2Id="select2-data-"+element.id}else{select2Id="select2-data-"+(++id2).toString()+"-"+Utils.generateChars(4)}element.setAttribute("data-select2-id",select2Id);return select2Id};Utils.StoreData=function(element,name,value){var id3=Utils.GetUniqueElementId(element);if(!Utils.__cache[id3]){Utils.__cache[id3]={}}Utils.__cache[id3][name]=value};Utils.GetData=function(element,name){var id3=Utils.GetUniqueElementId(element);if(name){var datasetKey=name.replace(/-([a-z])/g,function(_,letter){return letter.toUpperCase()});if(Utils.__cache[id3]){if(Utils.__cache[id3][name]!=null){return Utils.__cache[id3][name]}return element.dataset[datasetKey]}return element.dataset[datasetKey]}else{return Utils.__cache[id3]}};Utils.RemoveData=function(element){var id3=Utils.GetUniqueElementId(element);if(Utils.__cache[id3]!=null){delete Utils.__cache[id3]}element.removeAttribute("data-select2-id")};Utils.copyNonInternalCssClasses=function(dest,src){var classes;var destinationClasses=dest.getAttribute("class").trim().split(/\s+/);destinationClasses=destinationClasses.filter(function(clazz){return clazz.indexOf("select2-")===0});var sourceClasses=src.getAttribute("class").trim().split(/\s+/);sourceClasses=sourceClasses.filter(function(clazz){return clazz.indexOf("select2-")!==0});var replacements=destinationClasses.concat(sourceClasses);dest.setAttribute("class",replacements.join(" "))};return Utils});S22.define("select2/results",["jquery","./utils"],function($2,Utils){function Results($element,options,dataAdapter){this.$element=$element;this.data=dataAdapter;this.options=options;Results.__super__.constructor.call(this)}Utils.Extend(Results,Utils.Observable);Results.prototype.render=function(){var $results=$2('<ul class="select2-results__options" role="listbox"></ul>');if(this.options.get("multiple")){$results[0].setAttribute("aria-multiselectable","true")}this.$results=$results;return $results};Results.prototype.clear=function(){this.$results.empty()};Results.prototype.displayMessage=function(params){var escapeMarkup=this.options.get("escapeMarkup");this.clear();this.hideLoading();var $message=$2('<li role="alert" aria-live="assertive" class="select2-results__option"></li>');var message=this.options.get("translations").get(params.message);$message.append(escapeMarkup(message(params.args)));$message[0].className+=" select2-results__message";this.$results.append($message)};Results.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()};Results.prototype.append=function(data2){this.hideLoading();var $options=[];if(data2.results==null||data2.results.length===0){if(this.$results.children().length===0){this.trigger("results:message",{message:"noResults"})}return}data2.results=this.sort(data2.results);for(var d=0;d<data2.results.length;d++){var item=data2.results[d];var $option=this.option(item);$options.push($option)}this.$results.append($options)};Results.prototype.position=function($results,$dropdown){var $resultsContainer=$dropdown.find(".select2-results");$resultsContainer.append($results)};Results.prototype.sort=function(data2){var sorter=this.options.get("sorter");return sorter(data2)};Results.prototype.highlightFirstItem=function(){var $options=this.$results.find(".select2-results__option--selectable");var $selected=$options.filter(".select2-results__option--selected");if($selected.length>0){$selected.first().trigger("mouseenter")}else{$options.first().trigger("mouseenter")}this.ensureHighlightVisible()};Results.prototype.setClasses=function(){var self2=this;this.data.current(function(selected){var selectedIds=selected.map(function(s){return s.id.toString()});var $options=self2.$results.find(".select2-results__option--selectable");$options.each(function(){var $option=$2(this);var item=Utils.GetData(this,"data");var id2=""+item.id;if(item.element!=null&&item.element.selected||item.element==null&&selectedIds.indexOf(id2)>-1){this.classList.add("select2-results__option--selected");$option[0].setAttribute("aria-selected","true")}else{this.classList.remove("select2-results__option--selected");$option[0].setAttribute("aria-selected","false")}})})};Results.prototype.showLoading=function(params){this.hideLoading();var loadingMore=this.options.get("translations").get("searching");var loading={disabled:true,loading:true,text:loadingMore(params)};var $loading=this.option(loading);$loading.className+=" loading-results";this.$results.prepend($loading)};Results.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()};Results.prototype.option=function(data2){var option=document.createElement("li");option.classList.add("select2-results__option");option.classList.add("select2-results__option--selectable");var attrs2={"role":"option"};var matches=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;if(data2.element!=null&&matches.call(data2.element,":disabled")||data2.element==null&&data2.disabled){attrs2["aria-disabled"]="true";option.classList.remove("select2-results__option--selectable");option.classList.add("select2-results__option--disabled")}if(data2.id==null){option.classList.remove("select2-results__option--selectable")}if(data2._resultId!=null){option.id=data2._resultId}if(data2.title){option.title=data2.title}if(data2.children){attrs2.role="group";attrs2["aria-label"]=data2.text;option.classList.remove("select2-results__option--selectable");option.classList.add("select2-results__option--group")}for(var attr in attrs2){var val2=attrs2[attr];option.setAttribute(attr,val2)}if(data2.children){var $option=$2(option);var label=document.createElement("strong");label.className="select2-results__group";this.template(data2,label);var $children=[];for(var c=0;c<data2.children.length;c++){var child=data2.children[c];var $child=this.option(child);$children.push($child)}var $childrenContainer=$2("<ul></ul>",{"class":"select2-results__options select2-results__options--nested","role":"none"});$childrenContainer.append($children);$option.append(label);$option.append($childrenContainer)}else{this.template(data2,option)}Utils.StoreData(option,"data",data2);return option};Results.prototype.bind=function(container,$container){var self2=this;var id2=container.id+"-results";this.$results[0].setAttribute("id",id2);container.on("results:all",function(params){self2.clear();self2.append(params.data);if(container.isOpen()){self2.setClasses();self2.highlightFirstItem()}});container.on("results:append",function(params){self2.append(params.data);if(container.isOpen()){self2.setClasses()}});container.on("query",function(params){self2.hideMessages();self2.showLoading(params)});container.on("select",function(){if(!container.isOpen()){return}self2.setClasses();if(self2.options.get("scrollAfterSelect")){self2.highlightFirstItem()}});container.on("unselect",function(){if(!container.isOpen()){return}self2.setClasses();if(self2.options.get("scrollAfterSelect")){self2.highlightFirstItem()}});container.on("open",function(){self2.$results[0].setAttribute("aria-expanded","true");self2.$results[0].setAttribute("aria-hidden","false");self2.setClasses();self2.ensureHighlightVisible()});container.on("close",function(){self2.$results[0].setAttribute("aria-expanded","false");self2.$results[0].setAttribute("aria-hidden","true");self2.$results[0].removeAttribute("aria-activedescendant")});container.on("results:toggle",function(){var $highlighted=self2.getHighlightedResults();if($highlighted.length===0){return}$highlighted.trigger("mouseup")});container.on("results:select",function(){var $highlighted=self2.getHighlightedResults();if($highlighted.length===0){return}var data2=Utils.GetData($highlighted[0],"data");if($highlighted.hasClass("select2-results__option--selected")){self2.trigger("close",{})}else{self2.trigger("select",{data:data2})}});container.on("results:previous",function(){var $highlighted=self2.getHighlightedResults();var $options=self2.$results.find(".select2-results__option--selectable");var currentIndex=$options.index($highlighted);if(currentIndex<=0){return}var nextIndex=currentIndex-1;if($highlighted.length===0){nextIndex=0}var $next=$options.eq(nextIndex);$next.trigger("mouseenter");var currentOffset=self2.$results.offset().top;var nextTop=$next.offset().top;var nextOffset=self2.$results.scrollTop()+(nextTop-currentOffset);if(nextIndex===0){self2.$results.scrollTop(0)}else if(nextTop-currentOffset<0){self2.$results.scrollTop(nextOffset)}});container.on("results:next",function(){var $highlighted=self2.getHighlightedResults();var $options=self2.$results.find(".select2-results__option--selectable");var currentIndex=$options.index($highlighted);var nextIndex=currentIndex+1;if(nextIndex>=$options.length){return}var $next=$options.eq(nextIndex);$next.trigger("mouseenter");var currentOffset=self2.$results.offset().top+self2.$results.outerHeight(false);var nextBottom=$next.offset().top+$next.outerHeight(false);var nextOffset=self2.$results.scrollTop()+nextBottom-currentOffset;if(nextIndex===0){self2.$results.scrollTop(0)}else if(nextBottom>currentOffset){self2.$results.scrollTop(nextOffset)}});container.on("results:focus",function(params){params.element[0].classList.add("select2-results__option--highlighted");params.element[0].setAttribute("aria-selected","true")});container.on("results:message",function(params){self2.displayMessage(params)});if($2.fn.mousewheel){this.$results.on("mousewheel",function(e2){var top=self2.$results.scrollTop();var bottom=self2.$results.get(0).scrollHeight-top+e2.deltaY;var isAtTop=e2.deltaY>0&&top-e2.deltaY<=0;var isAtBottom=e2.deltaY<0&&bottom<=self2.$results.height();if(isAtTop){self2.$results.scrollTop(0);e2.preventDefault();e2.stopPropagation()}else if(isAtBottom){self2.$results.scrollTop(self2.$results.get(0).scrollHeight-self2.$results.height());e2.preventDefault();e2.stopPropagation()}})}this.$results.on("mouseup",".select2-results__option--selectable",function(evt){var $this=$2(this);var data2=Utils.GetData(this,"data");if($this.hasClass("select2-results__option--selected")){if(self2.options.get("multiple")){self2.trigger("unselect",{originalEvent:evt,data:data2})}else{self2.trigger("close",{originalEvent:evt,data:data2})}return}self2.trigger("select",{originalEvent:evt,data:data2})});this.$results.on("mouseenter",".select2-results__option--selectable",function(evt){var data2=Utils.GetData(this,"data");var $highlighted=self2.getHighlightedResults();$highlighted.removeClass("select2-results__option--highlighted");$highlighted.each(function(){this.setAttribute("aria-selected","false")});self2.trigger("results:focus",{data:data2,element:$2(this)})})};Results.prototype.getHighlightedResults=function(){var $highlighted=this.$results.find(".select2-results__option--highlighted");return $highlighted};Results.prototype.destroy=function(){this.$results.remove()};Results.prototype.ensureHighlightVisible=function(){var $highlighted=this.getHighlightedResults();if($highlighted.length===0){return}var $options=this.$results.find(".select2-results__option--selectable");var currentIndex=$options.index($highlighted);var currentOffset=this.$results.offset().top;var nextTop=$highlighted.offset().top;var nextOffset=this.$results.scrollTop()+(nextTop-currentOffset);var offsetDelta=nextTop-currentOffset;nextOffset-=$highlighted.outerHeight(false)*2;if(currentIndex<=2){this.$results.scrollTop(0)}else if(offsetDelta>this.$results.outerHeight()||offsetDelta<0){this.$results.scrollTop(nextOffset)}};Results.prototype.template=function(result,container){var template=this.options.get("templateResult");var escapeMarkup=this.options.get("escapeMarkup");var content=template(result,container);if(content==null){container.style.display="none"}else if(typeof content==="string"){container.innerHTML=escapeMarkup(content)}else{$2(container).append(content)}};return Results});S22.define("select2/keys",[],function(){var KEYS={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return KEYS});S22.define("select2/selection/base",["jquery","../utils","../keys"],function($2,Utils,KEYS){function BaseSelection($element,options){this.$element=$element;this.options=options;BaseSelection.__super__.constructor.call(this)}Utils.Extend(BaseSelection,Utils.Observable);BaseSelection.prototype.render=function(){var $selection=$2('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');this._tabindex=0;if(Utils.GetData(this.$element[0],"old-tabindex")!=null){this._tabindex=Utils.GetData(this.$element[0],"old-tabindex")}else if(this.$element[0].getAttribute("tabindex")!=null){this._tabindex=this.$element[0].getAttribute("tabindex")}if(this.$element[0].getAttribute("title")){$selection[0].setAttribute("title",this.$element[0].getAttribute("title"))}$selection[0].setAttribute("tabindex",this._tabindex);$selection[0].setAttribute("aria-disabled","false");this.$selection=$selection;return $selection};BaseSelection.prototype.bind=function(container,$container){var self2=this;var resultsId=container.id+"-results";this.container=container;this.$selection.on("focus",function(evt){self2.trigger("focus",evt)});this.$selection.on("blur",function(evt){self2._handleBlur(evt)});this.$selection.on("keydown",function(evt){self2.trigger("keypress",evt);if(evt.which===KEYS.SPACE){evt.preventDefault()}});container.on("results:focus",function(params){self2.$selection[0].setAttribute("aria-activedescendant",params.data._resultId)});container.on("selection:update",function(params){self2.update(params.data)});container.on("open",function(){self2.$selection[0].setAttribute("aria-expanded","true");self2.$selection[0].setAttribute("aria-owns",resultsId);self2._attachCloseHandler(container)});container.on("close",function(){self2.$selection[0].setAttribute("aria-expanded","false");self2.$selection[0].removeAttribute("aria-activedescendant");self2.$selection[0].removeAttribute("aria-owns");self2.$selection.trigger("focus");self2._detachCloseHandler(container)});container.on("enable",function(){self2.$selection[0].setAttribute("tabindex",self2._tabindex);self2.$selection[0].setAttribute("aria-disabled","false")});container.on("disable",function(){self2.$selection[0].setAttribute("tabindex","-1");self2.$selection[0].setAttribute("aria-disabled","true")})};BaseSelection.prototype._handleBlur=function(evt){var self2=this;window.setTimeout(function(){if(document.activeElement==self2.$selection[0]||$2.contains(self2.$selection[0],document.activeElement)){return}self2.trigger("blur",evt)},1)};BaseSelection.prototype._attachCloseHandler=function(container){$2(document.body).on("mousedown.select2."+container.id,function(e2){var $target=$2(e2.target);var $select=$target.closest(".select2");var $all=$2(".select2.select2-container--open");$all.each(function(){if(this==$select[0]){return}var $element=Utils.GetData(this,"element");$element.select2("close")})})};BaseSelection.prototype._detachCloseHandler=function(container){$2(document.body).off("mousedown.select2."+container.id)};BaseSelection.prototype.position=function($selection,$container){var $selectionContainer=$container.find(".selection");$selectionContainer.append($selection)};BaseSelection.prototype.destroy=function(){this._detachCloseHandler(this.container)};BaseSelection.prototype.update=function(data2){throw new Error("The `update` method must be defined in child classes.")};BaseSelection.prototype.isEnabled=function(){return!this.isDisabled()};BaseSelection.prototype.isDisabled=function(){return this.options.get("disabled")};return BaseSelection});S22.define("select2/selection/single",["jquery","./base","../utils","../keys"],function($2,BaseSelection,Utils,KEYS){function SingleSelection(){SingleSelection.__super__.constructor.apply(this,arguments)}Utils.Extend(SingleSelection,BaseSelection);SingleSelection.prototype.render=function(){var $selection=SingleSelection.__super__.render.call(this);$selection[0].classList.add("select2-selection--single");$selection.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>');return $selection};SingleSelection.prototype.bind=function(container,$container){var self2=this;SingleSelection.__super__.bind.apply(this,arguments);var id2=container.id+"-container";var rendered=this.$selection.find(".select2-selection__rendered")[0];if(rendered!=null){rendered.setAttribute("id",id2);rendered.setAttribute("role","textbox");rendered.setAttribute("aria-readonly","true")}this.$selection[0].setAttribute("aria-labelledby",id2);this.$selection[0].setAttribute("aria-controls",id2);this.$selection.on("mousedown",function(evt){if(evt.which!==1){return}self2.trigger("toggle",{originalEvent:evt})});this.$selection.on("focus",function(evt){});this.$selection.on("blur",function(evt){});container.on("focus",function(evt){if(!container.isOpen()){self2.$selection.trigger("focus")}})};SingleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty();$rendered[0].removeAttribute("title")};SingleSelection.prototype.display=function(data2,container){var template=this.options.get("templateSelection");var escapeMarkup=this.options.get("escapeMarkup");return escapeMarkup(template(data2,container))};SingleSelection.prototype.selectionContainer=function(){return $2("<span></span>")};SingleSelection.prototype.update=function(data2){if(data2.length===0){this.clear();return}var selection=data2[0];var $rendered=this.$selection.find(".select2-selection__rendered");var formatted=this.display(selection,$rendered);$rendered.empty().append(formatted);var title=selection.title||selection.text;if(title){$rendered[0].setAttribute("title",title)}else{$rendered[0].removeAttribute("title")}};return SingleSelection});S22.define("select2/selection/multiple",["jquery","./base","../utils"],function($2,BaseSelection,Utils){function MultipleSelection($element,options){MultipleSelection.__super__.constructor.apply(this,arguments)}Utils.Extend(MultipleSelection,BaseSelection);MultipleSelection.prototype.render=function(){var $selection=MultipleSelection.__super__.render.call(this);$selection[0].classList.add("select2-selection--multiple");$selection.html('<ul class="select2-selection__rendered"></ul>');return $selection};MultipleSelection.prototype.bind=function(container,$container){var self2=this;MultipleSelection.__super__.bind.apply(this,arguments);var id2=container.id+"-container";var rendered=this.$selection.find(".select2-selection__rendered")[0];if(rendered!=null){rendered.setAttribute("id",id2)}this.$selection.on("click",function(evt){self2.trigger("toggle",{originalEvent:evt})});this.$selection.on("click",".select2-selection__choice__remove",function(evt){if(self2.isDisabled()){return}var $remove=$2(this);var $selection=$remove.parent();var data2=Utils.GetData($selection[0],"data");self2.trigger("unselect",{originalEvent:evt,data:data2})});this.$selection.on("keydown",".select2-selection__choice__remove",function(evt){if(self2.isDisabled()){return}evt.stopPropagation()})};MultipleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty();$rendered[0].removeAttribute("title")};MultipleSelection.prototype.display=function(data2,container){var template=this.options.get("templateSelection");var escapeMarkup=this.options.get("escapeMarkup");return escapeMarkup(template(data2,container))};MultipleSelection.prototype.selectionContainer=function(){var $container=$2('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">×</span></button><span class="select2-selection__choice__display"></span></li>');return $container};MultipleSelection.prototype.update=function(data2){this.clear();if(data2.length===0){return}var $selections=[];var selectionIdPrefix=this.$selection.find(".select2-selection__rendered")[0].getAttribute("id")+"-choice-";for(var d=0;d<data2.length;d++){var selection=data2[d];var $selection=this.selectionContainer();var formatted=this.display(selection,$selection);var selectionId=selectionIdPrefix+Utils.generateChars(4)+"-";if(selection.id){selectionId+=selection.id}else{selectionId+=Utils.generateChars(4)}$selection.find(".select2-selection__choice__display").append(formatted)[0].setAttribute("id",selectionId);var title=selection.title||selection.text;if(title){$selection[0].setAttribute("title",title)}var removeItem=this.options.get("translations").get("removeItem");var remove=$selection.find(".select2-selection__choice__remove")[0];remove.setAttribute("title",removeItem());remove.setAttribute("aria-label",removeItem());remove.setAttribute("aria-describedby",selectionId);Utils.StoreData($selection[0],"data",selection);$selections.push($selection)}var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.append($selections)};return MultipleSelection});S22.define("select2/selection/placeholder",[],function(){function Placeholder(decorated,$element,options){this.placeholder=this.normalizePlaceholder(options.get("placeholder"));decorated.call(this,$element,options)}Placeholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder!=="object"){placeholder={id:"",text:placeholder}}return placeholder};Placeholder.prototype.createPlaceholder=function(decorated,placeholder){var $placeholder=this.selectionContainer();$placeholder.html(this.display(placeholder));$placeholder[0].classList.add("select2-selection__placeholder");$placeholder[0].classList.remove("select2-selection__choice");var placeholderTitle=placeholder.title||placeholder.text||$placeholder.text();this.$selection.find(".select2-selection__rendered")[0].setAttribute("title",placeholderTitle);return $placeholder};Placeholder.prototype.update=function(decorated,data2){var singlePlaceholder=data2.length==1&&data2[0].id!=this.placeholder.id;var multipleSelections=data2.length>1;if(multipleSelections||singlePlaceholder){return decorated.call(this,data2)}this.clear();var $placeholder=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append($placeholder)};return Placeholder});S22.define("select2/selection/allowClear",["jquery","../keys","../utils"],function($2,KEYS,Utils){function AllowClear(){}AllowClear.prototype.bind=function(decorated,container,$container){var self2=this;decorated.call(this,container,$container);if(this.placeholder==null){if(this.options.get("debug")&&window.console&&console.error){console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option.")}}this.$selection.on("mousedown",".select2-selection__clear",function(evt){self2._handleClear(evt)});container.on("keypress",function(evt){self2._handleKeyboardClear(evt,container)})};AllowClear.prototype._handleClear=function(_,evt){if(this.isDisabled()){return}var $clear=this.$selection.find(".select2-selection__clear");if($clear.length===0){return}evt.stopPropagation();var data2=Utils.GetData($clear[0],"data");var previousVal=this.$element.val();this.$element.val(this.placeholder.id);var unselectData={data:data2};this.trigger("clear",unselectData);if(unselectData.prevented){this.$element.val(previousVal);return}for(var d=0;d<data2.length;d++){unselectData={data:data2[d]};this.trigger("unselect",unselectData);if(unselectData.prevented){this.$element.val(previousVal);return}}this.$element.trigger("input").trigger("change");this.trigger("toggle",{})};AllowClear.prototype._handleKeyboardClear=function(_,evt,container){if(container.isOpen()){return}if(evt.which==KEYS.DELETE||evt.which==KEYS.BACKSPACE){this._handleClear(evt)}};AllowClear.prototype.update=function(decorated,data2){decorated.call(this,data2);this.$selection.find(".select2-selection__clear").remove();this.$selection[0].classList.remove("select2-selection--clearable");if(this.$selection.find(".select2-selection__placeholder").length>0||data2.length===0){return}var rendered=this.$selection.find(".select2-selection__rendered")[0];var selectionId=null;if(rendered!=null){selectionId=rendered.getAttribute("id")}var removeAll=this.options.get("translations").get("removeAllItems");var $remove=$2('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">×</span></button>');$remove[0].setAttribute("title",removeAll());$remove[0].setAttribute("aria-label",removeAll());$remove[0].setAttribute("aria-describedby",selectionId);Utils.StoreData($remove[0],"data",data2);this.$selection.prepend($remove);this.$selection[0].classList.add("select2-selection--clearable")};return AllowClear});S22.define("select2/selection/search",["jquery","../utils","../keys"],function($2,Utils,KEYS){function Search(decorated,$element,options){decorated.call(this,$element,options)}Search.prototype.render=function(decorated){var searchLabel=this.options.get("translations").get("search");var $search=$2('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=$search;this.$search=$search.find("textarea");this.$search[0].autocomplete=this.options.get("autocomplete");this.$search[0].setAttribute("aria-label",searchLabel());var $rendered=decorated.call(this);this._transferTabIndex();$rendered.append(this.$searchContainer);return $rendered};Search.prototype.bind=function(decorated,container,$container){var self2=this;var resultsId=container.id+"-results";var selectionId=container.id+"-container";decorated.call(this,container,$container);self2.$search[0].setAttribute("aria-describedby",selectionId);container.on("open",function(){self2.$search[0].setAttribute("aria-controls",resultsId);self2.$search.trigger("focus")});container.on("close",function(){self2.$search.val("");self2.resizeSearch();self2.$search[0].removeAttribute("aria-controls");self2.$search[0].removeAttribute("aria-activedescendant");self2.$search.trigger("focus")});container.on("enable",function(){self2.$search[0].disabled=false;self2._transferTabIndex()});container.on("disable",function(){self2.$search[0].disabled=true});container.on("focus",function(evt){self2.$search.trigger("focus")});container.on("results:focus",function(params){if(params.data._resultId){self2.$search[0].setAttribute("aria-activedescendant",params.data._resultId)}else{self2.$search[0].removeAttribute("aria-activedescendant")}});this.$selection.on("focusin",".select2-search--inline",function(evt){self2.trigger("focus",evt)});this.$selection.on("focusout",".select2-search--inline",function(evt){self2._handleBlur(evt)});this.$selection.on("keydown",".select2-search--inline",function(evt){evt.stopPropagation();self2.trigger("keypress",evt);self2._keyUpPrevented=evt.isDefaultPrevented();var key2=evt.which;if(key2===KEYS.BACKSPACE&&self2.$search.val()===""){var $previousChoice=self2.$selection.find(".select2-selection__choice").last();if($previousChoice.length>0){var item=Utils.GetData($previousChoice[0],"data");self2.searchRemoveChoice(item);evt.preventDefault()}}});this.$selection.on("click",".select2-search--inline",function(evt){if(self2.$search.val()){evt.stopPropagation()}});var msie=document.documentMode;var disableInputEvents=msie&&msie<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(evt){if(disableInputEvents){self2.$selection.off("input.search input.searchcheck");return}self2.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(evt){if(disableInputEvents&&evt.type==="input"){self2.$selection.off("input.search input.searchcheck");return}var key2=evt.which;if(key2==KEYS.SHIFT||key2==KEYS.CTRL||key2==KEYS.ALT){return}if(key2==KEYS.TAB){return}self2.handleSearch(evt)})};Search.prototype._transferTabIndex=function(decorated){this.$search[0].setAttribute("tabindex",this.$selection[0].getAttribute("tabindex"));this.$selection[0].setAttribute("tabindex","-1")};Search.prototype.createPlaceholder=function(decorated,placeholder){this.$search[0].setAttribute("placeholder",placeholder.text)};Search.prototype.update=function(decorated,data2){var searchHadFocus=this.$search[0]==document.activeElement;this.$search[0].setAttribute("placeholder","");decorated.call(this,data2);this.resizeSearch();if(searchHadFocus){this.$search.trigger("focus")}};Search.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var input=this.$search.val();this.trigger("query",{term:input})}this._keyUpPrevented=false};Search.prototype.searchRemoveChoice=function(decorated,item){this.trigger("unselect",{data:item});this.$search.val(item.text);this.handleSearch()};Search.prototype.resizeSearch=function(){this.$search.css("width","25px");var width="100%";if(this.$search[0].getAttribute("placeholder")===""){var minimumWidth=this.$search.val().length+1;width=minimumWidth*.75+"em"}this.$search.css("width",width)};return Search});S22.define("select2/selection/selectionCss",["../utils"],function(Utils){function SelectionCSS(){}SelectionCSS.prototype.render=function(decorated){var $selection=decorated.call(this);var selectionCssClass=this.options.get("selectionCssClass")||"";if(selectionCssClass.indexOf(":all:")!==-1){selectionCssClass=selectionCssClass.replace(":all:","");Utils.copyNonInternalCssClasses($selection[0],this.$element[0])}selectionCssClass.trim().split(" ").forEach(function(cssClass){if(cssClass.length>0){$selection[0].classList.add(cssClass)}});return $selection};return SelectionCSS});S22.define("select2/selection/eventRelay",["jquery"],function($2){function EventRelay(){}EventRelay.prototype.bind=function(decorated,container,$container){var self2=this;var relayEvents=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"];var preventableEvents=["opening","closing","selecting","unselecting","clearing"];decorated.call(this,container,$container);container.on("*",function(name,params){if(relayEvents.indexOf(name)===-1){return}params=params||{};var evt=$2.Event("select2:"+name,{params});self2.$element.trigger(evt);if(preventableEvents.indexOf(name)===-1){return}params.prevented=evt.isDefaultPrevented()})};return EventRelay});S22.define("select2/translation",["require"],function(require2){function Translation(dict){this.dict=dict||{}}Translation.prototype.all=function(){return this.dict};Translation.prototype.get=function(key2){return this.dict[key2]};Translation.prototype.extend=function(translation){this.dict=Object.assign({},translation.all(),this.dict)};Translation._cache={};Translation.loadPath=function(path){if(!(path in Translation._cache)){var translations=require2(path);Translation._cache[path]=translations}return new Translation(Translation._cache[path])};return Translation});S22.define("select2/diacritics",[],function(){var diacritics={"\u24B6":"A","\uFF21":"A","\xC0":"A","\xC1":"A","\xC2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\xC3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\xC4":"A","\u01DE":"A","\u1EA2":"A","\xC5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\xC6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\xC7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\xC8":"E","\xC9":"E","\xCA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\xCB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\xCC":"I","\xCD":"I","\xCE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\xCF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\xD1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\xD2":"O","\xD3":"O","\xD4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\xD5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\xD6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\xD8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u0152":"OE","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\xD9":"U","\xDA":"U","\xDB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\xDC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\xDD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\xE0":"a","\xE1":"a","\xE2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\xE3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\xE4":"a","\u01DF":"a","\u1EA3":"a","\xE5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\xE6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\xE7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\xE8":"e","\xE9":"e","\xEA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\xEB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\xEC":"i","\xED":"i","\xEE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\xEF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\xF1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\xF2":"o","\xF3":"o","\xF4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\xF5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\xF6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\xF8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u0153":"oe","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\xDF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\xF9":"u","\xFA":"u","\xFB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\xFC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\xFD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\xFF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038A":"\u0399","\u03AA":"\u0399","\u038C":"\u039F","\u038E":"\u03A5","\u03AB":"\u03A5","\u038F":"\u03A9","\u03AC":"\u03B1","\u03AD":"\u03B5","\u03AE":"\u03B7","\u03AF":"\u03B9","\u03CA":"\u03B9","\u0390":"\u03B9","\u03CC":"\u03BF","\u03CD":"\u03C5","\u03CB":"\u03C5","\u03B0":"\u03C5","\u03CE":"\u03C9","\u03C2":"\u03C3","\u2019":"'"};return diacritics});S22.define("select2/data/base",["../utils"],function(Utils){function BaseAdapter($element,options){BaseAdapter.__super__.constructor.call(this)}Utils.Extend(BaseAdapter,Utils.Observable);BaseAdapter.prototype.current=function(callback){throw new Error("The `current` method must be defined in child classes.")};BaseAdapter.prototype.query=function(params,callback){throw new Error("The `query` method must be defined in child classes.")};BaseAdapter.prototype.bind=function(container,$container){};BaseAdapter.prototype.destroy=function(){};BaseAdapter.prototype.generateResultId=function(container,data2){var id2=container.id+"-result-";id2+=Utils.generateChars(4);if(data2.id!=null){id2+="-"+data2.id.toString()}else{id2+="-"+Utils.generateChars(4)}return id2};return BaseAdapter});S22.define("select2/data/select",["./base","../utils","jquery"],function(BaseAdapter,Utils,$2){function SelectAdapter($element,options){this.$element=$element;this.options=options;SelectAdapter.__super__.constructor.call(this)}Utils.Extend(SelectAdapter,BaseAdapter);SelectAdapter.prototype.current=function(callback){var self2=this;var data2=Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(selectedElement){return self2.item($2(selectedElement))});callback(data2)};SelectAdapter.prototype.select=function(data2){var self2=this;data2.selected=true;if(data2.element!=null&&data2.element.tagName.toLowerCase()==="option"){data2.element.selected=true;this.$element.trigger("input").trigger("change");return}if(this.$element[0].multiple){this.current(function(currentData){var val3=[];data2=[data2];data2.push.apply(data2,currentData);for(var d=0;d<data2.length;d++){var id2=data2[d].id;if(val3.indexOf(id2)===-1){val3.push(id2)}}self2.$element.val(val3);self2.$element.trigger("input").trigger("change")})}else{var val2=data2.id;this.$element.val(val2);this.$element.trigger("input").trigger("change")}};SelectAdapter.prototype.unselect=function(data2){var self2=this;if(!this.$element[0].multiple){return}data2.selected=false;if(data2.element!=null&&data2.element.tagName.toLowerCase()==="option"){data2.element.selected=false;this.$element.trigger("input").trigger("change");return}this.current(function(currentData){var val2=[];for(var d=0;d<currentData.length;d++){var id2=currentData[d].id;if(id2!==data2.id&&val2.indexOf(id2)===-1){val2.push(id2)}}self2.$element.val(val2);self2.$element.trigger("input").trigger("change")})};SelectAdapter.prototype.bind=function(container,$container){var self2=this;this.container=container;container.on("select",function(params){self2.select(params.data)});container.on("unselect",function(params){self2.unselect(params.data)})};SelectAdapter.prototype.destroy=function(){this.$element.find("*").each(function(){Utils.RemoveData(this)})};SelectAdapter.prototype.query=function(params,callback){var data2=[];var self2=this;var $options=this.$element.children();$options.each(function(){if(this.tagName.toLowerCase()!=="option"&&this.tagName.toLowerCase()!=="optgroup"){return}var $option=$2(this);var option=self2.item($option);var matches=self2.matches(params,option);if(matches!==null){data2.push(matches)}});callback({results:data2})};SelectAdapter.prototype.addOptions=function($options){this.$element.append($options)};SelectAdapter.prototype.option=function(data2){var option;if(data2.children){option=document.createElement("optgroup");option.label=data2.text}else{option=document.createElement("option");if(option.textContent!==void 0){option.textContent=data2.text}else{option.innerText=data2.text}}if(data2.id!==void 0){option.value=data2.id}if(data2.disabled){option.disabled=true}if(data2.selected){option.selected=true}if(data2.title){option.title=data2.title}var normalizedData=this._normalizeItem(data2);normalizedData.element=option;Utils.StoreData(option,"data",normalizedData);return $2(option)};SelectAdapter.prototype.item=function($option){var data2={};data2=Utils.GetData($option[0],"data");if(data2!=null){return data2}var option=$option[0];if(option.tagName.toLowerCase()==="option"){data2={id:$option.val(),text:$option.text(),disabled:$option[0].disabled,selected:$option[0].selected,title:$option[0].title}}else if(option.tagName.toLowerCase()==="optgroup"){data2={text:$option[0].label,children:[],title:$option[0].title};var $children=$option.children("option");var children=[];for(var c=0;c<$children.length;c++){var $child=$2($children[c]);var child=this.item($child);children.push(child)}data2.children=children}data2=this._normalizeItem(data2);data2.element=$option[0];Utils.StoreData($option[0],"data",data2);return data2};SelectAdapter.prototype._normalizeItem=function(item){if(item!==Object(item)){item={id:item,text:item}}item=$2.extend({},{text:""},item);var defaults={selected:false,disabled:false};if(item.id!=null){item.id=item.id.toString()}if(item.text!=null){item.text=item.text.toString()}if(item._resultId==null&&item.id&&this.container!=null){item._resultId=this.generateResultId(this.container,item)}if(item.children){item.children=item.children.map(SelectAdapter.prototype._normalizeItem)}return $2.extend({},defaults,item)};SelectAdapter.prototype.matches=function(params,data2){var matcher=this.options.get("matcher");return matcher(params,data2)};return SelectAdapter});S22.define("select2/data/array",["./select","../utils","jquery"],function(SelectAdapter,Utils,$2){function ArrayAdapter($element,options){this._dataToConvert=options.get("data")||[];ArrayAdapter.__super__.constructor.call(this,$element,options)}Utils.Extend(ArrayAdapter,SelectAdapter);ArrayAdapter.prototype.bind=function(container,$container){ArrayAdapter.__super__.bind.call(this,container,$container);this.addOptions(this.convertToOptions(this._dataToConvert))};ArrayAdapter.prototype.select=function(data2){var $option=this.$element.find("option").filter(function(i2,elm){return elm.value==data2.id.toString()});if($option.length===0){$option=this.option(data2);this.addOptions($option)}ArrayAdapter.__super__.select.call(this,data2)};ArrayAdapter.prototype.convertToOptions=function(data2){var self2=this;var $existing=this.$element.find("option");var existingIds=$existing.map(function(){return self2.item($2(this)).id}).get();var $options=[];function onlyItem(item2){return function(){return $2(this).val()==item2.id}}for(var d=0;d<data2.length;d++){var item=this._normalizeItem(data2[d]);if(existingIds.indexOf(item.id)>=0){var $existingOption=$existing.filter(onlyItem(item));var existingData=this.item($existingOption);var newData=$2.extend(true,{},item,existingData);var $newOption=this.option(newData);$existingOption.replaceWith($newOption);continue}var $option=this.option(item);if(item.children){var $children=this.convertToOptions(item.children);$option.append($children)}$options.push($option)}return $options};return ArrayAdapter});S22.define("select2/data/ajax",["./array","../utils","jquery"],function(ArrayAdapter,Utils,$2){function AjaxAdapter($element,options){this.ajaxOptions=this._applyDefaults(options.get("ajax"));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults}AjaxAdapter.__super__.constructor.call(this,$element,options)}Utils.Extend(AjaxAdapter,ArrayAdapter);AjaxAdapter.prototype._applyDefaults=function(options){var defaults={data:function(params){return $2.extend({},params,{q:params.term})},transport:function(params,success,failure){var $request=$2.ajax(params);$request.then(success);$request.fail(failure);return $request}};return $2.extend({},defaults,options,true)};AjaxAdapter.prototype.processResults=function(results){return results};AjaxAdapter.prototype.query=function(params,callback){var matches=[];var self2=this;if(this._request!=null){if(typeof this._request.abort==="function"){this._request.abort()}this._request=null}var options=$2.extend({type:"GET"},this.ajaxOptions);if(typeof options.url==="function"){options.url=options.url.call(this.$element,params)}if(typeof options.data==="function"){options.data=options.data.call(this.$element,params)}function request(){var $request=options.transport(options,function(data2){var results=self2.processResults(data2,params);if(results&&results.results&&Array.isArray(results.results)){results.results=results.results.map(AjaxAdapter.prototype._normalizeItem)}else{if(self2.options.get("debug")&&window.console&&console.error){console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")}}callback(results)},function(){if($request&&"status"in $request&&($request.status===0||$request.status==="0")){return}self2.trigger("results:message",{message:"errorLoading"})});self2._request=$request}if(this.ajaxOptions.delay&¶ms.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout)}this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay)}else{request()}};return AjaxAdapter});S22.define("select2/data/tags",["jquery"],function($2){function Tags(decorated,$element,options){var tags=options.get("tags");var createTag=options.get("createTag");if(createTag!==void 0){this.createTag=createTag}var insertTag=options.get("insertTag");if(insertTag!==void 0){this.insertTag=insertTag}decorated.call(this,$element,options);if(Array.isArray(tags)){for(var t2=0;t2<tags.length;t2++){var tag=tags[t2];var item=this._normalizeItem(tag);var $option=this.option(item);this.$element.append($option)}}}Tags.prototype.query=function(decorated,params,callback){var self2=this;this._removeOldTags();if(params.term==null||params.page!=null){decorated.call(this,params,callback);return}function wrapper(obj,child){var data2=obj.results;for(var i2=0;i2<data2.length;i2++){var option=data2[i2];var checkChildren=option.children!=null&&!wrapper({results:option.children},true);var optionText=(option.text||"").toUpperCase();var paramsTerm=(params.term||"").toUpperCase();var checkText=optionText===paramsTerm;if(checkText||checkChildren){if(child){return false}obj.data=data2;callback(obj);return}}if(child){return true}var tag=self2.createTag(params);if(tag!=null){var $option=self2.option(tag);$option[0].setAttribute("data-select2-tag","true");self2.addOptions([$option]);self2.insertTag(data2,tag)}obj.results=data2;callback(obj)}decorated.call(this,params,wrapper)};Tags.prototype.createTag=function(decorated,params){if(params.term==null){return null}var term=params.term.trim();if(term===""){return null}return{id:term,text:term}};Tags.prototype.insertTag=function(_,data2,tag){data2.unshift(tag)};Tags.prototype._removeOldTags=function(_){var $options=this.$element.find("option[data-select2-tag]");$options.each(function(){if(this.selected){return}$2(this).remove()})};return Tags});S22.define("select2/data/tokenizer",["jquery"],function($2){function Tokenizer(decorated,$element,options){var tokenizer=options.get("tokenizer");if(tokenizer!==void 0){this.tokenizer=tokenizer}decorated.call(this,$element,options)}Tokenizer.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);this.$search=container.dropdown.$search||container.selection.$search||$container.find(".select2-search__field")};Tokenizer.prototype.query=function(decorated,params,callback){var self2=this;function createAndSelect(data2){var item=self2._normalizeItem(data2);var $existingOptions=self2.$element.find("option").filter(function(){return $2(this).val()===item.id});if(!$existingOptions.length){var $option=self2.option(item);$option[0].setAttribute("data-select2-tag",true);self2._removeOldTags();self2.addOptions([$option])}select(item)}function select(data2){self2.trigger("select",{data:data2})}params.term=params.term||"";var tokenData=this.tokenizer(params,this.options,createAndSelect);if(tokenData.term!==params.term){if(this.$search.length){this.$search.val(tokenData.term);this.$search.trigger("focus")}params.term=tokenData.term}decorated.call(this,params,callback)};Tokenizer.prototype.tokenizer=function(_,params,options,callback){var separators=options.get("tokenSeparators")||[];var term=params.term;var i2=0;var createTag=this.createTag||function(params2){return{id:params2.term,text:params2.term}};while(i2<term.length){var termChar=term[i2];if(separators.indexOf(termChar)===-1){i2++;continue}var part=term.substr(0,i2);var partParams=$2.extend({},params,{term:part});var data2=createTag(partParams);if(data2==null){i2++;continue}callback(data2);term=term.substr(i2+1)||"";i2=0}return{term}};return Tokenizer});S22.define("select2/data/minimumInputLength",[],function(){function MinimumInputLength(decorated,$e,options){this.minimumInputLength=options.get("minimumInputLength");decorated.call(this,$e,options)}MinimumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||"";if(params.term.length<this.minimumInputLength){this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:params.term,params}});return}decorated.call(this,params,callback)};return MinimumInputLength});S22.define("select2/data/maximumInputLength",[],function(){function MaximumInputLength(decorated,$e,options){this.maximumInputLength=options.get("maximumInputLength");decorated.call(this,$e,options)}MaximumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||"";if(this.maximumInputLength>0&¶ms.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:params.term,params}});return}decorated.call(this,params,callback)};return MaximumInputLength});S22.define("select2/data/maximumSelectionLength",[],function(){function MaximumSelectionLength(decorated,$e,options){this.maximumSelectionLength=options.get("maximumSelectionLength");decorated.call(this,$e,options)}MaximumSelectionLength.prototype.bind=function(decorated,container,$container){var self2=this;decorated.call(this,container,$container);container.on("select",function(){self2._checkIfMaximumSelected()})};MaximumSelectionLength.prototype.query=function(decorated,params,callback){var self2=this;this._checkIfMaximumSelected(function(){decorated.call(self2,params,callback)})};MaximumSelectionLength.prototype._checkIfMaximumSelected=function(_,successCallback){var self2=this;this.current(function(currentData){var count=currentData!=null?currentData.length:0;if(self2.maximumSelectionLength>0&&count>=self2.maximumSelectionLength){self2.trigger("results:message",{message:"maximumSelected",args:{maximum:self2.maximumSelectionLength}});return}if(successCallback){successCallback()}})};return MaximumSelectionLength});S22.define("select2/dropdown",["jquery","./utils"],function($2,Utils){function Dropdown($element,options){this.$element=$element;this.options=options;Dropdown.__super__.constructor.call(this)}Utils.Extend(Dropdown,Utils.Observable);Dropdown.prototype.render=function(){var $dropdown=$2('<span class="select2-dropdown"><span class="select2-results"></span></span>');$dropdown[0].setAttribute("dir",this.options.get("dir"));this.$dropdown=$dropdown;return $dropdown};Dropdown.prototype.bind=function(){};Dropdown.prototype.position=function($dropdown,$container){};Dropdown.prototype.destroy=function(){this.$dropdown.remove()};return Dropdown});S22.define("select2/dropdown/search",["jquery"],function($2){function Search(){}Search.prototype.render=function(decorated){var $rendered=decorated.call(this);var searchLabel=this.options.get("translations").get("search");var $search=$2('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');this.$searchContainer=$search;this.$search=$search.find("input");this.$search[0].autocomplete=this.options.get("autocomplete");this.$search[0].setAttribute("aria-label",searchLabel());$rendered.prepend($search);return $rendered};Search.prototype.bind=function(decorated,container,$container){var self2=this;var resultsId=container.id+"-results";decorated.call(this,container,$container);this.$search.on("keydown",function(evt){self2.trigger("keypress",evt);self2._keyUpPrevented=evt.isDefaultPrevented()});this.$search.on("input",function(evt){$2(this).off("keyup")});this.$search.on("keyup input",function(evt){self2.handleSearch(evt)});container.on("open",function(){self2.$search[0].setAttribute("tabindex",0);self2.$search[0].setAttribute("aria-controls",resultsId);self2.$search.trigger("focus");window.setTimeout(function(){self2.$search.trigger("focus")},0)});container.on("close",function(){self2.$search[0].setAttribute("tabindex",-1);self2.$search[0].removeAttribute("aria-controls");self2.$search[0].removeAttribute("aria-activedescendant");self2.$search.val("");self2.$search.trigger("blur")});container.on("focus",function(){if(!container.isOpen()){self2.$search.trigger("focus")}});container.on("results:all",function(params){if(params.query.term==null||params.query.term===""){var showSearch=self2.showSearch(params);if(showSearch){self2.$searchContainer[0].classList.remove("select2-search--hide")}else{self2.$searchContainer[0].classList.add("select2-search--hide")}}});container.on("results:focus",function(params){if(params.data._resultId){self2.$search[0].setAttribute("aria-activedescendant",params.data._resultId)}else{self2.$search[0].removeAttribute("aria-activedescendant")}})};Search.prototype.handleSearch=function(evt){if(!this._keyUpPrevented){var input=this.$search.val();this.trigger("query",{term:input})}this._keyUpPrevented=false};Search.prototype.showSearch=function(_,params){return true};return Search});S22.define("select2/dropdown/hidePlaceholder",[],function(){function HidePlaceholder(decorated,$element,options,dataAdapter){this.placeholder=this.normalizePlaceholder(options.get("placeholder"));decorated.call(this,$element,options,dataAdapter)}HidePlaceholder.prototype.append=function(decorated,data2){data2.results=this.removePlaceholder(data2.results);decorated.call(this,data2)};HidePlaceholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder!=="object"){placeholder={id:"",text:placeholder}}return placeholder};HidePlaceholder.prototype.removePlaceholder=function(_,data2){var modifiedData=data2.slice(0);for(var d=data2.length-1;d>=0;d--){var item=data2[d];if(this.placeholder.id===item.id){modifiedData.splice(d,1)}}return modifiedData};return HidePlaceholder});S22.define("select2/dropdown/infiniteScroll",["jquery"],function($2){function InfiniteScroll(decorated,$element,options,dataAdapter){this.lastParams={};decorated.call(this,$element,options,dataAdapter);this.$loadingMore=this.createLoadingMore();this.loading=false}InfiniteScroll.prototype.append=function(decorated,data2){this.$loadingMore.remove();this.loading=false;decorated.call(this,data2);if(this.showLoadingMore(data2)){this.$results.append(this.$loadingMore);this.loadMoreIfNeeded()}};InfiniteScroll.prototype.bind=function(decorated,container,$container){var self2=this;decorated.call(this,container,$container);container.on("query",function(params){self2.lastParams=params;self2.loading=true});container.on("query:append",function(params){self2.lastParams=params;self2.loading=true});this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))};InfiniteScroll.prototype.loadMoreIfNeeded=function(){var isLoadMoreVisible=$2.contains(document.documentElement,this.$loadingMore[0]);if(this.loading||!isLoadMoreVisible){return}var currentOffset=this.$results.offset().top+this.$results.outerHeight(false);var loadingMoreOffset=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(false);if(currentOffset+50>=loadingMoreOffset){this.loadMore()}};InfiniteScroll.prototype.loadMore=function(){this.loading=true;var params=$2.extend({},{page:1},this.lastParams);params.page++;this.trigger("query:append",params)};InfiniteScroll.prototype.showLoadingMore=function(_,data2){return data2.pagination&&data2.pagination.more};InfiniteScroll.prototype.createLoadingMore=function(){var $option=$2('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>');var message=this.options.get("translations").get("loadingMore");$option.html(message(this.lastParams));return $option};return InfiniteScroll});S22.define("select2/dropdown/attachBody",["jquery","../utils"],function($2,Utils){function AttachBody(decorated,$element,options){this.$dropdownParent=$2(options.get("dropdownParent")||document.body);decorated.call(this,$element,options)}AttachBody.prototype.bind=function(decorated,container,$container){var self2=this;decorated.call(this,container,$container);container.on("open",function(){self2._showDropdown();self2._attachPositioningHandler(container);self2._bindContainerResultHandlers(container)});container.on("close",function(){self2._hideDropdown();self2._detachPositioningHandler(container)});this.$dropdownContainer.on("mousedown",function(evt){evt.stopPropagation()})};AttachBody.prototype.destroy=function(decorated){decorated.call(this);this.$dropdownContainer.remove()};AttachBody.prototype.position=function(decorated,$dropdown,$container){$dropdown[0].setAttribute("class",$container[0].getAttribute("class"));$dropdown[0].classList.remove("select2");$dropdown[0].classList.add("select2-container--open");$dropdown.css({position:"absolute",top:-999999});this.$container=$container};AttachBody.prototype.render=function(decorated){var $container=$2("<span></span>");var $dropdown=decorated.call(this);$container.append($dropdown);this.$dropdownContainer=$container;return $container};AttachBody.prototype._hideDropdown=function(decorated){this.$dropdownContainer.detach()};AttachBody.prototype._bindContainerResultHandlers=function(decorated,container){if(this._containerResultsHandlersBound){return}var self2=this;container.on("results:all",function(){self2._positionDropdown();self2._resizeDropdown()});container.on("results:append",function(){self2._positionDropdown();self2._resizeDropdown()});container.on("results:message",function(){self2._positionDropdown();self2._resizeDropdown()});container.on("select",function(){self2._positionDropdown();self2._resizeDropdown()});container.on("unselect",function(){self2._positionDropdown();self2._resizeDropdown()});this._containerResultsHandlersBound=true};AttachBody.prototype._attachPositioningHandler=function(decorated,container){var self2=this;var scrollEvent="scroll.select2."+container.id;var resizeEvent="resize.select2."+container.id;var orientationEvent="orientationchange.select2."+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.each(function(){Utils.StoreData(this,"select2-scroll-position",{x:$2(this).scrollLeft(),y:$2(this).scrollTop()})});$watchers.on(scrollEvent,function(ev2){var position=Utils.GetData(this,"select2-scroll-position");$2(this).scrollTop(position.y)});$2(window).on(scrollEvent+" "+resizeEvent+" "+orientationEvent,function(e2){self2._positionDropdown();self2._resizeDropdown()})};AttachBody.prototype._detachPositioningHandler=function(decorated,container){var scrollEvent="scroll.select2."+container.id;var resizeEvent="resize.select2."+container.id;var orientationEvent="orientationchange.select2."+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.off(scrollEvent);$2(window).off(scrollEvent+" "+resizeEvent+" "+orientationEvent)};AttachBody.prototype._positionDropdown=function(){var $window=$2(window);var isCurrentlyAbove=this.$dropdown[0].classList.contains("select2-dropdown--above");var isCurrentlyBelow=this.$dropdown[0].classList.contains("select2-dropdown--below");var newDirection=null;var offset=this.$container.offset();offset.bottom=offset.top+this.$container.outerHeight(false);var container={height:this.$container.outerHeight(false)};container.top=offset.top;container.bottom=offset.top+container.height;var dropdown={height:this.$dropdown.outerHeight(false)};var viewport={top:$window.scrollTop(),bottom:$window.scrollTop()+$window.height()};var enoughRoomAbove=viewport.top<offset.top-dropdown.height;var enoughRoomBelow=viewport.bottom>offset.bottom+dropdown.height;var css={left:offset.left,top:container.bottom};var $offsetParent=this.$dropdownParent;if($offsetParent.css("position")==="static"){$offsetParent=$offsetParent.offsetParent()}var parentOffset={top:0,left:0};if($2.contains(document.body,$offsetParent[0])||$offsetParent[0].isConnected){parentOffset=$offsetParent.offset()}css.top-=parentOffset.top;css.left-=parentOffset.left;if(!isCurrentlyAbove&&!isCurrentlyBelow){newDirection="below"}if(!enoughRoomBelow&&enoughRoomAbove&&!isCurrentlyAbove){newDirection="above"}else if(!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove){newDirection="below"}if(newDirection=="above"||isCurrentlyAbove&&newDirection!=="below"){css.top=container.top-parentOffset.top-dropdown.height}if(newDirection!=null){this.$dropdown[0].classList.remove("select2-dropdown--below");this.$dropdown[0].classList.remove("select2-dropdown--above");this.$dropdown[0].classList.add("select2-dropdown--"+newDirection);this.$container[0].classList.remove("select2-container--below");this.$container[0].classList.remove("select2-container--above");this.$container[0].classList.add("select2-container--"+newDirection)}this.$dropdownContainer.css(css)};AttachBody.prototype._resizeDropdown=function(){var css={width:this.$container.outerWidth(false)+"px"};if(this.options.get("dropdownAutoWidth")){css.minWidth=css.width;css.position="relative";css.width="auto"}this.$dropdown.css(css)};AttachBody.prototype._showDropdown=function(decorated){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};return AttachBody});S22.define("select2/dropdown/minimumResultsForSearch",[],function(){function countResults(data2){var count=0;for(var d=0;d<data2.length;d++){var item=data2[d];if(item.children){count+=countResults(item.children)}else{count++}}return count}function MinimumResultsForSearch(decorated,$element,options,dataAdapter){this.minimumResultsForSearch=options.get("minimumResultsForSearch");if(this.minimumResultsForSearch<0){this.minimumResultsForSearch=Infinity}decorated.call(this,$element,options,dataAdapter)}MinimumResultsForSearch.prototype.showSearch=function(decorated,params){if(countResults(params.data.results)<this.minimumResultsForSearch){return false}return decorated.call(this,params)};return MinimumResultsForSearch});S22.define("select2/dropdown/selectOnClose",["../utils"],function(Utils){function SelectOnClose(){}SelectOnClose.prototype.bind=function(decorated,container,$container){var self2=this;decorated.call(this,container,$container);container.on("close",function(params){self2._handleSelectOnClose(params)})};SelectOnClose.prototype._handleSelectOnClose=function(_,params){if(params&¶ms.originalSelect2Event!=null){var event=params.originalSelect2Event;if(event._type==="select"||event._type==="unselect"){return}}var $highlightedResults=this.getHighlightedResults();if($highlightedResults.length<1){return}var data2=Utils.GetData($highlightedResults[0],"data");if(data2.element!=null&&data2.element.selected||data2.element==null&&data2.selected){return}this.trigger("select",{data:data2})};return SelectOnClose});S22.define("select2/dropdown/closeOnSelect",[],function(){function CloseOnSelect(){}CloseOnSelect.prototype.bind=function(decorated,container,$container){var self2=this;decorated.call(this,container,$container);container.on("select",function(evt){self2._selectTriggered(evt)});container.on("unselect",function(evt){self2._selectTriggered(evt)})};CloseOnSelect.prototype._selectTriggered=function(_,evt){var originalEvent=evt.originalEvent;if(originalEvent&&(originalEvent.ctrlKey||originalEvent.metaKey)){return}this.trigger("close",{originalEvent,originalSelect2Event:evt})};return CloseOnSelect});S22.define("select2/dropdown/dropdownCss",["../utils"],function(Utils){function DropdownCSS(){}DropdownCSS.prototype.render=function(decorated){var $dropdown=decorated.call(this);var dropdownCssClass=this.options.get("dropdownCssClass")||"";if(dropdownCssClass.indexOf(":all:")!==-1){dropdownCssClass=dropdownCssClass.replace(":all:","");Utils.copyNonInternalCssClasses($dropdown[0],this.$element[0])}dropdownCssClass.trim().split(" ").forEach(function(cssClass){if(cssClass.length>0){$dropdown[0].classList.add(cssClass)}});return $dropdown};return DropdownCSS});S22.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(Utils){function TagsSearchHighlight(){}TagsSearchHighlight.prototype.highlightFirstItem=function(decorated){var $options=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if($options.length>0){var $firstOption=$options.first();var data2=Utils.GetData($firstOption[0],"data");var firstElement=data2.element;if(firstElement&&firstElement.getAttribute){if(firstElement.getAttribute("data-select2-tag")==="true"){$firstOption.trigger("mouseenter");return}}}decorated.call(this)};return TagsSearchHighlight});S22.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(args){var overChars=args.input.length-args.maximum;var message="Please delete "+overChars+" character";if(overChars!=1){message+="s"}return message},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;var message="Please enter "+remainingChars+" or more characters";return message},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(args){var message="You can only select "+args.maximum+" item";if(args.maximum!=1){message+="s"}return message},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}});S22.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function($2,ResultsList,SingleSelection,MultipleSelection,Placeholder,AllowClear,SelectionSearch,SelectionCSS,EventRelay,Utils,Translation,DIACRITICS,SelectData,ArrayData,AjaxData,Tags,Tokenizer,MinimumInputLength,MaximumInputLength,MaximumSelectionLength,Dropdown,DropdownSearch,HidePlaceholder,InfiniteScroll,AttachBody,MinimumResultsForSearch,SelectOnClose,CloseOnSelect,DropdownCSS,TagsSearchHighlight,EnglishTranslation){function Defaults(){this.reset()}Defaults.prototype.apply=function(options){options=$2.extend(true,{},this.defaults,options);if(options.dataAdapter==null){if(options.ajax!=null){options.dataAdapter=AjaxData}else if(options.data!=null){options.dataAdapter=ArrayData}else{options.dataAdapter=SelectData}if(options.minimumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MinimumInputLength)}if(options.maximumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumInputLength)}if(options.maximumSelectionLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumSelectionLength)}if(options.tags){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tags)}if(options.tokenSeparators!=null||options.tokenizer!=null){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tokenizer)}}if(options.resultsAdapter==null){options.resultsAdapter=ResultsList;if(options.ajax!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,InfiniteScroll)}if(options.placeholder!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,HidePlaceholder)}if(options.selectOnClose){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,SelectOnClose)}if(options.tags){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,TagsSearchHighlight)}}if(options.dropdownAdapter==null){if(options.multiple){options.dropdownAdapter=Dropdown}else{var SearchableDropdown=Utils.Decorate(Dropdown,DropdownSearch);options.dropdownAdapter=SearchableDropdown}if(options.minimumResultsForSearch!==0){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,MinimumResultsForSearch)}if(options.closeOnSelect){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,CloseOnSelect)}if(options.dropdownCssClass!=null){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,DropdownCSS)}options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,AttachBody)}if(options.selectionAdapter==null){if(options.multiple){options.selectionAdapter=MultipleSelection}else{options.selectionAdapter=SingleSelection}if(options.placeholder!=null){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,Placeholder)}if(options.allowClear){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,AllowClear)}if(options.multiple){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionSearch)}if(options.selectionCssClass!=null){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionCSS)}options.selectionAdapter=Utils.Decorate(options.selectionAdapter,EventRelay)}options.language=this._resolveLanguage(options.language);options.language.push("en");var uniqueLanguages=[];for(var l=0;l<options.language.length;l++){var language=options.language[l];if(uniqueLanguages.indexOf(language)===-1){uniqueLanguages.push(language)}}options.language=uniqueLanguages;options.translations=this._processTranslations(options.language,options.debug);return options};Defaults.prototype.reset=function(){function stripDiacritics(text){function match(a){return DIACRITICS[a]||a}return text.replace(/[^\u0000-\u007E]/g,match)}function matcher(params,data2){if(params.term==null||params.term.trim()===""){return data2}if(data2.children&&data2.children.length>0){var match=$2.extend(true,{},data2);for(var c=data2.children.length-1;c>=0;c--){var child=data2.children[c];var matches=matcher(params,child);if(matches==null){match.children.splice(c,1)}}if(match.children.length>0){return match}return matcher(params,match)}var original=stripDiacritics(data2.text).toUpperCase();var term=stripDiacritics(params.term).toUpperCase();if(original.indexOf(term)>-1){return data2}return null}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:true,debug:false,dropdownAutoWidth:false,escapeMarkup:Utils.escapeMarkup,language:{},matcher,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:false,scrollAfterSelect:false,sorter:function(data2){return data2},templateResult:function(result){return result.text},templateSelection:function(selection){return selection.text},theme:"default",width:"resolve"}};Defaults.prototype.applyFromElement=function(options,$element){var optionLanguage=options.language;var defaultLanguage=this.defaults.language;var elementLanguage=$element[0].lang;var elementClosest=$element.closest("[lang]");var parentLanguage=elementClosest[0]?elementClosest[0].lang:null;var languages=Array.prototype.concat.call(this._resolveLanguage(elementLanguage),this._resolveLanguage(optionLanguage),this._resolveLanguage(defaultLanguage),this._resolveLanguage(parentLanguage));options.language=languages;return options};Defaults.prototype._resolveLanguage=function(language){if(!language){return[]}if($2.isEmptyObject(language)){return[]}if($2.isPlainObject(language)){return[language]}var languages;if(!Array.isArray(language)){languages=[language]}else{languages=language}var resolvedLanguages=[];for(var l=0;l<languages.length;l++){resolvedLanguages.push(languages[l]);if(typeof languages[l]==="string"&&languages[l].indexOf("-")>0){var languageParts=languages[l].split("-");var baseLanguage=languageParts[0];resolvedLanguages.push(baseLanguage)}}return resolvedLanguages};Defaults.prototype._processTranslations=function(languages,debug){var translations=new Translation;for(var l=0;l<languages.length;l++){var languageData=new Translation;var language=languages[l];if(typeof language==="string"){try{languageData=Translation.loadPath(language)}catch(e2){try{language=this.defaults.amdLanguageBase+language;languageData=Translation.loadPath(language)}catch(ex){if(debug&&window.console&&console.warn){console.warn('Select2: The language file for "'+language+'" could not be automatically loaded. A fallback will be used instead.')}}}}else if($2.isPlainObject(language)){languageData=new Translation(language)}else{languageData=language}translations.extend(languageData)}return translations};Defaults.prototype.set=function(key2,value){function upperCaseLetter(_,letter){return letter.toUpperCase()}var camelKey=key2.replace(/-([a-z])/g,upperCaseLetter);var data2={};data2[camelKey]=value;var convertedData=Utils._convertData(data2);$2.extend(true,this.defaults,convertedData)};var defaults=new Defaults;return defaults});S22.define("select2/options",["jquery","./defaults","./utils"],function($2,Defaults,Utils){function Options(options,$element){this.options=options;if($element!=null){this.fromElement($element)}if($element!=null){this.options=Defaults.applyFromElement(this.options,$element)}this.options=Defaults.apply(this.options)}Options.prototype.fromElement=function($e){var excludedData=["select2"];if(this.options.multiple==null){this.options.multiple=$e[0].multiple}if(this.options.disabled==null){this.options.disabled=$e[0].disabled}if(this.options.autocomplete==null&&$e[0].autocomplete){this.options.autocomplete=$e[0].autocomplete}if(this.options.dir===null){var dirValue=$e[0].getAttribute("dir");if(dirValue){this.options.dir=dirValue}else{var closestDirValue=$e.closest("[dir]").getAttribute("dir");if(closestDirValue){this.options.dir=closestDirValue}else{this.options.dir="ltr"}}}$e[0].disabled=this.options.disabled;$e[0].multiple=this.options.multiple;if(Utils.GetData($e[0],"select2Tags")){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.')}Utils.StoreData($e[0],"data",Utils.GetData($e[0],"select2Tags"));Utils.StoreData($e[0],"tags",true)}if(Utils.GetData($e[0],"ajaxUrl")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2.")}$e[0].setAttribute("ajax--url",Utils.GetData($e[0],"ajaxUrl"));Utils.StoreData($e[0],"ajax-Url",Utils.GetData($e[0],"ajaxUrl"))}var dataset={};function upperCaseLetter(_,letter){return letter.toUpperCase()}for(var attr=0;attr<$e[0].attributes.length;attr++){var attributeName=$e[0].attributes[attr].name;var prefix="data-";if(attributeName.substr(0,prefix.length)==prefix){var dataName=attributeName.substring(prefix.length);var dataValue=Utils.GetData($e[0],dataName);var camelDataName=dataName.replace(/-([a-z])/g,upperCaseLetter);dataset[camelDataName]=dataValue}}if($2.fn.jquery&&$2.fn.jquery.substr(0,2)=="1."&&$e[0].dataset){dataset=$2.extend(true,{},$e[0].dataset,dataset)}var data2=$2.extend(true,{},Utils.GetData($e[0]),dataset);data2=Utils._convertData(data2);for(var key2 in data2){if(excludedData.indexOf(key2)>-1){continue}if($2.isPlainObject(this.options[key2])){$2.extend(this.options[key2],data2[key2])}else{this.options[key2]=data2[key2]}}return this};Options.prototype.get=function(key2){return this.options[key2]};Options.prototype.set=function(key2,val2){this.options[key2]=val2};return Options});S22.define("select2/core",["jquery","./options","./utils","./keys"],function($2,Options,Utils,KEYS){var Select2=function($element,options){if(Utils.GetData($element[0],"select2")!=null){Utils.GetData($element[0],"select2").destroy()}this.$element=$element;this.id=this._generateId($element);options=options||{};this.options=new Options(options,$element);Select2.__super__.constructor.call(this);var tabindex=$element[0].getAttribute("tabindex")||0;Utils.StoreData($element[0],"old-tabindex",tabindex);$element[0].setAttribute("tabindex","-1");var DataAdapter=this.options.get("dataAdapter");this.dataAdapter=new DataAdapter($element,this.options);var $container=this.render();this._placeContainer($container);var SelectionAdapter=this.options.get("selectionAdapter");this.selection=new SelectionAdapter($element,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,$container);var DropdownAdapter=this.options.get("dropdownAdapter");this.dropdown=new DropdownAdapter($element,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,$container);var ResultsAdapter=this.options.get("resultsAdapter");this.results=new ResultsAdapter($element,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var self2=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(initialData){self2.trigger("selection:update",{data:initialData})});$element[0].classList.add("select2-hidden-accessible");$element[0].setAttribute("aria-hidden","true");this._syncAttributes();Utils.StoreData($element[0],"select2",this);$element.data("select2",this)};Utils.Extend(Select2,Utils.Observable);Select2.prototype._generateId=function($element){var id2="";var element=$element[0];if(element!=null&&element.getAttribute("id")!=null){id2=element.getAttribute("id")}else if(element!=null&&element.getAttribute("name")!=null){id2=element.getAttribute("name")+"-"+Utils.generateChars(2)}else{id2=Utils.generateChars(4)}id2=id2.replace(/(:|\.|\[|\]|,)/g,"");id2="select2-"+id2;return id2};Select2.prototype._placeContainer=function($container){$container.insertAfter(this.$element);var width=this._resolveWidth(this.$element,this.options.get("width"));if(width!=null){$container.css("width",width)}};Select2.prototype._resolveWidth=function($element,method){var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(method=="resolve"){var styleWidth=this._resolveWidth($element,"style");if(styleWidth!=null){return styleWidth}return this._resolveWidth($element,"element")}if(method=="element"){var elementWidth=$element.outerWidth(false);if(elementWidth<=0){return"auto"}return elementWidth+"px"}if(method=="style"){var style=$element[0].getAttribute("style");if(typeof style!=="string"){return null}var attrs2=style.split(";");for(var i2=0,l=attrs2.length;i2<l;i2=i2+1){var attr=attrs2[i2].replace(/\s/g,"");var matches=attr.match(WIDTH);if(matches!==null&&matches.length>=1){return matches[1]}}return null}if(method=="computedstyle"){var computedStyle=window.getComputedStyle($element[0]);return computedStyle.width}return method};Select2.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)};Select2.prototype._registerDomEvents=function(){var self2=this;this.$element.on("change.select2",function(){self2.dataAdapter.current(function(data2){self2.trigger("selection:update",{data:data2})})});this.$element.on("focus.select2",function(evt){self2.trigger("focus",evt)});this._syncA=Utils.bind(this._syncAttributes,this);this._syncS=Utils.bind(this._syncSubtree,this);this._observer=new window.MutationObserver(function(mutations){self2._syncA();self2._syncS(mutations)});this._observer.observe(this.$element[0],{attributes:true,childList:true,subtree:false})};Select2.prototype._registerDataEvents=function(){var self2=this;this.dataAdapter.on("*",function(name,params){self2.trigger(name,params)})};Select2.prototype._registerSelectionEvents=function(){var self2=this;var nonRelayEvents=["toggle","focus"];this.selection.on("toggle",function(){self2.toggleDropdown()});this.selection.on("focus",function(params){self2.focus(params)});this.selection.on("*",function(name,params){if(nonRelayEvents.indexOf(name)!==-1){return}self2.trigger(name,params)})};Select2.prototype._registerDropdownEvents=function(){var self2=this;this.dropdown.on("*",function(name,params){self2.trigger(name,params)})};Select2.prototype._registerResultsEvents=function(){var self2=this;this.results.on("*",function(name,params){self2.trigger(name,params)})};Select2.prototype._registerEvents=function(){var self2=this;this.on("open",function(){self2.$container[0].classList.add("select2-container--open")});this.on("close",function(){self2.$container[0].classList.remove("select2-container--open")});this.on("enable",function(){self2.$container[0].classList.remove("select2-container--disabled")});this.on("disable",function(){self2.$container[0].classList.add("select2-container--disabled")});this.on("blur",function(){self2.$container[0].classList.remove("select2-container--focus")});this.on("query",function(params){if(!self2.isOpen()){self2.trigger("open",{})}this.dataAdapter.query(params,function(data2){self2.trigger("results:all",{data:data2,query:params})})});this.on("query:append",function(params){this.dataAdapter.query(params,function(data2){self2.trigger("results:append",{data:data2,query:params})})});this.on("keypress",function(evt){var key2=evt.which;if(self2.isOpen()){if(key2===KEYS.ESC||key2===KEYS.UP&&evt.altKey){self2.close(evt);evt.preventDefault()}else if(key2===KEYS.ENTER||key2===KEYS.TAB){self2.trigger("results:select",{});evt.preventDefault()}else if(key2===KEYS.SPACE&&evt.ctrlKey){self2.trigger("results:toggle",{});evt.preventDefault()}else if(key2===KEYS.UP){self2.trigger("results:previous",{});evt.preventDefault()}else if(key2===KEYS.DOWN){self2.trigger("results:next",{});evt.preventDefault()}}else{if(key2===KEYS.ENTER||key2===KEYS.SPACE||key2===KEYS.DOWN&&evt.altKey){self2.open();evt.preventDefault()}}})};Select2.prototype._syncAttributes=function(){this.options.set("disabled",this.$element[0].disabled);if(this.isDisabled()){if(this.isOpen()){this.close()}this.trigger("disable",{})}else{this.trigger("enable",{})}};Select2.prototype._isChangeMutation=function(mutations){var self2=this;if(mutations.addedNodes&&mutations.addedNodes.length>0){for(var n2=0;n2<mutations.addedNodes.length;n2++){var node=mutations.addedNodes[n2];if(node.selected){return true}}}else if(mutations.removedNodes&&mutations.removedNodes.length>0){return true}else if(Array.isArray(mutations)){return mutations.some(function(mutation){return self2._isChangeMutation(mutation)})}return false};Select2.prototype._syncSubtree=function(mutations){var changed=this._isChangeMutation(mutations);var self2=this;if(changed){this.dataAdapter.current(function(currentData){self2.trigger("selection:update",{data:currentData})})}};Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger;var preTriggerMap={"open":"opening","close":"closing","select":"selecting","unselect":"unselecting","clear":"clearing"};if(args===void 0){args={}}if(name in preTriggerMap){var preTriggerName=preTriggerMap[name];var preTriggerArgs={prevented:false,name,args};actualTrigger.call(this,preTriggerName,preTriggerArgs);if(preTriggerArgs.prevented){args.prevented=true;return}}actualTrigger.call(this,name,args)};Select2.prototype.toggleDropdown=function(){if(this.isDisabled()){return}if(this.isOpen()){this.close()}else{this.open()}};Select2.prototype.open=function(){if(this.isOpen()){return}if(this.isDisabled()){return}this.trigger("query",{})};Select2.prototype.close=function(evt){if(!this.isOpen()){return}this.trigger("close",{originalEvent:evt})};Select2.prototype.isEnabled=function(){return!this.isDisabled()};Select2.prototype.isDisabled=function(){return this.options.get("disabled")};Select2.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")};Select2.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")};Select2.prototype.focus=function(data2){if(this.hasFocus()){return}this.$container[0].classList.add("select2-container--focus");this.trigger("focus",{})};Select2.prototype.enable=function(args){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element[0].disabled instead.')}if(args==null||args.length===0){args=[true]}var disabled=!args[0];this.$element[0].disabled=disabled};Select2.prototype.data=function(){if(this.options.get("debug")&&arguments.length>0&&window.console&&console.warn){console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.')}var data2=[];this.dataAdapter.current(function(currentData){data2=currentData});return data2};Select2.prototype.val=function(args){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.')}if(args==null||args.length===0){return this.$element.val()}var newVal=args[0];if(Array.isArray(newVal)){newVal=newVal.map(function(obj){return obj.toString()})}this.$element.val(newVal).trigger("input").trigger("change")};Select2.prototype.destroy=function(){Utils.RemoveData(this.$container[0]);this.$container.remove();this._observer.disconnect();this._observer=null;this._syncA=null;this._syncS=null;this.$element.off(".select2");this.$element[0].setAttribute("tabindex",Utils.GetData(this.$element[0],"old-tabindex"));this.$element[0].classList.remove("select2-hidden-accessible");this.$element[0].setAttribute("aria-hidden","false");Utils.RemoveData(this.$element[0]);this.$element.removeData("select2");this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null};Select2.prototype.render=function(){var $container=$2('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');$container[0].setAttribute("dir",this.options.get("dir"));this.$container=$container;this.$container[0].classList.add("select2-container--"+this.options.get("theme"));Utils.StoreData($container[0],"element",this.$element);return $container};return Select2});S22.define("jquery-mousewheel",["jquery"],function($2){return $2});S22.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function($2,_,Select2,Defaults,Utils){if($2.fn.select2==null){var thisMethods=["open","close","destroy"];$2.fn.select2=function(options){options=options||{};if(typeof options==="object"){this.each(function(){var instanceOptions=$2.extend(true,{},options);var instance=new Select2($2(this),instanceOptions)});return this}else if(typeof options==="string"){var ret;var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=Utils.GetData(this,"select2");if(instance==null&&window.console&&console.error){console.error("The select2('"+options+"') method was called on an element that is not using Select2.")}ret=instance[options].apply(instance,args)});if(thisMethods.indexOf(options)>-1){return this}return ret}else{throw new Error("Invalid arguments for Select2: "+options)}}}if($2.fn.select2.defaults==null){$2.fn.select2.defaults=Defaults}return Select2});return{define:S22.define,require:S22.require}})();var select2=S2.require("jquery.select2");jQuery2.fn.select2.amd=S2;return select2});;/*!
|
|
20
|
+
* Flickity PACKAGED v3.0.0
|
|
21
|
+
* Touch, responsive, flickable carousels
|
|
22
|
+
*
|
|
23
|
+
* Licensed GPLv3 for open source use
|
|
24
|
+
* or Flickity Commercial License for commercial use
|
|
25
|
+
*
|
|
26
|
+
* https://flickity.metafizzy.co
|
|
27
|
+
* Copyright 2015-2022 Metafizzy
|
|
28
|
+
*/(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(window2,require("jquery"))}else{window2.jQueryBridget=factory18(window2,window2.jQuery)}})(window,function factory(window2,jQuery2){let console2=window2.console;let logError=typeof console2=="undefined"?function(){}:function(message){console2.error(message)};function jQueryBridget2(namespace,PluginClass,$2){$2=$2||jQuery2||window2.jQuery;if(!$2){return}if(!PluginClass.prototype.option){PluginClass.prototype.option=function(opts){if(!opts)return;this.options=Object.assign(this.options||{},opts)}}$2.fn[namespace]=function(arg0,...args){if(typeof arg0=="string"){return methodCall(this,arg0,args)}plainCall(this,arg0);return this};function methodCall($elems,methodName,args){let returnValue;let pluginMethodStr=`$().${namespace}("${methodName}")`;$elems.each(function(i2,elem){let instance=$2.data(elem,namespace);if(!instance){logError(`${namespace} not initialized. Cannot call method ${pluginMethodStr}`);return}let method=instance[methodName];if(!method||methodName.charAt(0)=="_"){logError(`${pluginMethodStr} is not a valid method`);return}let value=method.apply(instance,args);returnValue=returnValue===void 0?value:returnValue});return returnValue!==void 0?returnValue:$elems}function plainCall($elems,options){$elems.each(function(i2,elem){let instance=$2.data(elem,namespace);if(instance){instance.option(options);instance._init()}else{instance=new PluginClass(elem,options);$2.data(elem,namespace,instance)}})}}return jQueryBridget2});(function(global2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18()}else{global2.EvEmitter=factory18()}})(typeof window!="undefined"?window:this,function(){function EvEmitter(){}let proto=EvEmitter.prototype;proto.on=function(eventName,listener){if(!eventName||!listener)return this;let events=this._events=this._events||{};let listeners=events[eventName]=events[eventName]||[];if(!listeners.includes(listener)){listeners.push(listener)}return this};proto.once=function(eventName,listener){if(!eventName||!listener)return this;this.on(eventName,listener);let onceEvents=this._onceEvents=this._onceEvents||{};let onceListeners=onceEvents[eventName]=onceEvents[eventName]||{};onceListeners[listener]=true;return this};proto.off=function(eventName,listener){let listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length)return this;let index2=listeners.indexOf(listener);if(index2!=-1){listeners.splice(index2,1)}return this};proto.emitEvent=function(eventName,args){let listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length)return this;listeners=listeners.slice(0);args=args||[];let onceListeners=this._onceEvents&&this._onceEvents[eventName];for(let listener of listeners){let isOnce=onceListeners&&onceListeners[listener];if(isOnce){this.off(eventName,listener);delete onceListeners[listener]}listener.apply(this,args)}return this};proto.allOff=function(){delete this._events;delete this._onceEvents;return this};return EvEmitter});/*!
|
|
29
|
+
* Infinite Scroll v2.0.4
|
|
30
|
+
* measure size of elements
|
|
31
|
+
* MIT license
|
|
32
|
+
*/(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18()}else{window2.getSize=factory18()}})(window,function factory2(){function getStyleSize(value){let num=parseFloat(value);let isValid=value.indexOf("%")==-1&&!isNaN(num);return isValid&&num}let measurements=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];let measurementsLength=measurements.length;function getZeroSize(){let size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};measurements.forEach(measurement=>{size[measurement]=0});return size}function getSize(elem){if(typeof elem=="string")elem=document.querySelector(elem);let isElement=elem&&typeof elem=="object"&&elem.nodeType;if(!isElement)return;let style=getComputedStyle(elem);if(style.display=="none")return getZeroSize();let size={};size.width=elem.offsetWidth;size.height=elem.offsetHeight;let isBorderBox=size.isBorderBox=style.boxSizing=="border-box";measurements.forEach(measurement=>{let value=style[measurement];let num=parseFloat(value);size[measurement]=!isNaN(num)?num:0});let paddingWidth=size.paddingLeft+size.paddingRight;let paddingHeight=size.paddingTop+size.paddingBottom;let marginWidth=size.marginLeft+size.marginRight;let marginHeight=size.marginTop+size.marginBottom;let borderWidth=size.borderLeftWidth+size.borderRightWidth;let borderHeight=size.borderTopWidth+size.borderBottomWidth;let styleWidth=getStyleSize(style.width);if(styleWidth!==false){size.width=styleWidth+(isBorderBox?0:paddingWidth+borderWidth)}let styleHeight=getStyleSize(style.height);if(styleHeight!==false){size.height=styleHeight+(isBorderBox?0:paddingHeight+borderHeight)}size.innerWidth=size.width-(paddingWidth+borderWidth);size.innerHeight=size.height-(paddingHeight+borderHeight);size.outerWidth=size.width+marginWidth;size.outerHeight=size.height+marginHeight;return size}return getSize});(function(global2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(global2)}else{global2.fizzyUIUtils=factory18(global2)}})(this,function factory3(global2){let utils={};utils.extend=function(a,b){return Object.assign(a,b)};utils.modulo=function(num,div){return(num%div+div)%div};utils.makeArray=function(obj){if(Array.isArray(obj))return obj;if(obj===null||obj===void 0)return[];let isArrayLike=typeof obj=="object"&&typeof obj.length=="number";if(isArrayLike)return[...obj];return[obj]};utils.removeFrom=function(ary,obj){let index2=ary.indexOf(obj);if(index2!=-1){ary.splice(index2,1)}};utils.getParent=function(elem,selector2){while(elem.parentNode&&elem!=document.body){elem=elem.parentNode;if(elem.matches(selector2))return elem}};utils.getQueryElement=function(elem){if(typeof elem=="string"){return document.querySelector(elem)}return elem};utils.handleEvent=function(event){let method="on"+event.type;if(this[method]){this[method](event)}};utils.filterFindElements=function(elems,selector2){elems=utils.makeArray(elems);return elems.filter(elem=>elem instanceof HTMLElement).reduce((ffElems,elem)=>{if(!selector2){ffElems.push(elem);return ffElems}if(elem.matches(selector2)){ffElems.push(elem)}let childElems=elem.querySelectorAll(selector2);ffElems=ffElems.concat(...childElems);return ffElems},[])};utils.debounceMethod=function(_class,methodName,threshold){threshold=threshold||100;let method=_class.prototype[methodName];let timeoutName=methodName+"Timeout";_class.prototype[methodName]=function(){clearTimeout(this[timeoutName]);let args=arguments;this[timeoutName]=setTimeout(()=>{method.apply(this,args);delete this[timeoutName]},threshold)}};utils.docReady=function(onDocReady){let readyState=document.readyState;if(readyState=="complete"||readyState=="interactive"){setTimeout(onDocReady)}else{document.addEventListener("DOMContentLoaded",onDocReady)}};utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+"-"+$2}).toLowerCase()};let console2=global2.console;utils.htmlInit=function(WidgetClass,namespace){utils.docReady(function(){let dashedNamespace=utils.toDashed(namespace);let dataAttr="data-"+dashedNamespace;let dataAttrElems=document.querySelectorAll(`[${dataAttr}]`);let jQuery2=global2.jQuery;[...dataAttrElems].forEach(elem=>{let attr=elem.getAttribute(dataAttr);let options;try{options=attr&&JSON.parse(attr)}catch(error){if(console2){console2.error(`Error parsing ${dataAttr} on ${elem.className}: ${error}`)}return}let instance=new WidgetClass(elem,options);if(jQuery2){jQuery2.data(elem,namespace,instance)}})})};return utils});/*!
|
|
33
|
+
* Unidragger v3.0.0
|
|
34
|
+
* Draggable base class
|
|
35
|
+
* MIT license
|
|
36
|
+
*/(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(window2,require("ev-emitter"))}else{window2.Unidragger=factory18(window2,window2.EvEmitter)}})(typeof window!="undefined"?window:this,function factory4(window2,EvEmitter){function Unidragger(){}let proto=Unidragger.prototype=Object.create(EvEmitter.prototype);proto.handleEvent=function(event){let method="on"+event.type;if(this[method]){this[method](event)}};let startEvent,activeEvents;if("ontouchstart"in window2){startEvent="touchstart";activeEvents=["touchmove","touchend","touchcancel"]}else if(window2.PointerEvent){startEvent="pointerdown";activeEvents=["pointermove","pointerup","pointercancel"]}else{startEvent="mousedown";activeEvents=["mousemove","mouseup"]}proto.touchActionValue="none";proto.bindHandles=function(){this._bindHandles("addEventListener",this.touchActionValue)};proto.unbindHandles=function(){this._bindHandles("removeEventListener","")};proto._bindHandles=function(bindMethod,touchAction){this.handles.forEach(handle=>{handle[bindMethod](startEvent,this);handle[bindMethod]("click",this);if(window2.PointerEvent)handle.style.touchAction=touchAction})};proto.bindActivePointerEvents=function(){activeEvents.forEach(eventName=>{window2.addEventListener(eventName,this)})};proto.unbindActivePointerEvents=function(){activeEvents.forEach(eventName=>{window2.removeEventListener(eventName,this)})};proto.withPointer=function(methodName,event){if(event.pointerId==this.pointerIdentifier){this[methodName](event,event)}};proto.withTouch=function(methodName,event){let touch;for(let changedTouch of event.changedTouches){if(changedTouch.identifier==this.pointerIdentifier){touch=changedTouch}}if(touch)this[methodName](event,touch)};proto.onmousedown=function(event){this.pointerDown(event,event)};proto.ontouchstart=function(event){this.pointerDown(event,event.changedTouches[0])};proto.onpointerdown=function(event){this.pointerDown(event,event)};const cursorNodes=["TEXTAREA","INPUT","SELECT","OPTION"];const clickTypes=["radio","checkbox","button","submit","image","file"];proto.pointerDown=function(event,pointer){let isCursorNode=cursorNodes.includes(event.target.nodeName);let isClickType=clickTypes.includes(event.target.type);let isOkayElement=!isCursorNode||isClickType;let isOkay=!this.isPointerDown&&!event.button&&isOkayElement;if(!isOkay)return;this.isPointerDown=true;this.pointerIdentifier=pointer.pointerId!==void 0?pointer.pointerId:pointer.identifier;this.pointerDownPointer={pageX:pointer.pageX,pageY:pointer.pageY};this.bindActivePointerEvents();this.emitEvent("pointerDown",[event,pointer])};proto.onmousemove=function(event){this.pointerMove(event,event)};proto.onpointermove=function(event){this.withPointer("pointerMove",event)};proto.ontouchmove=function(event){this.withTouch("pointerMove",event)};proto.pointerMove=function(event,pointer){let moveVector={x:pointer.pageX-this.pointerDownPointer.pageX,y:pointer.pageY-this.pointerDownPointer.pageY};this.emitEvent("pointerMove",[event,pointer,moveVector]);let isDragStarting=!this.isDragging&&this.hasDragStarted(moveVector);if(isDragStarting)this.dragStart(event,pointer);if(this.isDragging)this.dragMove(event,pointer,moveVector)};proto.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>3||Math.abs(moveVector.y)>3};proto.dragStart=function(event,pointer){this.isDragging=true;this.isPreventingClicks=true;this.emitEvent("dragStart",[event,pointer])};proto.dragMove=function(event,pointer,moveVector){this.emitEvent("dragMove",[event,pointer,moveVector])};proto.onmouseup=function(event){this.pointerUp(event,event)};proto.onpointerup=function(event){this.withPointer("pointerUp",event)};proto.ontouchend=function(event){this.withTouch("pointerUp",event)};proto.pointerUp=function(event,pointer){this.pointerDone();this.emitEvent("pointerUp",[event,pointer]);if(this.isDragging){this.dragEnd(event,pointer)}else{this.staticClick(event,pointer)}};proto.dragEnd=function(event,pointer){this.isDragging=false;setTimeout(()=>delete this.isPreventingClicks);this.emitEvent("dragEnd",[event,pointer])};proto.pointerDone=function(){this.isPointerDown=false;delete this.pointerIdentifier;this.unbindActivePointerEvents();this.emitEvent("pointerDone")};proto.onpointercancel=function(event){this.withPointer("pointerCancel",event)};proto.ontouchcancel=function(event){this.withTouch("pointerCancel",event)};proto.pointerCancel=function(event,pointer){this.pointerDone();this.emitEvent("pointerCancel",[event,pointer])};proto.onclick=function(event){if(this.isPreventingClicks)event.preventDefault()};proto.staticClick=function(event,pointer){let isMouseup=event.type=="mouseup";if(isMouseup&&this.isIgnoringMouseUp)return;this.emitEvent("staticClick",[event,pointer]);if(isMouseup){this.isIgnoringMouseUp=true;setTimeout(()=>{delete this.isIgnoringMouseUp},400)}};return Unidragger});/*!
|
|
37
|
+
* imagesLoaded v5.0.0
|
|
38
|
+
* JavaScript is all like "You images are done yet or what?"
|
|
39
|
+
* MIT License
|
|
40
|
+
*/(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(window2,require("ev-emitter"))}else{window2.imagesLoaded=factory18(window2,window2.EvEmitter)}})(typeof window!=="undefined"?window:this,function factory5(window2,EvEmitter){let $2=window2.jQuery;let console2=window2.console;function makeArray(obj){if(Array.isArray(obj))return obj;let isArrayLike=typeof obj=="object"&&typeof obj.length=="number";if(isArrayLike)return[...obj];return[obj]}function ImagesLoaded(elem,options,onAlways){if(!(this instanceof ImagesLoaded)){return new ImagesLoaded(elem,options,onAlways)}let queryElem=elem;if(typeof elem=="string"){queryElem=document.querySelectorAll(elem)}if(!queryElem){console2.error(`Bad element for imagesLoaded ${queryElem||elem}`);return}this.elements=makeArray(queryElem);this.options={};if(typeof options=="function"){onAlways=options}else{Object.assign(this.options,options)}if(onAlways)this.on("always",onAlways);this.getImages();if($2)this.jqDeferred=new $2.Deferred;setTimeout(this.check.bind(this))}ImagesLoaded.prototype=Object.create(EvEmitter.prototype);ImagesLoaded.prototype.getImages=function(){this.images=[];this.elements.forEach(this.addElementImages,this)};const elementNodeTypes=[1,9,11];ImagesLoaded.prototype.addElementImages=function(elem){if(elem.nodeName==="IMG"){this.addImage(elem)}if(this.options.background===true){this.addElementBackgroundImages(elem)}let{nodeType}=elem;if(!nodeType||!elementNodeTypes.includes(nodeType))return;let childImgs=elem.querySelectorAll("img");for(let img of childImgs){this.addImage(img)}if(typeof this.options.background=="string"){let children=elem.querySelectorAll(this.options.background);for(let child of children){this.addElementBackgroundImages(child)}}};const reURL=/url\((['"])?(.*?)\1\)/gi;ImagesLoaded.prototype.addElementBackgroundImages=function(elem){let style=getComputedStyle(elem);if(!style)return;let matches=reURL.exec(style.backgroundImage);while(matches!==null){let url=matches&&matches[2];if(url){this.addBackground(url,elem)}matches=reURL.exec(style.backgroundImage)}};ImagesLoaded.prototype.addImage=function(img){let loadingImage=new LoadingImage(img);this.images.push(loadingImage)};ImagesLoaded.prototype.addBackground=function(url,elem){let background=new Background(url,elem);this.images.push(background)};ImagesLoaded.prototype.check=function(){this.progressedCount=0;this.hasAnyBroken=false;if(!this.images.length){this.complete();return}let onProgress=(image,elem,message)=>{setTimeout(()=>{this.progress(image,elem,message)})};this.images.forEach(function(loadingImage){loadingImage.once("progress",onProgress);loadingImage.check()})};ImagesLoaded.prototype.progress=function(image,elem,message){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!image.isLoaded;this.emitEvent("progress",[this,image,elem]);if(this.jqDeferred&&this.jqDeferred.notify){this.jqDeferred.notify(this,image)}if(this.progressedCount===this.images.length){this.complete()}if(this.options.debug&&console2){console2.log(`progress: ${message}`,image,elem)}};ImagesLoaded.prototype.complete=function(){let eventName=this.hasAnyBroken?"fail":"done";this.isComplete=true;this.emitEvent(eventName,[this]);this.emitEvent("always",[this]);if(this.jqDeferred){let jqMethod=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[jqMethod](this)}};function LoadingImage(img){this.img=img}LoadingImage.prototype=Object.create(EvEmitter.prototype);LoadingImage.prototype.check=function(){let isComplete=this.getIsImageComplete();if(isComplete){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image;if(this.img.crossOrigin){this.proxyImage.crossOrigin=this.img.crossOrigin}this.proxyImage.addEventListener("load",this);this.proxyImage.addEventListener("error",this);this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.proxyImage.src=this.img.currentSrc||this.img.src};LoadingImage.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth};LoadingImage.prototype.confirm=function(isLoaded,message){this.isLoaded=isLoaded;let{parentNode}=this.img;let elem=parentNode.nodeName==="PICTURE"?parentNode:this.img;this.emitEvent("progress",[this,elem,message])};LoadingImage.prototype.handleEvent=function(event){let method="on"+event.type;if(this[method]){this[method](event)}};LoadingImage.prototype.onload=function(){this.confirm(true,"onload");this.unbindEvents()};LoadingImage.prototype.onerror=function(){this.confirm(false,"onerror");this.unbindEvents()};LoadingImage.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this);this.proxyImage.removeEventListener("error",this);this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)};function Background(url,element){this.url=url;this.element=element;this.img=new Image}Background.prototype=Object.create(LoadingImage.prototype);Background.prototype.check=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.img.src=this.url;let isComplete=this.getIsImageComplete();if(isComplete){this.confirm(this.img.naturalWidth!==0,"naturalWidth");this.unbindEvents()}};Background.prototype.unbindEvents=function(){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)};Background.prototype.confirm=function(isLoaded,message){this.isLoaded=isLoaded;this.emitEvent("progress",[this,this.element,message])};ImagesLoaded.makeJQueryPlugin=function(jQuery2){jQuery2=jQuery2||window2.jQuery;if(!jQuery2)return;$2=jQuery2;$2.fn.imagesLoaded=function(options,onAlways){let instance=new ImagesLoaded(this,options,onAlways);return instance.jqDeferred.promise($2(this))}};ImagesLoaded.makeJQueryPlugin();return ImagesLoaded});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("get-size"))}else{window2.Flickity=window2.Flickity||{};window2.Flickity.Cell=factory18(window2.getSize)}})(typeof window!="undefined"?window:this,function factory6(getSize){const cellClassName="flickity-cell";function Cell(elem){this.element=elem;this.element.classList.add(cellClassName);this.x=0;this.unselect()}let proto=Cell.prototype;proto.destroy=function(){this.unselect();this.element.classList.remove(cellClassName);this.element.style.transform="";this.element.removeAttribute("aria-hidden")};proto.getSize=function(){this.size=getSize(this.element)};proto.select=function(){this.element.classList.add("is-selected");this.element.removeAttribute("aria-hidden")};proto.unselect=function(){this.element.classList.remove("is-selected");this.element.setAttribute("aria-hidden","true")};proto.remove=function(){this.element.remove()};return Cell});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18()}else{window2.Flickity=window2.Flickity||{};window2.Flickity.Slide=factory18()}})(typeof window!="undefined"?window:this,function factory7(){function Slide(beginMargin,endMargin,cellAlign){this.beginMargin=beginMargin;this.endMargin=endMargin;this.cellAlign=cellAlign;this.cells=[];this.outerWidth=0;this.height=0}let proto=Slide.prototype;proto.addCell=function(cell){this.cells.push(cell);this.outerWidth+=cell.size.outerWidth;this.height=Math.max(cell.size.outerHeight,this.height);if(this.cells.length===1){this.x=cell.x;this.firstMargin=cell.size[this.beginMargin]}};proto.updateTarget=function(){let lastCell=this.getLastCell();let lastMargin=lastCell?lastCell.size[this.endMargin]:0;let slideWidth=this.outerWidth-(this.firstMargin+lastMargin);this.target=this.x+this.firstMargin+slideWidth*this.cellAlign};proto.getLastCell=function(){return this.cells[this.cells.length-1]};proto.select=function(){this.cells.forEach(cell=>cell.select())};proto.unselect=function(){this.cells.forEach(cell=>cell.unselect())};proto.getCellElements=function(){return this.cells.map(cell=>cell.element)};return Slide});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("fizzy-ui-utils"))}else{window2.Flickity=window2.Flickity||{};window2.Flickity.animatePrototype=factory18(window2.fizzyUIUtils)}})(typeof window!="undefined"?window:this,function factory8(utils){let proto={};proto.startAnimation=function(){if(this.isAnimating)return;this.isAnimating=true;this.restingFrames=0;this.animate()};proto.animate=function(){this.applyDragForce();this.applySelectedAttraction();let previousX=this.x;this.integratePhysics();this.positionSlider();this.settle(previousX);if(this.isAnimating)requestAnimationFrame(()=>this.animate())};proto.positionSlider=function(){let x2=this.x;if(this.isWrapping){x2=utils.modulo(x2,this.slideableWidth)-this.slideableWidth;this.shiftWrapCells(x2)}this.setTranslateX(x2,this.isAnimating);this.dispatchScrollEvent()};proto.setTranslateX=function(x2,is3d){x2+=this.cursorPosition;if(this.options.rightToLeft)x2=-x2;let translateX=this.getPositionValue(x2);this.slider.style.transform=is3d?`translate3d(${translateX},0,0)`:`translateX(${translateX})`};proto.dispatchScrollEvent=function(){let firstSlide=this.slides[0];if(!firstSlide)return;let positionX=-this.x-firstSlide.target;let progress=positionX/this.slidesWidth;this.dispatchEvent("scroll",null,[progress,positionX])};proto.positionSliderAtSelected=function(){if(!this.cells.length)return;this.x=-this.selectedSlide.target;this.velocity=0;this.positionSlider()};proto.getPositionValue=function(position){if(this.options.percentPosition){return Math.round(position/this.size.innerWidth*1e4)*.01+"%"}else{return Math.round(position)+"px"}};proto.settle=function(previousX){let isResting=!this.isPointerDown&&Math.round(this.x*100)===Math.round(previousX*100);if(isResting)this.restingFrames++;if(this.restingFrames>2){this.isAnimating=false;delete this.isFreeScrolling;this.positionSlider();this.dispatchEvent("settle",null,[this.selectedIndex])}};proto.shiftWrapCells=function(x2){let beforeGap=this.cursorPosition+x2;this._shiftCells(this.beforeShiftCells,beforeGap,-1);let afterGap=this.size.innerWidth-(x2+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,afterGap,1)};proto._shiftCells=function(cells,gap,shift){cells.forEach(cell=>{let cellShift=gap>0?shift:0;this._wrapShiftCell(cell,cellShift);gap-=cell.size.outerWidth})};proto._unshiftCells=function(cells){if(!cells||!cells.length)return;cells.forEach(cell=>this._wrapShiftCell(cell,0))};proto._wrapShiftCell=function(cell,shift){this._renderCellPosition(cell,cell.x+this.slideableWidth*shift)};proto.integratePhysics=function(){this.x+=this.velocity;this.velocity*=this.getFrictionFactor()};proto.applyForce=function(force){this.velocity+=force};proto.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]};proto.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())};proto.applyDragForce=function(){if(!this.isDraggable||!this.isPointerDown)return;let dragVelocity=this.dragX-this.x;let dragForce=dragVelocity-this.velocity;this.applyForce(dragForce)};proto.applySelectedAttraction=function(){let dragDown=this.isDraggable&&this.isPointerDown;if(dragDown||this.isFreeScrolling||!this.slides.length)return;let distance=this.selectedSlide.target*-1-this.x;let force=distance*this.options.selectedAttraction;this.applyForce(force)};return proto});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(window2,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./cell"),require("./slide"),require("./animate"))}else{let _Flickity=window2.Flickity;window2.Flickity=factory18(window2,window2.EvEmitter,window2.getSize,window2.fizzyUIUtils,_Flickity.Cell,_Flickity.Slide,_Flickity.animatePrototype)}})(typeof window!="undefined"?window:this,function factory9(window2,EvEmitter,getSize,utils,Cell,Slide,animatePrototype){const{getComputedStyle:getComputedStyle2,console:console2}=window2;let{jQuery:jQuery2}=window2;let GUID=0;let instances={};function Flickity2(element,options){let queryElement=utils.getQueryElement(element);if(!queryElement){if(console2)console2.error(`Bad element for Flickity: ${queryElement||element}`);return}this.element=queryElement;if(this.element.flickityGUID){let instance=instances[this.element.flickityGUID];if(instance)instance.option(options);return instance}if(jQuery2){this.$element=jQuery2(this.element)}this.options={...this.constructor.defaults};this.option(options);this._create()}Flickity2.defaults={accessibility:true,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:true,percentPosition:true,resize:true,selectedAttraction:.025,setGallerySize:true};Flickity2.create={};let proto=Flickity2.prototype;Object.assign(proto,EvEmitter.prototype);proto._create=function(){let{resize,watchCSS,rightToLeft}=this.options;let id2=this.guid=++GUID;this.element.flickityGUID=id2;instances[id2]=this;this.selectedIndex=0;this.restingFrames=0;this.x=0;this.velocity=0;this.beginMargin=rightToLeft?"marginRight":"marginLeft";this.endMargin=rightToLeft?"marginLeft":"marginRight";this.viewport=document.createElement("div");this.viewport.className="flickity-viewport";this._createSlider();this.focusableElems=[this.element];if(resize||watchCSS){window2.addEventListener("resize",this)}for(let eventName in this.options.on){let listener=this.options.on[eventName];this.on(eventName,listener)}for(let method in Flickity2.create){Flickity2.create[method].call(this)}if(watchCSS){this.watchCSS()}else{this.activate()}};proto.option=function(opts){Object.assign(this.options,opts)};proto.activate=function(){if(this.isActive)return;this.isActive=true;this.element.classList.add("flickity-enabled");if(this.options.rightToLeft){this.element.classList.add("flickity-rtl")}this.getSize();let cellElems=this._filterFindCellElements(this.element.children);this.slider.append(...cellElems);this.viewport.append(this.slider);this.element.append(this.viewport);this.reloadCells();if(this.options.accessibility){this.element.tabIndex=0;this.element.addEventListener("keydown",this)}this.emitEvent("activate");this.selectInitialIndex();this.isInitActivated=true;this.dispatchEvent("ready")};proto._createSlider=function(){let slider=document.createElement("div");slider.className="flickity-slider";this.slider=slider};proto._filterFindCellElements=function(elems){return utils.filterFindElements(elems,this.options.cellSelector)};proto.reloadCells=function(){this.cells=this._makeCells(this.slider.children);this.positionCells();this._updateWrapShiftCells();this.setGallerySize()};proto._makeCells=function(elems){let cellElems=this._filterFindCellElements(elems);return cellElems.map(cellElem=>new Cell(cellElem))};proto.getLastCell=function(){return this.cells[this.cells.length-1]};proto.getLastSlide=function(){return this.slides[this.slides.length-1]};proto.positionCells=function(){this._sizeCells(this.cells);this._positionCells(0)};proto._positionCells=function(index2){index2=index2||0;this.maxCellHeight=index2?this.maxCellHeight||0:0;let cellX=0;if(index2>0){let startCell=this.cells[index2-1];cellX=startCell.x+startCell.size.outerWidth}this.cells.slice(index2).forEach(cell=>{cell.x=cellX;this._renderCellPosition(cell,cellX);cellX+=cell.size.outerWidth;this.maxCellHeight=Math.max(cell.size.outerHeight,this.maxCellHeight)});this.slideableWidth=cellX;this.updateSlides();this._containSlides();this.slidesWidth=this.cells.length?this.getLastSlide().target-this.slides[0].target:0};proto._renderCellPosition=function(cell,x2){let sideOffset=this.options.rightToLeft?-1:1;let renderX=x2*sideOffset;if(this.options.percentPosition)renderX*=this.size.innerWidth/cell.size.width;let positionValue=this.getPositionValue(renderX);cell.element.style.transform=`translateX( ${positionValue} )`};proto._sizeCells=function(cells){cells.forEach(cell=>cell.getSize())};proto.updateSlides=function(){this.slides=[];if(!this.cells.length)return;let{beginMargin,endMargin}=this;let slide=new Slide(beginMargin,endMargin,this.cellAlign);this.slides.push(slide);let canCellFit=this._getCanCellFit();this.cells.forEach((cell,i2)=>{if(!slide.cells.length){slide.addCell(cell);return}let slideWidth=slide.outerWidth-slide.firstMargin+(cell.size.outerWidth-cell.size[endMargin]);if(canCellFit(i2,slideWidth)){slide.addCell(cell)}else{slide.updateTarget();slide=new Slide(beginMargin,endMargin,this.cellAlign);this.slides.push(slide);slide.addCell(cell)}});slide.updateTarget();this.updateSelectedSlide()};proto._getCanCellFit=function(){let{groupCells}=this.options;if(!groupCells)return()=>false;if(typeof groupCells=="number"){let number=parseInt(groupCells,10);return i2=>i2%number!==0}let percent=1;let percentMatch=typeof groupCells=="string"&&groupCells.match(/^(\d+)%$/);if(percentMatch)percent=parseInt(percentMatch[1],10)/100;let groupWidth=(this.size.innerWidth+1)*percent;return(i2,slideWidth)=>slideWidth<=groupWidth};proto._init=proto.reposition=function(){this.positionCells();this.positionSliderAtSelected()};proto.getSize=function(){this.size=getSize(this.element);this.setCellAlign();this.cursorPosition=this.size.innerWidth*this.cellAlign};let cellAlignShorthands={left:0,center:.5,right:1};proto.setCellAlign=function(){let{cellAlign,rightToLeft}=this.options;let shorthand=cellAlignShorthands[cellAlign];this.cellAlign=shorthand!==void 0?shorthand:cellAlign;if(rightToLeft)this.cellAlign=1-this.cellAlign};proto.setGallerySize=function(){if(!this.options.setGallerySize)return;let height=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=`${height}px`};proto._updateWrapShiftCells=function(){this.isWrapping=this.getIsWrapping();if(!this.isWrapping)return;this._unshiftCells(this.beforeShiftCells);this._unshiftCells(this.afterShiftCells);let beforeGapX=this.cursorPosition;let lastIndex=this.cells.length-1;this.beforeShiftCells=this._getGapCells(beforeGapX,lastIndex,-1);let afterGapX=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(afterGapX,0,1)};proto.getIsWrapping=function(){let{wrapAround}=this.options;if(!wrapAround||this.slides.length<2)return false;if(wrapAround!=="fill")return true;let gapWidth=this.slideableWidth-this.size.innerWidth;if(gapWidth>this.size.innerWidth)return true;for(let cell of this.cells){if(cell.size.outerWidth>gapWidth)return false}return true};proto._getGapCells=function(gapX,cellIndex,increment){let cells=[];while(gapX>0){let cell=this.cells[cellIndex];if(!cell)break;cells.push(cell);cellIndex+=increment;gapX-=cell.size.outerWidth}return cells};proto._containSlides=function(){let isContaining=this.options.contain&&!this.isWrapping&&this.cells.length;if(!isContaining)return;let contentWidth=this.slideableWidth-this.getLastCell().size[this.endMargin];let isContentSmaller=contentWidth<this.size.innerWidth;if(isContentSmaller){this.slides.forEach(slide=>{slide.target=contentWidth*this.cellAlign})}else{let beginBound=this.cursorPosition+this.cells[0].size[this.beginMargin];let endBound=contentWidth-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach(slide=>{slide.target=Math.max(slide.target,beginBound);slide.target=Math.min(slide.target,endBound)})}};proto.dispatchEvent=function(type2,event,args){let emitArgs=event?[event].concat(args):args;this.emitEvent(type2,emitArgs);if(jQuery2&&this.$element){type2+=this.options.namespaceJQueryEvents?".flickity":"";let $event=type2;if(event){let jQEvent=new jQuery2.Event(event);jQEvent.type=type2;$event=jQEvent}this.$element.trigger($event,args)}};const unidraggerEvents=["dragStart","dragMove","dragEnd","pointerDown","pointerMove","pointerEnd","staticClick"];let _emitEvent=proto.emitEvent;proto.emitEvent=function(eventName,args){if(eventName==="staticClick"){let clickedCell=this.getParentCell(args[0].target);let cellElem=clickedCell&&clickedCell.element;let cellIndex=clickedCell&&this.cells.indexOf(clickedCell);args=args.concat(cellElem,cellIndex)}_emitEvent.call(this,eventName,args);let isUnidraggerEvent=unidraggerEvents.includes(eventName);if(!isUnidraggerEvent||!jQuery2||!this.$element)return;eventName+=this.options.namespaceJQueryEvents?".flickity":"";let event=args.shift(0);let jQEvent=new jQuery2.Event(event);jQEvent.type=eventName;this.$element.trigger(jQEvent,args)};proto.select=function(index2,isWrap,isInstant){if(!this.isActive)return;index2=parseInt(index2,10);this._wrapSelect(index2);if(this.isWrapping||isWrap){index2=utils.modulo(index2,this.slides.length)}if(!this.slides[index2])return;let prevIndex=this.selectedIndex;this.selectedIndex=index2;this.updateSelectedSlide();if(isInstant){this.positionSliderAtSelected()}else{this.startAnimation()}if(this.options.adaptiveHeight){this.setGallerySize()}this.dispatchEvent("select",null,[index2]);if(index2!==prevIndex){this.dispatchEvent("change",null,[index2])}};proto._wrapSelect=function(index2){if(!this.isWrapping)return;const{selectedIndex,slideableWidth,slides:{length}}=this;if(!this.isDragSelect){let wrapIndex=utils.modulo(index2,length);let delta=Math.abs(wrapIndex-selectedIndex);let backWrapDelta=Math.abs(wrapIndex+length-selectedIndex);let forewardWrapDelta=Math.abs(wrapIndex-length-selectedIndex);if(backWrapDelta<delta){index2+=length}else if(forewardWrapDelta<delta){index2-=length}}if(index2<0){this.x-=slideableWidth}else if(index2>=length){this.x+=slideableWidth}};proto.previous=function(isWrap,isInstant){this.select(this.selectedIndex-1,isWrap,isInstant)};proto.next=function(isWrap,isInstant){this.select(this.selectedIndex+1,isWrap,isInstant)};proto.updateSelectedSlide=function(){let slide=this.slides[this.selectedIndex];if(!slide)return;this.unselectSelectedSlide();this.selectedSlide=slide;slide.select();this.selectedCells=slide.cells;this.selectedElements=slide.getCellElements();this.selectedCell=slide.cells[0];this.selectedElement=this.selectedElements[0]};proto.unselectSelectedSlide=function(){if(this.selectedSlide)this.selectedSlide.unselect()};proto.selectInitialIndex=function(){let initialIndex=this.options.initialIndex;if(this.isInitActivated){this.select(this.selectedIndex,false,true);return}if(initialIndex&&typeof initialIndex=="string"){let cell=this.queryCell(initialIndex);if(cell){this.selectCell(initialIndex,false,true);return}}let index2=0;if(initialIndex&&this.slides[initialIndex]){index2=initialIndex}this.select(index2,false,true)};proto.selectCell=function(value,isWrap,isInstant){let cell=this.queryCell(value);if(!cell)return;let index2=this.getCellSlideIndex(cell);this.select(index2,isWrap,isInstant)};proto.getCellSlideIndex=function(cell){let cellSlide=this.slides.find(slide=>slide.cells.includes(cell));return this.slides.indexOf(cellSlide)};proto.getCell=function(elem){for(let cell of this.cells){if(cell.element===elem)return cell}};proto.getCells=function(elems){elems=utils.makeArray(elems);return elems.map(elem=>this.getCell(elem)).filter(Boolean)};proto.getCellElements=function(){return this.cells.map(cell=>cell.element)};proto.getParentCell=function(elem){let cell=this.getCell(elem);if(cell)return cell;let closest=elem.closest(".flickity-slider > *");return this.getCell(closest)};proto.getAdjacentCellElements=function(adjCount,index2){if(!adjCount)return this.selectedSlide.getCellElements();index2=index2===void 0?this.selectedIndex:index2;let len=this.slides.length;if(1+adjCount*2>=len){return this.getCellElements()}let cellElems=[];for(let i2=index2-adjCount;i2<=index2+adjCount;i2++){let slideIndex=this.isWrapping?utils.modulo(i2,len):i2;let slide=this.slides[slideIndex];if(slide){cellElems=cellElems.concat(slide.getCellElements())}}return cellElems};proto.queryCell=function(selector2){if(typeof selector2=="number"){return this.cells[selector2]}let isSelectorString=typeof selector2=="string"&&!selector2.match(/^[#.]?[\d/]/);if(isSelectorString){selector2=this.element.querySelector(selector2)}return this.getCell(selector2)};proto.uiChange=function(){this.emitEvent("uiChange")};proto.onresize=function(){this.watchCSS();this.resize()};utils.debounceMethod(Flickity2,"onresize",150);proto.resize=function(){if(!this.isActive||this.isAnimating||this.isDragging)return;this.getSize();if(this.isWrapping){this.x=utils.modulo(this.x,this.slideableWidth)}this.positionCells();this._updateWrapShiftCells();this.setGallerySize();this.emitEvent("resize");let selectedElement=this.selectedElements&&this.selectedElements[0];this.selectCell(selectedElement,false,true)};proto.watchCSS=function(){if(!this.options.watchCSS)return;let afterContent=getComputedStyle2(this.element,":after").content;if(afterContent.includes("flickity")){this.activate()}else{this.deactivate()}};proto.onkeydown=function(event){let{activeElement}=document;let handler=Flickity2.keyboardHandlers[event.key];if(!this.options.accessibility||!activeElement||!handler)return;let isFocused=this.focusableElems.some(elem=>activeElement===elem);if(isFocused)handler.call(this)};Flickity2.keyboardHandlers={ArrowLeft:function(){this.uiChange();let leftMethod=this.options.rightToLeft?"next":"previous";this[leftMethod]()},ArrowRight:function(){this.uiChange();let rightMethod=this.options.rightToLeft?"previous":"next";this[rightMethod]()}};proto.focus=function(){this.element.focus({preventScroll:true})};proto.deactivate=function(){if(!this.isActive)return;this.element.classList.remove("flickity-enabled");this.element.classList.remove("flickity-rtl");this.unselectSelectedSlide();this.cells.forEach(cell=>cell.destroy());this.viewport.remove();this.element.append(...this.slider.children);if(this.options.accessibility){this.element.removeAttribute("tabIndex");this.element.removeEventListener("keydown",this)}this.isActive=false;this.emitEvent("deactivate")};proto.destroy=function(){this.deactivate();window2.removeEventListener("resize",this);this.allOff();this.emitEvent("destroy");if(jQuery2&&this.$element){jQuery2.removeData(this.element,"flickity")}delete this.element.flickityGUID;delete instances[this.guid]};Object.assign(proto,animatePrototype);Flickity2.data=function(elem){elem=utils.getQueryElement(elem);if(elem)return instances[elem.flickityGUID]};utils.htmlInit(Flickity2,"flickity");let{jQueryBridget:jQueryBridget2}=window2;if(jQuery2&&jQueryBridget2){jQueryBridget2("flickity",Flickity2,jQuery2)}Flickity2.setJQuery=function(jq){jQuery2=jq};Flickity2.Cell=Cell;Flickity2.Slide=Slide;return Flickity2});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(window2,require("./core"),require("unidragger"),require("fizzy-ui-utils"))}else{window2.Flickity=factory18(window2,window2.Flickity,window2.Unidragger,window2.fizzyUIUtils)}})(typeof window!="undefined"?window:this,function factory10(window2,Flickity2,Unidragger,utils){Object.assign(Flickity2.defaults,{draggable:">1",dragThreshold:3});let proto=Flickity2.prototype;Object.assign(proto,Unidragger.prototype);proto.touchActionValue="";Flickity2.create.drag=function(){this.on("activate",this.onActivateDrag);this.on("uiChange",this._uiChangeDrag);this.on("deactivate",this.onDeactivateDrag);this.on("cellChange",this.updateDraggable);this.on("pointerDown",this.handlePointerDown);this.on("pointerUp",this.handlePointerUp);this.on("pointerDown",this.handlePointerDone);this.on("dragStart",this.handleDragStart);this.on("dragMove",this.handleDragMove);this.on("dragEnd",this.handleDragEnd);this.on("staticClick",this.handleStaticClick)};proto.onActivateDrag=function(){this.handles=[this.viewport];this.bindHandles();this.updateDraggable()};proto.onDeactivateDrag=function(){this.unbindHandles();this.element.classList.remove("is-draggable")};proto.updateDraggable=function(){if(this.options.draggable===">1"){this.isDraggable=this.slides.length>1}else{this.isDraggable=this.options.draggable}this.element.classList.toggle("is-draggable",this.isDraggable)};proto._uiChangeDrag=function(){delete this.isFreeScrolling};proto.handlePointerDown=function(event){if(!this.isDraggable){this.bindActivePointerEvents(event);return}let isTouchStart=event.type==="touchstart";let isTouchPointer=event.pointerType==="touch";let isFocusNode=event.target.matches("input, textarea, select");if(!isTouchStart&&!isTouchPointer&&!isFocusNode)event.preventDefault();if(!isFocusNode)this.focus();if(document.activeElement!==this.element)document.activeElement.blur();this.dragX=this.x;this.viewport.classList.add("is-pointer-down");this.pointerDownScroll=getScrollPosition();window2.addEventListener("scroll",this);this.bindActivePointerEvents(event)};proto.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>this.options.dragThreshold};proto.handlePointerUp=function(){delete this.isTouchScrolling;this.viewport.classList.remove("is-pointer-down")};proto.handlePointerDone=function(){window2.removeEventListener("scroll",this);delete this.pointerDownScroll};proto.handleDragStart=function(){if(!this.isDraggable)return;this.dragStartPosition=this.x;this.startAnimation();window2.removeEventListener("scroll",this)};proto.handleDragMove=function(event,pointer,moveVector){if(!this.isDraggable)return;event.preventDefault();this.previousDragX=this.dragX;let direction=this.options.rightToLeft?-1:1;if(this.isWrapping)moveVector.x%=this.slideableWidth;let dragX=this.dragStartPosition+moveVector.x*direction;if(!this.isWrapping){let originBound=Math.max(-this.slides[0].target,this.dragStartPosition);dragX=dragX>originBound?(dragX+originBound)*.5:dragX;let endBound=Math.min(-this.getLastSlide().target,this.dragStartPosition);dragX=dragX<endBound?(dragX+endBound)*.5:dragX}this.dragX=dragX;this.dragMoveTime=new Date};proto.handleDragEnd=function(){if(!this.isDraggable)return;let{freeScroll}=this.options;if(freeScroll)this.isFreeScrolling=true;let index2=this.dragEndRestingSelect();if(freeScroll&&!this.isWrapping){let restingX=this.getRestingPosition();this.isFreeScrolling=-restingX>this.slides[0].target&&-restingX<this.getLastSlide().target}else if(!freeScroll&&index2===this.selectedIndex){index2+=this.dragEndBoostSelect()}delete this.previousDragX;this.isDragSelect=this.isWrapping;this.select(index2);delete this.isDragSelect};proto.dragEndRestingSelect=function(){let restingX=this.getRestingPosition();let distance=Math.abs(this.getSlideDistance(-restingX,this.selectedIndex));let positiveResting=this._getClosestResting(restingX,distance,1);let negativeResting=this._getClosestResting(restingX,distance,-1);return positiveResting.distance<negativeResting.distance?positiveResting.index:negativeResting.index};proto._getClosestResting=function(restingX,distance,increment){let index2=this.selectedIndex;let minDistance=Infinity;let condition=this.options.contain&&!this.isWrapping?(dist,minDist)=>dist<=minDist:(dist,minDist)=>dist<minDist;while(condition(distance,minDistance)){index2+=increment;minDistance=distance;distance=this.getSlideDistance(-restingX,index2);if(distance===null)break;distance=Math.abs(distance)}return{distance:minDistance,index:index2-increment}};proto.getSlideDistance=function(x2,index2){let len=this.slides.length;let isWrapAround=this.options.wrapAround&&len>1;let slideIndex=isWrapAround?utils.modulo(index2,len):index2;let slide=this.slides[slideIndex];if(!slide)return null;let wrap=isWrapAround?this.slideableWidth*Math.floor(index2/len):0;return x2-(slide.target+wrap)};proto.dragEndBoostSelect=function(){if(this.previousDragX===void 0||!this.dragMoveTime||new Date-this.dragMoveTime>100){return 0}let distance=this.getSlideDistance(-this.dragX,this.selectedIndex);let delta=this.previousDragX-this.dragX;if(distance>0&&delta>0){return 1}else if(distance<0&&delta<0){return-1}return 0};proto.onscroll=function(){let scroll=getScrollPosition();let scrollMoveX=this.pointerDownScroll.x-scroll.x;let scrollMoveY=this.pointerDownScroll.y-scroll.y;if(Math.abs(scrollMoveX)>3||Math.abs(scrollMoveY)>3){this.pointerDone()}};function getScrollPosition(){return{x:window2.pageXOffset,y:window2.pageYOffset}}return Flickity2});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("./core"))}else{factory18(window2.Flickity)}})(typeof window!="undefined"?window:this,function factory11(Flickity2){const svgURI="http://www.w3.org/2000/svg";function PrevNextButton(increment,direction,arrowShape){this.increment=increment;this.direction=direction;this.isPrevious=increment==="previous";this.isLeft=direction==="left";this._create(arrowShape)}PrevNextButton.prototype._create=function(arrowShape){let element=this.element=document.createElement("button");element.className=`flickity-button flickity-prev-next-button ${this.increment}`;let label=this.isPrevious?"Previous":"Next";element.setAttribute("type","button");element.setAttribute("aria-label",label);this.disable();let svg=this.createSVG(label,arrowShape);element.append(svg)};PrevNextButton.prototype.createSVG=function(label,arrowShape){let svg=document.createElementNS(svgURI,"svg");svg.setAttribute("class","flickity-button-icon");svg.setAttribute("viewBox","0 0 100 100");let title=document.createElementNS(svgURI,"title");title.append(label);let path=document.createElementNS(svgURI,"path");let pathMovements=getArrowMovements(arrowShape);path.setAttribute("d",pathMovements);path.setAttribute("class","arrow");if(!this.isLeft){path.setAttribute("transform","translate(100, 100) rotate(180)")}svg.append(title,path);return svg};function getArrowMovements(shape){if(typeof shape=="string")return shape;let{x0,x1,x2,x3,y1,y2}=shape;return`M ${x0}, 50
|
|
41
|
+
L ${x1}, ${y1+50}
|
|
42
|
+
L ${x2}, ${y2+50}
|
|
43
|
+
L ${x3}, 50
|
|
44
|
+
L ${x2}, ${50-y2}
|
|
45
|
+
L ${x1}, ${50-y1}
|
|
46
|
+
Z`}PrevNextButton.prototype.enable=function(){this.element.removeAttribute("disabled")};PrevNextButton.prototype.disable=function(){this.element.setAttribute("disabled",true)};Object.assign(Flickity2.defaults,{prevNextButtons:true,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}});Flickity2.create.prevNextButtons=function(){if(!this.options.prevNextButtons)return;let{rightToLeft,arrowShape}=this.options;let prevDirection=rightToLeft?"right":"left";let nextDirection=rightToLeft?"left":"right";this.prevButton=new PrevNextButton("previous",prevDirection,arrowShape);this.nextButton=new PrevNextButton("next",nextDirection,arrowShape);this.focusableElems.push(this.prevButton.element);this.focusableElems.push(this.nextButton.element);this.handlePrevButtonClick=()=>{this.uiChange();this.previous()};this.handleNextButtonClick=()=>{this.uiChange();this.next()};this.on("activate",this.activatePrevNextButtons);this.on("select",this.updatePrevNextButtons)};let proto=Flickity2.prototype;proto.updatePrevNextButtons=function(){let lastIndex=this.slides.length?this.slides.length-1:0;this.updatePrevNextButton(this.prevButton,0);this.updatePrevNextButton(this.nextButton,lastIndex)};proto.updatePrevNextButton=function(button,disabledIndex){if(this.isWrapping&&this.slides.length>1){button.enable();return}let isEnabled=this.selectedIndex!==disabledIndex;button[isEnabled?"enable":"disable"]();let isDisabledFocused=!isEnabled&&document.activeElement===button.element;if(isDisabledFocused)this.focus()};proto.activatePrevNextButtons=function(){this.prevButton.element.addEventListener("click",this.handlePrevButtonClick);this.nextButton.element.addEventListener("click",this.handleNextButtonClick);this.element.append(this.prevButton.element,this.nextButton.element);this.on("deactivate",this.deactivatePrevNextButtons)};proto.deactivatePrevNextButtons=function(){this.prevButton.element.remove();this.nextButton.element.remove();this.prevButton.element.removeEventListener("click",this.handlePrevButtonClick);this.nextButton.element.removeEventListener("click",this.handleNextButtonClick);this.off("deactivate",this.deactivatePrevNextButtons)};Flickity2.PrevNextButton=PrevNextButton;return Flickity2});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("./core"),require("fizzy-ui-utils"))}else{factory18(window2.Flickity,window2.fizzyUIUtils)}})(typeof window!="undefined"?window:this,function factory12(Flickity2,utils){function PageDots(){this.holder=document.createElement("div");this.holder.className="flickity-page-dots";this.dots=[]}PageDots.prototype.setDots=function(slidesLength){let delta=slidesLength-this.dots.length;if(delta>0){this.addDots(delta)}else if(delta<0){this.removeDots(-delta)}};PageDots.prototype.addDots=function(count){let newDots=new Array(count).fill().map((item,i2)=>{let dot=document.createElement("button");dot.setAttribute("type","button");let num=i2+1+this.dots.length;dot.className="flickity-page-dot";dot.textContent=`View slide ${num}`;return dot});this.holder.append(...newDots);this.dots=this.dots.concat(newDots)};PageDots.prototype.removeDots=function(count){let removeDots=this.dots.splice(this.dots.length-count,count);removeDots.forEach(dot=>dot.remove())};PageDots.prototype.updateSelected=function(index2){if(this.selectedDot){this.selectedDot.classList.remove("is-selected");this.selectedDot.removeAttribute("aria-current")}if(!this.dots.length)return;this.selectedDot=this.dots[index2];this.selectedDot.classList.add("is-selected");this.selectedDot.setAttribute("aria-current","step")};Flickity2.PageDots=PageDots;Object.assign(Flickity2.defaults,{pageDots:true});Flickity2.create.pageDots=function(){if(!this.options.pageDots)return;this.pageDots=new PageDots;this.handlePageDotsClick=this.onPageDotsClick.bind(this);this.on("activate",this.activatePageDots);this.on("select",this.updateSelectedPageDots);this.on("cellChange",this.updatePageDots);this.on("resize",this.updatePageDots);this.on("deactivate",this.deactivatePageDots)};let proto=Flickity2.prototype;proto.activatePageDots=function(){this.pageDots.setDots(this.slides.length);this.focusableElems.push(...this.pageDots.dots);this.pageDots.holder.addEventListener("click",this.handlePageDotsClick);this.element.append(this.pageDots.holder)};proto.onPageDotsClick=function(event){let index2=this.pageDots.dots.indexOf(event.target);if(index2===-1)return;this.uiChange();this.select(index2)};proto.updateSelectedPageDots=function(){this.pageDots.updateSelected(this.selectedIndex)};proto.updatePageDots=function(){this.pageDots.dots.forEach(dot=>{utils.removeFrom(this.focusableElems,dot)});this.pageDots.setDots(this.slides.length);this.focusableElems.push(...this.pageDots.dots)};proto.deactivatePageDots=function(){this.pageDots.holder.remove();this.pageDots.holder.removeEventListener("click",this.handlePageDotsClick)};Flickity2.PageDots=PageDots;return Flickity2});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("./core"))}else{factory18(window2.Flickity)}})(typeof window!="undefined"?window:this,function factory13(Flickity2){function Player(autoPlay,onTick){this.autoPlay=autoPlay;this.onTick=onTick;this.state="stopped";this.onVisibilityChange=this.visibilityChange.bind(this);this.onVisibilityPlay=this.visibilityPlay.bind(this)}Player.prototype.play=function(){if(this.state==="playing")return;let isPageHidden=document.hidden;if(isPageHidden){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing";document.addEventListener("visibilitychange",this.onVisibilityChange);this.tick()};Player.prototype.tick=function(){if(this.state!=="playing")return;let time=typeof this.autoPlay=="number"?this.autoPlay:3e3;this.clear();this.timeout=setTimeout(()=>{this.onTick();this.tick()},time)};Player.prototype.stop=function(){this.state="stopped";this.clear();document.removeEventListener("visibilitychange",this.onVisibilityChange)};Player.prototype.clear=function(){clearTimeout(this.timeout)};Player.prototype.pause=function(){if(this.state==="playing"){this.state="paused";this.clear()}};Player.prototype.unpause=function(){if(this.state==="paused")this.play()};Player.prototype.visibilityChange=function(){let isPageHidden=document.hidden;this[isPageHidden?"pause":"unpause"]()};Player.prototype.visibilityPlay=function(){this.play();document.removeEventListener("visibilitychange",this.onVisibilityPlay)};Object.assign(Flickity2.defaults,{pauseAutoPlayOnHover:true});Flickity2.create.player=function(){this.player=new Player(this.options.autoPlay,()=>{this.next(true)});this.on("activate",this.activatePlayer);this.on("uiChange",this.stopPlayer);this.on("pointerDown",this.stopPlayer);this.on("deactivate",this.deactivatePlayer)};let proto=Flickity2.prototype;proto.activatePlayer=function(){if(!this.options.autoPlay)return;this.player.play();this.element.addEventListener("mouseenter",this)};proto.playPlayer=function(){this.player.play()};proto.stopPlayer=function(){this.player.stop()};proto.pausePlayer=function(){this.player.pause()};proto.unpausePlayer=function(){this.player.unpause()};proto.deactivatePlayer=function(){this.player.stop();this.element.removeEventListener("mouseenter",this)};proto.onmouseenter=function(){if(!this.options.pauseAutoPlayOnHover)return;this.player.pause();this.element.addEventListener("mouseleave",this)};proto.onmouseleave=function(){this.player.unpause();this.element.removeEventListener("mouseleave",this)};Flickity2.Player=Player;return Flickity2});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("./core"),require("fizzy-ui-utils"))}else{factory18(window2.Flickity,window2.fizzyUIUtils)}})(typeof window!="undefined"?window:this,function factory14(Flickity2,utils){function getCellsFragment(cells){let fragment=document.createDocumentFragment();cells.forEach(cell=>fragment.appendChild(cell.element));return fragment}let proto=Flickity2.prototype;proto.insert=function(elems,index2){let cells=this._makeCells(elems);if(!cells||!cells.length)return;let len=this.cells.length;index2=index2===void 0?len:index2;let fragment=getCellsFragment(cells);let isAppend=index2===len;if(isAppend){this.slider.appendChild(fragment)}else{let insertCellElement=this.cells[index2].element;this.slider.insertBefore(fragment,insertCellElement)}if(index2===0){this.cells=cells.concat(this.cells)}else if(isAppend){this.cells=this.cells.concat(cells)}else{let endCells=this.cells.splice(index2,len-index2);this.cells=this.cells.concat(cells).concat(endCells)}this._sizeCells(cells);this.cellChange(index2);this.positionSliderAtSelected()};proto.append=function(elems){this.insert(elems,this.cells.length)};proto.prepend=function(elems){this.insert(elems,0)};proto.remove=function(elems){let cells=this.getCells(elems);if(!cells||!cells.length)return;let minCellIndex=this.cells.length-1;cells.forEach(cell=>{cell.remove();let index2=this.cells.indexOf(cell);minCellIndex=Math.min(index2,minCellIndex);utils.removeFrom(this.cells,cell)});this.cellChange(minCellIndex);this.positionSliderAtSelected()};proto.cellSizeChange=function(elem){let cell=this.getCell(elem);if(!cell)return;cell.getSize();let index2=this.cells.indexOf(cell);this.cellChange(index2)};proto.cellChange=function(changedCellIndex){let prevSelectedElem=this.selectedElement;this._positionCells(changedCellIndex);this._updateWrapShiftCells();this.setGallerySize();let cell=this.getCell(prevSelectedElem);if(cell)this.selectedIndex=this.getCellSlideIndex(cell);this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex);this.emitEvent("cellChange",[changedCellIndex]);this.select(this.selectedIndex)};return Flickity2});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("./core"),require("fizzy-ui-utils"))}else{factory18(window2.Flickity,window2.fizzyUIUtils)}})(typeof window!="undefined"?window:this,function factory15(Flickity2,utils){const lazyAttr="data-flickity-lazyload";const lazySrcAttr=`${lazyAttr}-src`;const lazySrcsetAttr=`${lazyAttr}-srcset`;const imgSelector=`img[${lazyAttr}], img[${lazySrcAttr}], img[${lazySrcsetAttr}], source[${lazySrcsetAttr}]`;Flickity2.create.lazyLoad=function(){this.on("select",this.lazyLoad);this.handleLazyLoadComplete=this.onLazyLoadComplete.bind(this)};let proto=Flickity2.prototype;proto.lazyLoad=function(){let{lazyLoad}=this.options;if(!lazyLoad)return;let adjCount=typeof lazyLoad=="number"?lazyLoad:0;this.getAdjacentCellElements(adjCount).map(getCellLazyImages).flat().forEach(img=>new LazyLoader(img,this.handleLazyLoadComplete))};function getCellLazyImages(cellElem){if(cellElem.matches("img")){let cellAttr=cellElem.getAttribute(lazyAttr);let cellSrcAttr=cellElem.getAttribute(lazySrcAttr);let cellSrcsetAttr=cellElem.getAttribute(lazySrcsetAttr);if(cellAttr||cellSrcAttr||cellSrcsetAttr){return cellElem}}return[...cellElem.querySelectorAll(imgSelector)]}proto.onLazyLoadComplete=function(img,event){let cell=this.getParentCell(img);let cellElem=cell&&cell.element;this.cellSizeChange(cellElem);this.dispatchEvent("lazyLoad",event,cellElem)};function LazyLoader(img,onComplete){this.img=img;this.onComplete=onComplete;this.load()}LazyLoader.prototype.handleEvent=utils.handleEvent;LazyLoader.prototype.load=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);let src=this.img.getAttribute(lazyAttr)||this.img.getAttribute(lazySrcAttr);let srcset=this.img.getAttribute(lazySrcsetAttr);this.img.src=src;if(srcset)this.img.setAttribute("srcset",srcset);this.img.removeAttribute(lazyAttr);this.img.removeAttribute(lazySrcAttr);this.img.removeAttribute(lazySrcsetAttr)};LazyLoader.prototype.onload=function(event){this.complete(event,"flickity-lazyloaded")};LazyLoader.prototype.onerror=function(event){this.complete(event,"flickity-lazyerror")};LazyLoader.prototype.complete=function(event,className){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this);let mediaElem=this.img.parentNode.matches("picture")?this.img.parentNode:this.img;mediaElem.classList.add(className);this.onComplete(this.img,event)};Flickity2.LazyLoader=LazyLoader;return Flickity2});(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(require("./core"),require("imagesloaded"))}else{factory18(window2.Flickity,window2.imagesLoaded)}})(typeof window!="undefined"?window:this,function factory16(Flickity2,imagesLoaded){Flickity2.create.imagesLoaded=function(){this.on("activate",this.imagesLoaded)};Flickity2.prototype.imagesLoaded=function(){if(!this.options.imagesLoaded)return;let onImagesLoadedProgress=(instance,image)=>{let cell=this.getParentCell(image.img);this.cellSizeChange(cell&&cell.element);if(!this.options.freeScroll)this.positionSliderAtSelected()};imagesLoaded(this.slider).on("progress",onImagesLoadedProgress)};return Flickity2});;(function(window2,factory18){if(typeof module=="object"&&module.exports){module.exports=factory18(window2,require("jquery"))}else{window2.jQueryBridget=factory18(window2,window2.jQuery)}})(window,function factory17(window2,jQuery2){let console2=window2.console;let logError=typeof console2=="undefined"?function(){}:function(message){console2.error(message)};function jQueryBridget2(namespace,PluginClass,$2){$2=$2||jQuery2||window2.jQuery;if(!$2){return}if(!PluginClass.prototype.option){PluginClass.prototype.option=function(opts){if(!opts)return;this.options=Object.assign(this.options||{},opts)}}$2.fn[namespace]=function(arg0,...args){if(typeof arg0=="string"){return methodCall(this,arg0,args)}plainCall(this,arg0);return this};function methodCall($elems,methodName,args){let returnValue;let pluginMethodStr=`$().${namespace}("${methodName}")`;$elems.each(function(i2,elem){let instance=$2.data(elem,namespace);if(!instance){logError(`${namespace} not initialized. Cannot call method ${pluginMethodStr}`);return}let method=instance[methodName];if(!method||methodName.charAt(0)=="_"){logError(`${pluginMethodStr} is not a valid method`);return}let value=method.apply(instance,args);returnValue=returnValue===void 0?value:returnValue});return returnValue!==void 0?returnValue:$elems}function plainCall($elems,options){$elems.each(function(i2,elem){let instance=$2.data(elem,namespace);if(instance){instance.option(options);instance._init()}else{instance=new PluginClass(elem,options);$2.data(elem,namespace,instance)}})}}return jQueryBridget2});;jQueryBridget("flickity",Flickity,jQuery);;/*!
|
|
47
|
+
* Bootstrap Colorpicker v2.5.2
|
|
48
|
+
* https://itsjavi.com/bootstrap-colorpicker/
|
|
49
|
+
*
|
|
50
|
+
* Originally written by (c) 2012 Stefan Petre
|
|
51
|
+
* Licensed under the Apache License v2.0
|
|
52
|
+
* http://www.apache.org/licenses/LICENSE-2.0.txt
|
|
53
|
+
*
|
|
54
|
+
*/(function(root,factory18){if(typeof define==="function"&&define.amd){define(["jquery"],function(jq){return factory18(jq)})}else if(typeof exports==="object"){module.exports=factory18(require("jquery"))}else if(jQuery&&!jQuery.fn.colorpicker){factory18(jQuery)}})(this,function($2){"use strict";var Color=function(val2,predefinedColors,fallbackColor,fallbackFormat,hexNumberSignPrefix){this.fallbackValue=fallbackColor?typeof fallbackColor==="string"?this.parse(fallbackColor):fallbackColor:null;this.fallbackFormat=fallbackFormat?fallbackFormat:"rgba";this.hexNumberSignPrefix=hexNumberSignPrefix===true;this.value=this.fallbackValue;this.origFormat=null;this.predefinedColors=predefinedColors?predefinedColors:{};this.colors=$2.extend({},Color.webColors,this.predefinedColors);if(val2){if(typeof val2.h!=="undefined"){this.value=val2}else{this.setColor(String(val2))}}if(!this.value){this.value={h:0,s:0,b:0,a:1}}};Color.webColors={"aliceblue":"f0f8ff","antiquewhite":"faebd7","aqua":"00ffff","aquamarine":"7fffd4","azure":"f0ffff","beige":"f5f5dc","bisque":"ffe4c4","black":"000000","blanchedalmond":"ffebcd","blue":"0000ff","blueviolet":"8a2be2","brown":"a52a2a","burlywood":"deb887","cadetblue":"5f9ea0","chartreuse":"7fff00","chocolate":"d2691e","coral":"ff7f50","cornflowerblue":"6495ed","cornsilk":"fff8dc","crimson":"dc143c","cyan":"00ffff","darkblue":"00008b","darkcyan":"008b8b","darkgoldenrod":"b8860b","darkgray":"a9a9a9","darkgreen":"006400","darkkhaki":"bdb76b","darkmagenta":"8b008b","darkolivegreen":"556b2f","darkorange":"ff8c00","darkorchid":"9932cc","darkred":"8b0000","darksalmon":"e9967a","darkseagreen":"8fbc8f","darkslateblue":"483d8b","darkslategray":"2f4f4f","darkturquoise":"00ced1","darkviolet":"9400d3","deeppink":"ff1493","deepskyblue":"00bfff","dimgray":"696969","dodgerblue":"1e90ff","firebrick":"b22222","floralwhite":"fffaf0","forestgreen":"228b22","fuchsia":"ff00ff","gainsboro":"dcdcdc","ghostwhite":"f8f8ff","gold":"ffd700","goldenrod":"daa520","gray":"808080","green":"008000","greenyellow":"adff2f","honeydew":"f0fff0","hotpink":"ff69b4","indianred":"cd5c5c","indigo":"4b0082","ivory":"fffff0","khaki":"f0e68c","lavender":"e6e6fa","lavenderblush":"fff0f5","lawngreen":"7cfc00","lemonchiffon":"fffacd","lightblue":"add8e6","lightcoral":"f08080","lightcyan":"e0ffff","lightgoldenrodyellow":"fafad2","lightgrey":"d3d3d3","lightgreen":"90ee90","lightpink":"ffb6c1","lightsalmon":"ffa07a","lightseagreen":"20b2aa","lightskyblue":"87cefa","lightslategray":"778899","lightsteelblue":"b0c4de","lightyellow":"ffffe0","lime":"00ff00","limegreen":"32cd32","linen":"faf0e6","magenta":"ff00ff","maroon":"800000","mediumaquamarine":"66cdaa","mediumblue":"0000cd","mediumorchid":"ba55d3","mediumpurple":"9370d8","mediumseagreen":"3cb371","mediumslateblue":"7b68ee","mediumspringgreen":"00fa9a","mediumturquoise":"48d1cc","mediumvioletred":"c71585","midnightblue":"191970","mintcream":"f5fffa","mistyrose":"ffe4e1","moccasin":"ffe4b5","navajowhite":"ffdead","navy":"000080","oldlace":"fdf5e6","olive":"808000","olivedrab":"6b8e23","orange":"ffa500","orangered":"ff4500","orchid":"da70d6","palegoldenrod":"eee8aa","palegreen":"98fb98","paleturquoise":"afeeee","palevioletred":"d87093","papayawhip":"ffefd5","peachpuff":"ffdab9","peru":"cd853f","pink":"ffc0cb","plum":"dda0dd","powderblue":"b0e0e6","purple":"800080","red":"ff0000","rosybrown":"bc8f8f","royalblue":"4169e1","saddlebrown":"8b4513","salmon":"fa8072","sandybrown":"f4a460","seagreen":"2e8b57","seashell":"fff5ee","sienna":"a0522d","silver":"c0c0c0","skyblue":"87ceeb","slateblue":"6a5acd","slategray":"708090","snow":"fffafa","springgreen":"00ff7f","steelblue":"4682b4","tan":"d2b48c","teal":"008080","thistle":"d8bfd8","tomato":"ff6347","turquoise":"40e0d0","violet":"ee82ee","wheat":"f5deb3","white":"ffffff","whitesmoke":"f5f5f5","yellow":"ffff00","yellowgreen":"9acd32","transparent":"transparent"};Color.prototype={constructor:Color,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(val2){this.value=val2},_sanitizeNumber:function(val2){if(typeof val2==="number"){return val2}if(isNaN(val2)||val2===null||val2===""||val2===void 0){return 1}if(val2===""){return 0}if(typeof val2.toLowerCase!=="undefined"){if(val2.match(/^\./)){val2="0"+val2}return Math.ceil(parseFloat(val2)*100)/100}return 1},isTransparent:function(strVal){if(!strVal||!(typeof strVal==="string"||strVal instanceof String)){return false}strVal=strVal.toLowerCase().trim();return strVal==="transparent"||strVal.match(/#?00000000/)||strVal.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/)},rgbaIsTransparent:function(rgba){return rgba.r===0&&rgba.g===0&&rgba.b===0&&rgba.a===0},setColor:function(strVal){strVal=strVal.toLowerCase().trim();if(strVal){if(this.isTransparent(strVal)){this.value={h:0,s:0,b:0,a:0};return true}else{var parsedColor=this.parse(strVal);if(parsedColor){this.value=this.value={h:parsedColor.h,s:parsedColor.s,b:parsedColor.b,a:parsedColor.a};if(!this.origFormat){this.origFormat=parsedColor.format}}else if(this.fallbackValue){this.value=this.fallbackValue}}}return false},setHue:function(h){this.value.h=1-h},setSaturation:function(s){this.value.s=s},setBrightness:function(b){this.value.b=1-b},setAlpha:function(a){this.value.a=Math.round(parseInt((1-a)*100,10)/100*100)/100},toRGB:function(h,s,b,a){if(arguments.length===0){h=this.value.h;s=this.value.s;b=this.value.b;a=this.value.a}h*=360;var R,G,B,X,C;h=h%360/60;C=b*s;X=C*(1-Math.abs(h%2-1));R=G=B=b-C;h=~~h;R+=[C,X,0,0,X,C][h];G+=[X,C,C,X,0,0][h];B+=[0,0,X,C,C,X][h];return{r:Math.round(R*255),g:Math.round(G*255),b:Math.round(B*255),a}},toHex:function(ignoreFormat,h,s,b,a){if(arguments.length<=1){h=this.value.h;s=this.value.s;b=this.value.b;a=this.value.a}var prefix="#";var rgb=this.toRGB(h,s,b,a);if(this.rgbaIsTransparent(rgb)){return"transparent"}if(!ignoreFormat){prefix=this.hexNumberSignPrefix?"#":""}var hexStr=prefix+((1<<24)+(parseInt(rgb.r)<<16)+(parseInt(rgb.g)<<8)+parseInt(rgb.b)).toString(16).slice(1);return hexStr},toHSL:function(h,s,b,a){if(arguments.length===0){h=this.value.h;s=this.value.s;b=this.value.b;a=this.value.a}var H=h,L=(2-s)*b,S=s*b;if(L>0&&L<=1){S/=L}else{S/=2-L}L/=2;if(S>1){S=1}return{h:isNaN(H)?0:H,s:isNaN(S)?0:S,l:isNaN(L)?0:L,a:isNaN(a)?0:a}},toAlias:function(r2,g,b,a){var c,rgb=arguments.length===0?this.toHex(true):this.toHex(true,r2,g,b,a);var original=this.origFormat==="alias"?rgb:this.toString(false,this.origFormat);for(var alias in this.colors){c=this.colors[alias].toLowerCase().trim();if(c===rgb||c===original){return alias}}return false},RGBtoHSB:function(r2,g,b,a){r2/=255;g/=255;b/=255;var H,S,V,C;V=Math.max(r2,g,b);C=V-Math.min(r2,g,b);H=C===0?null:V===r2?(g-b)/C:V===g?(b-r2)/C+2:(r2-g)/C+4;H=(H+360)%6*60/360;S=C===0?0:C/V;return{h:this._sanitizeNumber(H),s:S,b:V,a:this._sanitizeNumber(a)}},HueToRGB:function(p,q,h){if(h<0){h+=1}else if(h>1){h-=1}if(h*6<1){return p+(q-p)*h*6}else if(h*2<1){return q}else if(h*3<2){return p+(q-p)*(2/3-h)*6}else{return p}},HSLtoRGB:function(h,s,l,a){if(s<0){s=0}var q;if(l<=.5){q=l*(1+s)}else{q=l+s-l*s}var p=2*l-q;var tr=h+1/3;var tg=h;var tb=h-1/3;var r2=Math.round(this.HueToRGB(p,q,tr)*255);var g=Math.round(this.HueToRGB(p,q,tg)*255);var b=Math.round(this.HueToRGB(p,q,tb)*255);return[r2,g,b,this._sanitizeNumber(a)]},parse:function(strVal){if(typeof strVal!=="string"){return this.fallbackValue}if(arguments.length===0){return false}var that=this,result=false,isAlias=typeof this.colors[strVal]!=="undefined",values,format;if(isAlias){strVal=this.colors[strVal].toLowerCase().trim()}$2.each(this.stringParsers,function(i2,parser){var match=parser.re.exec(strVal);values=match&&parser.parse.apply(that,[match]);if(values){result={};format=isAlias?"alias":parser.format?parser.format:that.getValidFallbackFormat();if(format.match(/hsla?/)){result=that.RGBtoHSB.apply(that,that.HSLtoRGB.apply(that,values))}else{result=that.RGBtoHSB.apply(that,values)}if(result instanceof Object){result.format=format}return false}return true});return result},getValidFallbackFormat:function(){var formats=["rgba","rgb","hex","hsla","hsl"];if(this.origFormat&&formats.indexOf(this.origFormat)!==-1){return this.origFormat}if(this.fallbackFormat&&formats.indexOf(this.fallbackFormat)!==-1){return this.fallbackFormat}return"rgba"},toString:function(forceRawValue,format,translateAlias){format=format||this.origFormat||this.fallbackFormat;translateAlias=translateAlias||false;var c=false;switch(format){case"rgb":{c=this.toRGB();if(this.rgbaIsTransparent(c)){return"transparent"}return"rgb("+c.r+","+c.g+","+c.b+")"}break;case"rgba":{c=this.toRGB();return"rgba("+c.r+","+c.g+","+c.b+","+c.a+")"}break;case"hsl":{c=this.toHSL();return"hsl("+Math.round(c.h*360)+","+Math.round(c.s*100)+"%,"+Math.round(c.l*100)+"%)"}break;case"hsla":{c=this.toHSL();return"hsla("+Math.round(c.h*360)+","+Math.round(c.s*100)+"%,"+Math.round(c.l*100)+"%,"+c.a+")"}break;case"hex":{return this.toHex(forceRawValue)}break;case"alias":{c=this.toAlias();if(c===false){return this.toString(forceRawValue,this.getValidFallbackFormat())}if(translateAlias&&!(c in Color.webColors)&&c in this.predefinedColors){return this.predefinedColors[c]}return c}default:{return c}break}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(execResult){return[execResult[1],execResult[2],execResult[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(execResult){return[2.55*execResult[1],2.55*execResult[2],2.55*execResult[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(execResult){return[2.55*execResult[1],2.55*execResult[2],2.55*execResult[3],execResult[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(execResult){return[execResult[1]/360,execResult[2]/100,execResult[3]/100,execResult[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(execResult){return[execResult[1]/360,execResult[2]/100,execResult[3]/100,execResult[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16),1]}}],colorNameToHex:function(name){if(typeof this.colors[name.toLowerCase()]!=="undefined"){return this.colors[name.toLowerCase()]}return false}};var defaults={horizontal:false,inline:false,color:false,format:false,input:"input",container:false,component:".add-on, .input-group-addon",fallbackColor:false,fallbackFormat:"hex",hexNumberSignPrefix:true,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:false,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:false,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:false},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:false}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div><div class="colorpicker-selectors"></div></div>',align:"right",customClass:null,colorSelectors:null};var Colorpicker=function(element,options){this.element=$2(element).addClass("colorpicker-element");this.options=$2.extend(true,{},defaults,this.element.data(),options);this.component=this.options.component;this.component=this.component!==false?this.element.find(this.component):false;if(this.component&&this.component.length===0){this.component=false}this.container=this.options.container===true?this.element:this.options.container;this.container=this.container!==false?$2(this.container):false;this.input=this.element.is("input")?this.element:this.options.input?this.element.find(this.options.input):false;if(this.input&&this.input.length===0){this.input=false}this.color=this.createColor(this.options.color!==false?this.options.color:this.getValue());this.format=this.options.format!==false?this.options.format:this.color.origFormat;if(this.options.color!==false){this.updateInput(this.color);this.updateData(this.color)}this.disabled=false;var $picker=this.picker=$2(this.options.template);if(this.options.customClass){$picker.addClass(this.options.customClass)}if(this.options.inline){$picker.addClass("colorpicker-inline colorpicker-visible")}else{$picker.addClass("colorpicker-hidden")}if(this.options.horizontal){$picker.addClass("colorpicker-horizontal")}if(["rgba","hsla","alias"].indexOf(this.format)!==-1||this.options.format===false||this.getValue()==="transparent"){$picker.addClass("colorpicker-with-alpha")}if(this.options.align==="right"){$picker.addClass("colorpicker-right")}if(this.options.inline===true){$picker.addClass("colorpicker-no-arrow")}if(this.options.colorSelectors){var colorpicker=this,selectorsContainer=colorpicker.picker.find(".colorpicker-selectors");if(selectorsContainer.length>0){$2.each(this.options.colorSelectors,function(name,color){var $btn=$2("<i />").addClass("colorpicker-selectors-color").css("background-color",color).data("class",name).data("alias",name);$btn.on("mousedown.colorpicker touchstart.colorpicker",function(event){event.preventDefault();colorpicker.setValue(colorpicker.format==="alias"?$2(this).data("alias"):$2(this).css("background-color"))});selectorsContainer.append($btn)});selectorsContainer.show().addClass("colorpicker-visible")}}$picker.on("mousedown.colorpicker touchstart.colorpicker",$2.proxy(function(e2){if(e2.target===e2.currentTarget){e2.preventDefault()}},this));$picker.find(".colorpicker-saturation, .colorpicker-hue, .colorpicker-alpha").on("mousedown.colorpicker touchstart.colorpicker",$2.proxy(this.mousedown,this));$picker.appendTo(this.container?this.container:$2("body"));if(this.input!==false){this.input.on({"keyup.colorpicker":$2.proxy(this.keyup,this)});this.input.on({"input.colorpicker":$2.proxy(this.change,this)});if(this.component===false){this.element.on({"focus.colorpicker":$2.proxy(this.show,this)})}if(this.options.inline===false){this.element.on({"focusout.colorpicker":$2.proxy(this.hide,this)})}}if(this.component!==false){this.component.on({"click.colorpicker":$2.proxy(this.show,this)})}if(this.input===false&&this.component===false){this.element.on({"click.colorpicker":$2.proxy(this.show,this)})}if(this.input!==false&&this.component!==false&&this.input.attr("type")==="color"){this.input.on({"click.colorpicker":$2.proxy(this.show,this),"focus.colorpicker":$2.proxy(this.show,this)})}this.update();$2($2.proxy(function(){this.element.trigger("create")},this))};Colorpicker.Color=Color;Colorpicker.prototype={constructor:Colorpicker,destroy:function(){this.picker.remove();this.element.removeData("colorpicker","color").off(".colorpicker");if(this.input!==false){this.input.off(".colorpicker")}if(this.component!==false){this.component.off(".colorpicker")}this.element.removeClass("colorpicker-element");this.element.trigger({type:"destroy"})},reposition:function(){if(this.options.inline!==false||this.options.container){return false}var type2=this.container&&this.container[0]!==window.document.body?"position":"offset";var element=this.component||this.element;var offset=element[type2]();if(this.options.align==="right"){offset.left-=this.picker.outerWidth()-element.outerWidth()}this.picker.css({top:offset.top+element.outerHeight(),left:offset.left})},show:function(e2){if(this.isDisabled()){return}this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden");this.reposition();$2(window).on("resize.colorpicker",$2.proxy(this.reposition,this));if(e2&&(!this.hasInput()||this.input.attr("type")==="color")){if(e2.stopPropagation&&e2.preventDefault){e2.stopPropagation();e2.preventDefault()}}if((this.component||!this.input)&&this.options.inline===false){$2(window.document).on({"mousedown.colorpicker":$2.proxy(this.hide,this)})}this.element.trigger({type:"showPicker",color:this.color})},hide:function(e2){if(typeof e2!=="undefined"&&e2.target){if($2(e2.currentTarget).parents(".colorpicker").length>0||$2(e2.target).parents(".colorpicker").length>0){return false}}this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible");$2(window).off("resize.colorpicker",this.reposition);$2(window.document).off({"mousedown.colorpicker":this.hide});this.update();this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(val2){val2=val2||this.color.toString(false,this.format);this.element.data("color",val2);return val2},updateInput:function(val2){val2=val2||this.color.toString(false,this.format);if(this.input!==false){this.input.prop("value",val2);this.input.trigger("change")}return val2},updatePicker:function(val2){if(typeof val2!=="undefined"){this.color=this.createColor(val2)}var sl=this.options.horizontal===false?this.options.sliders:this.options.slidersHorz;var icns=this.picker.find("i");if(icns.length===0){return}if(this.options.horizontal===false){sl=this.options.sliders;icns.eq(1).css("top",sl.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",sl.alpha.maxTop*(1-this.color.value.a))}else{sl=this.options.slidersHorz;icns.eq(1).css("left",sl.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",sl.alpha.maxLeft*(1-this.color.value.a))}icns.eq(0).css({"top":sl.saturation.maxTop-this.color.value.b*sl.saturation.maxTop,"left":this.color.value.s*sl.saturation.maxLeft});this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(true,this.color.value.h,1,1,1));this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex(true));this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(true,this.format));return val2},updateComponent:function(val2){var color;if(typeof val2!=="undefined"){color=this.createColor(val2)}else{color=this.color}if(this.component!==false){var icn=this.component.find("i").eq(0);if(icn.length>0){icn.css({"backgroundColor":color.toString(true,this.format)})}else{this.component.css({"backgroundColor":color.toString(true,this.format)})}}return color.toString(false,this.format)},update:function(force){var val2;if(this.getValue(false)!==false||force===true){val2=this.updateComponent();this.updateInput(val2);this.updateData(val2);this.updatePicker()}return val2},setValue:function(val2){this.color=this.createColor(val2);this.update(true);this.element.trigger({type:"changeColor",color:this.color,value:val2})},createColor:function(val2){return new Color(val2?val2:null,this.options.colorSelectors,this.options.fallbackColor?this.options.fallbackColor:this.color,this.options.fallbackFormat,this.options.hexNumberSignPrefix)},getValue:function(defaultValue){defaultValue=typeof defaultValue==="undefined"?this.options.fallbackColor:defaultValue;var val2;if(this.hasInput()){val2=this.input.val()}else{val2=this.element.data("color")}if(val2===void 0||val2===""||val2===null){val2=defaultValue}return val2},hasInput:function(){return this.input!==false},isDisabled:function(){return this.disabled},disable:function(){if(this.hasInput()){this.input.prop("disabled",true)}this.disabled=true;this.element.trigger({type:"disable",color:this.color,value:this.getValue()});return true},enable:function(){if(this.hasInput()){this.input.prop("disabled",false)}this.disabled=false;this.element.trigger({type:"enable",color:this.color,value:this.getValue()});return true},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(e2){if(!e2.pageX&&!e2.pageY&&e2.originalEvent&&e2.originalEvent.touches){e2.pageX=e2.originalEvent.touches[0].pageX;e2.pageY=e2.originalEvent.touches[0].pageY}e2.stopPropagation();e2.preventDefault();var target=$2(e2.target);var zone=target.closest("div");var sl=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!zone.is(".colorpicker")){if(zone.is(".colorpicker-saturation")){this.currentSlider=$2.extend({},sl.saturation)}else if(zone.is(".colorpicker-hue")){this.currentSlider=$2.extend({},sl.hue)}else if(zone.is(".colorpicker-alpha")){this.currentSlider=$2.extend({},sl.alpha)}else{return false}var offset=zone.offset();this.currentSlider.guide=zone.find("i")[0].style;this.currentSlider.left=e2.pageX-offset.left;this.currentSlider.top=e2.pageY-offset.top;this.mousePointer={left:e2.pageX,top:e2.pageY};$2(window.document).on({"mousemove.colorpicker":$2.proxy(this.mousemove,this),"touchmove.colorpicker":$2.proxy(this.mousemove,this),"mouseup.colorpicker":$2.proxy(this.mouseup,this),"touchend.colorpicker":$2.proxy(this.mouseup,this)}).trigger("mousemove")}return false},mousemove:function(e2){if(!e2.pageX&&!e2.pageY&&e2.originalEvent&&e2.originalEvent.touches){e2.pageX=e2.originalEvent.touches[0].pageX;e2.pageY=e2.originalEvent.touches[0].pageY}e2.stopPropagation();e2.preventDefault();var left=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((e2.pageX||this.mousePointer.left)-this.mousePointer.left)));var top=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((e2.pageY||this.mousePointer.top)-this.mousePointer.top)));this.currentSlider.guide.left=left+"px";this.currentSlider.guide.top=top+"px";if(this.currentSlider.callLeft){this.color[this.currentSlider.callLeft].call(this.color,left/this.currentSlider.maxLeft)}if(this.currentSlider.callTop){this.color[this.currentSlider.callTop].call(this.color,top/this.currentSlider.maxTop)}if(this.options.format===false&&(this.currentSlider.callTop==="setAlpha"||this.currentSlider.callLeft==="setAlpha")){if(this.color.value.a!==1){this.format="rgba";this.color.origFormat="rgba"}else{this.format="hex";this.color.origFormat="hex"}}this.update(true);this.element.trigger({type:"changeColor",color:this.color});return false},mouseup:function(e2){e2.stopPropagation();e2.preventDefault();$2(window.document).off({"mousemove.colorpicker":this.mousemove,"touchmove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup,"touchend.colorpicker":this.mouseup});return false},change:function(e2){this.color=this.createColor(this.input.val());if(this.color.origFormat&&this.options.format===false){this.format=this.color.origFormat}if(this.getValue(false)!==false){this.updateData();this.updateComponent();this.updatePicker()}this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})},keyup:function(e2){if(e2.keyCode===38){if(this.color.value.a<1){this.color.value.a=Math.round((this.color.value.a+.01)*100)/100}this.update(true)}else if(e2.keyCode===40){if(this.color.value.a>0){this.color.value.a=Math.round((this.color.value.a-.01)*100)/100}this.update(true)}this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})}};$2.colorpicker=Colorpicker;$2.fn.colorpicker=function(option){var apiArgs=Array.prototype.slice.call(arguments,1),isSingleElement=this.length===1,returnValue=null;var $jq=this.each(function(){var $this=$2(this),inst=$this.data("colorpicker"),options=typeof option==="object"?option:{};if(!inst){inst=new Colorpicker(this,options);$this.data("colorpicker",inst)}if(typeof option==="string"){if($2.isFunction(inst[option])){returnValue=inst[option].apply(inst,apiArgs)}else{if(apiArgs.length){inst[option]=apiArgs[0]}returnValue=inst[option]}}else{returnValue=$this}});return isSingleElement?returnValue:$jq};$2.fn.colorpicker.constructor=Colorpicker});;/**
|
|
55
|
+
* @license
|
|
56
|
+
* =========================================================
|
|
57
|
+
* bootstrap-datetimepicker.js
|
|
58
|
+
* http://www.eyecon.ro/bootstrap-datepicker
|
|
59
|
+
* =========================================================
|
|
60
|
+
* Copyright 2012 Stefan Petre
|
|
61
|
+
*
|
|
62
|
+
* Contributions:
|
|
63
|
+
* - Andrew Rowls
|
|
64
|
+
* - Thiago de Arruda
|
|
65
|
+
*
|
|
66
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
67
|
+
* you may not use this file except in compliance with the License.
|
|
68
|
+
* You may obtain a copy of the License at
|
|
69
|
+
*
|
|
70
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
71
|
+
*
|
|
72
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
73
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
74
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
75
|
+
* See the License for the specific language governing permissions and
|
|
76
|
+
* limitations under the License.
|
|
77
|
+
* =========================================================
|
|
78
|
+
*/(function($2){var smartPhone=window.orientation!=void 0;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$2(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=this.$element.is(".input-append")?this.$element.find(".add-on"):false;this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";if(icon)icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";if(icon){icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}}this.widget=$2(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e2){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e2){e2.stopPropagation();e2.preventDefault()}},hide:function(){var collapse=this.widget.find(".collapse");for(var i2=0;i2<collapse.length;i2++){var collapseData=collapse.eq(i2).data("collapse");if(collapseData&&collapseData.transitioning)return}this.widget.hide();this.viewMode=this.startViewMode;this.showMode();this.set();this.$element.trigger({type:"hide",date:this._date});this._detachDatePickerGlobalEvents()},set:function(){var formatted="";if(!this._unset)formatted=this.formatDate(this._date);if(!this.isInput){if(this.component){var input=this.$element.find("input");input.val(formatted);this._resetMaskPos(input)}this.$element.data("date",formatted)}else{this.$element.val(formatted);this._resetMaskPos(this.$element)}},setValue:function(newDate){if(!newDate){this._unset=true}else{this._unset=false}if(typeof newDate==="string"){this._date=this.parseDate(newDate)}else{this._date=new Date(newDate)}this.set();this.viewDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),1,0,0,0,0);this.fillDate();this.fillTime()},getDate:function(){if(this._unset)return null;return new Date(this._date.valueOf())},setDate:function(date){if(!date)this.setValue(null);else this.setValue(date.valueOf())},getLocalDate:function(){if(this._unset)return null;var d=this._date;return new Date(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds())},setLocalDate:function(localDate){if(!localDate)this.setValue(null);else this.setValue(Date.UTC(localDate.getFullYear(),localDate.getMonth(),localDate.getDate(),localDate.getHours(),localDate.getMinutes(),localDate.getSeconds(),localDate.getMilliseconds()))},place:function(){var offset=this.component?this.component.offset():this.$element.offset();this.widget.css({top:offset.top+this.height,left:offset.left})},notifyChange:function(){this.$element.trigger({type:"changeDate",date:this.getDate(),localDate:this.getLocalDate()})},update:function(newDate){var dateStr=newDate;if(!dateStr){if(this.isInput){dateStr=this.$element.val()}else{dateStr=this.$element.find("input").val()}if(!dateStr){var tmp=new Date;this._date=UTCDate(tmp.getFullYear(),tmp.getMonth(),tmp.getDate(),tmp.getHours(),tmp.getMinutes(),tmp.getSeconds(),tmp.getMilliseconds())}else{this._date=this.parseDate(dateStr)}}this.viewDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),1,0,0,0,0);this.fillDate();this.fillTime()},fillDow:function(){var dowCnt=this.weekStart;var html="<tr>";while(dowCnt<this.weekStart+7){html+='<th class="dow">'+dates[this.language].daysMin[dowCnt++%7]+"</th>"}html+="</tr>";this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i2=0;while(i2<12){html+='<span class="month">'+dates[this.language].monthsShort[i2++]+"</span>"}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var clsName;while(prevMonth.valueOf()<nextMonth){if(prevMonth.getUTCDay()===this.weekStart){html.push("<tr>")}clsName="";if(prevMonth.getUTCFullYear()<year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()<month){clsName+=" old"}else if(prevMonth.getUTCFullYear()>year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}html.push('<td class="day'+clsName+'">'+prevMonth.getUTCDate()+"</td>");if(prevMonth.getUTCDay()===this.weekEnd){html.push("</tr>")}prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html.join(""));var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");year-=1;for(var i2=-1;i2<11;i2++){html+='<span class="year'+(i2===-1||i2===10?" old":"")+(currentYear===year?" active":"")+'">'+year+"</span>";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i2=0;i2<3;i2+=1){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="hour">'+padLeft(c,2,"0")+"</td>";current++}html+="</tr>"}}else{var current=0;for(var i2=0;i2<6;i2+=1){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="hour">'+padLeft(c,2,"0")+"</td>";current++}html+="</tr>"}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i2=0;i2<5;i2++){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="minute">'+padLeft(c,2,"0")+"</td>";current+=3}html+="</tr>"}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i2=0;i2<5;i2++){html+="<tr>";for(var j=0;j<4;j+=1){var c=current.toString();html+='<td class="second">'+padLeft(c,2,"0")+"</td>";current+=3}html+="</tr>"}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e2){e2.stopPropagation();e2.preventDefault();var target=$2(e2.target).closest("span, td, th");if(target.length===1){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}},actions:{incrementHours:function(e2){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e2){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e2){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e2){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e2){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e2){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e2){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e2){var tgt=$2(e2.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e2){var tgt=$2(e2.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e2){var tgt=$2(e2.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e2){e2.stopPropagation();e2.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$2(e2.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e2){e2.stopPropagation();e2.preventDefault()},keydown:function(e2){var self2=this,k2=e2.which,input=$2(e2.target);if(k2==8||k2==46){setTimeout(function(){self2._resetMaskPos(input)})}},keypress:function(e2){var k2=e2.which;if(k2==8||k2==46){return}var input=$2(e2.target);var c=String.fromCharCode(k2);var val2=input.val()||"";val2+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val2.length){return}if(!mask.pattern.test(val2.slice(mask.start))){val2=val2.slice(0,val2.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val2+=mask.character;this._maskPos++}val2+=c;if(mask.end!=val2.length){input.val(val2);return false}else{if(!mask.pattern.test(val2.slice(mask.start))){input.val(val2.slice(0,mask.start));return false}else{input.val(val2);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e2){var input=$2(e2.target);var val2=input.val();if(this._formatPattern.test(val2)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val2&&val2.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange()}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i2,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i2=1;i2<match.length;i2++){property=this._propertiesByIndex[i2];if(!property)continue;value=match[i2];if(/^\d+$/.test(value))value=parseInt(value,10);parsed[property]=value}return this._finishParsingDate(parsed)},_resetMaskPos:function(input){var val2=input.val();for(var i2=0;i2<this._mask.length;i2++){if(this._mask[i2].end>val2.length){this._maskPos=i2;break}else if(this._mask[i2].end===val2.length){this._maskPos=i2+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i2=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i2++;propertiesByIndex[i2]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self2=this;this.widget.on("click",".datepicker *",$2.proxy(this.click,this));this.widget.on("click","[data-action]",$2.proxy(this.doAction,this));this.widget.on("mousedown",$2.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e2){e2.stopPropagation();var $this=$2(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self2.timeIcon+" "+self2.dateIcon);self2.$element.find(".add-on i").toggleClass(self2.timeIcon+" "+self2.dateIcon)}})}if(this.isInput){this.$element.on({"focus":$2.proxy(this.show,this),"change":$2.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({"keydown":$2.proxy(this.keydown,this),"keypress":$2.proxy(this.keypress,this)})}}else{this.$element.on({"change":$2.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({"keydown":$2.proxy(this.keydown,this),"keypress":$2.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$2.proxy(this.show,this))}else{this.$element.on("click",$2.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$2(window).on("resize.datetimepicker"+this.id,$2.proxy(this.place,this));if(!this.isInput){$2(document).on("mousedown.datetimepicker"+this.id,$2.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({"focus":this.show,"change":this.change});if(this.options.maskInput){this.$element.off({"keydown":this.keydown,"keypress":this.keypress})}}else{this.$element.off({"change":this.change},"input");if(this.options.maskInput){this.$element.off({"keydown":this.keydown,"keypress":this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$2(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$2(document).off("mousedown.datetimepicker"+this.id)}}};$2.fn.datetimepicker=function(option,val2){return this.each(function(){var $this=$2(this),data2=$this.data("datetimepicker"),options=typeof option==="object"&&option;if(!data2){$this.data("datetimepicker",data2=new DateTimePicker(this,$2.extend({},$2.fn.datetimepicker.defaults,options)))}if(typeof option==="string")data2[option](val2)})};$2.fn.datetimepicker.defaults={maskInput:true,pickDate:true,pickTime:true,pick12HourFormat:false};$2.fn.datetimepicker.Constructor=DateTimePicker;var dpgId=0;var dates=$2.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}};var dateFormatComponents={dd:{property:"UTCDate",getPattern:function(){return"(0?[1-9]|[1-2][0-9]|3[0-1])\\b"}},MM:{property:"UTCMonth",getPattern:function(){return"(0?[1-9]|1[0-2])\\b"}},yy:{property:"UTCYear",getPattern:function(){return"(\\d{2})\\b"}},yyyy:{property:"UTCFullYear",getPattern:function(){return"(\\d{4})\\b"}},hh:{property:"UTCHours",getPattern:function(){return"(0?[0-9]|1[0-9]|2[0-3])\\b"}},mm:{property:"UTCMinutes",getPattern:function(){return"(0?[0-9]|[1-5][0-9])\\b"}},ss:{property:"UTCSeconds",getPattern:function(){return"(0?[0-9]|[1-5][0-9])\\b"}},ms:{property:"UTCMilliseconds",getPattern:function(){return"([0-9]{1,3})\\b"}},HH:{property:"Hours12",getPattern:function(){return"(0?[1-9]|1[0-2])\\b"}},PP:{property:"Period12",getPattern:function(){return"(AM|PM|am|pm|Am|aM|Pm|pM)\\b"}}};var keys=[];for(var k in dateFormatComponents)keys.push(k);keys[keys.length-1]+="\\b";keys.push(".");var formatComponent=new RegExp(keys.join("\\b|"));keys.pop();var formatReplacer=new RegExp(keys.join("\\b|"),"g");function escapeRegExp(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function padLeft(s,l,c){if(l<s.length)return s;else return Array(l-s.length+1).join(c||" ")+s}function getTemplate(timeIcon,pickDate,pickTime,is12Hours){if(pickDate&&pickTime){return'<div class="bootstrap-datetimepicker-widget dropdown-menu"><ul><li class="collapse in"><div class="datepicker">'+DPGlobal.template+'</div></li><li class="picker-switch"><a class="accordion-toggle"><i class="'+timeIcon+'"></i></a></li><li class="collapse"><div class="timepicker">'+TPGlobal.getTemplate(is12Hours)+"</div></li></ul></div>"}else if(pickTime){return'<div class="bootstrap-datetimepicker-widget dropdown-menu"><div class="timepicker">'+TPGlobal.getTemplate(is12Hours)+"</div></div>"}else{return'<div class="bootstrap-datetimepicker-widget dropdown-menu"><div class="datepicker">'+DPGlobal.template+"</div></div>"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:'<thead><tr><th class="prev">‹</th><th colspan="5" class="switch"></th><th class="next">›</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>'};DPGlobal.template='<div class="datepicker-days"><table class="table-condensed">'+DPGlobal.headTemplate+'<tbody></tbody></table></div><div class="datepicker-months"><table class="table-condensed">'+DPGlobal.headTemplate+DPGlobal.contTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+DPGlobal.headTemplate+DPGlobal.contTemplate+"</table></div>";var TPGlobal={hourTemplate:'<span data-action="showHours" data-time-component="hours" class="timepicker-hour"></span>',minuteTemplate:'<span data-action="showMinutes" data-time-component="minutes" class="timepicker-minute"></span>',secondTemplate:'<span data-action="showSeconds" data-time-component="seconds" class="timepicker-second"></span>'};TPGlobal.getTemplate=function(is12Hours){return'<div class="timepicker-picker"><table class="table-condensed"'+(is12Hours?' data-hour-format="12"':"")+'><tr><td><a href="#" class="btn" data-action="incrementHours"><i class="icon-chevron-up"></i></a></td><td class="separator"></td><td><a href="#" class="btn" data-action="incrementMinutes"><i class="icon-chevron-up"></i></a></td><td class="separator"></td><td><a href="#" class="btn" data-action="incrementSeconds"><i class="icon-chevron-up"></i></a></td>'+(is12Hours?'<td class="separator"></td>':"")+"</tr><tr><td>"+TPGlobal.hourTemplate+'</td> <td class="separator">:</td><td>'+TPGlobal.minuteTemplate+'</td> <td class="separator">:</td><td>'+TPGlobal.secondTemplate+"</td>"+(is12Hours?'<td class="separator"></td><td><button type="button" class="btn btn-primary" data-action="togglePeriod"></button></td>':"")+'</tr><tr><td><a href="#" class="btn" data-action="decrementHours"><i class="icon-chevron-down"></i></a></td><td class="separator"></td><td><a href="#" class="btn" data-action="decrementMinutes"><i class="icon-chevron-down"></i></a></td><td class="separator"></td><td><a href="#" class="btn" data-action="decrementSeconds"><i class="icon-chevron-down"></i></a></td>'+(is12Hours?'<td class="separator"></td>':"")+'</tr></table></div><div class="timepicker-hours" data-action="selectHour"><table class="table-condensed"></table></div><div class="timepicker-minutes" data-action="selectMinute"><table class="table-condensed"></table></div><div class="timepicker-seconds" data-action="selectSecond"><table class="table-condensed"></table></div>'}})(window.jQuery);/*! jQuery UI - v1.12.1 - 2016-09-14
|
|
79
|
+
* http://jqueryui.com
|
|
80
|
+
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
|
|
81
|
+
* Copyright jQuery Foundation and other contributors; Licensed MIT */(function(factory18){if(typeof define==="function"&&define.amd){define(["jquery"],factory18)}else{factory18(jQuery)}})(function($2){$2.ui=$2.ui||{};var version=$2.ui.version="1.12.1";/*!
|
|
82
|
+
* jQuery UI Widget 1.12.1
|
|
83
|
+
* http://jqueryui.com
|
|
84
|
+
*
|
|
85
|
+
* Copyright jQuery Foundation and other contributors
|
|
86
|
+
* Released under the MIT license.
|
|
87
|
+
* http://jquery.org/license
|
|
88
|
+
*/var widgetUuid=0;var widgetSlice=Array.prototype.slice;$2.cleanData=(function(orig){return function(elems){var events,elem,i2;for(i2=0;(elem=elems[i2])!=null;i2++){try{events=$2._data(elem,"events");if(events&&events.remove){$2(elem).triggerHandler("remove")}}catch(e2){}}orig(elems)}})($2.cleanData);$2.widget=function(name,base,prototype){var existingConstructor,constructor,basePrototype;var proxiedPrototype={};var namespace=name.split(".")[0];name=name.split(".")[1];var fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$2.Widget}if($2.isArray(prototype)){prototype=$2.extend.apply(null,[{}].concat(prototype))}$2.expr[":"][fullName.toLowerCase()]=function(elem){return!!$2.data(elem,fullName)};$2[namespace]=$2[namespace]||{};existingConstructor=$2[namespace][name];constructor=$2[namespace][name]=function(options,element){if(!this._createWidget){return new constructor(options,element)}if(arguments.length){this._createWidget(options,element)}};$2.extend(constructor,existingConstructor,{version:prototype.version,_proto:$2.extend({},prototype),_childConstructors:[]});basePrototype=new base;basePrototype.options=$2.widget.extend({},basePrototype.options);$2.each(prototype,function(prop,value){if(!$2.isFunction(value)){proxiedPrototype[prop]=value;return}proxiedPrototype[prop]=(function(){function _super(){return base.prototype[prop].apply(this,arguments)}function _superApply(args){return base.prototype[prop].apply(this,args)}return function(){var __super=this._super;var __superApply=this._superApply;var returnValue;this._super=_super;this._superApply=_superApply;returnValue=value.apply(this,arguments);this._super=__super;this._superApply=__superApply;return returnValue}})()});constructor.prototype=$2.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix||name:name},proxiedPrototype,{constructor,namespace,widgetName:name,widgetFullName:fullName});if(existingConstructor){$2.each(existingConstructor._childConstructors,function(i2,child){var childPrototype=child.prototype;$2.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)});delete existingConstructor._childConstructors}else{base._childConstructors.push(constructor)}$2.widget.bridge(name,constructor);return constructor};$2.widget.extend=function(target){var input=widgetSlice.call(arguments,1);var inputIndex=0;var inputLength=input.length;var key2;var value;for(;inputIndex<inputLength;inputIndex++){for(key2 in input[inputIndex]){value=input[inputIndex][key2];if(input[inputIndex].hasOwnProperty(key2)&&value!==void 0){if($2.isPlainObject(value)){target[key2]=$2.isPlainObject(target[key2])?$2.widget.extend({},target[key2],value):$2.widget.extend({},value)}else{target[key2]=value}}}}return target};$2.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$2.fn[name]=function(options){var isMethodCall=typeof options==="string";var args=widgetSlice.call(arguments,1);var returnValue=this;if(isMethodCall){if(!this.length&&options==="instance"){returnValue=void 0}else{this.each(function(){var methodValue;var instance=$2.data(this,fullName);if(options==="instance"){returnValue=instance;return false}if(!instance){return $2.error("cannot call methods on "+name+" prior to initialization; attempted to call method '"+options+"'")}if(!$2.isFunction(instance[options])||options.charAt(0)==="_"){return $2.error("no such method '"+options+"' for "+name+" widget instance")}methodValue=instance[options].apply(instance,args);if(methodValue!==instance&&methodValue!==void 0){returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue;return false}})}}else{if(args.length){options=$2.widget.extend.apply(null,[options].concat(args))}this.each(function(){var instance=$2.data(this,fullName);if(instance){instance.option(options||{});if(instance._init){instance._init()}}else{$2.data(this,fullName,new object(options,this))}})}return returnValue}};$2.Widget=function(){};$2.Widget._childConstructors=[];$2.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:false,create:null},_createWidget:function(options,element){element=$2(element||this.defaultElement||this)[0];this.element=$2(element);this.uuid=widgetUuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=$2();this.hoverable=$2();this.focusable=$2();this.classesElementLookup={};if(element!==this){$2.data(element,this.widgetFullName,this);this._on(true,this.element,{remove:function(event){if(event.target===element){this.destroy()}}});this.document=$2(element.style?element.ownerDocument:element.document||element);this.window=$2(this.document[0].defaultView||this.document[0].parentWindow)}this.options=$2.widget.extend({},this.options,this._getCreateOptions(),options);this._create();if(this.options.disabled){this._setOptionDisabled(this.options.disabled)}this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:$2.noop,_create:$2.noop,_init:$2.noop,destroy:function(){var that=this;this._destroy();$2.each(this.classesElementLookup,function(key2,value){that._removeClass(value,key2)});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace)},_destroy:$2.noop,widget:function(){return this.element},option:function(key2,value){var options=key2;var parts;var curOption;var i2;if(arguments.length===0){return $2.widget.extend({},this.options)}if(typeof key2==="string"){options={};parts=key2.split(".");key2=parts.shift();if(parts.length){curOption=options[key2]=$2.widget.extend({},this.options[key2]);for(i2=0;i2<parts.length-1;i2++){curOption[parts[i2]]=curOption[parts[i2]]||{};curOption=curOption[parts[i2]]}key2=parts.pop();if(arguments.length===1){return curOption[key2]===void 0?null:curOption[key2]}curOption[key2]=value}else{if(arguments.length===1){return this.options[key2]===void 0?null:this.options[key2]}options[key2]=value}}this._setOptions(options);return this},_setOptions:function(options){var key2;for(key2 in options){this._setOption(key2,options[key2])}return this},_setOption:function(key2,value){if(key2==="classes"){this._setOptionClasses(value)}this.options[key2]=value;if(key2==="disabled"){this._setOptionDisabled(value)}return this},_setOptionClasses:function(value){var classKey,elements,currentElements;for(classKey in value){currentElements=this.classesElementLookup[classKey];if(value[classKey]===this.options.classes[classKey]||!currentElements||!currentElements.length){continue}elements=$2(currentElements.get());this._removeClass(currentElements,classKey);elements.addClass(this._classes({element:elements,keys:classKey,classes:value,add:true}))}},_setOptionDisabled:function(value){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!value);if(value){this._removeClass(this.hoverable,null,"ui-state-hover");this._removeClass(this.focusable,null,"ui-state-focus")}},enable:function(){return this._setOptions({disabled:false})},disable:function(){return this._setOptions({disabled:true})},_classes:function(options){var full=[];var that=this;options=$2.extend({element:this.element,classes:this.options.classes||{}},options);function processClassString(classes,checkOption){var current,i2;for(i2=0;i2<classes.length;i2++){current=that.classesElementLookup[classes[i2]]||$2();if(options.add){current=$2($2.unique(current.get().concat(options.element.get())))}else{current=$2(current.not(options.element).get())}that.classesElementLookup[classes[i2]]=current;full.push(classes[i2]);if(checkOption&&options.classes[classes[i2]]){full.push(options.classes[classes[i2]])}}}this._on(options.element,{"remove":"_untrackClassesElement"});if(options.keys){processClassString(options.keys.match(/\S+/g)||[],true)}if(options.extra){processClassString(options.extra.match(/\S+/g)||[])}return full.join(" ")},_untrackClassesElement:function(event){var that=this;$2.each(that.classesElementLookup,function(key2,value){if($2.inArray(event.target,value)!==-1){that.classesElementLookup[key2]=$2(value.not(event.target).get())}})},_removeClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,false)},_addClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,true)},_toggleClass:function(element,keys,extra,add){add=typeof add==="boolean"?add:extra;var shift=typeof element==="string"||element===null,options={extra:shift?keys:extra,keys:shift?element:keys,element:shift?this.element:element,add};options.element.toggleClass(this._classes(options),add);return this},_on:function(suppressDisabledCheck,element,handlers){var delegateElement;var instance=this;if(typeof suppressDisabledCheck!=="boolean"){handlers=element;element=suppressDisabledCheck;suppressDisabledCheck=false}if(!handlers){handlers=element;element=this.element;delegateElement=this.widget()}else{element=delegateElement=$2(element);this.bindings=this.bindings.add(element)}$2.each(handlers,function(event,handler){function handlerProxy(){if(!suppressDisabledCheck&&(instance.options.disabled===true||$2(this).hasClass("ui-state-disabled"))){return}return(typeof handler==="string"?instance[handler]:handler).apply(instance,arguments)}if(typeof handler!=="string"){handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$2.guid++}var match=event.match(/^([\w:-]*)\s*(.*)$/);var eventName=match[1]+instance.eventNamespace;var selector2=match[2];if(selector2){delegateElement.on(eventName,selector2,handlerProxy)}else{element.on(eventName,handlerProxy)}})},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;element.off(eventName).off(eventName);this.bindings=$2(this.bindings.not(element).get());this.focusable=$2(this.focusable.not(element).get());this.hoverable=$2(this.hoverable.not(element).get())},_delay:function(handler,delay){function handlerProxy(){return(typeof handler==="string"?instance[handler]:handler).apply(instance,arguments)}var instance=this;return setTimeout(handlerProxy,delay||0)},_hoverable:function(element){this.hoverable=this.hoverable.add(element);this._on(element,{mouseenter:function(event){this._addClass($2(event.currentTarget),null,"ui-state-hover")},mouseleave:function(event){this._removeClass($2(event.currentTarget),null,"ui-state-hover")}})},_focusable:function(element){this.focusable=this.focusable.add(element);this._on(element,{focusin:function(event){this._addClass($2(event.currentTarget),null,"ui-state-focus")},focusout:function(event){this._removeClass($2(event.currentTarget),null,"ui-state-focus")}})},_trigger:function(type2,event,data3){var prop,orig;var callback=this.options[type2];data3=data3||{};event=$2.Event(event);event.type=(type2===this.widgetEventPrefix?type2:this.widgetEventPrefix+type2).toLowerCase();event.target=this.element[0];orig=event.originalEvent;if(orig){for(prop in orig){if(!(prop in event)){event[prop]=orig[prop]}}}this.element.trigger(event,data3);return!($2.isFunction(callback)&&callback.apply(this.element[0],[event].concat(data3))===false||event.isDefaultPrevented())}};$2.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$2.Widget.prototype["_"+method]=function(element,options,callback){if(typeof options==="string"){options={effect:options}}var hasOptions;var effectName=!options?method:options===true||typeof options==="number"?defaultEffect:options.effect||defaultEffect;options=options||{};if(typeof options==="number"){options={duration:options}}hasOptions=!$2.isEmptyObject(options);options.complete=callback;if(options.delay){element.delay(options.delay)}if(hasOptions&&$2.effects&&$2.effects.effect[effectName]){element[method](options)}else if(effectName!==method&&element[effectName]){element[effectName](options.duration,options.easing,callback)}else{element.queue(function(next){$2(this)[method]();if(callback){callback.call(element[0])}next()})}}});var widget=$2.widget;/*!
|
|
89
|
+
* jQuery UI Position 1.12.1
|
|
90
|
+
* http://jqueryui.com
|
|
91
|
+
*
|
|
92
|
+
* Copyright jQuery Foundation and other contributors
|
|
93
|
+
* Released under the MIT license.
|
|
94
|
+
* http://jquery.org/license
|
|
95
|
+
*
|
|
96
|
+
* http://api.jqueryui.com/position/
|
|
97
|
+
*/(function(){var cachedScrollbarWidth,max=Math.max,abs=Math.abs,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\+\-]\d+(\.[\d]+)?%?/,rposition=/^\w+/,rpercent=/%$/,_position=$2.fn.position;function getOffsets(offsets,width,height){return[parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)]}function parseCss(element,property){return parseInt($2.css(element,property),10)||0}function getDimensions(elem){var raw=elem[0];if(raw.nodeType===9){return{width:elem.width(),height:elem.height(),offset:{top:0,left:0}}}if($2.isWindow(raw)){return{width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}}}if(raw.preventDefault){return{width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}}}return{width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()}}$2.position={scrollbarWidth:function(){if(cachedScrollbarWidth!==void 0){return cachedScrollbarWidth}var w1,w2,div=$2("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),innerDiv=div.children()[0];$2("body").append(div);w1=innerDiv.offsetWidth;div.css("overflow","scroll");w2=innerDiv.offsetWidth;if(w1===w2){w2=div[0].clientWidth}div.remove();return cachedScrollbarWidth=w1-w2},getScrollInfo:function(within){var overflowX=within.isWindow||within.isDocument?"":within.element.css("overflow-x"),overflowY=within.isWindow||within.isDocument?"":within.element.css("overflow-y"),hasOverflowX=overflowX==="scroll"||overflowX==="auto"&&within.width<within.element[0].scrollWidth,hasOverflowY=overflowY==="scroll"||overflowY==="auto"&&within.height<within.element[0].scrollHeight;return{width:hasOverflowY?$2.position.scrollbarWidth():0,height:hasOverflowX?$2.position.scrollbarWidth():0}},getWithinInfo:function(element){var withinElement=$2(element||window),isWindow=$2.isWindow(withinElement[0]),isDocument=!!withinElement[0]&&withinElement[0].nodeType===9,hasOffset=!isWindow&&!isDocument;return{element:withinElement,isWindow,isDocument,offset:hasOffset?$2(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()}}};$2.fn.position=function(options){if(!options||!options.of){return _position.apply(this,arguments)}options=$2.extend({},options);var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,target=$2(options.of),within=$2.position.getWithinInfo(options.within),scrollInfo=$2.position.getScrollInfo(within),collision=(options.collision||"flip").split(" "),offsets={};dimensions=getDimensions(target);if(target[0].preventDefault){options.at="left top"}targetWidth=dimensions.width;targetHeight=dimensions.height;targetOffset=dimensions.offset;basePosition=$2.extend({},targetOffset);$2.each(["my","at"],function(){var pos=(options[this]||"").split(" "),horizontalOffset,verticalOffset;if(pos.length===1){pos=rhorizontal.test(pos[0])?pos.concat(["center"]):rvertical.test(pos[0])?["center"].concat(pos):["center","center"]}pos[0]=rhorizontal.test(pos[0])?pos[0]:"center";pos[1]=rvertical.test(pos[1])?pos[1]:"center";horizontalOffset=roffset.exec(pos[0]);verticalOffset=roffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]]});if(collision.length===1){collision[1]=collision[0]}if(options.at[0]==="right"){basePosition.left+=targetWidth}else if(options.at[0]==="center"){basePosition.left+=targetWidth/2}if(options.at[1]==="bottom"){basePosition.top+=targetHeight}else if(options.at[1]==="center"){basePosition.top+=targetHeight/2}atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){var collisionPosition,using,elem=$2(this),elemWidth=elem.outerWidth(),elemHeight=elem.outerHeight(),marginLeft=parseCss(this,"marginLeft"),marginTop=parseCss(this,"marginTop"),collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+scrollInfo.width,collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+scrollInfo.height,position2=$2.extend({},basePosition),myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==="right"){position2.left-=elemWidth}else if(options.my[0]==="center"){position2.left-=elemWidth/2}if(options.my[1]==="bottom"){position2.top-=elemHeight}else if(options.my[1]==="center"){position2.top-=elemHeight/2}position2.left+=myOffset[0];position2.top+=myOffset[1];collisionPosition={marginLeft,marginTop};$2.each(["left","top"],function(i2,dir){if($2.ui.position[collision[i2]]){$2.ui.position[collision[i2]][dir](position2,{targetWidth,targetHeight,elemWidth,elemHeight,collisionPosition,collisionWidth,collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within,elem})}});if(options.using){using=function(props2){var left=targetOffset.left-position2.left,right=left+targetWidth-elemWidth,top=targetOffset.top-position2.top,bottom=top+targetHeight-elemHeight,feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position2.left,top:position2.top,width:elemWidth,height:elemHeight},horizontal:right<0?"left":left>0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};if(targetWidth<elemWidth&&abs(left+right)<targetWidth){feedback.horizontal="center"}if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight){feedback.vertical="middle"}if(max(abs(left),abs(right))>max(abs(top),abs(bottom))){feedback.important="horizontal"}else{feedback.important="vertical"}options.using.call(this,props2,feedback)}}elem.offset($2.extend(position2,{using}))})};$2.ui.position={fit:{left:function(position2,data3){var within=data3.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position2.left-data3.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data3.collisionWidth-outerWidth-withinOffset,newOverRight;if(data3.collisionWidth>outerWidth){if(overLeft>0&&overRight<=0){newOverRight=position2.left+overLeft+data3.collisionWidth-outerWidth-withinOffset;position2.left+=overLeft-newOverRight}else if(overRight>0&&overLeft<=0){position2.left=withinOffset}else{if(overLeft>overRight){position2.left=withinOffset+outerWidth-data3.collisionWidth}else{position2.left=withinOffset}}}else if(overLeft>0){position2.left+=overLeft}else if(overRight>0){position2.left-=overRight}else{position2.left=max(position2.left-collisionPosLeft,position2.left)}},top:function(position2,data3){var within=data3.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data3.within.height,collisionPosTop=position2.top-data3.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data3.collisionHeight-outerHeight-withinOffset,newOverBottom;if(data3.collisionHeight>outerHeight){if(overTop>0&&overBottom<=0){newOverBottom=position2.top+overTop+data3.collisionHeight-outerHeight-withinOffset;position2.top+=overTop-newOverBottom}else if(overBottom>0&&overTop<=0){position2.top=withinOffset}else{if(overTop>overBottom){position2.top=withinOffset+outerHeight-data3.collisionHeight}else{position2.top=withinOffset}}}else if(overTop>0){position2.top+=overTop}else if(overBottom>0){position2.top-=overBottom}else{position2.top=max(position2.top-collisionPosTop,position2.top)}}},flip:{left:function(position2,data3){var within=data3.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position2.left-data3.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data3.collisionWidth-outerWidth-offsetLeft,myOffset=data3.my[0]==="left"?-data3.elemWidth:data3.my[0]==="right"?data3.elemWidth:0,atOffset=data3.at[0]==="left"?data3.targetWidth:data3.at[0]==="right"?-data3.targetWidth:0,offset=-2*data3.offset[0],newOverRight,newOverLeft;if(overLeft<0){newOverRight=position2.left+myOffset+atOffset+offset+data3.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft)){position2.left+=myOffset+atOffset+offset}}else if(overRight>0){newOverLeft=position2.left-data3.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight){position2.left+=myOffset+atOffset+offset}}},top:function(position2,data3){var within=data3.within,withinOffset=within.offset.top+within.scrollTop,outerHeight=within.height,offsetTop=within.isWindow?within.scrollTop:within.offset.top,collisionPosTop=position2.top-data3.collisionPosition.marginTop,overTop=collisionPosTop-offsetTop,overBottom=collisionPosTop+data3.collisionHeight-outerHeight-offsetTop,top=data3.my[1]==="top",myOffset=top?-data3.elemHeight:data3.my[1]==="bottom"?data3.elemHeight:0,atOffset=data3.at[1]==="top"?data3.targetHeight:data3.at[1]==="bottom"?-data3.targetHeight:0,offset=-2*data3.offset[1],newOverTop,newOverBottom;if(overTop<0){newOverBottom=position2.top+myOffset+atOffset+offset+data3.collisionHeight-outerHeight-withinOffset;if(newOverBottom<0||newOverBottom<abs(overTop)){position2.top+=myOffset+atOffset+offset}}else if(overBottom>0){newOverTop=position2.top-data3.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if(newOverTop>0||abs(newOverTop)<overBottom){position2.top+=myOffset+atOffset+offset}}}},flipfit:{left:function(){$2.ui.position.flip.left.apply(this,arguments);$2.ui.position.fit.left.apply(this,arguments)},top:function(){$2.ui.position.flip.top.apply(this,arguments);$2.ui.position.fit.top.apply(this,arguments)}}}})();var position=$2.ui.position;/*!
|
|
98
|
+
* jQuery UI :data 1.12.1
|
|
99
|
+
* http://jqueryui.com
|
|
100
|
+
*
|
|
101
|
+
* Copyright jQuery Foundation and other contributors
|
|
102
|
+
* Released under the MIT license.
|
|
103
|
+
* http://jquery.org/license
|
|
104
|
+
*/var data2=$2.extend($2.expr[":"],{data:$2.expr.createPseudo?$2.expr.createPseudo(function(dataName){return function(elem){return!!$2.data(elem,dataName)}}):function(elem,i2,match){return!!$2.data(elem,match[3])}});/*!
|
|
105
|
+
* jQuery UI Disable Selection 1.12.1
|
|
106
|
+
* http://jqueryui.com
|
|
107
|
+
*
|
|
108
|
+
* Copyright jQuery Foundation and other contributors
|
|
109
|
+
* Released under the MIT license.
|
|
110
|
+
* http://jquery.org/license
|
|
111
|
+
*/var disableSelection=$2.fn.extend({disableSelection:(function(){var eventType="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(eventType+".ui-disableSelection",function(event){event.preventDefault()})}})(),enableSelection:function(){return this.off(".ui-disableSelection")}});/*!
|
|
112
|
+
* jQuery UI Effects 1.12.1
|
|
113
|
+
* http://jqueryui.com
|
|
114
|
+
*
|
|
115
|
+
* Copyright jQuery Foundation and other contributors
|
|
116
|
+
* Released under the MIT license.
|
|
117
|
+
* http://jquery.org/license
|
|
118
|
+
*/var dataSpace="ui-effects-",dataSpaceStyle="ui-effects-style",dataSpaceAnimated="ui-effects-animated",jQuery2=$2;$2.effects={effect:{}};/*!
|
|
119
|
+
* jQuery Color Animations v2.1.2
|
|
120
|
+
* https://github.com/jquery/jquery-color
|
|
121
|
+
*
|
|
122
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
|
123
|
+
* Released under the MIT license.
|
|
124
|
+
* http://jquery.org/license
|
|
125
|
+
*
|
|
126
|
+
* Date: Wed Jan 16 08:47:09 2013 -0600
|
|
127
|
+
*/(function(jQuery3,undefined2){var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1]*2.55,execResult[2]*2.55,execResult[3]*2.55,execResult[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]]}}],color=jQuery3.Color=function(color2,green,blue,alpha){return new jQuery3.Color.fn.parse(color2,green,blue,alpha)},spaces={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},propTypes={"byte":{floor:true,max:255},"percent":{max:1},"degrees":{mod:360,floor:true}},support=color.support={},supportElem=jQuery3("<p>")[0],colors,each=jQuery3.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)";support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1;each(spaces,function(spaceName,space){space.cache="_"+spaceName;space.props.alpha={idx:3,type:"percent",def:1}});function clamp(value,prop,allowEmpty){var type2=propTypes[prop.type]||{};if(value==null){return allowEmpty||!prop.def?null:prop.def}value=type2.floor?~~value:parseFloat(value);if(isNaN(value)){return prop.def}if(type2.mod){return(value+type2.mod)%type2.mod}return 0>value?0:type2.max<value?type2.max:value}function stringParse(string){var inst=color(),rgba=inst._rgba=[];string=string.toLowerCase();each(stringParsers,function(i2,parser){var parsed,match=parser.re.exec(string),values=match&&parser.parse(match),spaceName=parser.space||"rgba";if(values){parsed=inst[spaceName](values);inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache];rgba=inst._rgba=parsed._rgba;return false}});if(rgba.length){if(rgba.join()==="0,0,0,0"){jQuery3.extend(rgba,colors.transparent)}return inst}return colors[string]}color.fn=jQuery3.extend(color.prototype,{parse:function(red,green,blue,alpha){if(red===undefined2){this._rgba=[null,null,null,null];return this}if(red.jquery||red.nodeType){red=jQuery3(red).css(green);green=undefined2}var inst=this,type2=jQuery3.type(red),rgba=this._rgba=[];if(green!==undefined2){red=[red,green,blue,alpha];type2="array"}if(type2==="string"){return this.parse(stringParse(red)||colors._default)}if(type2==="array"){each(spaces.rgba.props,function(key2,prop){rgba[prop.idx]=clamp(red[prop.idx],prop)});return this}if(type2==="object"){if(red instanceof color){each(spaces,function(spaceName,space){if(red[space.cache]){inst[space.cache]=red[space.cache].slice()}})}else{each(spaces,function(spaceName,space){var cache=space.cache;each(space.props,function(key2,prop){if(!inst[cache]&&space.to){if(key2==="alpha"||red[key2]==null){return}inst[cache]=space.to(inst._rgba)}inst[cache][prop.idx]=clamp(red[key2],prop,true)});if(inst[cache]&&jQuery3.inArray(null,inst[cache].slice(0,3))<0){inst[cache][3]=1;if(space.from){inst._rgba=space.from(inst[cache])}}})}return this}},is:function(compare){var is=color(compare),same=true,inst=this;each(spaces,function(_,space){var localCache,isCache=is[space.cache];if(isCache){localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[];each(space.props,function(_2,prop){if(isCache[prop.idx]!=null){same=isCache[prop.idx]===localCache[prop.idx];return same}})}return same});return same},_space:function(){var used=[],inst=this;each(spaces,function(spaceName,space){if(inst[space.cache]){used.push(spaceName)}});return used.pop()},transition:function(other,distance){var end=color(other),spaceName=end._space(),space=spaces[spaceName],startColor=this.alpha()===0?color("transparent"):this,start=startColor[space.cache]||space.to(startColor._rgba),result=start.slice();end=end[space.cache];each(space.props,function(key2,prop){var index2=prop.idx,startValue=start[index2],endValue=end[index2],type2=propTypes[prop.type]||{};if(endValue===null){return}if(startValue===null){result[index2]=endValue}else{if(type2.mod){if(endValue-startValue>type2.mod/2){startValue+=type2.mod}else if(startValue-endValue>type2.mod/2){startValue-=type2.mod}}result[index2]=clamp((endValue-startValue)*distance+startValue,prop)}});return this[spaceName](result)},blend:function(opaque){if(this._rgba[3]===1){return this}var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery3.map(rgb,function(v,i2){return(1-a)*blend[i2]+a*v}))},toRgbaString:function(){var prefix="rgba(",rgba=jQuery3.map(this._rgba,function(v,i2){return v==null?i2>2?1:0:v});if(rgba[3]===1){rgba.pop();prefix="rgb("}return prefix+rgba.join()+")"},toHslaString:function(){var prefix="hsla(",hsla=jQuery3.map(this.hsla(),function(v,i2){if(v==null){v=i2>2?1:0}if(i2&&i2<3){v=Math.round(v*100)+"%"}return v});if(hsla[3]===1){hsla.pop();prefix="hsl("}return prefix+hsla.join()+")"},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();if(includeAlpha){rgba.push(~~(alpha*255))}return"#"+jQuery3.map(rgba,function(v){v=(v||0).toString(16);return v.length===1?"0"+v:v}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});color.fn.parse.prototype=color.fn;function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6}if(h*2<1){return q}if(h*3<2){return p+(q-p)*(2/3-h)*6}return p}spaces.hsla.to=function(rgba){if(rgba[0]==null||rgba[1]==null||rgba[2]==null){return[null,null,null,rgba[3]]}var r2=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r2,g,b),min=Math.min(r2,g,b),diff=max-min,add=max+min,l=add*.5,h,s;if(min===max){h=0}else if(r2===max){h=60*(g-b)/diff+360}else if(g===max){h=60*(b-r2)/diff+120}else{h=60*(r2-g)/diff+240}if(diff===0){s=0}else if(l<=.5){s=diff/add}else{s=diff/(2-add)}return[Math.round(h)%360,s,l,a==null?1:a]};spaces.hsla.from=function(hsla){if(hsla[0]==null||hsla[1]==null||hsla[2]==null){return[null,null,null,hsla[3]]}var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(hue2rgb(p,q,h+1/3)*255),Math.round(hue2rgb(p,q,h)*255),Math.round(hue2rgb(p,q,h-1/3)*255),a]};each(spaces,function(spaceName,space){var props2=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]){this[cache]=to(this._rgba)}if(value===undefined2){return this[cache].slice()}var ret,type2=jQuery3.type(value),arr=type2==="array"||type2==="object"?value:arguments,local=this[cache].slice();each(props2,function(key2,prop){var val2=arr[type2==="object"?key2:prop.idx];if(val2==null){val2=local[prop.idx]}local[prop.idx]=clamp(val2,prop)});if(from){ret=color(from(local));ret[cache]=local;return ret}else{return color(local)}};each(props2,function(key2,prop){if(color.fn[key2]){return}color.fn[key2]=function(value){var vtype=jQuery3.type(value),fn2=key2==="alpha"?this._hsla?"hsla":"rgba":spaceName,local=this[fn2](),cur=local[prop.idx],match;if(vtype==="undefined"){return cur}if(vtype==="function"){value=value.call(this,cur);vtype=jQuery3.type(value)}if(value==null&&prop.empty){return this}if(vtype==="string"){match=rplusequals.exec(value);if(match){value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1)}}local[prop.idx]=value;return this[fn2](local)}})});color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i2,hook2){jQuery3.cssHooks[hook2]={set:function(elem,value){var parsed,curElem,backgroundColor="";if(value!=="transparent"&&(jQuery3.type(value)!=="string"||(parsed=stringParse(value)))){value=color(parsed||value);if(!support.rgba&&value._rgba[3]!==1){curElem=hook2==="backgroundColor"?elem.parentNode:elem;while((backgroundColor===""||backgroundColor==="transparent")&&curElem&&curElem.style){try{backgroundColor=jQuery3.css(curElem,"backgroundColor");curElem=curElem.parentNode}catch(e2){}}value=value.blend(backgroundColor&&backgroundColor!=="transparent"?backgroundColor:"_default")}value=value.toRgbaString()}try{elem.style[hook2]=value}catch(e2){}}};jQuery3.fx.step[hook2]=function(fx){if(!fx.colorInit){fx.start=color(fx.elem,hook2);fx.end=color(fx.end);fx.colorInit=true}jQuery3.cssHooks[hook2].set(fx.elem,fx.start.transition(fx.end,fx.pos))}})};color.hook(stepHooks);jQuery3.cssHooks.borderColor={expand:function(value){var expanded={};each(["Top","Right","Bottom","Left"],function(i2,part){expanded["border"+part+"Color"]=value});return expanded}};colors=jQuery3.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery2);(function(){var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$2.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$2.fx.step[prop]=function(fx){if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){jQuery2.style(fx.elem,prop,fx.end);fx.setAttr=true}}});function getElementStyles(elem){var key2,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]]){len=style.length;while(len--){key2=style[len];if(typeof style[key2]==="string"){styles[$2.camelCase(key2)]=style[key2]}}}else{for(key2 in style){if(typeof style[key2]==="string"){styles[key2]=style[key2]}}}return styles}function styleDifference(oldStyle,newStyle){var diff={},name,value;for(name in newStyle){value=newStyle[name];if(oldStyle[name]!==value){if(!shorthandStyles[name]){if($2.fx.step[name]||!isNaN(parseFloat(value))){diff[name]=value}}}}return diff}if(!$2.fn.addBack){$2.fn.addBack=function(selector2){return this.add(selector2==null?this.prevObject:this.prevObject.filter(selector2))}}$2.effects.animateClass=function(value,duration,easing,callback){var o=$2.speed(duration,easing,callback);return this.queue(function(){var animated=$2(this),baseClass=animated.attr("class")||"",applyClassChange,allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el2=$2(this);return{el:el2,start:getElementStyles(this)}});applyClassChange=function(){$2.each(classAnimationActions,function(i2,action){if(value[action]){animated[action+"Class"](value[action])}})};applyClassChange();allAnimations=allAnimations.map(function(){this.end=getElementStyles(this.el[0]);this.diff=styleDifference(this.start,this.end);return this});animated.attr("class",baseClass);allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$2.Deferred(),opts=$2.extend({},o,{queue:false,complete:function(){dfd.resolve(styleInfo)}});this.el.animate(this.diff,opts);return dfd.promise()});$2.when.apply($2,allAnimations.get()).done(function(){applyClassChange();$2.each(arguments,function(){var el2=this.el;$2.each(this.diff,function(key2){el2.css(key2,"")})});o.complete.call(animated[0])})})};$2.fn.extend({addClass:(function(orig){return function(classNames,speed,easing,callback){return speed?$2.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments)}})($2.fn.addClass),removeClass:(function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$2.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments)}})($2.fn.removeClass),toggleClass:(function(orig){return function(classNames,force,speed,easing,callback){if(typeof force==="boolean"||force===void 0){if(!speed){return orig.apply(this,arguments)}else{return $2.effects.animateClass.call(this,force?{add:classNames}:{remove:classNames},speed,easing,callback)}}else{return $2.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)}}})($2.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $2.effects.animateClass.call(this,{add,remove},speed,easing,callback)}})})();(function(){if($2.expr&&$2.expr.filters&&$2.expr.filters.animated){$2.expr.filters.animated=(function(orig){return function(elem){return!!$2(elem).data(dataSpaceAnimated)||orig(elem)}})($2.expr.filters.animated)}if($2.uiBackCompat!==false){$2.extend($2.effects,{save:function(element,set){var i2=0,length=set.length;for(;i2<length;i2++){if(set[i2]!==null){element.data(dataSpace+set[i2],element[0].style[set[i2]])}}},restore:function(element,set){var val2,i2=0,length=set.length;for(;i2<length;i2++){if(set[i2]!==null){val2=element.data(dataSpace+set[i2]);element.css(set[i2],val2)}}},setMode:function(el2,mode){if(mode==="toggle"){mode=el2.is(":hidden")?"show":"hide"}return mode},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent()}var props2={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")},wrapper=$2("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id}catch(e2){active=document.body}element.wrap(wrapper);if(element[0]===active||$2.contains(element[0],active)){$2(active).trigger("focus")}wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{$2.extend(props2,{position:element.css("position"),zIndex:element.css("z-index")});$2.each(["top","left","bottom","right"],function(i2,pos){props2[pos]=element.css(pos);if(isNaN(parseInt(props2[pos],10))){props2[pos]="auto"}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}element.css(size);return wrapper.css(props2).show()},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$2.contains(element[0],active)){$2(active).trigger("focus")}}return element}})}$2.extend($2.effects,{version:"1.12.1",define:function(name,mode,effect2){if(!effect2){effect2=mode;mode="effect"}$2.effects.effect[name]=effect2;$2.effects.effect[name].mode=mode;return effect2},scaledDimensions:function(element,percent,direction){if(percent===0){return{height:0,width:0,outerHeight:0,outerWidth:0}}var x2=direction!=="horizontal"?(percent||100)/100:1,y=direction!=="vertical"?(percent||100)/100:1;return{height:element.height()*y,width:element.width()*x2,outerHeight:element.outerHeight()*y,outerWidth:element.outerWidth()*x2}},clipToBox:function(animation){return{width:animation.clip.right-animation.clip.left,height:animation.clip.bottom-animation.clip.top,left:animation.clip.left,top:animation.clip.top}},unshift:function(element,queueLength,count){var queue=element.queue();if(queueLength>1){queue.splice.apply(queue,[1,0].concat(queue.splice(queueLength,count)))}element.dequeue()},saveStyle:function(element){element.data(dataSpaceStyle,element[0].style.cssText)},restoreStyle:function(element){element[0].style.cssText=element.data(dataSpaceStyle)||"";element.removeData(dataSpaceStyle)},mode:function(element,mode){var hidden=element.is(":hidden");if(mode==="toggle"){mode=hidden?"show":"hide"}if(hidden?mode==="hide":mode==="show"){mode="none"}return mode},getBaseline:function(origin,original){var y,x2;switch(origin[0]){case"top":y=0;break;case"middle":y=.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x2=0;break;case"center":x2=.5;break;case"right":x2=1;break;default:x2=origin[1]/original.width}return{x:x2,y}},createPlaceholder:function(element){var placeholder,cssPosition=element.css("position"),position2=element.position();element.css({marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight());if(/^(static|relative)/.test(cssPosition)){cssPosition="absolute";placeholder=$2("<"+element[0].nodeName+">").insertAfter(element).css({display:/^(inline|ruby)/.test(element.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight"),"float":element.css("float")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()).addClass("ui-effects-placeholder");element.data(dataSpace+"placeholder",placeholder)}element.css({position:cssPosition,left:position2.left,top:position2.top});return placeholder},removePlaceholder:function(element){var dataKey=dataSpace+"placeholder",placeholder=element.data(dataKey);if(placeholder){placeholder.remove();element.removeData(dataKey)}},cleanUp:function(element){$2.effects.restoreStyle(element);$2.effects.removePlaceholder(element)},setTransition:function(element,list,factor,value){value=value||{};$2.each(list,function(i2,x2){var unit=element.cssUnit(x2);if(unit[0]>0){value[x2]=unit[0]*factor+unit[1]}});return value}});function _normalizeArguments(effect2,options,speed,callback){if($2.isPlainObject(effect2)){options=effect2;effect2=effect2.effect}effect2={effect:effect2};if(options==null){options={}}if($2.isFunction(options)){callback=options;speed=null;options={}}if(typeof options==="number"||$2.fx.speeds[options]){callback=speed;speed=options;options={}}if($2.isFunction(speed)){callback=speed;speed=null}if(options){$2.extend(effect2,options)}speed=speed||options.duration;effect2.duration=$2.fx.off?0:typeof speed==="number"?speed:speed in $2.fx.speeds?$2.fx.speeds[speed]:$2.fx.speeds._default;effect2.complete=callback||options.complete;return effect2}function standardAnimationOption(option){if(!option||typeof option==="number"||$2.fx.speeds[option]){return true}if(typeof option==="string"&&!$2.effects.effect[option]){return true}if($2.isFunction(option)){return true}if(typeof option==="object"&&!option.effect){return true}return false}$2.fn.extend({effect:function(){var args=_normalizeArguments.apply(this,arguments),effectMethod=$2.effects.effect[args.effect],defaultMode=effectMethod.mode,queue=args.queue,queueName=queue||"fx",complete=args.complete,mode=args.mode,modes=[],prefilter=function(next){var el2=$2(this),normalizedMode=$2.effects.mode(el2,mode)||defaultMode;el2.data(dataSpaceAnimated,true);modes.push(normalizedMode);if(defaultMode&&(normalizedMode==="show"||normalizedMode===defaultMode&&normalizedMode==="hide")){el2.show()}if(!defaultMode||normalizedMode!=="none"){$2.effects.saveStyle(el2)}if($2.isFunction(next)){next()}};if($2.fx.off||!effectMethod){if(mode){return this[mode](args.duration,complete)}else{return this.each(function(){if(complete){complete.call(this)}})}}function run(next){var elem=$2(this);function cleanup(){elem.removeData(dataSpaceAnimated);$2.effects.cleanUp(elem);if(args.mode==="hide"){elem.hide()}done()}function done(){if($2.isFunction(complete)){complete.call(elem[0])}if($2.isFunction(next)){next()}}args.mode=modes.shift();if($2.uiBackCompat!==false&&!defaultMode){if(elem.is(":hidden")?mode==="hide":mode==="show"){elem[mode]();done()}else{effectMethod.call(elem[0],args,done)}}else{if(args.mode==="none"){elem[mode]();done()}else{effectMethod.call(elem[0],args,cleanup)}}}return queue===false?this.each(prefilter).each(run):this.queue(queueName,prefilter).queue(queueName,run)},show:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="show";return this.effect.call(this,args)}}})($2.fn.show),hide:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="hide";return this.effect.call(this,args)}}})($2.fn.hide),toggle:(function(orig){return function(option){if(standardAnimationOption(option)||typeof option==="boolean"){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="toggle";return this.effect.call(this,args)}}})($2.fn.toggle),cssUnit:function(key2){var style=this.css(key2),val2=[];$2.each(["em","px","%","pt"],function(i2,unit){if(style.indexOf(unit)>0){val2=[parseFloat(style),unit]}});return val2},cssClip:function(clipObj){if(clipObj){return this.css("clip","rect("+clipObj.top+"px "+clipObj.right+"px "+clipObj.bottom+"px "+clipObj.left+"px)")}return parseClip(this.css("clip"),this)},transfer:function(options,done){var element=$2(this),target=$2(options.to),targetFixed=target.css("position")==="fixed",body=$2("body"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=element.offset(),transfer=$2("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(options.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:element.innerHeight(),width:element.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,options.duration,options.easing,function(){transfer.remove();if($2.isFunction(done)){done()}})}});function parseClip(str,element){var outerWidth=element.outerWidth(),outerHeight=element.outerHeight(),clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,values=clipRegex.exec(str)||["",0,outerWidth,outerHeight,0];return{top:parseFloat(values[1])||0,right:values[2]==="auto"?outerWidth:parseFloat(values[2]),bottom:values[3]==="auto"?outerHeight:parseFloat(values[3]),left:parseFloat(values[4])||0}}$2.fx.step.clip=function(fx){if(!fx.clipInit){fx.start=$2(fx.elem).cssClip();if(typeof fx.end==="string"){fx.end=parseClip(fx.end,fx.elem)}fx.clipInit=true}$2(fx.elem).cssClip({top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left})}})();(function(){var baseEasings={};$2.each(["Quad","Cubic","Quart","Quint","Expo"],function(i2,name){baseEasings[name]=function(p){return Math.pow(p,i2+2)}});$2.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1-Math.sqrt(1-p*p)},Elastic:function(p){return p===0||p===1?p:-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){var pow2,bounce=4;while(p<((pow2=Math.pow(2,--bounce))-1)/11){}return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2)}});$2.each(baseEasings,function(name,easeIn){$2.easing["easeIn"+name]=easeIn;$2.easing["easeOut"+name]=function(p){return 1-easeIn(1-p)};$2.easing["easeInOut"+name]=function(p){return p<.5?easeIn(p*2)/2:1-easeIn(p*-2+2)/2}})})();var effect=$2.effects;/*!
|
|
128
|
+
* jQuery UI Effects Blind 1.12.1
|
|
129
|
+
* http://jqueryui.com
|
|
130
|
+
*
|
|
131
|
+
* Copyright jQuery Foundation and other contributors
|
|
132
|
+
* Released under the MIT license.
|
|
133
|
+
* http://jquery.org/license
|
|
134
|
+
*/var effectsEffectBlind=$2.effects.define("blind","hide",function(options,done){var map={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},element=$2(this),direction=options.direction||"up",start=element.cssClip(),animate={clip:$2.extend({},start)},placeholder=$2.effects.createPlaceholder(element);animate.clip[map[direction][0]]=animate.clip[map[direction][1]];if(options.mode==="show"){element.cssClip(animate.clip);if(placeholder){placeholder.css($2.effects.clipToBox(animate))}animate.clip=start}if(placeholder){placeholder.animate($2.effects.clipToBox(animate),options.duration,options.easing)}element.animate(animate,{queue:false,duration:options.duration,easing:options.easing,complete:done})});/*!
|
|
135
|
+
* jQuery UI Effects Bounce 1.12.1
|
|
136
|
+
* http://jqueryui.com
|
|
137
|
+
*
|
|
138
|
+
* Copyright jQuery Foundation and other contributors
|
|
139
|
+
* Released under the MIT license.
|
|
140
|
+
* http://jquery.org/license
|
|
141
|
+
*/var effectsEffectBounce=$2.effects.define("bounce",function(options,done){var upAnim,downAnim,refValue,element=$2(this),mode=options.mode,hide=mode==="hide",show=mode==="show",direction=options.direction||"up",distance=options.distance,times=options.times||5,anims=times*2+(show||hide?1:0),speed=options.duration/anims,easing=options.easing,ref=direction==="up"||direction==="down"?"top":"left",motion=direction==="up"||direction==="left",i2=0,queuelen=element.queue().length;$2.effects.createPlaceholder(element);refValue=element.css(ref);if(!distance){distance=element[ref==="top"?"outerHeight":"outerWidth"]()/3}if(show){downAnim={opacity:1};downAnim[ref]=refValue;element.css("opacity",0).css(ref,motion?-distance*2:distance*2).animate(downAnim,speed,easing)}if(hide){distance=distance/Math.pow(2,times-1)}downAnim={};downAnim[ref]=refValue;for(;i2<times;i2++){upAnim={};upAnim[ref]=(motion?"-=":"+=")+distance;element.animate(upAnim,speed,easing).animate(downAnim,speed,easing);distance=hide?distance*2:distance/2}if(hide){upAnim={opacity:0};upAnim[ref]=(motion?"-=":"+=")+distance;element.animate(upAnim,speed,easing)}element.queue(done);$2.effects.unshift(element,queuelen,anims+1)});/*!
|
|
142
|
+
* jQuery UI Effects Clip 1.12.1
|
|
143
|
+
* http://jqueryui.com
|
|
144
|
+
*
|
|
145
|
+
* Copyright jQuery Foundation and other contributors
|
|
146
|
+
* Released under the MIT license.
|
|
147
|
+
* http://jquery.org/license
|
|
148
|
+
*/var effectsEffectClip=$2.effects.define("clip","hide",function(options,done){var start,animate={},element=$2(this),direction=options.direction||"vertical",both=direction==="both",horizontal=both||direction==="horizontal",vertical=both||direction==="vertical";start=element.cssClip();animate.clip={top:vertical?(start.bottom-start.top)/2:start.top,right:horizontal?(start.right-start.left)/2:start.right,bottom:vertical?(start.bottom-start.top)/2:start.bottom,left:horizontal?(start.right-start.left)/2:start.left};$2.effects.createPlaceholder(element);if(options.mode==="show"){element.cssClip(animate.clip);animate.clip=start}element.animate(animate,{queue:false,duration:options.duration,easing:options.easing,complete:done})});/*!
|
|
149
|
+
* jQuery UI Effects Drop 1.12.1
|
|
150
|
+
* http://jqueryui.com
|
|
151
|
+
*
|
|
152
|
+
* Copyright jQuery Foundation and other contributors
|
|
153
|
+
* Released under the MIT license.
|
|
154
|
+
* http://jquery.org/license
|
|
155
|
+
*/var effectsEffectDrop=$2.effects.define("drop","hide",function(options,done){var distance,element=$2(this),mode=options.mode,show=mode==="show",direction=options.direction||"left",ref=direction==="up"||direction==="down"?"top":"left",motion=direction==="up"||direction==="left"?"-=":"+=",oppositeMotion=motion==="+="?"-=":"+=",animation={opacity:0};$2.effects.createPlaceholder(element);distance=options.distance||element[ref==="top"?"outerHeight":"outerWidth"](true)/2;animation[ref]=motion+distance;if(show){element.css(animation);animation[ref]=oppositeMotion+distance;animation.opacity=1}element.animate(animation,{queue:false,duration:options.duration,easing:options.easing,complete:done})});/*!
|
|
156
|
+
* jQuery UI Effects Explode 1.12.1
|
|
157
|
+
* http://jqueryui.com
|
|
158
|
+
*
|
|
159
|
+
* Copyright jQuery Foundation and other contributors
|
|
160
|
+
* Released under the MIT license.
|
|
161
|
+
* http://jquery.org/license
|
|
162
|
+
*/var effectsEffectExplode=$2.effects.define("explode","hide",function(options,done){var i2,j,left,top,mx,my,rows=options.pieces?Math.round(Math.sqrt(options.pieces)):3,cells=rows,element=$2(this),mode=options.mode,show=mode==="show",offset=element.show().css("visibility","hidden").offset(),width=Math.ceil(element.outerWidth()/cells),height=Math.ceil(element.outerHeight()/rows),pieces=[];function childComplete(){pieces.push(this);if(pieces.length===rows*cells){animComplete()}}for(i2=0;i2<rows;i2++){top=offset.top+i2*height;my=i2-(rows-1)/2;for(j=0;j<cells;j++){left=offset.left+j*width;mx=j-(cells-1)/2;element.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*width,top:-i2*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width,height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},options.duration||500,options.easing,childComplete)}}function animComplete(){element.css({visibility:"visible"});$2(pieces).remove();done()}});/*!
|
|
163
|
+
* jQuery UI Effects Fade 1.12.1
|
|
164
|
+
* http://jqueryui.com
|
|
165
|
+
*
|
|
166
|
+
* Copyright jQuery Foundation and other contributors
|
|
167
|
+
* Released under the MIT license.
|
|
168
|
+
* http://jquery.org/license
|
|
169
|
+
*/var effectsEffectFade=$2.effects.define("fade","toggle",function(options,done){var show=options.mode==="show";$2(this).css("opacity",show?0:1).animate({opacity:show?1:0},{queue:false,duration:options.duration,easing:options.easing,complete:done})});/*!
|
|
170
|
+
* jQuery UI Effects Fold 1.12.1
|
|
171
|
+
* http://jqueryui.com
|
|
172
|
+
*
|
|
173
|
+
* Copyright jQuery Foundation and other contributors
|
|
174
|
+
* Released under the MIT license.
|
|
175
|
+
* http://jquery.org/license
|
|
176
|
+
*/var effectsEffectFold=$2.effects.define("fold","hide",function(options,done){var element=$2(this),mode=options.mode,show=mode==="show",hide=mode==="hide",size=options.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!options.horizFirst,ref=horizFirst?["right","bottom"]:["bottom","right"],duration=options.duration/2,placeholder=$2.effects.createPlaceholder(element),start=element.cssClip(),animation1={clip:$2.extend({},start)},animation2={clip:$2.extend({},start)},distance=[start[ref[0]],start[ref[1]]],queuelen=element.queue().length;if(percent){size=parseInt(percent[1],10)/100*distance[hide?0:1]}animation1.clip[ref[0]]=size;animation2.clip[ref[0]]=size;animation2.clip[ref[1]]=0;if(show){element.cssClip(animation2.clip);if(placeholder){placeholder.css($2.effects.clipToBox(animation2))}animation2.clip=start}element.queue(function(next){if(placeholder){placeholder.animate($2.effects.clipToBox(animation1),duration,options.easing).animate($2.effects.clipToBox(animation2),duration,options.easing)}next()}).animate(animation1,duration,options.easing).animate(animation2,duration,options.easing).queue(done);$2.effects.unshift(element,queuelen,4)});/*!
|
|
177
|
+
* jQuery UI Effects Highlight 1.12.1
|
|
178
|
+
* http://jqueryui.com
|
|
179
|
+
*
|
|
180
|
+
* Copyright jQuery Foundation and other contributors
|
|
181
|
+
* Released under the MIT license.
|
|
182
|
+
* http://jquery.org/license
|
|
183
|
+
*/var effectsEffectHighlight=$2.effects.define("highlight","show",function(options,done){var element=$2(this),animation={backgroundColor:element.css("backgroundColor")};if(options.mode==="hide"){animation.opacity=0}$2.effects.saveStyle(element);element.css({backgroundImage:"none",backgroundColor:options.color||"#ffff99"}).animate(animation,{queue:false,duration:options.duration,easing:options.easing,complete:done})});/*!
|
|
184
|
+
* jQuery UI Effects Size 1.12.1
|
|
185
|
+
* http://jqueryui.com
|
|
186
|
+
*
|
|
187
|
+
* Copyright jQuery Foundation and other contributors
|
|
188
|
+
* Released under the MIT license.
|
|
189
|
+
* http://jquery.org/license
|
|
190
|
+
*/var effectsEffectSize=$2.effects.define("size",function(options,done){var baseline,factor,temp2,element=$2(this),cProps=["fontSize"],vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],mode=options.mode,restore=mode!=="effect",scale=options.scale||"both",origin=options.origin||["middle","center"],position2=element.css("position"),pos=element.position(),original=$2.effects.scaledDimensions(element),from=options.from||original,to=options.to||$2.effects.scaledDimensions(element,0);$2.effects.createPlaceholder(element);if(mode==="show"){temp2=from;from=to;to=temp2}factor={from:{y:from.height/original.height,x:from.width/original.width},to:{y:to.height/original.height,x:to.width/original.width}};if(scale==="box"||scale==="both"){if(factor.from.y!==factor.to.y){from=$2.effects.setTransition(element,vProps,factor.from.y,from);to=$2.effects.setTransition(element,vProps,factor.to.y,to)}if(factor.from.x!==factor.to.x){from=$2.effects.setTransition(element,hProps,factor.from.x,from);to=$2.effects.setTransition(element,hProps,factor.to.x,to)}}if(scale==="content"||scale==="both"){if(factor.from.y!==factor.to.y){from=$2.effects.setTransition(element,cProps,factor.from.y,from);to=$2.effects.setTransition(element,cProps,factor.to.y,to)}}if(origin){baseline=$2.effects.getBaseline(origin,original);from.top=(original.outerHeight-from.outerHeight)*baseline.y+pos.top;from.left=(original.outerWidth-from.outerWidth)*baseline.x+pos.left;to.top=(original.outerHeight-to.outerHeight)*baseline.y+pos.top;to.left=(original.outerWidth-to.outerWidth)*baseline.x+pos.left}element.css(from);if(scale==="content"||scale==="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);element.find("*[width]").each(function(){var child=$2(this),childOriginal=$2.effects.scaledDimensions(child),childFrom={height:childOriginal.height*factor.from.y,width:childOriginal.width*factor.from.x,outerHeight:childOriginal.outerHeight*factor.from.y,outerWidth:childOriginal.outerWidth*factor.from.x},childTo={height:childOriginal.height*factor.to.y,width:childOriginal.width*factor.to.x,outerHeight:childOriginal.height*factor.to.y,outerWidth:childOriginal.width*factor.to.x};if(factor.from.y!==factor.to.y){childFrom=$2.effects.setTransition(child,vProps,factor.from.y,childFrom);childTo=$2.effects.setTransition(child,vProps,factor.to.y,childTo)}if(factor.from.x!==factor.to.x){childFrom=$2.effects.setTransition(child,hProps,factor.from.x,childFrom);childTo=$2.effects.setTransition(child,hProps,factor.to.x,childTo)}if(restore){$2.effects.saveStyle(child)}child.css(childFrom);child.animate(childTo,options.duration,options.easing,function(){if(restore){$2.effects.restoreStyle(child)}})})}element.animate(to,{queue:false,duration:options.duration,easing:options.easing,complete:function(){var offset=element.offset();if(to.opacity===0){element.css("opacity",from.opacity)}if(!restore){element.css("position",position2==="static"?"relative":position2).offset(offset);$2.effects.saveStyle(element)}done()}})});/*!
|
|
191
|
+
* jQuery UI Effects Scale 1.12.1
|
|
192
|
+
* http://jqueryui.com
|
|
193
|
+
*
|
|
194
|
+
* Copyright jQuery Foundation and other contributors
|
|
195
|
+
* Released under the MIT license.
|
|
196
|
+
* http://jquery.org/license
|
|
197
|
+
*/var effectsEffectScale=$2.effects.define("scale",function(options,done){var el2=$2(this),mode=options.mode,percent=parseInt(options.percent,10)||(parseInt(options.percent,10)===0?0:mode!=="effect"?0:100),newOptions=$2.extend(true,{from:$2.effects.scaledDimensions(el2),to:$2.effects.scaledDimensions(el2,percent,options.direction||"both"),origin:options.origin||["middle","center"]},options);if(options.fade){newOptions.from.opacity=1;newOptions.to.opacity=0}$2.effects.effect.size.call(this,newOptions,done)});/*!
|
|
198
|
+
* jQuery UI Effects Puff 1.12.1
|
|
199
|
+
* http://jqueryui.com
|
|
200
|
+
*
|
|
201
|
+
* Copyright jQuery Foundation and other contributors
|
|
202
|
+
* Released under the MIT license.
|
|
203
|
+
* http://jquery.org/license
|
|
204
|
+
*/var effectsEffectPuff=$2.effects.define("puff","hide",function(options,done){var newOptions=$2.extend(true,{},options,{fade:true,percent:parseInt(options.percent,10)||150});$2.effects.effect.scale.call(this,newOptions,done)});/*!
|
|
205
|
+
* jQuery UI Effects Pulsate 1.12.1
|
|
206
|
+
* http://jqueryui.com
|
|
207
|
+
*
|
|
208
|
+
* Copyright jQuery Foundation and other contributors
|
|
209
|
+
* Released under the MIT license.
|
|
210
|
+
* http://jquery.org/license
|
|
211
|
+
*/var effectsEffectPulsate=$2.effects.define("pulsate","show",function(options,done){var element=$2(this),mode=options.mode,show=mode==="show",hide=mode==="hide",showhide=show||hide,anims=(options.times||5)*2+(showhide?1:0),duration=options.duration/anims,animateTo=0,i2=1,queuelen=element.queue().length;if(show||!element.is(":visible")){element.css("opacity",0).show();animateTo=1}for(;i2<anims;i2++){element.animate({opacity:animateTo},duration,options.easing);animateTo=1-animateTo}element.animate({opacity:animateTo},duration,options.easing);element.queue(done);$2.effects.unshift(element,queuelen,anims+1)});/*!
|
|
212
|
+
* jQuery UI Effects Shake 1.12.1
|
|
213
|
+
* http://jqueryui.com
|
|
214
|
+
*
|
|
215
|
+
* Copyright jQuery Foundation and other contributors
|
|
216
|
+
* Released under the MIT license.
|
|
217
|
+
* http://jquery.org/license
|
|
218
|
+
*/var effectsEffectShake=$2.effects.define("shake",function(options,done){var i2=1,element=$2(this),direction=options.direction||"left",distance=options.distance||20,times=options.times||3,anims=times*2+1,speed=Math.round(options.duration/anims),ref=direction==="up"||direction==="down"?"top":"left",positiveMotion=direction==="up"||direction==="left",animation={},animation1={},animation2={},queuelen=element.queue().length;$2.effects.createPlaceholder(element);animation[ref]=(positiveMotion?"-=":"+=")+distance;animation1[ref]=(positiveMotion?"+=":"-=")+distance*2;animation2[ref]=(positiveMotion?"-=":"+=")+distance*2;element.animate(animation,speed,options.easing);for(;i2<times;i2++){element.animate(animation1,speed,options.easing).animate(animation2,speed,options.easing)}element.animate(animation1,speed,options.easing).animate(animation,speed/2,options.easing).queue(done);$2.effects.unshift(element,queuelen,anims+1)});/*!
|
|
219
|
+
* jQuery UI Effects Slide 1.12.1
|
|
220
|
+
* http://jqueryui.com
|
|
221
|
+
*
|
|
222
|
+
* Copyright jQuery Foundation and other contributors
|
|
223
|
+
* Released under the MIT license.
|
|
224
|
+
* http://jquery.org/license
|
|
225
|
+
*/var effectsEffectSlide=$2.effects.define("slide","show",function(options,done){var startClip,startRef,element=$2(this),map={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},mode=options.mode,direction=options.direction||"left",ref=direction==="up"||direction==="down"?"top":"left",positiveMotion=direction==="up"||direction==="left",distance=options.distance||element[ref==="top"?"outerHeight":"outerWidth"](true),animation={};$2.effects.createPlaceholder(element);startClip=element.cssClip();startRef=element.position()[ref];animation[ref]=(positiveMotion?-1:1)*distance+startRef;animation.clip=element.cssClip();animation.clip[map[direction][1]]=animation.clip[map[direction][0]];if(mode==="show"){element.cssClip(animation.clip);element.css(ref,animation[ref]);animation.clip=startClip;animation[ref]=startRef}element.animate(animation,{queue:false,duration:options.duration,easing:options.easing,complete:done})});/*!
|
|
226
|
+
* jQuery UI Effects Transfer 1.12.1
|
|
227
|
+
* http://jqueryui.com
|
|
228
|
+
*
|
|
229
|
+
* Copyright jQuery Foundation and other contributors
|
|
230
|
+
* Released under the MIT license.
|
|
231
|
+
* http://jquery.org/license
|
|
232
|
+
*/var effect;if($2.uiBackCompat!==false){effect=$2.effects.define("transfer",function(options,done){$2(this).transfer(options,done)})}var effectsEffectTransfer=effect;/*!
|
|
233
|
+
* jQuery UI Focusable 1.12.1
|
|
234
|
+
* http://jqueryui.com
|
|
235
|
+
*
|
|
236
|
+
* Copyright jQuery Foundation and other contributors
|
|
237
|
+
* Released under the MIT license.
|
|
238
|
+
* http://jquery.org/license
|
|
239
|
+
*/$2.ui.focusable=function(element,hasTabindex){var map,mapName,img,focusableIfVisible,fieldset,nodeName=element.nodeName.toLowerCase();if("area"===nodeName){map=element.parentNode;mapName=map.name;if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){return false}img=$2("img[usemap='#"+mapName+"']");return img.length>0&&img.is(":visible")}if(/^(input|select|textarea|button|object)$/.test(nodeName)){focusableIfVisible=!element.disabled;if(focusableIfVisible){fieldset=$2(element).closest("fieldset")[0];if(fieldset){focusableIfVisible=!fieldset.disabled}}}else if("a"===nodeName){focusableIfVisible=element.href||hasTabindex}else{focusableIfVisible=hasTabindex}return focusableIfVisible&&$2(element).is(":visible")&&visible($2(element))};function visible(element){var visibility=element.css("visibility");while(visibility==="inherit"){element=element.parent();visibility=element.css("visibility")}return visibility!=="hidden"}$2.extend($2.expr[":"],{focusable:function(element){return $2.ui.focusable(element,$2.attr(element,"tabindex")!=null)}});var focusable=$2.ui.focusable;var form=$2.fn.form=function(){return typeof this[0].form==="string"?this.closest("form"):$2(this[0].form)};/*!
|
|
240
|
+
* jQuery UI Form Reset Mixin 1.12.1
|
|
241
|
+
* http://jqueryui.com
|
|
242
|
+
*
|
|
243
|
+
* Copyright jQuery Foundation and other contributors
|
|
244
|
+
* Released under the MIT license.
|
|
245
|
+
* http://jquery.org/license
|
|
246
|
+
*/var formResetMixin=$2.ui.formResetMixin={_formResetHandler:function(){var form2=$2(this);setTimeout(function(){var instances=form2.data("ui-form-reset-instances");$2.each(instances,function(){this.refresh()})})},_bindFormResetHandler:function(){this.form=this.element.form();if(!this.form.length){return}var instances=this.form.data("ui-form-reset-instances")||[];if(!instances.length){this.form.on("reset.ui-form-reset",this._formResetHandler)}instances.push(this);this.form.data("ui-form-reset-instances",instances)},_unbindFormResetHandler:function(){if(!this.form.length){return}var instances=this.form.data("ui-form-reset-instances");instances.splice($2.inArray(this,instances),1);if(instances.length){this.form.data("ui-form-reset-instances",instances)}else{this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};/*!
|
|
247
|
+
* jQuery UI Support for jQuery core 1.7.x 1.12.1
|
|
248
|
+
* http://jqueryui.com
|
|
249
|
+
*
|
|
250
|
+
* Copyright jQuery Foundation and other contributors
|
|
251
|
+
* Released under the MIT license.
|
|
252
|
+
* http://jquery.org/license
|
|
253
|
+
*
|
|
254
|
+
*/if($2.fn.jquery.substring(0,3)==="1.7"){$2.each(["Width","Height"],function(i2,name){var side=name==="Width"?["Left","Right"]:["Top","Bottom"],type2=name.toLowerCase(),orig={innerWidth:$2.fn.innerWidth,innerHeight:$2.fn.innerHeight,outerWidth:$2.fn.outerWidth,outerHeight:$2.fn.outerHeight};function reduce(elem,size,border,margin){$2.each(side,function(){size-=parseFloat($2.css(elem,"padding"+this))||0;if(border){size-=parseFloat($2.css(elem,"border"+this+"Width"))||0}if(margin){size-=parseFloat($2.css(elem,"margin"+this))||0}});return size}$2.fn["inner"+name]=function(size){if(size===void 0){return orig["inner"+name].call(this)}return this.each(function(){$2(this).css(type2,reduce(this,size)+"px")})};$2.fn["outer"+name]=function(size,margin){if(typeof size!=="number"){return orig["outer"+name].call(this,size)}return this.each(function(){$2(this).css(type2,reduce(this,size,true,margin)+"px")})}});$2.fn.addBack=function(selector2){return this.add(selector2==null?this.prevObject:this.prevObject.filter(selector2))}};/*!
|
|
255
|
+
* jQuery UI Keycode 1.12.1
|
|
256
|
+
* http://jqueryui.com
|
|
257
|
+
*
|
|
258
|
+
* Copyright jQuery Foundation and other contributors
|
|
259
|
+
* Released under the MIT license.
|
|
260
|
+
* http://jquery.org/license
|
|
261
|
+
*/var keycode=$2.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38};var escapeSelector=$2.ui.escapeSelector=(function(){var selectorEscape=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(selector2){return selector2.replace(selectorEscape,"\\$1")}})();/*!
|
|
262
|
+
* jQuery UI Labels 1.12.1
|
|
263
|
+
* http://jqueryui.com
|
|
264
|
+
*
|
|
265
|
+
* Copyright jQuery Foundation and other contributors
|
|
266
|
+
* Released under the MIT license.
|
|
267
|
+
* http://jquery.org/license
|
|
268
|
+
*/var labels=$2.fn.labels=function(){var ancestor,selector2,id2,labels2,ancestors;if(this[0].labels&&this[0].labels.length){return this.pushStack(this[0].labels)}labels2=this.eq(0).parents("label");id2=this.attr("id");if(id2){ancestor=this.eq(0).parents().last();ancestors=ancestor.add(ancestor.length?ancestor.siblings():this.siblings());selector2="label[for='"+$2.ui.escapeSelector(id2)+"']";labels2=labels2.add(ancestors.find(selector2).addBack(selector2))}return this.pushStack(labels2)};/*!
|
|
269
|
+
* jQuery UI Scroll Parent 1.12.1
|
|
270
|
+
* http://jqueryui.com
|
|
271
|
+
*
|
|
272
|
+
* Copyright jQuery Foundation and other contributors
|
|
273
|
+
* Released under the MIT license.
|
|
274
|
+
* http://jquery.org/license
|
|
275
|
+
*/var scrollParent=$2.fn.scrollParent=function(includeHidden){var position2=this.css("position"),excludeStaticParent=position2==="absolute",overflowRegex=includeHidden?/(auto|scroll|hidden)/:/(auto|scroll)/,scrollParent2=this.parents().filter(function(){var parent2=$2(this);if(excludeStaticParent&&parent2.css("position")==="static"){return false}return overflowRegex.test(parent2.css("overflow")+parent2.css("overflow-y")+parent2.css("overflow-x"))}).eq(0);return position2==="fixed"||!scrollParent2.length?$2(this[0].ownerDocument||document):scrollParent2};/*!
|
|
276
|
+
* jQuery UI Tabbable 1.12.1
|
|
277
|
+
* http://jqueryui.com
|
|
278
|
+
*
|
|
279
|
+
* Copyright jQuery Foundation and other contributors
|
|
280
|
+
* Released under the MIT license.
|
|
281
|
+
* http://jquery.org/license
|
|
282
|
+
*/var tabbable=$2.extend($2.expr[":"],{tabbable:function(element){var tabIndex=$2.attr(element,"tabindex"),hasTabindex=tabIndex!=null;return(!hasTabindex||tabIndex>=0)&&$2.ui.focusable(element,hasTabindex)}});/*!
|
|
283
|
+
* jQuery UI Unique ID 1.12.1
|
|
284
|
+
* http://jqueryui.com
|
|
285
|
+
*
|
|
286
|
+
* Copyright jQuery Foundation and other contributors
|
|
287
|
+
* Released under the MIT license.
|
|
288
|
+
* http://jquery.org/license
|
|
289
|
+
*/var uniqueId=$2.fn.extend({uniqueId:(function(){var uuid=0;return function(){return this.each(function(){if(!this.id){this.id="ui-id-"+ ++uuid}})}})(),removeUniqueId:function(){return this.each(function(){if(/^ui-id-\d+$/.test(this.id)){$2(this).removeAttr("id")}})}});/*!
|
|
290
|
+
* jQuery UI Accordion 1.12.1
|
|
291
|
+
* http://jqueryui.com
|
|
292
|
+
*
|
|
293
|
+
* Copyright jQuery Foundation and other contributors
|
|
294
|
+
* Released under the MIT license.
|
|
295
|
+
* http://jquery.org/license
|
|
296
|
+
*/var widgetsAccordion=$2.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:false,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var options=this.options;this.prevShow=this.prevHide=$2();this._addClass("ui-accordion","ui-widget ui-helper-reset");this.element.attr("role","tablist");if(!options.collapsible&&(options.active===false||options.active==null)){options.active=0}this._processPanels();if(options.active<0){options.active+=this.headers.length}this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:!this.active.length?$2():this.active.next()}},_createIcons:function(){var icon,children,icons=this.options.icons;if(icons){icon=$2("<span>");this._addClass(icon,"ui-accordion-header-icon","ui-icon "+icons.header);icon.prependTo(this.headers);children=this.active.children(".ui-accordion-header-icon");this._removeClass(children,icons.header)._addClass(children,null,icons.activeHeader)._addClass(this.headers,"ui-accordion-icons")}},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons");this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var contents;this.element.removeAttr("role");this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId();this._destroyIcons();contents=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId();if(this.options.heightStyle!=="content"){contents.css("height","")}},_setOption:function(key2,value){if(key2==="active"){this._activate(value);return}if(key2==="event"){if(this.options.event){this._off(this.headers,this.options.event)}this._setupEvents(value)}this._super(key2,value);if(key2==="collapsible"&&!value&&this.options.active===false){this._activate(0)}if(key2==="icons"){this._destroyIcons();if(value){this._createIcons()}}},_setOptionDisabled:function(value){this._super(value);this.element.attr("aria-disabled",value);this._toggleClass(null,"ui-state-disabled",!!value);this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!value)},_keydown:function(event){if(event.altKey||event.ctrlKey){return}var keyCode=$2.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1];break}if(toFocus){$2(event.target).attr("tabIndex",-1);$2(toFocus).attr("tabIndex",0);$2(toFocus).trigger("focus");event.preventDefault()}},_panelKeyDown:function(event){if(event.keyCode===$2.ui.keyCode.UP&&event.ctrlKey){$2(event.currentTarget).prev().trigger("focus")}},refresh:function(){var options=this.options;this._processPanels();if(options.active===false&&options.collapsible===true||!this.headers.length){options.active=false;this.active=$2()}else if(options.active===false){this._activate(0)}else if(this.active.length&&!$2.contains(this.element[0],this.active[0])){if(this.headers.length===this.headers.find(".ui-state-disabled").length){options.active=false;this.active=$2()}else{this._activate(Math.max(0,options.active-1))}}else{options.active=this.headers.index(this.active)}this._destroyIcons();this._refresh()},_processPanels:function(){var prevHeaders=this.headers,prevPanels=this.panels;this.headers=this.element.find(this.options.header);this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default");this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide();this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content");if(prevPanels){this._off(prevHeaders.not(this.headers));this._off(prevPanels.not(this.panels))}},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent2=this.element.parent();this.active=this._findActive(options.active);this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed");this._addClass(this.active.next(),"ui-accordion-content-active");this.active.next().show();this.headers.attr("role","tab").each(function(){var header=$2(this),headerId=header.uniqueId().attr("id"),panel=header.next(),panelId=panel.uniqueId().attr("id");header.attr("aria-controls",panelId);panel.attr("aria-labelledby",headerId)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex",0)}else{this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"})}this._createIcons();this._setupEvents(options.event);if(heightStyle==="fill"){maxHeight=parent2.height();this.element.siblings(":visible").each(function(){var elem=$2(this),position2=elem.css("position");if(position2==="absolute"||position2==="fixed"){return}maxHeight-=elem.outerHeight(true)});this.headers.each(function(){maxHeight-=$2(this).outerHeight(true)});this.headers.next().each(function(){$2(this).height(Math.max(0,maxHeight-$2(this).innerHeight()+$2(this).height()))}).css("overflow","auto")}else if(heightStyle==="auto"){maxHeight=0;this.headers.next().each(function(){var isVisible=$2(this).is(":visible");if(!isVisible){$2(this).show()}maxHeight=Math.max(maxHeight,$2(this).css("height","").height());if(!isVisible){$2(this).hide()}}).height(maxHeight)}},_activate:function(index2){var active=this._findActive(index2)[0];if(active===this.active[0]){return}active=active||this.active[0];this._eventHandler({target:active,currentTarget:active,preventDefault:$2.noop})},_findActive:function(selector2){return typeof selector2==="number"?this.headers.eq(selector2):$2()},_setupEvents:function(event){var events={keydown:"_keydown"};if(event){$2.each(event.split(" "),function(index2,eventName){events[eventName]="_eventHandler"})}this._off(this.headers.add(this.headers.next()));this._on(this.headers,events);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(event){var activeChildren,clickedChildren,options=this.options,active=this.active,clicked=$2(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$2():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$2():clicked,newPanel:toShow};event.preventDefault();if(clickedIsActive&&!options.collapsible||this._trigger("beforeActivate",event,eventData)===false){return}options.active=collapsing?false:this.headers.index(clicked);this.active=clickedIsActive?$2():clicked;this._toggle(eventData);this._removeClass(active,"ui-accordion-header-active","ui-state-active");if(options.icons){activeChildren=active.children(".ui-accordion-header-icon");this._removeClass(activeChildren,null,options.icons.activeHeader)._addClass(activeChildren,null,options.icons.header)}if(!clickedIsActive){this._removeClass(clicked,"ui-accordion-header-collapsed")._addClass(clicked,"ui-accordion-header-active","ui-state-active");if(options.icons){clickedChildren=clicked.children(".ui-accordion-header-icon");this._removeClass(clickedChildren,null,options.icons.header)._addClass(clickedChildren,null,options.icons.activeHeader)}this._addClass(clicked.next(),"ui-accordion-content-active")}},_toggle:function(data3){var toShow=data3.newPanel,toHide=this.prevShow.length?this.prevShow:data3.oldPanel;this.prevShow.add(this.prevHide).stop(true,true);this.prevShow=toShow;this.prevHide=toHide;if(this.options.animate){this._animate(toShow,toHide,data3)}else{toHide.hide();toShow.show();this._toggleComplete(data3)}toHide.attr({"aria-hidden":"true"});toHide.prev().attr({"aria-selected":"false","aria-expanded":"false"});if(toShow.length&&toHide.length){toHide.prev().attr({"tabIndex":-1,"aria-expanded":"false"})}else if(toShow.length){this.headers.filter(function(){return parseInt($2(this).attr("tabIndex"),10)===0}).attr("tabIndex",-1)}toShow.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(toShow,toHide,data3){var total,easing,duration,that=this,adjust=0,boxSizing=toShow.css("box-sizing"),down=toShow.length&&(!toHide.length||toShow.index()<toHide.index()),animate=this.options.animate||{},options=down&&animate.down||animate,complete=function(){that._toggleComplete(data3)};if(typeof options==="number"){duration=options}if(typeof options==="string"){easing=options}easing=easing||options.easing||animate.easing;duration=duration||options.duration||animate.duration;if(!toHide.length){return toShow.animate(this.showProps,duration,easing,complete)}if(!toShow.length){return toHide.animate(this.hideProps,duration,easing,complete)}total=toShow.show().outerHeight();toHide.animate(this.hideProps,{duration,easing,step:function(now,fx){fx.now=Math.round(now)}});toShow.hide().animate(this.showProps,{duration,easing,complete,step:function(now,fx){fx.now=Math.round(now);if(fx.prop!=="height"){if(boxSizing==="content-box"){adjust+=fx.now}}else if(that.options.heightStyle!=="content"){fx.now=Math.round(total-toHide.outerHeight()-adjust);adjust=0}}})},_toggleComplete:function(data3){var toHide=data3.oldPanel,prev=toHide.prev();this._removeClass(toHide,"ui-accordion-content-active");this._removeClass(prev,"ui-accordion-header-active")._addClass(prev,"ui-accordion-header-collapsed");if(toHide.length){toHide.parent()[0].className=toHide.parent()[0].className}this._trigger("activate",null,data3)}});var safeActiveElement=$2.ui.safeActiveElement=function(document2){var activeElement;try{activeElement=document2.activeElement}catch(error){activeElement=document2.body}if(!activeElement){activeElement=document2.body}if(!activeElement.nodeName){activeElement=document2.body}return activeElement};/*!
|
|
297
|
+
* jQuery UI Menu 1.12.1
|
|
298
|
+
* http://jqueryui.com
|
|
299
|
+
*
|
|
300
|
+
* Copyright jQuery Foundation and other contributors
|
|
301
|
+
* Released under the MIT license.
|
|
302
|
+
* http://jquery.org/license
|
|
303
|
+
*/var widgetsMenu=$2.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=false;this.element.uniqueId().attr({role:this.options.role,tabIndex:0});this._addClass("ui-menu","ui-widget ui-widget-content");this._on({"mousedown .ui-menu-item":function(event){event.preventDefault()},"click .ui-menu-item":function(event){var target=$2(event.target);var active=$2($2.ui.safeActiveElement(this.document[0]));if(!this.mouseHandled&&target.not(".ui-state-disabled").length){this.select(event);if(!event.isPropagationStopped()){this.mouseHandled=true}if(target.has(".ui-menu").length){this.expand(event)}else if(!this.element.is(":focus")&&active.closest(".ui-menu").length){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1){clearTimeout(this.timer)}}}},"mouseenter .ui-menu-item":function(event){if(this.previousFilter){return}var actualTarget=$2(event.target).closest(".ui-menu-item"),target=$2(event.currentTarget);if(actualTarget[0]!==target[0]){return}this._removeClass(target.siblings().children(".ui-state-active"),null,"ui-state-active");this.focus(event,target)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);if(!keepActiveItem){this.focus(event,item)}},blur:function(event){this._delay(function(){var notContained=!$2.contains(this.element[0],$2.ui.safeActiveElement(this.document[0]));if(notContained){this.collapseAll(event)}})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(event){if(this._closeOnDocumentClick(event)){this.collapseAll(event)}this.mouseHandled=false}})},_destroy:function(){var items=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),submenus=items.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show();submenus.children().each(function(){var elem=$2(this);if(elem.data("ui-menu-submenu-caret")){elem.remove()}})},_keydown:function(event){var match,prev,character,skip,preventDefault=true;switch(event.keyCode){case $2.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $2.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $2.ui.keyCode.HOME:this._move("first","first",event);break;case $2.ui.keyCode.END:this._move("last","last",event);break;case $2.ui.keyCode.UP:this.previous(event);break;case $2.ui.keyCode.DOWN:this.next(event);break;case $2.ui.keyCode.LEFT:this.collapse(event);break;case $2.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled")){this.expand(event)}break;case $2.ui.keyCode.ENTER:case $2.ui.keyCode.SPACE:this._activate(event);break;case $2.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||"";skip=false;character=event.keyCode>=96&&event.keyCode<=105?(event.keyCode-96).toString():String.fromCharCode(event.keyCode);clearTimeout(this.filterTimer);if(character===prev){skip=true}else{character=prev+character}match=this._filterMenuItems(character);match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match;if(!match.length){character=String.fromCharCode(event.keyCode);match=this._filterMenuItems(character)}if(match.length){this.focus(event,match);this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)}else{delete this.previousFilter}}if(preventDefault){event.preventDefault()}},_activate:function(event){if(this.active&&!this.active.is(".ui-state-disabled")){if(this.active.children("[aria-haspopup='true']").length){this.expand(event)}else{this.select(event)}}},refresh:function(){var menus,items,newSubmenus,newItems,newWrappers,that=this,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length);newSubmenus=submenus.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$2(this),item=menu.prev(),submenuCaret=$2("<span>").data("ui-menu-submenu-caret",true);that._addClass(submenuCaret,"ui-menu-icon","ui-icon "+icon);item.attr("aria-haspopup","true").prepend(submenuCaret);menu.attr("aria-labelledby",item.attr("id"))});this._addClass(newSubmenus,"ui-menu","ui-widget ui-widget-content ui-front");menus=submenus.add(this.element);items=menus.find(this.options.items);items.not(".ui-menu-item").each(function(){var item=$2(this);if(that._isDivider(item)){that._addClass(item,"ui-menu-divider","ui-widget-content")}});newItems=items.not(".ui-menu-item, .ui-menu-divider");newWrappers=newItems.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()});this._addClass(newItems,"ui-menu-item")._addClass(newWrappers,"ui-menu-item-wrapper");items.filter(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!$2.contains(this.element[0],this.active[0])){this.blur()}},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(key2,value){if(key2==="icons"){var icons=this.element.find(".ui-menu-icon");this._removeClass(icons,null,this.options.icons.submenu)._addClass(icons,null,value.submenu)}this._super(key2,value)},_setOptionDisabled:function(value){this._super(value);this.element.attr("aria-disabled",String(value));this._toggleClass(null,"ui-state-disabled",!!value)},focus:function(event,item){var nested,focused,activeParent;this.blur(event,event&&event.type==="focus");this._scrollIntoView(item);this.active=item.first();focused=this.active.children(".ui-menu-item-wrapper");this._addClass(focused,null,"ui-state-active");if(this.options.role){this.element.attr("aria-activedescendant",focused.attr("id"))}activeParent=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper");this._addClass(activeParent,null,"ui-state-active");if(event&&event.type==="keydown"){this._close()}else{this.timer=this._delay(function(){this._close()},this.delay)}nested=item.children(".ui-menu");if(nested.length&&event&&/^mouse/.test(event.type)){this._startOpening(nested)}this.activeMenu=item.parent();this._trigger("focus",event,{item})},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;if(this._hasScroll()){borderTop=parseFloat($2.css(this.activeMenu[0],"borderTopWidth"))||0;paddingTop=parseFloat($2.css(this.activeMenu[0],"paddingTop"))||0;offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;scroll=this.activeMenu.scrollTop();elementHeight=this.activeMenu.height();itemHeight=item.outerHeight();if(offset<0){this.activeMenu.scrollTop(scroll+offset)}else if(offset+itemHeight>elementHeight){this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight)}}},blur:function(event,fromFocus){if(!fromFocus){clearTimeout(this.timer)}if(!this.active){return}this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active");this._trigger("blur",event,{item:this.active});this.active=null},_startOpening:function(submenu){clearTimeout(this.timer);if(submenu.attr("aria-hidden")!=="true"){return}this.timer=this._delay(function(){this._close();this._open(submenu)},this.delay)},_open:function(submenu){var position2=$2.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true");submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position2)},collapseAll:function(event,all){clearTimeout(this.timer);this.timer=this._delay(function(){var currentMenu=all?this.element:$2(event&&event.target).closest(this.element.find(".ui-menu"));if(!currentMenu.length){currentMenu=this.element}this._close(currentMenu);this.blur(event);this._removeClass(currentMenu.find(".ui-state-active"),null,"ui-state-active");this.activeMenu=currentMenu},this.delay)},_close:function(startMenu){if(!startMenu){startMenu=this.active?this.active.parent():this.element}startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(event){return!$2(event.target).closest(".ui-menu").length},_isDivider:function(item){return!/[^\-\u2014\u2013\s]/.test(item.text())},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(newItem&&newItem.length){this._close();this.focus(event,newItem)}},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();if(newItem&&newItem.length){this._open(newItem.parent());this._delay(function(){this.focus(event,newItem)})}},next:function(event){this._move("next","first",event)},previous:function(event){this._move("prev","last",event)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(direction,filter,event){var next;if(this.active){if(direction==="first"||direction==="last"){next=this.active[direction==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1)}else{next=this.active[direction+"All"](".ui-menu-item").eq(0)}}if(!next||!next.length||!this.active){next=this.activeMenu.find(this.options.items)[filter]()}this.focus(event,next)},nextPage:function(event){var item,base,height;if(!this.active){this.next(event);return}if(this.isLastItem()){return}if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){item=$2(this);return item.offset().top-base-height<0});this.focus(event,item)}else{this.focus(event,this.activeMenu.find(this.options.items)[!this.active?"first":"last"]())}},previousPage:function(event){var item,base,height;if(!this.active){this.next(event);return}if(this.isFirstItem()){return}if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){item=$2(this);return item.offset().top-base+height>0});this.focus(event,item)}else{this.focus(event,this.activeMenu.find(this.options.items).first())}},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(event){this.active=this.active||$2(event.target).closest(".ui-menu-item");var ui={item:this.active};if(!this.active.has(".ui-menu").length){this.collapseAll(event,true)}this._trigger("select",event,ui)},_filterMenuItems:function(character){var escapedCharacter=character.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),regex=new RegExp("^"+escapedCharacter,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return regex.test($2.trim($2(this).children(".ui-menu-item-wrapper").text()))})}});/*!
|
|
304
|
+
* jQuery UI Autocomplete 1.12.1
|
|
305
|
+
* http://jqueryui.com
|
|
306
|
+
*
|
|
307
|
+
* Copyright jQuery Foundation and other contributors
|
|
308
|
+
* Released under the MIT license.
|
|
309
|
+
* http://jquery.org/license
|
|
310
|
+
*/$2.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea=nodeName==="textarea",isInput2=nodeName==="input";this.isMultiLine=isTextarea||!isInput2&&this._isContentEditable(this.element);this.valueMethod=this.element[isTextarea||isInput2?"val":"text"];this.isNewMenu=true;this._addClass("ui-autocomplete-input");this.element.attr("autocomplete","off");this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly")){suppressKeyPress=true;suppressInput=true;suppressKeyPressRepeat=true;return}suppressKeyPress=false;suppressInput=false;suppressKeyPressRepeat=false;var keyCode=$2.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=true;this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=true;this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=true;this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=true;this._keyEvent("next",event);break;case keyCode.ENTER:if(this.menu.active){suppressKeyPress=true;event.preventDefault();this.menu.select(event)}break;case keyCode.TAB:if(this.menu.active){this.menu.select(event)}break;case keyCode.ESCAPE:if(this.menu.element.is(":visible")){if(!this.isMultiLine){this._value(this.term)}this.close(event);event.preventDefault()}break;default:suppressKeyPressRepeat=true;this._searchTimeout(event);break}},keypress:function(event){if(suppressKeyPress){suppressKeyPress=false;if(!this.isMultiLine||this.menu.element.is(":visible")){event.preventDefault()}return}if(suppressKeyPressRepeat){return}var keyCode=$2.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event);break}},input:function(event){if(suppressInput){suppressInput=false;event.preventDefault();return}this._searchTimeout(event)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching);this.close(event);this._change(event)}});this._initSource();this.menu=$2("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance");this._addClass(this.menu.element,"ui-autocomplete","ui-front");this._on(this.menu.element,{mousedown:function(event){event.preventDefault();this.cancelBlur=true;this._delay(function(){delete this.cancelBlur;if(this.element[0]!==$2.ui.safeActiveElement(this.document[0])){this.element.trigger("focus")}})},menufocus:function(event,ui){var label,item;if(this.isNewMenu){this.isNewMenu=false;if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){this.menu.blur();this.document.one("mousemove",function(){$2(event.target).trigger(event.originalEvent)});return}}item=ui.item.data("ui-autocomplete-item");if(false!==this._trigger("focus",event,{item})){if(event.originalEvent&&/^key/.test(event.originalEvent.type)){this._value(item.value)}}label=ui.item.attr("aria-label")||item.value;if(label&&$2.trim(label).length){this.liveRegion.children().hide();$2("<div>").text(label).appendTo(this.liveRegion)}},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item"),previous=this.previous;if(this.element[0]!==$2.ui.safeActiveElement(this.document[0])){this.element.trigger("focus");this.previous=previous;this._delay(function(){this.previous=previous;this.selectedItem=item})}if(false!==this._trigger("select",event,{item})){this._value(item.value)}this.term=this._value();this.close(event);this.selectedItem=item}});this.liveRegion=$2("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body);this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(key2,value){this._super(key2,value);if(key2==="source"){this._initSource()}if(key2==="appendTo"){this.menu.element.appendTo(this._appendTo())}if(key2==="disabled"&&value&&this.xhr){this.xhr.abort()}},_isEventTargetInWidget:function(event){var menuElement=this.menu.element[0];return event.target===this.element[0]||event.target===menuElement||$2.contains(menuElement,event.target)},_closeOnClickOutside:function(event){if(!this._isEventTargetInWidget(event)){this.close()}},_appendTo:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$2(element):this.document.find(element).eq(0)}if(!element||!element[0]){element=this.element.closest(".ui-front, dialog")}if(!element.length){element=this.document[0].body}return element},_initSource:function(){var array,url,that=this;if($2.isArray(this.options.source)){array=this.options.source;this.source=function(request,response){response($2.ui.autocomplete.filter(array,request.term))}}else if(typeof this.options.source==="string"){url=this.options.source;this.source=function(request,response){if(that.xhr){that.xhr.abort()}that.xhr=$2.ajax({url,data:request,dataType:"json",success:function(data3){response(data3)},error:function(){response([])}})}}else{this.source=this.options.source}},_searchTimeout:function(event){clearTimeout(this.searching);this.searching=this._delay(function(){var equalValues=this.term===this._value(),menuVisible=this.menu.element.is(":visible"),modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;if(!equalValues||equalValues&&!menuVisible&&!modifierKey){this.selectedItem=null;this.search(null,event)}},this.options.delay)},search:function(value,event){value=value!=null?value:this._value();this.term=this._value();if(value.length<this.options.minLength){return this.close(event)}if(this._trigger("search",event)===false){return}return this._search(value)},_search:function(value){this.pending++;this._addClass("ui-autocomplete-loading");this.cancelSearch=false;this.source({term:value},this._response())},_response:function(){var index2=++this.requestIndex;return $2.proxy(function(content){if(index2===this.requestIndex){this.__response(content)}this.pending--;if(!this.pending){this._removeClass("ui-autocomplete-loading")}},this)},__response:function(content){if(content){content=this._normalize(content)}this._trigger("response",null,{content});if(!this.options.disabled&&content&&content.length&&!this.cancelSearch){this._suggest(content);this._trigger("open")}else{this._close()}},close:function(event){this.cancelSearch=true;this._close(event)},_close:function(event){this._off(this.document,"mousedown");if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.blur();this.isNewMenu=true;this._trigger("close",event)}},_change:function(event){if(this.previous!==this._value()){this._trigger("change",event,{item:this.selectedItem})}},_normalize:function(items){if(items.length&&items[0].label&&items[0].value){return items}return $2.map(items,function(item){if(typeof item==="string"){return{label:item,value:item}}return $2.extend({},item,{label:item.label||item.value,value:item.value||item.label})})},_suggest:function(items){var ul=this.menu.element.empty();this._renderMenu(ul,items);this.isNewMenu=true;this.menu.refresh();ul.show();this._resizeMenu();ul.position($2.extend({of:this.element},this.options.position));if(this.options.autoFocus){this.menu.next()}this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var ul=this.menu.element;ul.outerWidth(Math.max(ul.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(ul,items){var that=this;$2.each(items,function(index2,item){that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item)},_renderItem:function(ul,item){return $2("<li>").append($2("<div>").text(item.label)).appendTo(ul)},_move:function(direction,event){if(!this.menu.element.is(":visible")){this.search(null,event);return}if(this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)){if(!this.isMultiLine){this._value(this.term)}this.menu.blur();return}this.menu[direction](event)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(keyEvent,event){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(keyEvent,event);event.preventDefault()}},_isContentEditable:function(element){if(!element.length){return false}var editable=element.prop("contentEditable");if(editable==="inherit"){return this._isContentEditable(element.parent())}return editable==="true"}});$2.extend($2.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(array,term){var matcher=new RegExp($2.ui.autocomplete.escapeRegex(term),"i");return $2.grep(array,function(value){return matcher.test(value.label||value.value||value)})}});$2.widget("ui.autocomplete",$2.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(content){var message;this._superApply(arguments);if(this.options.disabled||this.cancelSearch){return}if(content&&content.length){message=this.options.messages.results(content.length)}else{message=this.options.messages.noResults}this.liveRegion.children().hide();$2("<div>").text(message).appendTo(this.liveRegion)}});var widgetsAutocomplete=$2.ui.autocomplete;/*!
|
|
311
|
+
* jQuery UI Controlgroup 1.12.1
|
|
312
|
+
* http://jqueryui.com
|
|
313
|
+
*
|
|
314
|
+
* Copyright jQuery Foundation and other contributors
|
|
315
|
+
* Released under the MIT license.
|
|
316
|
+
* http://jquery.org/license
|
|
317
|
+
*/var controlgroupCornerRegex=/ui-corner-([a-z]){2,6}/g;var widgetsControlgroup=$2.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:true,items:{"button":"input[type=button], input[type=submit], input[type=reset], button, a","controlgroupLabel":".ui-controlgroup-label","checkboxradio":"input[type='checkbox'], input[type='radio']","selectmenu":"select","spinner":".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar");this.refresh()},_destroy:function(){this._callChildMethod("destroy");this.childWidgets.removeData("ui-controlgroup-data");this.element.removeAttr("role");if(this.options.items.controlgroupLabel){this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()}},_initWidgets:function(){var that=this,childWidgets=[];$2.each(this.options.items,function(widget2,selector2){var labels2;var options={};if(!selector2){return}if(widget2==="controlgroupLabel"){labels2=that.element.find(selector2);labels2.each(function(){var element=$2(this);if(element.children(".ui-controlgroup-label-contents").length){return}element.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")});that._addClass(labels2,null,"ui-widget ui-widget-content ui-state-default");childWidgets=childWidgets.concat(labels2.get());return}if(!$2.fn[widget2]){return}if(that["_"+widget2+"Options"]){options=that["_"+widget2+"Options"]("middle")}else{options={classes:{}}}that.element.find(selector2).each(function(){var element=$2(this);var instance=element[widget2]("instance");var instanceOptions=$2.widget.extend({},options);if(widget2==="button"&&element.parent(".ui-spinner").length){return}if(!instance){instance=element[widget2]()[widget2]("instance")}if(instance){instanceOptions.classes=that._resolveClassesValues(instanceOptions.classes,instance)}element[widget2](instanceOptions);var widgetElement=element[widget2]("widget");$2.data(widgetElement[0],"ui-controlgroup-data",instance?instance:element[widget2]("instance"));childWidgets.push(widgetElement[0])})});this.childWidgets=$2($2.unique(childWidgets));this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(method){this.childWidgets.each(function(){var element=$2(this),data3=element.data("ui-controlgroup-data");if(data3&&data3[method]){data3[method]()}})},_updateCornerClass:function(element,position2){var remove="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";var add=this._buildSimpleOptions(position2,"label").classes.label;this._removeClass(element,null,remove);this._addClass(element,null,add)},_buildSimpleOptions:function(position2,key2){var direction=this.options.direction==="vertical";var result={classes:{}};result.classes[key2]={"middle":"","first":"ui-corner-"+(direction?"top":"left"),"last":"ui-corner-"+(direction?"bottom":"right"),"only":"ui-corner-all"}[position2];return result},_spinnerOptions:function(position2){var options=this._buildSimpleOptions(position2,"ui-spinner");options.classes["ui-spinner-up"]="";options.classes["ui-spinner-down"]="";return options},_buttonOptions:function(position2){return this._buildSimpleOptions(position2,"ui-button")},_checkboxradioOptions:function(position2){return this._buildSimpleOptions(position2,"ui-checkboxradio-label")},_selectmenuOptions:function(position2){var direction=this.options.direction==="vertical";return{width:direction?"auto":false,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(direction?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(direction?"top":"left")},last:{"ui-selectmenu-button-open":direction?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(direction?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[position2]}},_resolveClassesValues:function(classes,instance){var result={};$2.each(classes,function(key2){var current=instance.options.classes[key2]||"";current=$2.trim(current.replace(controlgroupCornerRegex,""));result[key2]=(current+" "+classes[key2]).replace(/\s+/g," ")});return result},_setOption:function(key2,value){if(key2==="direction"){this._removeClass("ui-controlgroup-"+this.options.direction)}this._super(key2,value);if(key2==="disabled"){this._callChildMethod(value?"disable":"enable");return}this.refresh()},refresh:function(){var children,that=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction);if(this.options.direction==="horizontal"){this._addClass(null,"ui-helper-clearfix")}this._initWidgets();children=this.childWidgets;if(this.options.onlyVisible){children=children.filter(":visible")}if(children.length){$2.each(["first","last"],function(index2,value){var instance=children[value]().data("ui-controlgroup-data");if(instance&&that["_"+instance.widgetName+"Options"]){var options=that["_"+instance.widgetName+"Options"](children.length===1?"only":value);options.classes=that._resolveClassesValues(options.classes,instance);instance.element[instance.widgetName](options)}else{that._updateCornerClass(children[value](),value)}});this._callChildMethod("refresh")}}});/*!
|
|
318
|
+
* jQuery UI Checkboxradio 1.12.1
|
|
319
|
+
* http://jqueryui.com
|
|
320
|
+
*
|
|
321
|
+
* Copyright jQuery Foundation and other contributors
|
|
322
|
+
* Released under the MIT license.
|
|
323
|
+
* http://jquery.org/license
|
|
324
|
+
*/$2.widget("ui.checkboxradio",[$2.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:true,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var disabled,labels2;var that=this;var options=this._super()||{};this._readType();labels2=this.element.labels();this.label=$2(labels2[labels2.length-1]);if(!this.label.length){$2.error("No label found for checkboxradio widget")}this.originalLabel="";this.label.contents().not(this.element[0]).each(function(){that.originalLabel+=this.nodeType===3?$2(this).text():this.outerHTML});if(this.originalLabel){options.label=this.originalLabel}disabled=this.element[0].disabled;if(disabled!=null){options.disabled=disabled}return options},_create:function(){var checked=this.element[0].checked;this._bindFormResetHandler();if(this.options.disabled==null){this.options.disabled=this.element[0].disabled}this._setOption("disabled",this.options.disabled);this._addClass("ui-checkboxradio","ui-helper-hidden-accessible");this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget");if(this.type==="radio"){this._addClass(this.label,"ui-checkboxradio-radio-label")}if(this.options.label&&this.options.label!==this.originalLabel){this._updateLabel()}else if(this.originalLabel){this.options.label=this.originalLabel}this._enhance();if(checked){this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active");if(this.icon){this._addClass(this.icon,null,"ui-state-hover")}}this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var nodeName=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type;if(nodeName!=="input"||!/radio|checkbox/.test(this.type)){$2.error("Can't create checkboxradio on element.nodeName="+nodeName+" and element.type="+this.type)}},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var group;var name=this.element[0].name;var nameSelector="input[name='"+$2.ui.escapeSelector(name)+"']";if(!name){return $2([])}if(this.form.length){group=$2(this.form[0].elements).filter(nameSelector)}else{group=$2(nameSelector).filter(function(){return $2(this).form().length===0})}return group.not(this.element)},_toggleClasses:function(){var checked=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked);if(this.options.icon&&this.type==="checkbox"){this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",checked)._toggleClass(this.icon,null,"ui-icon-blank",!checked)}if(this.type==="radio"){this._getRadioGroup().each(function(){var instance=$2(this).checkboxradio("instance");if(instance){instance._removeClass(instance.label,"ui-checkboxradio-checked","ui-state-active")}})}},_destroy:function(){this._unbindFormResetHandler();if(this.icon){this.icon.remove();this.iconSpace.remove()}},_setOption:function(key2,value){if(key2==="label"&&!value){return}this._super(key2,value);if(key2==="disabled"){this._toggleClass(this.label,null,"ui-state-disabled",value);this.element[0].disabled=value;return}this.refresh()},_updateIcon:function(checked){var toAdd="ui-icon ui-icon-background ";if(this.options.icon){if(!this.icon){this.icon=$2("<span>");this.iconSpace=$2("<span> </span>");this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")}if(this.type==="checkbox"){toAdd+=checked?"ui-icon-check ui-state-checked":"ui-icon-blank";this._removeClass(this.icon,null,checked?"ui-icon-blank":"ui-icon-check")}else{toAdd+="ui-icon-blank"}this._addClass(this.icon,"ui-checkboxradio-icon",toAdd);if(!checked){this._removeClass(this.icon,null,"ui-icon-check ui-state-checked")}this.icon.prependTo(this.label).after(this.iconSpace)}else if(this.icon!==void 0){this.icon.remove();this.iconSpace.remove();delete this.icon}},_updateLabel:function(){var contents=this.label.contents().not(this.element[0]);if(this.icon){contents=contents.not(this.icon[0])}if(this.iconSpace){contents=contents.not(this.iconSpace[0])}contents.remove();this.label.append(this.options.label)},refresh:function(){var checked=this.element[0].checked,isDisabled=this.element[0].disabled;this._updateIcon(checked);this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked);if(this.options.label!==null){this._updateLabel()}if(isDisabled!==this.options.disabled){this._setOptions({"disabled":isDisabled})}}}]);var widgetsCheckboxradio=$2.ui.checkboxradio;/*!
|
|
325
|
+
* jQuery UI Button 1.12.1
|
|
326
|
+
* http://jqueryui.com
|
|
327
|
+
*
|
|
328
|
+
* Copyright jQuery Foundation and other contributors
|
|
329
|
+
* Released under the MIT license.
|
|
330
|
+
* http://jquery.org/license
|
|
331
|
+
*/$2.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:true},_getCreateOptions:function(){var disabled,options=this._super()||{};this.isInput=this.element.is("input");disabled=this.element[0].disabled;if(disabled!=null){options.disabled=disabled}this.originalLabel=this.isInput?this.element.val():this.element.html();if(this.originalLabel){options.label=this.originalLabel}return options},_create:function(){if(!this.option.showLabel&!this.options.icon){this.options.showLabel=true}if(this.options.disabled==null){this.options.disabled=this.element[0].disabled||false}this.hasTitle=!!this.element.attr("title");if(this.options.label&&this.options.label!==this.originalLabel){if(this.isInput){this.element.val(this.options.label)}else{this.element.html(this.options.label)}}this._addClass("ui-button","ui-widget");this._setOption("disabled",this.options.disabled);this._enhance();if(this.element.is("a")){this._on({"keyup":function(event){if(event.keyCode===$2.ui.keyCode.SPACE){event.preventDefault();if(this.element[0].click){this.element[0].click()}else{this.element.trigger("click")}}}})}},_enhance:function(){if(!this.element.is("button")){this.element.attr("role","button")}if(this.options.icon){this._updateIcon("icon",this.options.icon);this._updateTooltip()}},_updateTooltip:function(){this.title=this.element.attr("title");if(!this.options.showLabel&&!this.title){this.element.attr("title",this.options.label)}},_updateIcon:function(option,value){var icon=option!=="iconPosition",position2=icon?this.options.iconPosition:value,displayBlock=position2==="top"||position2==="bottom";if(!this.icon){this.icon=$2("<span>");this._addClass(this.icon,"ui-button-icon","ui-icon");if(!this.options.showLabel){this._addClass("ui-button-icon-only")}}else if(icon){this._removeClass(this.icon,null,this.options.icon)}if(icon){this._addClass(this.icon,null,value)}this._attachIcon(position2);if(displayBlock){this._addClass(this.icon,null,"ui-widget-icon-block");if(this.iconSpace){this.iconSpace.remove()}}else{if(!this.iconSpace){this.iconSpace=$2("<span> </span>");this._addClass(this.iconSpace,"ui-button-icon-space")}this._removeClass(this.icon,null,"ui-wiget-icon-block");this._attachIconSpace(position2)}},_destroy:function(){this.element.removeAttr("role");if(this.icon){this.icon.remove()}if(this.iconSpace){this.iconSpace.remove()}if(!this.hasTitle){this.element.removeAttr("title")}},_attachIconSpace:function(iconPosition){this.icon[/^(?:end|bottom)/.test(iconPosition)?"before":"after"](this.iconSpace)},_attachIcon:function(iconPosition){this.element[/^(?:end|bottom)/.test(iconPosition)?"append":"prepend"](this.icon)},_setOptions:function(options){var newShowLabel=options.showLabel===void 0?this.options.showLabel:options.showLabel,newIcon=options.icon===void 0?this.options.icon:options.icon;if(!newShowLabel&&!newIcon){options.showLabel=true}this._super(options)},_setOption:function(key2,value){if(key2==="icon"){if(value){this._updateIcon(key2,value)}else if(this.icon){this.icon.remove();if(this.iconSpace){this.iconSpace.remove()}}}if(key2==="iconPosition"){this._updateIcon(key2,value)}if(key2==="showLabel"){this._toggleClass("ui-button-icon-only",null,!value);this._updateTooltip()}if(key2==="label"){if(this.isInput){this.element.val(value)}else{this.element.html(value);if(this.icon){this._attachIcon(this.options.iconPosition);this._attachIconSpace(this.options.iconPosition)}}}this._super(key2,value);if(key2==="disabled"){this._toggleClass(null,"ui-state-disabled",value);this.element[0].disabled=value;if(value){this.element.blur()}}},refresh:function(){var isDisabled=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");if(isDisabled!==this.options.disabled){this._setOptions({disabled:isDisabled})}this._updateTooltip()}});if($2.uiBackCompat!==false){$2.widget("ui.button",$2.ui.button,{options:{text:true,icons:{primary:null,secondary:null}},_create:function(){if(this.options.showLabel&&!this.options.text){this.options.showLabel=this.options.text}if(!this.options.showLabel&&this.options.text){this.options.text=this.options.showLabel}if(!this.options.icon&&(this.options.icons.primary||this.options.icons.secondary)){if(this.options.icons.primary){this.options.icon=this.options.icons.primary}else{this.options.icon=this.options.icons.secondary;this.options.iconPosition="end"}}else if(this.options.icon){this.options.icons.primary=this.options.icon}this._super()},_setOption:function(key2,value){if(key2==="text"){this._super("showLabel",value);return}if(key2==="showLabel"){this.options.text=value}if(key2==="icon"){this.options.icons.primary=value}if(key2==="icons"){if(value.primary){this._super("icon",value.primary);this._super("iconPosition","beginning")}else if(value.secondary){this._super("icon",value.secondary);this._super("iconPosition","end")}}this._superApply(arguments)}});$2.fn.button=(function(orig){return function(){if(!this.length||this.length&&this[0].tagName!=="INPUT"||this.length&&this[0].tagName==="INPUT"&&(this.attr("type")!=="checkbox"&&this.attr("type")!=="radio")){return orig.apply(this,arguments)}if(!$2.ui.checkboxradio){$2.error("Checkboxradio widget missing")}if(arguments.length===0){return this.checkboxradio({"icon":false})}return this.checkboxradio.apply(this,arguments)}})($2.fn.button);$2.fn.buttonset=function(){if(!$2.ui.controlgroup){$2.error("Controlgroup widget missing")}if(arguments[0]==="option"&&arguments[1]==="items"&&arguments[2]){return this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]])}if(arguments[0]==="option"&&arguments[1]==="items"){return this.controlgroup.apply(this,[arguments[0],"items.button"])}if(typeof arguments[0]==="object"&&arguments[0].items){arguments[0].items={button:arguments[0].items}}return this.controlgroup.apply(this,arguments)}}var widgetsButton=$2.ui.button;/*!
|
|
332
|
+
* jQuery UI Datepicker 1.12.1
|
|
333
|
+
* http://jqueryui.com
|
|
334
|
+
*
|
|
335
|
+
* Copyright jQuery Foundation and other contributors
|
|
336
|
+
* Released under the MIT license.
|
|
337
|
+
* http://jquery.org/license
|
|
338
|
+
*/$2.extend($2.ui,{datepicker:{version:"1.12.1"}});var datepicker_instActive;function datepicker_getZindex(elem){var position2,value;while(elem.length&&elem[0]!==document){position2=elem.css("position");if(position2==="absolute"||position2==="relative"||position2==="fixed"){value=parseInt(elem.css("zIndex"),10);if(!isNaN(value)&&value!==0){return value}}elem=elem.parent()}return 0}function Datepicker(){this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};$2.extend(this._defaults,this.regional[""]);this.regional.en=$2.extend(true,{},this.regional[""]);this.regional["en-US"]=$2.extend(true,{},this.regional.en);this.dpDiv=datepicker_bindHover($2("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}$2.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings2){datepicker_extendRemove(this._defaults,settings2||{});return this},_attachDatepicker:function(target,settings2){var nodeName,inline,inst;nodeName=target.nodeName.toLowerCase();inline=nodeName==="div"||nodeName==="span";if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}inst=this._newInst($2(target),inline);inst.settings=$2.extend({},settings2||{});if(nodeName==="input"){this._connectDatepicker(target,inst)}else if(inline){this._inlineDatepicker(target,inst)}},_newInst:function(target,inline){var id2=target[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:id2,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline,dpDiv:!inline?this.dpDiv:datepicker_bindHover($2("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}},_connectDatepicker:function(target,inst){var input=$2(target);inst.append=$2([]);inst.trigger=$2([]);if(input.hasClass(this.markerClassName)){return}this._attachments(input,inst);input.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp);this._autoSize(inst);$2.data(target,"datepicker",inst);if(inst.settings.disabled){this._disableDatepicker(target)}},_attachments:function(input,inst){var showOn,buttonText,buttonImage,appendText=this._get(inst,"appendText"),isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()}if(appendText){inst.append=$2("<span class='"+this._appendClass+"'>"+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}input.off("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}showOn=this._get(inst,"showOn");if(showOn==="focus"||showOn==="both"){input.on("focus",this._showDatepicker)}if(showOn==="button"||showOn==="both"){buttonText=this._get(inst,"buttonText");buttonImage=this._get(inst,"buttonImage");inst.trigger=$2(this._get(inst,"buttonImageOnly")?$2("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$2("<button type='button'></button>").addClass(this._triggerClass).html(!buttonImage?buttonText:$2("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.on("click",function(){if($2.datepicker._datepickerShowing&&$2.datepicker._lastInput===input[0]){$2.datepicker._hideDatepicker()}else if($2.datepicker._datepickerShowing&&$2.datepicker._lastInput!==input[0]){$2.datepicker._hideDatepicker();$2.datepicker._showDatepicker(input[0])}else{$2.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i2,date=new Date(2009,12-1,20),dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){findMax=function(names){max=0;maxI=0;for(i2=0;i2<names.length;i2++){if(names[i2].length>max){max=names[i2].length;maxI=i2}}return maxI};date.setMonth(findMax(this._get(inst,dateFormat.match(/MM/)?"monthNames":"monthNamesShort")));date.setDate(findMax(this._get(inst,dateFormat.match(/DD/)?"dayNames":"dayNamesShort"))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$2(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv);$2.data(target,"datepicker",inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled){this._disableDatepicker(target)}inst.dpDiv.css("display","block")},_dialogDatepicker:function(input,date,onSelect,settings2,pos){var id2,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;if(!inst){this.uuid+=1;id2="dp"+this.uuid;this._dialogInput=$2("<input type='text' id='"+id2+"' style='position: absolute; top: -100px; width: 0px;'/>");this._dialogInput.on("keydown",this._doKeyDown);$2("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$2.data(this._dialogInput[0],"datepicker",inst)}datepicker_extendRemove(inst.settings,settings2||{});date=date&&date.constructor===Date?this._formatDate(inst,date):date;this._dialogInput.val(date);this._pos=pos?pos.length?pos:[pos.pageX,pos.pageY]:null;if(!this._pos){browserWidth=document.documentElement.clientWidth;browserHeight=document.documentElement.clientHeight;scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[browserWidth/2-100+scrollX,browserHeight/2-150+scrollY]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($2.blockUI){$2.blockUI(this.dpDiv)}$2.data(this._dialogInput[0],"datepicker",inst);return this},_destroyDatepicker:function(target){var nodeName,$target=$2(target),inst=$2.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return}nodeName=target.nodeName.toLowerCase();$2.removeData(target,"datepicker");if(nodeName==="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)}else if(nodeName==="div"||nodeName==="span"){$target.removeClass(this.markerClassName).empty()}if(datepicker_instActive===inst){datepicker_instActive=null}},_enableDatepicker:function(target){var nodeName,inline,$target=$2(target),inst=$2.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return}nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}this._disabledInputs=$2.map(this._disabledInputs,function(value){return value===target?null:value})},_disableDatepicker:function(target){var nodeName,inline,$target=$2(target),inst=$2.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return}nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}this._disabledInputs=$2.map(this._disabledInputs,function(value){return value===target?null:value});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i2=0;i2<this._disabledInputs.length;i2++){if(this._disabledInputs[i2]===target){return true}}return false},_getInst:function(target){try{return $2.data(target,"datepicker")}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var settings2,date,minDate,maxDate,inst=this._getInst(target);if(arguments.length===2&&typeof name==="string"){return name==="defaults"?$2.extend({},$2.datepicker._defaults):inst?name==="all"?$2.extend({},inst.settings):this._get(inst,name):null}settings2=name||{};if(typeof name==="string"){settings2={};settings2[name]=value}if(inst){if(this._curInst===inst){this._hideDatepicker()}date=this._getDateDatepicker(target,true);minDate=this._getMinMaxDate(inst,"min");maxDate=this._getMinMaxDate(inst,"max");datepicker_extendRemove(inst.settings,settings2);if(minDate!==null&&settings2.dateFormat!==void 0&&settings2.minDate===void 0){inst.settings.minDate=this._formatDate(inst,minDate)}if(maxDate!==null&&settings2.dateFormat!==void 0&&settings2.maxDate===void 0){inst.settings.maxDate=this._formatDate(inst,maxDate)}if("disabled"in settings2){if(settings2.disabled){this._disableDatepicker(target)}else{this._enableDatepicker(target)}}this._attachments($2(target),inst);this._autoSize(inst);this._setDate(inst,date);this._updateAlternate(inst);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return inst?this._getDate(inst):null},_doKeyDown:function(event){var onSelect,dateStr,sel,inst=$2.datepicker._getInst(event.target),handled=true,isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($2.datepicker._datepickerShowing){switch(event.keyCode){case 9:$2.datepicker._hideDatepicker();handled=false;break;case 13:sel=$2("td."+$2.datepicker._dayOverClass+":not(."+$2.datepicker._currentClass+")",inst.dpDiv);if(sel[0]){$2.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}onSelect=$2.datepicker._get(inst,"onSelect");if(onSelect){dateStr=$2.datepicker._formatDate(inst);onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst])}else{$2.datepicker._hideDatepicker()}return false;case 27:$2.datepicker._hideDatepicker();break;case 33:$2.datepicker._adjustDate(event.target,event.ctrlKey?-$2.datepicker._get(inst,"stepBigMonths"):-$2.datepicker._get(inst,"stepMonths"),"M");break;case 34:$2.datepicker._adjustDate(event.target,event.ctrlKey?+$2.datepicker._get(inst,"stepBigMonths"):+$2.datepicker._get(inst,"stepMonths"),"M");break;case 35:if(event.ctrlKey||event.metaKey){$2.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$2.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$2.datepicker._adjustDate(event.target,isRTL?1:-1,"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$2.datepicker._adjustDate(event.target,event.ctrlKey?-$2.datepicker._get(inst,"stepBigMonths"):-$2.datepicker._get(inst,"stepMonths"),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$2.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$2.datepicker._adjustDate(event.target,isRTL?-1:1,"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$2.datepicker._adjustDate(event.target,event.ctrlKey?+$2.datepicker._get(inst,"stepBigMonths"):+$2.datepicker._get(inst,"stepMonths"),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$2.datepicker._adjustDate(event.target,7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else if(event.keyCode===36&&event.ctrlKey){$2.datepicker._showDatepicker(this)}else{handled=false}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var chars,chr,inst=$2.datepicker._getInst(event.target);if($2.datepicker._get(inst,"constrainInput")){chars=$2.datepicker._possibleChars($2.datepicker._get(inst,"dateFormat"));chr=String.fromCharCode(event.charCode==null?event.keyCode:event.charCode);return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var date,inst=$2.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal){try{date=$2.datepicker.parseDate($2.datepicker._get(inst,"dateFormat"),inst.input?inst.input.val():null,$2.datepicker._getFormatConfig(inst));if(date){$2.datepicker._setDateFromField(inst);$2.datepicker._updateAlternate(inst);$2.datepicker._updateDatepicker(inst)}}catch(err){}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!=="input"){input=$2("input",input.parentNode)[0]}if($2.datepicker._isDisabledDatepicker(input)||$2.datepicker._lastInput===input){return}var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$2.datepicker._getInst(input);if($2.datepicker._curInst&&$2.datepicker._curInst!==inst){$2.datepicker._curInst.dpDiv.stop(true,true);if(inst&&$2.datepicker._datepickerShowing){$2.datepicker._hideDatepicker($2.datepicker._curInst.input[0])}}beforeShow=$2.datepicker._get(inst,"beforeShow");beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false){return}datepicker_extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$2.datepicker._lastInput=input;$2.datepicker._setDateFromField(inst);if($2.datepicker._inDialog){input.value=""}if(!$2.datepicker._pos){$2.datepicker._pos=$2.datepicker._findPos(input);$2.datepicker._pos[1]+=input.offsetHeight}isFixed=false;$2(input).parents().each(function(){isFixed|=$2(this).css("position")==="fixed";return!isFixed});offset={left:$2.datepicker._pos[0],top:$2.datepicker._pos[1]};$2.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$2.datepicker._updateDatepicker(inst);offset=$2.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:$2.datepicker._inDialog&&$2.blockUI?"static":isFixed?"fixed":"absolute",display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){showAnim=$2.datepicker._get(inst,"showAnim");duration=$2.datepicker._get(inst,"duration");inst.dpDiv.css("z-index",datepicker_getZindex($2(input))+1);$2.datepicker._datepickerShowing=true;if($2.effects&&$2.effects.effect[showAnim]){inst.dpDiv.show(showAnim,$2.datepicker._get(inst,"showOptions"),duration)}else{inst.dpDiv[showAnim||"show"](showAnim?duration:null)}if($2.datepicker._shouldFocusInput(inst)){inst.input.trigger("focus")}$2.datepicker._curInst=inst}},_updateDatepicker:function(inst){this.maxRows=4;datepicker_instActive=inst;inst.dpDiv.empty().append(this._generateHTML(inst));this._attachHandlers(inst);var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],width=17,activeCell=inst.dpDiv.find("."+this._dayOverClass+" a");if(activeCell.length>0){datepicker_handleMouseover.apply(activeCell.get(0))}inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",width*cols+"em")}inst.dpDiv[(numMonths[0]!==1||numMonths[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst===$2.datepicker._curInst&&$2.datepicker._datepickerShowing&&$2.datepicker._shouldFocusInput(inst)){inst.input.trigger("focus")}if(inst.yearshtml){origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml)}origyearshtml=inst.yearshtml=null},0)}},_shouldFocusInput:function(inst){return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&!inst.input.is(":focus")},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$2(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$2(document).scrollTop());offset.left-=this._get(inst,"isRTL")?dpWidth-inputWidth:0;offset.left-=isFixed&&offset.left===inst.input.offset().left?$2(document).scrollLeft():0;offset.top-=isFixed&&offset.top===inst.input.offset().top+inputHeight?$2(document).scrollTop():0;offset.left-=Math.min(offset.left,offset.left+dpWidth>viewWidth&&viewWidth>dpWidth?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,offset.top+dpHeight>viewHeight&&viewHeight>dpHeight?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var position2,inst=this._getInst(obj),isRTL=this._get(inst,"isRTL");while(obj&&(obj.type==="hidden"||obj.nodeType!==1||$2.expr.filters.hidden(obj))){obj=obj[isRTL?"previousSibling":"nextSibling"]}position2=$2(obj).offset();return[position2.left,position2.top]},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;if(!inst||input&&inst!==$2.data(input,"datepicker")){return}if(this._datepickerShowing){showAnim=this._get(inst,"showAnim");duration=this._get(inst,"duration");postProcess=function(){$2.datepicker._tidyDialog(inst)};if($2.effects&&($2.effects.effect[showAnim]||$2.effects[showAnim])){inst.dpDiv.hide(showAnim,$2.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim==="slideDown"?"slideUp":showAnim==="fadeIn"?"fadeOut":"hide"](showAnim?duration:null,postProcess)}if(!showAnim){postProcess()}this._datepickerShowing=false;onClose=this._get(inst,"onClose");if(onClose){onClose.apply(inst.input?inst.input[0]:null,[inst.input?inst.input.val():"",inst])}this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($2.blockUI){$2.unblockUI();$2("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$2.datepicker._curInst){return}var $target=$2(event.target),inst=$2.datepicker._getInst($target[0]);if($target[0].id!==$2.datepicker._mainDivId&&$target.parents("#"+$2.datepicker._mainDivId).length===0&&!$target.hasClass($2.datepicker.markerClassName)&&!$target.closest("."+$2.datepicker._triggerClass).length&&$2.datepicker._datepickerShowing&&!($2.datepicker._inDialog&&$2.blockUI)||$target.hasClass($2.datepicker.markerClassName)&&$2.datepicker._curInst!==inst){$2.datepicker._hideDatepicker()}},_adjustDate:function(id2,offset,period){var target=$2(id2),inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period==="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id2){var date,target=$2(id2),inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{date=new Date;inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id2,select,period){var target=$2(id2),inst=this._getInst(target[0]);inst["selected"+(period==="M"?"Month":"Year")]=inst["draw"+(period==="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_selectDay:function(id2,month,year,td){var inst,target=$2(id2);if($2(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$2("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id2,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id2){var target=$2(id2);this._selectDate(target,"")},_selectDate:function(id2,dateStr){var onSelect,target=$2(id2),inst=this._getInst(target[0]);dateStr=dateStr!=null?dateStr:this._formatDate(inst);if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst])}else if(inst.input){inst.input.trigger("change")}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof inst.input[0]!=="object"){inst.input.trigger("focus")}this._lastInput=null}},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,"altField");if(altField){altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$2(altField).val(dateStr)}},noWeekends:function(date){var day=date.getDay();return[day>0&&day<6,""]},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/864e5)/7)+1},parseDate:function(format,value,settings2){if(format==null||value==null){throw"Invalid arguments"}value=typeof value==="object"?value.toString():value+"";if(value===""){return null}var iFormat,dim,extra,iValue=0,shortYearCutoffTemp=(settings2?settings2.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff=typeof shortYearCutoffTemp!=="string"?shortYearCutoffTemp:new Date().getFullYear()%100+parseInt(shortYearCutoffTemp,10),dayNamesShort=(settings2?settings2.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings2?settings2.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings2?settings2.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings2?settings2.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=false,date,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;if(matches){iFormat++}return matches},getNumber=function(match){var isDoubled=lookAhead(match),size=match==="@"?14:match==="!"?20:match==="y"&&isDoubled?4:match==="o"?3:2,minSize=match==="y"?size:1,digits=new RegExp("^\\d{"+minSize+","+size+"}"),num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue}iValue+=num[0].length;return parseInt(num[0],10)},getName=function(match,shortNames,longNames){var index2=-1,names=$2.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]]}).sort(function(a,b){return-(a[1].length-b[1].length)});$2.each(names,function(i2,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()===name.toLowerCase()){index2=pair[0];iValue+=name.length;return false}});if(index2!==-1){return index2+1}else{throw"Unknown name at position "+iValue}},checkLiteral=function(){if(value.charAt(iValue)!==format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":date=new Date((getNumber("!")-this._ticksTo1970)/1e4);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(iValue<value.length){extra=value.substr(iValue);if(!/^\s+/.test(extra)){throw"Extra/unparsed characters found in date: "+extra}}if(year===-1){year=new Date().getFullYear()}else if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}if(doy>-1){month=1;day=doy;do{dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7,formatDate:function(format,date,settings2){if(!date){return""}var iFormat,dayNamesShort=(settings2?settings2.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings2?settings2.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings2?settings2.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings2?settings2.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;if(matches){iFormat++}return matches},formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num},formatName=function(match,value,shortNames,longNames){return lookAhead(match)?longNames[value]:shortNames[value]},output="",literal=false;if(date){for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/864e5),3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=lookAhead("y")?date.getFullYear():(date.getFullYear()%100<10?"0":"")+date.getFullYear()%100;break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*1e4+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var iFormat,chars="",literal=false,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;if(matches){iFormat++}return matches};for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==void 0?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()===inst.lastVal){return}var dateFormat=this._get(inst,"dateFormat"),dates=inst.lastVal=inst.input?inst.input.val():null,defaultDate=this._getDefaultDate(inst),date=defaultDate,settings2=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings2)||defaultDate}catch(event){dates=noDefault?"":dates}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=dates?date.getDate():0;inst.currentMonth=dates?date.getMonth():0;inst.currentYear=dates?date.getFullYear():0;this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date2=new Date;date2.setDate(date2.getDate()+offset);return date2},offsetString=function(offset){try{return $2.datepicker.parseDate($2.datepicker._get(inst,"dateFormat"),offset,$2.datepicker._getFormatConfig(inst))}catch(e2){}var date2=(offset.toLowerCase().match(/^c/)?$2.datepicker._getDate(inst):null)||new Date,year=date2.getFullYear(),month=date2.getMonth(),day=date2.getDate(),pattern=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$2.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$2.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)},newDate=date==null||date===""?defaultDate:typeof date==="string"?offsetString(date):typeof date==="number"?isNaN(date)?defaultDate:offsetNumeric(date):new Date(date.getTime());newDate=newDate&&newDate.toString()==="Invalid Date"?defaultDate:newDate;if(newDate){newDate.setHours(0);newDate.setMinutes(0);newDate.setSeconds(0);newDate.setMilliseconds(0)}return this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!==inst.selectedMonth||origYear!==inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=!inst.currentYear||inst.input&&inst.input.val()===""?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return startDate},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths"),id2="#"+inst.id.replace(/\\\\/g,"\\");inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){$2.datepicker._adjustDate(id2,-stepMonths,"M")},next:function(){$2.datepicker._adjustDate(id2,+stepMonths,"M")},hide:function(){$2.datepicker._hideDatepicker()},today:function(){$2.datepicker._gotoToday(id2)},selectDay:function(){$2.datepicker._selectDay(id2,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){$2.datepicker._selectMonthYear(id2,this,"M");return false},selectYear:function(){$2.datepicker._selectMonthYear(id2,this,"Y");return false}};$2(this).on(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")])})},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date,today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,"isRTL"),showButtonPanel=this._get(inst,"showButtonPanel"),hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,"showCurrentAtPos"),stepMonths=this._get(inst,"stepMonths"),isMultiMonth=numMonths[0]!==1||numMonths[1]!==1,currentDate=this._daylightSavingAdjust(!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[0]*numMonths[1]+1,maxDate.getDate()));maxDraw=minDate&&maxDraw<minDate?minDate:maxDraw;while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;prevText=this._get(inst,"prevText");prevText=!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst));prev=this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>":hideIfNoPrevNext?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>";nextText=this._get(inst,"nextText");nextText=!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst));next=this._canAdjustMonth(inst,1,drawYear,drawMonth)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>":hideIfNoPrevNext?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>";currentText=this._get(inst,"currentText");gotoDate=this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today;currentText=!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst));controls=!inst.inline?"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(inst,"closeText")+"</button>":"";buttonPanel=showButtonPanel?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=isNaN(firstDay)?0:firstDay;showWeek=this._get(inst,"showWeek");dayNames=this._get(inst,"dayNames");dayNamesMin=this._get(inst,"dayNamesMin");monthNames=this._get(inst,"monthNames");monthNamesShort=this._get(inst,"monthNamesShort");beforeShowDay=this._get(inst,"beforeShowDay");showOtherMonths=this._get(inst,"showOtherMonths");selectOtherMonths=this._get(inst,"selectOtherMonths");defaultDate=this._getDefaultDate(inst);html="";for(row=0;row<numMonths[0];row++){group="";this.maxRows=4;for(col=0;col<numMonths[1];col++){selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));cornerClass=" ui-corner-all";calender="";if(isMultiMonth){calender+="<div class='ui-datepicker-group";if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+="'>"}calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+(/all|left/.test(cornerClass)&&row===0?isRTL?next:prev:"")+(/all|right/.test(cornerClass)&&row===0?isRTL?prev:next:"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"</div><table class='ui-datepicker-calendar'><thead><tr>";thead=showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"";for(dow=0;dow<7;dow++){day=(dow+firstDay)%7;thead+="<th scope='col'"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;curRows=Math.ceil((leadDays+daysInMonth)/7);numRows=isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows;this.maxRows=numRows;printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(dRow=0;dRow<numRows;dRow++){calender+="<tr>";tbody=!showWeek?"":"<td class='ui-datepicker-week-col'>"+this._get(inst,"calculateWeek")(printDate)+"</td>";for(dow=0;dow<7;dow++){daySettings=beforeShowDay?beforeShowDay.apply(inst.input?inst.input[0]:null,[printDate]):[true,""];otherMonth=printDate.getMonth()!==drawMonth;unselectable=otherMonth&&!selectOtherMonths||!daySettings[0]||minDate&&printDate<minDate||maxDate&&printDate>maxDate;tbody+="<td class='"+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+(printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent||defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime()?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+((!otherMonth||showOtherMonths)&&daySettings[2]?" title='"+daySettings[2].replace(/'/g,"'")+"'":"")+(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+(otherMonth&&!showOtherMonths?" ":unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+"' href='#'>"+printDate.getDate()+"</a>")+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+(numMonths[0]>0&&col===numMonths[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"");group+=calender}html+=group}html+=buttonPanel;inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,"changeMonth"),changeYear=this._get(inst,"changeYear"),showMonthAfterYear=this._get(inst,"showMonthAfterYear"),html="<div class='ui-datepicker-title'>",monthHtml="";if(secondary||!changeMonth){monthHtml+="<span class='ui-datepicker-month'>"+monthNames[drawMonth]+"</span>"}else{inMinYear=minDate&&minDate.getFullYear()===drawYear;inMaxYear=maxDate&&maxDate.getFullYear()===drawYear;monthHtml+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";for(month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+="<option value='"+month+"'"+(month===drawMonth?" selected='selected'":"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?" ":"")}if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear){html+="<span class='ui-datepicker-year'>"+drawYear+"</span>"}else{years=this._get(inst,"yearRange").split(":");thisYear=new Date().getFullYear();determineYear=function(value){var year2=value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):value.match(/[+\-].*/)?thisYear+parseInt(value,10):parseInt(value,10);return isNaN(year2)?thisYear:year2};year=determineYear(years[0]);endYear=Math.max(year,determineYear(years[1]||""));year=minDate?Math.max(year,minDate.getFullYear()):year;endYear=maxDate?Math.min(endYear,maxDate.getFullYear()):endYear;inst.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";for(;year<=endYear;year++){inst.yearshtml+="<option value='"+year+"'"+(year===drawYear?" selected='selected'":"")+">"+year+"</option>"}inst.yearshtml+="</select>";html+=inst.yearshtml;inst.yearshtml=null}}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?" ":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.selectedYear+(period==="Y"?offset:0),month=inst.selectedMonth+(period==="M"?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==="D"?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period==="M"||period==="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),newDate=minDate&&date<minDate?minDate:date;return maxDate&&newDate>maxDate?maxDate:newDate},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply(inst.input?inst.input[0]:null,[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return numMonths==null?[1,1]:typeof numMonths==="number"?[1,numMonths]:numMonths},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),minYear=null,maxYear=null,years=this._get(inst,"yearRange");if(years){yearSplit=years.split(":");currentYear=new Date().getFullYear();minYear=parseInt(yearSplit[0],10);maxYear=parseInt(yearSplit[1],10);if(yearSplit[0].match(/[+\-].*/)){minYear+=currentYear}if(yearSplit[1].match(/[+\-].*/)){maxYear+=currentYear}}return(!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear)},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=typeof shortYearCutoff!=="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10);return{shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=day?typeof day==="object"?day:this._daylightSavingAdjust(new Date(year,month,day)):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function datepicker_bindHover(dpDiv){var selector2="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.on("mouseout",selector2,function(){$2(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$2(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){$2(this).removeClass("ui-datepicker-next-hover")}}).on("mouseover",selector2,datepicker_handleMouseover)}function datepicker_handleMouseover(){if(!$2.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])){$2(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$2(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$2(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){$2(this).addClass("ui-datepicker-next-hover")}}}function datepicker_extendRemove(target,props2){$2.extend(target,props2);for(var name in props2){if(props2[name]==null){target[name]=props2[name]}}return target}$2.fn.datepicker=function(options){if(!this.length){return this}if(!$2.datepicker.initialized){$2(document).on("mousedown",$2.datepicker._checkExternalClick);$2.datepicker.initialized=true}if($2("#"+$2.datepicker._mainDivId).length===0){$2("body").append($2.datepicker.dpDiv)}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){return $2.datepicker["_"+options+"Datepicker"].apply($2.datepicker,[this[0]].concat(otherArgs))}if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return $2.datepicker["_"+options+"Datepicker"].apply($2.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options==="string"?$2.datepicker["_"+options+"Datepicker"].apply($2.datepicker,[this].concat(otherArgs)):$2.datepicker._attachDatepicker(this,options)})};$2.datepicker=new Datepicker;$2.datepicker.initialized=false;$2.datepicker.uuid=new Date().getTime();$2.datepicker.version="1.12.1";var widgetsDatepicker=$2.datepicker;var ie=$2.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());/*!
|
|
339
|
+
* jQuery UI Mouse 1.12.1
|
|
340
|
+
* http://jqueryui.com
|
|
341
|
+
*
|
|
342
|
+
* Copyright jQuery Foundation and other contributors
|
|
343
|
+
* Released under the MIT license.
|
|
344
|
+
* http://jquery.org/license
|
|
345
|
+
*/var mouseHandled=false;$2(document).on("mouseup",function(){mouseHandled=false});var widgetsMouse=$2.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var that=this;this.element.on("mousedown."+this.widgetName,function(event){return that._mouseDown(event)}).on("click."+this.widgetName,function(event){if(true===$2.data(event.target,that.widgetName+".preventClickEvent")){$2.removeData(event.target,that.widgetName+".preventClickEvent");event.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.off("."+this.widgetName);if(this._mouseMoveDelegate){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)}},_mouseDown:function(event){if(mouseHandled){return}this._mouseMoved=false;this._mouseStarted&&this._mouseUp(event);this._mouseDownEvent=event;var that=this,btnIsLeft=event.which===1,elIsCancel=typeof this.options.cancel==="string"&&event.target.nodeName?$2(event.target).closest(this.options.cancel).length:false;if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){that.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=this._mouseStart(event)!==false;if(!this._mouseStarted){event.preventDefault();return true}}if(true===$2.data(event.target,this.widgetName+".preventClickEvent")){$2.removeData(event.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(event2){return that._mouseMove(event2)};this._mouseUpDelegate=function(event2){return that._mouseUp(event2)};this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate);event.preventDefault();mouseHandled=true;return true},_mouseMove:function(event){if(this._mouseMoved){if($2.ui.ie&&(!document.documentMode||document.documentMode<9)&&!event.button){return this._mouseUp(event)}else if(!event.which){if(event.originalEvent.altKey||event.originalEvent.ctrlKey||event.originalEvent.metaKey||event.originalEvent.shiftKey){this.ignoreMissingWhich=true}else if(!this.ignoreMissingWhich){return this._mouseUp(event)}}}if(event.which||event.button){this._mouseMoved=true}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,event)!==false;this._mouseStarted?this._mouseDrag(event):this._mouseUp(event)}return!this._mouseStarted},_mouseUp:function(event){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(event.target===this._mouseDownEvent.target){$2.data(event.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(event)}if(this._mouseDelayTimer){clearTimeout(this._mouseDelayTimer);delete this._mouseDelayTimer}this.ignoreMissingWhich=false;mouseHandled=false;event.preventDefault()},_mouseDistanceMet:function(event){return Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}});var plugin=$2.ui.plugin={add:function(module2,option,set){var i2,proto=$2.ui[module2].prototype;for(i2 in set){proto.plugins[i2]=proto.plugins[i2]||[];proto.plugins[i2].push([option,set[i2]])}},call:function(instance,name,args,allowDisconnected){var i2,set=instance.plugins[name];if(!set){return}if(!allowDisconnected&&(!instance.element[0].parentNode||instance.element[0].parentNode.nodeType===11)){return}for(i2=0;i2<set.length;i2++){if(instance.options[set[i2][0]]){set[i2][1].apply(instance.element,args)}}}};var safeBlur=$2.ui.safeBlur=function(element){if(element&&element.nodeName.toLowerCase()!=="body"){$2(element).trigger("blur")}};/*!
|
|
346
|
+
* jQuery UI Draggable 1.12.1
|
|
347
|
+
* http://jqueryui.com
|
|
348
|
+
*
|
|
349
|
+
* Copyright jQuery Foundation and other contributors
|
|
350
|
+
* Released under the MIT license.
|
|
351
|
+
* http://jquery.org/license
|
|
352
|
+
*/$2.widget("ui.draggable",$2.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"){this._setPositionRelative()}if(this.options.addClasses){this._addClass("ui-draggable")}this._setHandleClassName();this._mouseInit()},_setOption:function(key2,value){this._super(key2,value);if(key2==="handle"){this._removeHandleClassName();this._setHandleClassName()}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return}this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$2(event.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(event);if(!this.handle){return false}this._blurActiveElement(event);this._blockFrames(o.iframeFix===true?"iframe":o.iframeFix);return true},_blockFrames:function(selector2){this.iframeBlocks=this.document.find(selector2).map(function(){var iframe=$2(this);return $2("<div>").css("position","absolute").appendTo(iframe.parent()).outerWidth(iframe.outerWidth()).outerHeight(iframe.outerHeight()).offset(iframe.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_blurActiveElement:function(event){var activeElement=$2.ui.safeActiveElement(this.document[0]),target=$2(event.target);if(target.closest(activeElement).length){return}$2.ui.safeBlur(activeElement)},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._addClass(this.helper,"ui-draggable-dragging");this._cacheHelperProportions();if($2.ui.ddmanager){$2.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(true);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=this.helper.parents().filter(function(){return $2(this).css("position")==="fixed"}).length>0;this.positionAbs=this.element.offset();this._refreshOffsets(event);this.originalPosition=this.position=this._generatePosition(event,false);this.originalPageX=event.pageX;this.originalPageY=event.pageY;o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt);this._setContainment();if(this._trigger("start",event)===false){this._clear();return false}this._cacheHelperProportions();if($2.ui.ddmanager&&!o.dropBehaviour){$2.ui.ddmanager.prepareOffsets(this,event)}this._mouseDrag(event,true);if($2.ui.ddmanager){$2.ui.ddmanager.dragStart(this,event)}return true},_refreshOffsets:function(event){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:false,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:event.pageX-this.offset.left,top:event.pageY-this.offset.top}},_mouseDrag:function(event,noPropagation){if(this.hasFixedAncestor){this.offset.parent=this._getParentOffset()}this.position=this._generatePosition(event,true);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();if(this._trigger("drag",event,ui)===false){this._mouseUp(new $2.Event("mouseup",event));return false}this.position=ui.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if($2.ui.ddmanager){$2.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var that=this,dropped=false;if($2.ui.ddmanager&&!this.options.dropBehaviour){dropped=$2.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}if(this.options.revert==="invalid"&&!dropped||this.options.revert==="valid"&&dropped||this.options.revert===true||$2.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped)){$2(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(that._trigger("stop",event)!==false){that._clear()}})}else{if(this._trigger("stop",event)!==false){this._clear()}}return false},_mouseUp:function(event){this._unblockFrames();if($2.ui.ddmanager){$2.ui.ddmanager.dragStop(this,event)}if(this.handleElement.is(event.target)){this.element.trigger("focus")}return $2.ui.mouse.prototype._mouseUp.call(this,event)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp(new $2.Event("mouseup",{target:this.element[0]}))}else{this._clear()}return this},_getHandle:function(event){return this.options.handle?!!$2(event.target).closest(this.element.find(this.options.handle)).length:true},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(event){var o=this.options,helperIsFunction=$2.isFunction(o.helper),helper=helperIsFunction?$2(o.helper.apply(this.element[0],[event])):o.helper==="clone"?this.element.clone().removeAttr("id"):this.element;if(!helper.parents("body").length){helper.appendTo(o.appendTo==="parent"?this.element[0].parentNode:o.appendTo)}if(helperIsFunction&&helper[0]===this.element[0]){this._setPositionRelative()}if(helper[0]!==this.element[0]&&!/(fixed|absolute)/.test(helper.css("position"))){helper.css("position","absolute")}return helper},_setPositionRelative:function(){if(!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}},_adjustOffsetFromHelper:function(obj){if(typeof obj==="string"){obj=obj.split(" ")}if($2.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0}}if("left"in obj){this.offset.click.left=obj.left+this.margins.left}if("right"in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if("top"in obj){this.offset.click.top=obj.top+this.margins.top}if("bottom"in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_isRootNode:function(element){return/(html|body)/i.test(element.tagName)||element===this.document[0]},_getParentOffset:function(){var po=this.offsetParent.offset(),document2=this.document[0];if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document2&&$2.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if(this._isRootNode(this.offsetParent[0])){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative"){return{top:0,left:0}}var p=this.element.position(),scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+(!scrollIsRootNode?this.scrollParent.scrollTop():0),left:p.left-(parseInt(this.helper.css("left"),10)||0)+(!scrollIsRootNode?this.scrollParent.scrollLeft():0)}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var isUserScrollable,c,ce,o=this.options,document2=this.document[0];this.relativeContainer=null;if(!o.containment){this.containment=null;return}if(o.containment==="window"){this.containment=[$2(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$2(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$2(window).scrollLeft()+$2(window).width()-this.helperProportions.width-this.margins.left,$2(window).scrollTop()+($2(window).height()||document2.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(o.containment==="document"){this.containment=[0,0,$2(document2).width()-this.helperProportions.width-this.margins.left,($2(document2).height()||document2.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(o.containment.constructor===Array){this.containment=o.containment;return}if(o.containment==="parent"){o.containment=this.helper[0].parentNode}c=$2(o.containment);ce=c[0];if(!ce){return}isUserScrollable=/(scroll|auto)/.test(c.css("overflow"));this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(isUserScrollable?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(isUserScrollable?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relativeContainer=c},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d==="absolute"?1:-1,scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-(this.cssPosition==="fixed"?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top)*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-(this.cssPosition==="fixed"?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)*mod}},_generatePosition:function(event,constrainPosition){var containment,co,top,left,o=this.options,scrollIsRootNode=this._isRootNode(this.scrollParent[0]),pageX=event.pageX,pageY=event.pageY;if(!scrollIsRootNode||!this.offset.scroll){this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}}if(constrainPosition){if(this.containment){if(this.relativeContainer){co=this.relativeContainer.offset();containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top]}else{containment=this.containment}if(event.pageX-this.offset.click.left<containment[0]){pageX=containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<containment[1]){pageY=containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>containment[2]){pageX=containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>containment[3]){pageY=containment[3]+this.offset.click.top}}if(o.grid){top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;pageY=containment?top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3]?top:top-this.offset.click.top>=containment[1]?top-o.grid[1]:top+o.grid[1]:top;left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX;pageX=containment?left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2]?left:left-this.offset.click.left>=containment[0]?left-o.grid[0]:left+o.grid[0]:left}if(o.axis==="y"){pageX=this.originalPageX}if(o.axis==="x"){pageY=this.originalPageY}}return{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false;if(this.destroyOnClear){this.destroy()}},_trigger:function(type2,event,ui){ui=ui||this._uiHash();$2.ui.plugin.call(this,type2,[event,ui,this],true);if(/^(drag|start|stop)/.test(type2)){this.positionAbs=this._convertPositionTo("absolute");ui.offset=this.positionAbs}return $2.Widget.prototype._trigger.call(this,type2,event,ui)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});$2.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui,draggable){var uiSortable=$2.extend({},ui,{item:draggable.element});draggable.sortables=[];$2(draggable.options.connectToSortable).each(function(){var sortable=$2(this).sortable("instance");if(sortable&&!sortable.options.disabled){draggable.sortables.push(sortable);sortable.refreshPositions();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui,draggable){var uiSortable=$2.extend({},ui,{item:draggable.element});draggable.cancelHelperRemoval=false;$2.each(draggable.sortables,function(){var sortable=this;if(sortable.isOver){sortable.isOver=0;draggable.cancelHelperRemoval=true;sortable.cancelHelperRemoval=false;sortable._storedCSS={position:sortable.placeholder.css("position"),top:sortable.placeholder.css("top"),left:sortable.placeholder.css("left")};sortable._mouseStop(event);sortable.options.helper=sortable.options._helper}else{sortable.cancelHelperRemoval=true;sortable._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui,draggable){$2.each(draggable.sortables,function(){var innermostIntersecting=false,sortable=this;sortable.positionAbs=draggable.positionAbs;sortable.helperProportions=draggable.helperProportions;sortable.offset.click=draggable.offset.click;if(sortable._intersectsWith(sortable.containerCache)){innermostIntersecting=true;$2.each(draggable.sortables,function(){this.positionAbs=draggable.positionAbs;this.helperProportions=draggable.helperProportions;this.offset.click=draggable.offset.click;if(this!==sortable&&this._intersectsWith(this.containerCache)&&$2.contains(sortable.element[0],this.element[0])){innermostIntersecting=false}return innermostIntersecting})}if(innermostIntersecting){if(!sortable.isOver){sortable.isOver=1;draggable._parent=ui.helper.parent();sortable.currentItem=ui.helper.appendTo(sortable.element).data("ui-sortable-item",true);sortable.options._helper=sortable.options.helper;sortable.options.helper=function(){return ui.helper[0]};event.target=sortable.currentItem[0];sortable._mouseCapture(event,true);sortable._mouseStart(event,true,true);sortable.offset.click.top=draggable.offset.click.top;sortable.offset.click.left=draggable.offset.click.left;sortable.offset.parent.left-=draggable.offset.parent.left-sortable.offset.parent.left;sortable.offset.parent.top-=draggable.offset.parent.top-sortable.offset.parent.top;draggable._trigger("toSortable",event);draggable.dropped=sortable.element;$2.each(draggable.sortables,function(){this.refreshPositions()});draggable.currentItem=draggable.element;sortable.fromOutside=draggable}if(sortable.currentItem){sortable._mouseDrag(event);ui.position=sortable.position}}else{if(sortable.isOver){sortable.isOver=0;sortable.cancelHelperRemoval=true;sortable.options._revert=sortable.options.revert;sortable.options.revert=false;sortable._trigger("out",event,sortable._uiHash(sortable));sortable._mouseStop(event,true);sortable.options.revert=sortable.options._revert;sortable.options.helper=sortable.options._helper;if(sortable.placeholder){sortable.placeholder.remove()}ui.helper.appendTo(draggable._parent);draggable._refreshOffsets(event);ui.position=draggable._generatePosition(event,true);draggable._trigger("fromSortable",event);draggable.dropped=false;$2.each(draggable.sortables,function(){this.refreshPositions()})}}})}});$2.ui.plugin.add("draggable","cursor",{start:function(event,ui,instance){var t2=$2("body"),o=instance.options;if(t2.css("cursor")){o._cursor=t2.css("cursor")}t2.css("cursor",o.cursor)},stop:function(event,ui,instance){var o=instance.options;if(o._cursor){$2("body").css("cursor",o._cursor)}}});$2.ui.plugin.add("draggable","opacity",{start:function(event,ui,instance){var t2=$2(ui.helper),o=instance.options;if(t2.css("opacity")){o._opacity=t2.css("opacity")}t2.css("opacity",o.opacity)},stop:function(event,ui,instance){var o=instance.options;if(o._opacity){$2(ui.helper).css("opacity",o._opacity)}}});$2.ui.plugin.add("draggable","scroll",{start:function(event,ui,i2){if(!i2.scrollParentNotHidden){i2.scrollParentNotHidden=i2.helper.scrollParent(false)}if(i2.scrollParentNotHidden[0]!==i2.document[0]&&i2.scrollParentNotHidden[0].tagName!=="HTML"){i2.overflowOffset=i2.scrollParentNotHidden.offset()}},drag:function(event,ui,i2){var o=i2.options,scrolled=false,scrollParent2=i2.scrollParentNotHidden[0],document2=i2.document[0];if(scrollParent2!==document2&&scrollParent2.tagName!=="HTML"){if(!o.axis||o.axis!=="x"){if(i2.overflowOffset.top+scrollParent2.offsetHeight-event.pageY<o.scrollSensitivity){scrollParent2.scrollTop=scrolled=scrollParent2.scrollTop+o.scrollSpeed}else if(event.pageY-i2.overflowOffset.top<o.scrollSensitivity){scrollParent2.scrollTop=scrolled=scrollParent2.scrollTop-o.scrollSpeed}}if(!o.axis||o.axis!=="y"){if(i2.overflowOffset.left+scrollParent2.offsetWidth-event.pageX<o.scrollSensitivity){scrollParent2.scrollLeft=scrolled=scrollParent2.scrollLeft+o.scrollSpeed}else if(event.pageX-i2.overflowOffset.left<o.scrollSensitivity){scrollParent2.scrollLeft=scrolled=scrollParent2.scrollLeft-o.scrollSpeed}}}else{if(!o.axis||o.axis!=="x"){if(event.pageY-$2(document2).scrollTop()<o.scrollSensitivity){scrolled=$2(document2).scrollTop($2(document2).scrollTop()-o.scrollSpeed)}else if($2(window).height()-(event.pageY-$2(document2).scrollTop())<o.scrollSensitivity){scrolled=$2(document2).scrollTop($2(document2).scrollTop()+o.scrollSpeed)}}if(!o.axis||o.axis!=="y"){if(event.pageX-$2(document2).scrollLeft()<o.scrollSensitivity){scrolled=$2(document2).scrollLeft($2(document2).scrollLeft()-o.scrollSpeed)}else if($2(window).width()-(event.pageX-$2(document2).scrollLeft())<o.scrollSensitivity){scrolled=$2(document2).scrollLeft($2(document2).scrollLeft()+o.scrollSpeed)}}}if(scrolled!==false&&$2.ui.ddmanager&&!o.dropBehaviour){$2.ui.ddmanager.prepareOffsets(i2,event)}}});$2.ui.plugin.add("draggable","snap",{start:function(event,ui,i2){var o=i2.options;i2.snapElements=[];$2(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each(function(){var $t=$2(this),$o=$t.offset();if(this!==i2.element[0]){i2.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})}})},drag:function(event,ui,inst){var ts,bs2,ls,rs,l,r2,t2,b,i2,first,o=inst.options,d=o.snapTolerance,x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(i2=inst.snapElements.length-1;i2>=0;i2--){l=inst.snapElements[i2].left-inst.margins.left;r2=l+inst.snapElements[i2].width;t2=inst.snapElements[i2].top-inst.margins.top;b=t2+inst.snapElements[i2].height;if(x2<l-d||x1>r2+d||y2<t2-d||y1>b+d||!$2.contains(inst.snapElements[i2].item.ownerDocument,inst.snapElements[i2].item)){if(inst.snapElements[i2].snapping){inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$2.extend(inst._uiHash(),{snapItem:inst.snapElements[i2].item}))}inst.snapElements[i2].snapping=false;continue}if(o.snapMode!=="inner"){ts=Math.abs(t2-y2)<=d;bs2=Math.abs(b-y1)<=d;ls=Math.abs(l-x2)<=d;rs=Math.abs(r2-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t2-inst.helperProportions.height,left:0}).top}if(bs2){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r2}).left}}first=ts||bs2||ls||rs;if(o.snapMode!=="outer"){ts=Math.abs(t2-y1)<=d;bs2=Math.abs(b-y2)<=d;ls=Math.abs(l-x1)<=d;rs=Math.abs(r2-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t2,left:0}).top}if(bs2){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r2-inst.helperProportions.width}).left}}if(!inst.snapElements[i2].snapping&&(ts||bs2||ls||rs||first)){inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$2.extend(inst._uiHash(),{snapItem:inst.snapElements[i2].item}))}inst.snapElements[i2].snapping=ts||bs2||ls||rs||first}}});$2.ui.plugin.add("draggable","stack",{start:function(event,ui,instance){var min,o=instance.options,group=$2.makeArray($2(o.stack)).sort(function(a,b){return(parseInt($2(a).css("zIndex"),10)||0)-(parseInt($2(b).css("zIndex"),10)||0)});if(!group.length){return}min=parseInt($2(group[0]).css("zIndex"),10)||0;$2(group).each(function(i2){$2(this).css("zIndex",min+i2)});this.css("zIndex",min+group.length)}});$2.ui.plugin.add("draggable","zIndex",{start:function(event,ui,instance){var t2=$2(ui.helper),o=instance.options;if(t2.css("zIndex")){o._zIndex=t2.css("zIndex")}t2.css("zIndex",o.zIndex)},stop:function(event,ui,instance){var o=instance.options;if(o._zIndex){$2(ui.helper).css("zIndex",o._zIndex)}}});var widgetsDraggable=$2.ui.draggable;/*!
|
|
353
|
+
* jQuery UI Resizable 1.12.1
|
|
354
|
+
* http://jqueryui.com
|
|
355
|
+
*
|
|
356
|
+
* Copyright jQuery Foundation and other contributors
|
|
357
|
+
* Released under the MIT license.
|
|
358
|
+
* http://jquery.org/license
|
|
359
|
+
*/$2.widget("ui.resizable",$2.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(value){return parseFloat(value)||0},_isNumber:function(value){return!isNaN(parseFloat(value))},_hasScroll:function(el2,a){if($2(el2).css("overflow")==="hidden"){return false}var scroll=a&&a==="left"?"scrollLeft":"scrollTop",has=false;if(el2[scroll]>0){return true}el2[scroll]=1;has=el2[scroll]>0;el2[scroll]=0;return has},_create:function(){var margins,o=this.options,that=this;this._addClass("ui-resizable");$2.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){this.element.wrap($2("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance"));this.elementIsWrapper=true;margins={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")};this.element.css(margins);this.originalElement.css("margin",0);this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css(margins);this._proportionallyResize()}this._setupHandles();if(o.autoHide){$2(this.element).on("mouseenter",function(){if(o.disabled){return}that._removeClass("ui-resizable-autohide");that._handles.show()}).on("mouseleave",function(){if(o.disabled){return}if(!that.resizing){that._addClass("ui-resizable-autohide");that._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$2(exp).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){_destroy(this.element);wrapper=this.element;this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper);wrapper.remove()}this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement);return this},_setOption:function(key2,value){this._super(key2,value);switch(key2){case"handles":this._removeHandles();this._setupHandles();break;default:break}},_setupHandles:function(){var o=this.options,handle,i2,n2,hname,axis,that=this;this.handles=o.handles||(!$2(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});this._handles=$2();if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw"}n2=this.handles.split(",");this.handles={};for(i2=0;i2<n2.length;i2++){handle=$2.trim(n2[i2]);hname="ui-resizable-"+handle;axis=$2("<div>");this._addClass(axis,"ui-resizable-handle "+hname);axis.css({zIndex:o.zIndex});this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis)}}this._renderAxis=function(target){var i3,axis2,padPos,padWrapper;target=target||this.element;for(i3 in this.handles){if(this.handles[i3].constructor===String){this.handles[i3]=this.element.children(this.handles[i3]).first().show()}else if(this.handles[i3].jquery||this.handles[i3].nodeType){this.handles[i3]=$2(this.handles[i3]);this._on(this.handles[i3],{"mousedown":that._mouseDown})}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)){axis2=$2(this.handles[i3],this.element);padWrapper=/sw|ne|nw|se|n|s/.test(i3)?axis2.outerHeight():axis2.outerWidth();padPos=["padding",/ne|nw|n/.test(i3)?"Top":/se|sw|s/.test(i3)?"Bottom":/^e$/.test(i3)?"Right":"Left"].join("");target.css(padPos,padWrapper);this._proportionallyResize()}this._handles=this._handles.add(this.handles[i3])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection();this._handles.on("mouseover",function(){if(!that.resizing){if(this.className){axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}that.axis=axis&&axis[1]?axis[1]:"se"}});if(o.autoHide){this._handles.hide();this._addClass("ui-resizable-autohide")}},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(event){var i2,handle,capture=false;for(i2 in this.handles){handle=$2(this.handles[i2])[0];if(handle===event.target||$2.contains(handle,event.target)){capture=true}}return!this.options.disabled&&capture},_mouseStart:function(event){var curleft,curtop,cursor,o=this.options,el2=this.element;this.resizing=true;this._renderProxy();curleft=this._num(this.helper.css("left"));curtop=this._num(this.helper.css("top"));if(o.containment){curleft+=$2(o.containment).scrollLeft()||0;curtop+=$2(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:el2.width(),height:el2.height()};this.originalSize=this._helper?{width:el2.outerWidth(),height:el2.outerHeight()}:{width:el2.width(),height:el2.height()};this.sizeDiff={width:el2.outerWidth()-el2.width(),height:el2.outerHeight()-el2.height()};this.originalPosition={left:curleft,top:curtop};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=typeof o.aspectRatio==="number"?o.aspectRatio:this.originalSize.width/this.originalSize.height||1;cursor=$2(".ui-resizable-"+this.axis).css("cursor");$2("body").css("cursor",cursor==="auto"?this.axis+"-resize":cursor);this._addClass("ui-resizable-resizing");this._propagate("start",event);return true},_mouseDrag:function(event){var data3,props2,smp=this.originalMousePosition,a=this.axis,dx=event.pageX-smp.left||0,dy=event.pageY-smp.top||0,trigger=this._change[a];this._updatePrevProperties();if(!trigger){return false}data3=trigger.apply(this,[event,dx,dy]);this._updateVirtualBoundaries(event.shiftKey);if(this._aspectRatio||event.shiftKey){data3=this._updateRatio(data3,event)}data3=this._respectSize(data3,event);this._updateCache(data3);this._propagate("resize",event);props2=this._applyChanges();if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}if(!$2.isEmptyObject(props2)){this._updatePrevProperties();this._trigger("resize",event,this.ui());this._applyChanges()}return false},_mouseStop:function(event){this.resizing=false;var pr,ista,soffseth,soffsetw,s,left,top,o=this.options,that=this;if(this._helper){pr=this._proportionallyResizeElements;ista=pr.length&&/textarea/i.test(pr[0].nodeName);soffseth=ista&&this._hasScroll(pr[0],"left")?0:that.sizeDiff.height;soffsetw=ista?0:that.sizeDiff.width;s={width:that.helper.width()-soffsetw,height:that.helper.height()-soffseth};left=parseFloat(that.element.css("left"))+(that.position.left-that.originalPosition.left)||null;top=parseFloat(that.element.css("top"))+(that.position.top-that.originalPosition.top)||null;if(!o.animate){this.element.css($2.extend(s,{top,left}))}that.helper.height(that.size.height);that.helper.width(that.size.width);if(this._helper&&!o.animate){this._proportionallyResize()}}$2("body").css("cursor","auto");this._removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper){this.helper.remove()}return false},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var props2={};if(this.position.top!==this.prevPosition.top){props2.top=this.position.top+"px"}if(this.position.left!==this.prevPosition.left){props2.left=this.position.left+"px"}if(this.size.width!==this.prevSize.width){props2.width=this.size.width+"px"}if(this.size.height!==this.prevSize.height){props2.height=this.size.height+"px"}this.helper.css(props2);return props2},_updateVirtualBoundaries:function(forceAspectRatio){var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,o=this.options;b={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:Infinity,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:Infinity};if(this._aspectRatio||forceAspectRatio){pMinWidth=b.minHeight*this.aspectRatio;pMinHeight=b.minWidth/this.aspectRatio;pMaxWidth=b.maxHeight*this.aspectRatio;pMaxHeight=b.maxWidth/this.aspectRatio;if(pMinWidth>b.minWidth){b.minWidth=pMinWidth}if(pMinHeight>b.minHeight){b.minHeight=pMinHeight}if(pMaxWidth<b.maxWidth){b.maxWidth=pMaxWidth}if(pMaxHeight<b.maxHeight){b.maxHeight=pMaxHeight}}this._vBoundaries=b},_updateCache:function(data3){this.offset=this.helper.offset();if(this._isNumber(data3.left)){this.position.left=data3.left}if(this._isNumber(data3.top)){this.position.top=data3.top}if(this._isNumber(data3.height)){this.size.height=data3.height}if(this._isNumber(data3.width)){this.size.width=data3.width}},_updateRatio:function(data3){var cpos=this.position,csize=this.size,a=this.axis;if(this._isNumber(data3.height)){data3.width=data3.height*this.aspectRatio}else if(this._isNumber(data3.width)){data3.height=data3.width/this.aspectRatio}if(a==="sw"){data3.left=cpos.left+(csize.width-data3.width);data3.top=null}if(a==="nw"){data3.top=cpos.top+(csize.height-data3.height);data3.left=cpos.left+(csize.width-data3.width)}return data3},_respectSize:function(data3){var o=this._vBoundaries,a=this.axis,ismaxw=this._isNumber(data3.width)&&o.maxWidth&&o.maxWidth<data3.width,ismaxh=this._isNumber(data3.height)&&o.maxHeight&&o.maxHeight<data3.height,isminw=this._isNumber(data3.width)&&o.minWidth&&o.minWidth>data3.width,isminh=this._isNumber(data3.height)&&o.minHeight&&o.minHeight>data3.height,dw=this.originalPosition.left+this.originalSize.width,dh=this.originalPosition.top+this.originalSize.height,cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw){data3.width=o.minWidth}if(isminh){data3.height=o.minHeight}if(ismaxw){data3.width=o.maxWidth}if(ismaxh){data3.height=o.maxHeight}if(isminw&&cw){data3.left=dw-o.minWidth}if(ismaxw&&cw){data3.left=dw-o.maxWidth}if(isminh&&ch){data3.top=dh-o.minHeight}if(ismaxh&&ch){data3.top=dh-o.maxHeight}if(!data3.width&&!data3.height&&!data3.left&&data3.top){data3.top=null}else if(!data3.width&&!data3.height&&!data3.top&&data3.left){data3.left=null}return data3},_getPaddingPlusBorderDimensions:function(element){var i2=0,widths=[],borders=[element.css("borderTopWidth"),element.css("borderRightWidth"),element.css("borderBottomWidth"),element.css("borderLeftWidth")],paddings=[element.css("paddingTop"),element.css("paddingRight"),element.css("paddingBottom"),element.css("paddingLeft")];for(;i2<4;i2++){widths[i2]=parseFloat(borders[i2])||0;widths[i2]+=parseFloat(paddings[i2])||0}return{height:widths[0]+widths[2],width:widths[1]+widths[3]}},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var prel,i2=0,element=this.helper||this.element;for(;i2<this._proportionallyResizeElements.length;i2++){prel=this._proportionallyResizeElements[i2];if(!this.outerDimensions){this.outerDimensions=this._getPaddingPlusBorderDimensions(prel)}prel.css({height:element.height()-this.outerDimensions.height||0,width:element.width()-this.outerDimensions.width||0})}},_renderProxy:function(){var el2=this.element,o=this.options;this.elementOffset=el2.offset();if(this._helper){this.helper=this.helper||$2("<div style='overflow:hidden;'></div>");this._addClass(this.helper,this._helper);this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(event,dx){return{width:this.originalSize.width+dx}},w:function(event,dx){var cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $2.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $2.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $2.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $2.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n2,event){$2.ui.plugin.call(this,n2,[event,this.ui()]);n2!=="resize"&&this._trigger(n2,event,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});$2.ui.plugin.add("resizable","animate",{stop:function(event){var that=$2(this).resizable("instance"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&/textarea/i.test(pr[0].nodeName),soffseth=ista&&that._hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:that.size.width-soffsetw,height:that.size.height-soffseth},left=parseFloat(that.element.css("left"))+(that.position.left-that.originalPosition.left)||null,top=parseFloat(that.element.css("top"))+(that.position.top-that.originalPosition.top)||null;that.element.animate($2.extend(style,top&&left?{top,left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data3={width:parseFloat(that.element.css("width")),height:parseFloat(that.element.css("height")),top:parseFloat(that.element.css("top")),left:parseFloat(that.element.css("left"))};if(pr&&pr.length){$2(pr[0]).css({width:data3.width,height:data3.height})}that._updateCache(data3);that._propagate("resize",event)}})}});$2.ui.plugin.add("resizable","containment",{start:function(){var element,p,co,ch,cw,width,height,that=$2(this).resizable("instance"),o=that.options,el2=that.element,oc=o.containment,ce=oc instanceof $2?oc.get(0):/parent/.test(oc)?el2.parent().get(0):oc;if(!ce){return}that.containerElement=$2(ce);if(/document/.test(oc)||oc===document){that.containerOffset={left:0,top:0};that.containerPosition={left:0,top:0};that.parentData={element:$2(document),left:0,top:0,width:$2(document).width(),height:$2(document).height()||document.body.parentNode.scrollHeight}}else{element=$2(ce);p=[];$2(["Top","Right","Left","Bottom"]).each(function(i2,name){p[i2]=that._num(element.css("padding"+name))});that.containerOffset=element.offset();that.containerPosition=element.position();that.containerSize={height:element.innerHeight()-p[3],width:element.innerWidth()-p[1]};co=that.containerOffset;ch=that.containerSize.height;cw=that.containerSize.width;width=that._hasScroll(ce,"left")?ce.scrollWidth:cw;height=that._hasScroll(ce)?ce.scrollHeight:ch;that.parentData={element:ce,left:co.left,top:co.top,width,height}}},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$2(this).resizable("instance"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement,continueResize=true;if(ce[0]!==document&&/static/.test(ce.css("position"))){cop=co}if(cp.left<(that._helper?co.left:0)){that.size.width=that.size.width+(that._helper?that.position.left-co.left:that.position.left-cop.left);if(pRatio){that.size.height=that.size.width/that.aspectRatio;continueResize=false}that.position.left=o.helper?co.left:0}if(cp.top<(that._helper?co.top:0)){that.size.height=that.size.height+(that._helper?that.position.top-co.top:that.position.top);if(pRatio){that.size.width=that.size.height*that.aspectRatio;continueResize=false}that.position.top=that._helper?co.top:0}isParent=that.containerElement.get(0)===that.element.parent().get(0);isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));if(isParent&&isOffsetRelative){that.offset.left=that.parentData.left+that.position.left;that.offset.top=that.parentData.top+that.position.top}else{that.offset.left=that.element.offset().left;that.offset.top=that.element.offset().top}woset=Math.abs(that.sizeDiff.width+(that._helper?that.offset.left-cop.left:that.offset.left-co.left));hoset=Math.abs(that.sizeDiff.height+(that._helper?that.offset.top-cop.top:that.offset.top-co.top));if(woset+that.size.width>=that.parentData.width){that.size.width=that.parentData.width-woset;if(pRatio){that.size.height=that.size.width/that.aspectRatio;continueResize=false}}if(hoset+that.size.height>=that.parentData.height){that.size.height=that.parentData.height-hoset;if(pRatio){that.size.width=that.size.height*that.aspectRatio;continueResize=false}}if(!continueResize){that.position.left=that.prevPosition.left;that.position.top=that.prevPosition.top;that.size.width=that.prevSize.width;that.size.height=that.prevSize.height}},stop:function(){var that=$2(this).resizable("instance"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$2(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;if(that._helper&&!o.animate&&/relative/.test(ce.css("position"))){$2(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}if(that._helper&&!o.animate&&/static/.test(ce.css("position"))){$2(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}});$2.ui.plugin.add("resizable","alsoResize",{start:function(){var that=$2(this).resizable("instance"),o=that.options;$2(o.alsoResize).each(function(){var el2=$2(this);el2.data("ui-resizable-alsoresize",{width:parseFloat(el2.width()),height:parseFloat(el2.height()),left:parseFloat(el2.css("left")),top:parseFloat(el2.css("top"))})})},resize:function(event,ui){var that=$2(this).resizable("instance"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={height:that.size.height-os.height||0,width:that.size.width-os.width||0,top:that.position.top-op.top||0,left:that.position.left-op.left||0};$2(o.alsoResize).each(function(){var el2=$2(this),start=$2(this).data("ui-resizable-alsoresize"),style={},css=el2.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$2.each(css,function(i2,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null}});el2.css(style)})},stop:function(){$2(this).removeData("ui-resizable-alsoresize")}});$2.ui.plugin.add("resizable","ghost",{start:function(){var that=$2(this).resizable("instance"),cs=that.size;that.ghost=that.originalElement.clone();that.ghost.css({opacity:.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0});that._addClass(that.ghost,"ui-resizable-ghost");if($2.uiBackCompat!==false&&typeof that.options.ghost==="string"){that.ghost.addClass(this.options.ghost)}that.ghost.appendTo(that.helper)},resize:function(){var that=$2(this).resizable("instance");if(that.ghost){that.ghost.css({position:"relative",height:that.size.height,width:that.size.width})}},stop:function(){var that=$2(this).resizable("instance");if(that.ghost&&that.helper){that.helper.get(0).removeChild(that.ghost.get(0))}}});$2.ui.plugin.add("resizable","grid",{resize:function(){var outerDimensions,that=$2(this).resizable("instance"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid=typeof o.grid==="number"?[o.grid,o.grid]:o.grid,gridX=grid[0]||1,gridY=grid[1]||1,ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&o.maxWidth<newWidth,isMaxHeight=o.maxHeight&&o.maxHeight<newHeight,isMinWidth=o.minWidth&&o.minWidth>newWidth,isMinHeight=o.minHeight&&o.minHeight>newHeight;o.grid=grid;if(isMinWidth){newWidth+=gridX}if(isMinHeight){newHeight+=gridY}if(isMaxWidth){newWidth-=gridX}if(isMaxHeight){newHeight-=gridY}if(/^(se|s|e)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight}else if(/^(ne)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.top=op.top-oy}else if(/^(sw)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.left=op.left-ox}else{if(newHeight-gridY<=0||newWidth-gridX<=0){outerDimensions=that._getPaddingPlusBorderDimensions(this)}if(newHeight-gridY>0){that.size.height=newHeight;that.position.top=op.top-oy}else{newHeight=gridY-outerDimensions.height;that.size.height=newHeight;that.position.top=op.top+os.height-newHeight}if(newWidth-gridX>0){that.size.width=newWidth;that.position.left=op.left-ox}else{newWidth=gridX-outerDimensions.width;that.size.width=newWidth;that.position.left=op.left+os.width-newWidth}}}});var widgetsResizable=$2.ui.resizable;/*!
|
|
360
|
+
* jQuery UI Dialog 1.12.1
|
|
361
|
+
* http://jqueryui.com
|
|
362
|
+
*
|
|
363
|
+
* Copyright jQuery Foundation and other contributors
|
|
364
|
+
* Released under the MIT license.
|
|
365
|
+
* http://jquery.org/license
|
|
366
|
+
*/$2.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:true,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:true,closeText:"Close",draggable:true,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(pos){var topOffset=$2(this).css(pos).offset().top;if(topOffset<0){$2(this).css("top",pos.top-topOffset)}}},resizable:true,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},resizableRelatedOptions:{maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");if(this.options.title==null&&this.originalTitle!=null){this.options.title=this.originalTitle}if(this.options.disabled){this.options.disabled=false}this._createWrapper();this.element.show().removeAttr("title").appendTo(this.uiDialog);this._addClass("ui-dialog-content","ui-widget-content");this._createTitlebar();this._createButtonPane();if(this.options.draggable&&$2.fn.draggable){this._makeDraggable()}if(this.options.resizable&&$2.fn.resizable){this._makeResizable()}this._isOpen=false;this._trackFocus()},_init:function(){if(this.options.autoOpen){this.open()}},_appendTo:function(){var element=this.options.appendTo;if(element&&(element.jquery||element.nodeType)){return $2(element)}return this.document.find(element||"body").eq(0)},_destroy:function(){var next,originalPosition=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().css(this.originalCss).detach();this.uiDialog.remove();if(this.originalTitle){this.element.attr("title",this.originalTitle)}next=originalPosition.parent.children().eq(originalPosition.index);if(next.length&&next[0]!==this.element[0]){next.before(this.element)}else{originalPosition.parent.append(this.element)}},widget:function(){return this.uiDialog},disable:$2.noop,enable:$2.noop,close:function(event){var that=this;if(!this._isOpen||this._trigger("beforeClose",event)===false){return}this._isOpen=false;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").trigger("focus").length){$2.ui.safeBlur($2.ui.safeActiveElement(this.document[0]))}this._hide(this.uiDialog,this.options.hide,function(){that._trigger("close",event)})},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(event,silent){var moved=false,zIndices=this.uiDialog.siblings(".ui-front:visible").map(function(){return+$2(this).css("z-index")}).get(),zIndexMax=Math.max.apply(null,zIndices);if(zIndexMax>=+this.uiDialog.css("z-index")){this.uiDialog.css("z-index",zIndexMax+1);moved=true}if(moved&&!silent){this._trigger("focus",event)}return moved},open:function(){var that=this;if(this._isOpen){if(this._moveToTop()){this._focusTabbable()}return}this._isOpen=true;this.opener=$2($2.ui.safeActiveElement(this.document[0]));this._size();this._position();this._createOverlay();this._moveToTop(null,true);if(this.overlay){this.overlay.css("z-index",this.uiDialog.css("z-index")-1)}this._show(this.uiDialog,this.options.show,function(){that._focusTabbable();that._trigger("focus")});this._makeFocusTarget();this._trigger("open")},_focusTabbable:function(){var hasFocus=this._focusedElement;if(!hasFocus){hasFocus=this.element.find("[autofocus]")}if(!hasFocus.length){hasFocus=this.element.find(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialogButtonPane.find(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialogTitlebarClose.filter(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialog}hasFocus.eq(0).trigger("focus")},_keepFocus:function(event){function checkFocus(){var activeElement=$2.ui.safeActiveElement(this.document[0]),isActive=this.uiDialog[0]===activeElement||$2.contains(this.uiDialog[0],activeElement);if(!isActive){this._focusTabbable()}}event.preventDefault();checkFocus.call(this);this._delay(checkFocus)},_createWrapper:function(){this.uiDialog=$2("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front");this._on(this.uiDialog,{keydown:function(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$2.ui.keyCode.ESCAPE){event.preventDefault();this.close(event);return}if(event.keyCode!==$2.ui.keyCode.TAB||event.isDefaultPrevented()){return}var tabbables=this.uiDialog.find(":tabbable"),first=tabbables.filter(":first"),last=tabbables.filter(":last");if((event.target===last[0]||event.target===this.uiDialog[0])&&!event.shiftKey){this._delay(function(){first.trigger("focus")});event.preventDefault()}else if((event.target===first[0]||event.target===this.uiDialog[0])&&event.shiftKey){this._delay(function(){last.trigger("focus")});event.preventDefault()}},mousedown:function(event){if(this._moveToTop(event)){this._focusTabbable()}}});if(!this.element.find("[aria-describedby]").length){this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})}},_createTitlebar:function(){var uiDialogTitle;this.uiDialogTitlebar=$2("<div>");this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix");this._on(this.uiDialogTitlebar,{mousedown:function(event){if(!$2(event.target).closest(".ui-dialog-titlebar-close")){this.uiDialog.trigger("focus")}}});this.uiDialogTitlebarClose=$2("<button type='button'></button>").button({label:$2("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:false}).appendTo(this.uiDialogTitlebar);this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close");this._on(this.uiDialogTitlebarClose,{click:function(event){event.preventDefault();this.close(event)}});uiDialogTitle=$2("<span>").uniqueId().prependTo(this.uiDialogTitlebar);this._addClass(uiDialogTitle,"ui-dialog-title");this._title(uiDialogTitle);this.uiDialogTitlebar.prependTo(this.uiDialog);this.uiDialog.attr({"aria-labelledby":uiDialogTitle.attr("id")})},_title:function(title){if(this.options.title){title.text(this.options.title)}else{title.html(" ")}},_createButtonPane:function(){this.uiDialogButtonPane=$2("<div>");this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix");this.uiButtonSet=$2("<div>").appendTo(this.uiDialogButtonPane);this._addClass(this.uiButtonSet,"ui-dialog-buttonset");this._createButtons()},_createButtons:function(){var that=this,buttons=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();if($2.isEmptyObject(buttons)||$2.isArray(buttons)&&!buttons.length){this._removeClass(this.uiDialog,"ui-dialog-buttons");return}$2.each(buttons,function(name,props2){var click,buttonOptions;props2=$2.isFunction(props2)?{click:props2,text:name}:props2;props2=$2.extend({type:"button"},props2);click=props2.click;buttonOptions={icon:props2.icon,iconPosition:props2.iconPosition,showLabel:props2.showLabel,icons:props2.icons,text:props2.text};delete props2.click;delete props2.icon;delete props2.iconPosition;delete props2.showLabel;delete props2.icons;if(typeof props2.text==="boolean"){delete props2.text}$2("<button></button>",props2).button(buttonOptions).appendTo(that.uiButtonSet).on("click",function(){click.apply(that.element[0],arguments)})});this._addClass(this.uiDialog,"ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){var that=this,options=this.options;function filteredUi(ui){return{position:ui.position,offset:ui.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(event,ui){that._addClass($2(this),"ui-dialog-dragging");that._blockFrames();that._trigger("dragStart",event,filteredUi(ui))},drag:function(event,ui){that._trigger("drag",event,filteredUi(ui))},stop:function(event,ui){var left=ui.offset.left-that.document.scrollLeft(),top=ui.offset.top-that.document.scrollTop();options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window};that._removeClass($2(this),"ui-dialog-dragging");that._unblockFrames();that._trigger("dragStop",event,filteredUi(ui))}})},_makeResizable:function(){var that=this,options=this.options,handles=options.resizable,position2=this.uiDialog.css("position"),resizeHandles=typeof handles==="string"?handles:"n,e,s,w,se,sw,ne,nw";function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){that._addClass($2(this),"ui-dialog-resizing");that._blockFrames();that._trigger("resizeStart",event,filteredUi(ui))},resize:function(event,ui){that._trigger("resize",event,filteredUi(ui))},stop:function(event,ui){var offset=that.uiDialog.offset(),left=offset.left-that.document.scrollLeft(),top=offset.top-that.document.scrollTop();options.height=that.uiDialog.height();options.width=that.uiDialog.width();options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window};that._removeClass($2(this),"ui-dialog-resizing");that._unblockFrames();that._trigger("resizeStop",event,filteredUi(ui))}}).css("position",position2)},_trackFocus:function(){this._on(this.widget(),{focusin:function(event){this._makeFocusTarget();this._focusedElement=$2(event.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var instances=this._trackingInstances(),exists=$2.inArray(this,instances);if(exists!==-1){instances.splice(exists,1)}},_trackingInstances:function(){var instances=this.document.data("ui-dialog-instances");if(!instances){instances=[];this.document.data("ui-dialog-instances",instances)}return instances},_minHeight:function(){var options=this.options;return options.height==="auto"?options.minHeight:Math.min(options.minHeight,options.height)},_position:function(){var isVisible=this.uiDialog.is(":visible");if(!isVisible){this.uiDialog.show()}this.uiDialog.position(this.options.position);if(!isVisible){this.uiDialog.hide()}},_setOptions:function(options){var that=this,resize=false,resizableOptions={};$2.each(options,function(key2,value){that._setOption(key2,value);if(key2 in that.sizeRelatedOptions){resize=true}if(key2 in that.resizableRelatedOptions){resizableOptions[key2]=value}});if(resize){this._size();this._position()}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option",resizableOptions)}},_setOption:function(key2,value){var isDraggable,isResizable,uiDialog=this.uiDialog;if(key2==="disabled"){return}this._super(key2,value);if(key2==="appendTo"){this.uiDialog.appendTo(this._appendTo())}if(key2==="buttons"){this._createButtons()}if(key2==="closeText"){this.uiDialogTitlebarClose.button({label:$2("<a>").text(""+this.options.closeText).html()})}if(key2==="draggable"){isDraggable=uiDialog.is(":data(ui-draggable)");if(isDraggable&&!value){uiDialog.draggable("destroy")}if(!isDraggable&&value){this._makeDraggable()}}if(key2==="position"){this._position()}if(key2==="resizable"){isResizable=uiDialog.is(":data(ui-resizable)");if(isResizable&&!value){uiDialog.resizable("destroy")}if(isResizable&&typeof value==="string"){uiDialog.resizable("option","handles",value)}if(!isResizable&&value!==false){this._makeResizable()}}if(key2==="title"){this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))}},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});if(options.minWidth>options.width){options.width=options.minWidth}nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight();minContentHeight=Math.max(0,options.minHeight-nonContentHeight);maxContentHeight=typeof options.maxHeight==="number"?Math.max(0,options.maxHeight-nonContentHeight):"none";if(options.height==="auto"){this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:"auto"})}else{this.element.height(Math.max(0,options.height-nonContentHeight))}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var iframe=$2(this);return $2("<div>").css({position:"absolute",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_allowInteraction:function(event){if($2(event.target).closest(".ui-dialog").length){return true}return!!$2(event.target).closest(".ui-datepicker").length},_createOverlay:function(){if(!this.options.modal){return}var isOpening=true;this._delay(function(){isOpening=false});if(!this.document.data("ui-dialog-overlays")){this._on(this.document,{focusin:function(event){if(isOpening){return}if(!this._allowInteraction(event)){event.preventDefault();this._trackingInstances()[0]._focusTabbable()}}})}this.overlay=$2("<div>").appendTo(this._appendTo());this._addClass(this.overlay,null,"ui-widget-overlay ui-front");this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)},_destroyOverlay:function(){if(!this.options.modal){return}if(this.overlay){var overlays=this.document.data("ui-dialog-overlays")-1;if(!overlays){this._off(this.document,"focusin");this.document.removeData("ui-dialog-overlays")}else{this.document.data("ui-dialog-overlays",overlays)}this.overlay.remove();this.overlay=null}}});if($2.uiBackCompat!==false){$2.widget("ui.dialog",$2.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super();this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(key2,value){if(key2==="dialogClass"){this.uiDialog.removeClass(this.options.dialogClass).addClass(value)}this._superApply(arguments)}})}var widgetsDialog=$2.ui.dialog;/*!
|
|
367
|
+
* jQuery UI Droppable 1.12.1
|
|
368
|
+
* http://jqueryui.com
|
|
369
|
+
*
|
|
370
|
+
* Copyright jQuery Foundation and other contributors
|
|
371
|
+
* Released under the MIT license.
|
|
372
|
+
* http://jquery.org/license
|
|
373
|
+
*/$2.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:true,greedy:false,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var proportions,o=this.options,accept=o.accept;this.isover=false;this.isout=true;this.accept=$2.isFunction(accept)?accept:function(d){return d.is(accept)};this.proportions=function(){if(arguments.length){proportions=arguments[0]}else{return proportions?proportions:proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}}};this._addToManager(o.scope);o.addClasses&&this._addClass("ui-droppable")},_addToManager:function(scope){$2.ui.ddmanager.droppables[scope]=$2.ui.ddmanager.droppables[scope]||[];$2.ui.ddmanager.droppables[scope].push(this)},_splice:function(drop){var i2=0;for(;i2<drop.length;i2++){if(drop[i2]===this){drop.splice(i2,1)}}},_destroy:function(){var drop=$2.ui.ddmanager.droppables[this.options.scope];this._splice(drop)},_setOption:function(key2,value){if(key2==="accept"){this.accept=$2.isFunction(value)?value:function(d){return d.is(value)}}else if(key2==="scope"){var drop=$2.ui.ddmanager.droppables[this.options.scope];this._splice(drop);this._addToManager(value)}this._super(key2,value)},_activate:function(event){var draggable=$2.ui.ddmanager.current;this._addActiveClass();if(draggable){this._trigger("activate",event,this.ui(draggable))}},_deactivate:function(event){var draggable=$2.ui.ddmanager.current;this._removeActiveClass();if(draggable){this._trigger("deactivate",event,this.ui(draggable))}},_over:function(event){var draggable=$2.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return}if(this.accept.call(this.element[0],draggable.currentItem||draggable.element)){this._addHoverClass();this._trigger("over",event,this.ui(draggable))}},_out:function(event){var draggable=$2.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return}if(this.accept.call(this.element[0],draggable.currentItem||draggable.element)){this._removeHoverClass();this._trigger("out",event,this.ui(draggable))}},_drop:function(event,custom){var draggable=custom||$2.ui.ddmanager.current,childrenIntersection=false;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return false}this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var inst=$2(this).droppable("instance");if(inst.options.greedy&&!inst.options.disabled&&inst.options.scope===draggable.options.scope&&inst.accept.call(inst.element[0],draggable.currentItem||draggable.element)&&intersect(draggable,$2.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance,event)){childrenIntersection=true;return false}});if(childrenIntersection){return false}if(this.accept.call(this.element[0],draggable.currentItem||draggable.element)){this._removeActiveClass();this._removeHoverClass();this._trigger("drop",event,this.ui(draggable));return this.element}return false},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var intersect=$2.ui.intersect=(function(){function isOverAxis(x2,reference,size){return x2>=reference&&x2<reference+size}return function(draggable,droppable,toleranceMode,event){if(!droppable.offset){return false}var x1=(draggable.positionAbs||draggable.position.absolute).left+draggable.margins.left,y1=(draggable.positionAbs||draggable.position.absolute).top+draggable.margins.top,x2=x1+draggable.helperProportions.width,y2=y1+draggable.helperProportions.height,l=droppable.offset.left,t2=droppable.offset.top,r2=l+droppable.proportions().width,b=t2+droppable.proportions().height;switch(toleranceMode){case"fit":return l<=x1&&x2<=r2&&t2<=y1&&y2<=b;case"intersect":return l<x1+draggable.helperProportions.width/2&&x2-draggable.helperProportions.width/2<r2&&t2<y1+draggable.helperProportions.height/2&&y2-draggable.helperProportions.height/2<b;case"pointer":return isOverAxis(event.pageY,t2,droppable.proportions().height)&&isOverAxis(event.pageX,l,droppable.proportions().width);case"touch":return(y1>=t2&&y1<=b||y2>=t2&&y2<=b||y1<t2&&y2>b)&&(x1>=l&&x1<=r2||x2>=l&&x2<=r2||x1<l&&x2>r2);default:return false}}})();$2.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t2,event){var i2,j,m=$2.ui.ddmanager.droppables[t2.options.scope]||[],type2=event?event.type:null,list=(t2.currentItem||t2.element).find(":data(ui-droppable)").addBack();droppablesLoop:for(i2=0;i2<m.length;i2++){if(m[i2].options.disabled||t2&&!m[i2].accept.call(m[i2].element[0],t2.currentItem||t2.element)){continue}for(j=0;j<list.length;j++){if(list[j]===m[i2].element[0]){m[i2].proportions().height=0;continue droppablesLoop}}m[i2].visible=m[i2].element.css("display")!=="none";if(!m[i2].visible){continue}if(type2==="mousedown"){m[i2]._activate.call(m[i2],event)}m[i2].offset=m[i2].element.offset();m[i2].proportions({width:m[i2].element[0].offsetWidth,height:m[i2].element[0].offsetHeight})}},drop:function(draggable,event){var dropped=false;$2.each(($2.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&intersect(draggable,this,this.options.tolerance,event)){dropped=this._drop.call(this,event)||dropped}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)){this.isout=true;this.isover=false;this._deactivate.call(this,event)}});return dropped},dragStart:function(draggable,event){draggable.element.parentsUntil("body").on("scroll.droppable",function(){if(!draggable.options.refreshPositions){$2.ui.ddmanager.prepareOffsets(draggable,event)}})},drag:function(draggable,event){if(draggable.options.refreshPositions){$2.ui.ddmanager.prepareOffsets(draggable,event)}$2.each($2.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var parentInstance,scope,parent2,intersects=intersect(draggable,this,this.options.tolerance,event),c=!intersects&&this.isover?"isout":intersects&&!this.isover?"isover":null;if(!c){return}if(this.options.greedy){scope=this.options.scope;parent2=this.element.parents(":data(ui-droppable)").filter(function(){return $2(this).droppable("instance").options.scope===scope});if(parent2.length){parentInstance=$2(parent2[0]).droppable("instance");parentInstance.greedyChild=c==="isover"}}if(parentInstance&&c==="isover"){parentInstance.isover=false;parentInstance.isout=true;parentInstance._out.call(parentInstance,event)}this[c]=true;this[c==="isout"?"isover":"isout"]=false;this[c==="isover"?"_over":"_out"].call(this,event);if(parentInstance&&c==="isout"){parentInstance.isout=false;parentInstance.isover=true;parentInstance._over.call(parentInstance,event)}})},dragStop:function(draggable,event){draggable.element.parentsUntil("body").off("scroll.droppable");if(!draggable.options.refreshPositions){$2.ui.ddmanager.prepareOffsets(draggable,event)}}};if($2.uiBackCompat!==false){$2.widget("ui.droppable",$2.ui.droppable,{options:{hoverClass:false,activeClass:false},_addActiveClass:function(){this._super();if(this.options.activeClass){this.element.addClass(this.options.activeClass)}},_removeActiveClass:function(){this._super();if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}},_addHoverClass:function(){this._super();if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}},_removeHoverClass:function(){this._super();if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}}})}var widgetsDroppable=$2.ui.droppable;/*!
|
|
374
|
+
* jQuery UI Progressbar 1.12.1
|
|
375
|
+
* http://jqueryui.com
|
|
376
|
+
*
|
|
377
|
+
* Copyright jQuery Foundation and other contributors
|
|
378
|
+
* Released under the MIT license.
|
|
379
|
+
* http://jquery.org/license
|
|
380
|
+
*/var widgetsProgressbar=$2.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.attr({role:"progressbar","aria-valuemin":this.min});this._addClass("ui-progressbar","ui-widget ui-widget-content");this.valueDiv=$2("<div>").appendTo(this.element);this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header");this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow");this.valueDiv.remove()},value:function(newValue){if(newValue===void 0){return this.options.value}this.options.value=this._constrainedValue(newValue);this._refreshValue()},_constrainedValue:function(newValue){if(newValue===void 0){newValue=this.options.value}this.indeterminate=newValue===false;if(typeof newValue!=="number"){newValue=0}return this.indeterminate?false:Math.min(this.options.max,Math.max(this.min,newValue))},_setOptions:function(options){var value=options.value;delete options.value;this._super(options);this.options.value=this._constrainedValue(value);this._refreshValue()},_setOption:function(key2,value){if(key2==="max"){value=Math.max(this.min,value)}this._super(key2,value)},_setOptionDisabled:function(value){this._super(value);this.element.attr("aria-disabled",value);this._toggleClass(null,"ui-state-disabled",!!value)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var value=this.options.value,percentage=this._percentage();this.valueDiv.toggle(this.indeterminate||value>this.min).width(percentage.toFixed(0)+"%");this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,value===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate);if(this.indeterminate){this.element.removeAttr("aria-valuenow");if(!this.overlayDiv){this.overlayDiv=$2("<div>").appendTo(this.valueDiv);this._addClass(this.overlayDiv,"ui-progressbar-overlay")}}else{this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":value});if(this.overlayDiv){this.overlayDiv.remove();this.overlayDiv=null}}if(this.oldValue!==value){this.oldValue=value;this._trigger("change")}if(value===this.options.max){this._trigger("complete")}}});/*!
|
|
381
|
+
* jQuery UI Selectable 1.12.1
|
|
382
|
+
* http://jqueryui.com
|
|
383
|
+
*
|
|
384
|
+
* Copyright jQuery Foundation and other contributors
|
|
385
|
+
* Released under the MIT license.
|
|
386
|
+
* http://jquery.org/license
|
|
387
|
+
*/var widgetsSelectable=$2.widget("ui.selectable",$2.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var that=this;this._addClass("ui-selectable");this.dragged=false;this.refresh=function(){that.elementPos=$2(that.element[0]).offset();that.selectees=$2(that.options.filter,that.element[0]);that._addClass(that.selectees,"ui-selectee");that.selectees.each(function(){var $this=$2(this),selecteeOffset=$this.offset(),pos={left:selecteeOffset.left-that.elementPos.left,top:selecteeOffset.top-that.elementPos.top};$2.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})};this.refresh();this._mouseInit();this.helper=$2("<div>");this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item");this._mouseDestroy()},_mouseStart:function(event){var that=this,options=this.options;this.opos=[event.pageX,event.pageY];this.elementPos=$2(this.element[0]).offset();if(this.options.disabled){return}this.selectees=$2(options.filter,this.element[0]);this._trigger("start",event);$2(options.appendTo).append(this.helper);this.helper.css({"left":event.pageX,"top":event.pageY,"width":0,"height":0});if(options.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var selectee=$2.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey&&!event.ctrlKey){that._removeClass(selectee.$element,"ui-selected");selectee.selected=false;that._addClass(selectee.$element,"ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element})}});$2(event.target).parents().addBack().each(function(){var doSelect,selectee=$2.data(this,"selectable-item");if(selectee){doSelect=!event.metaKey&&!event.ctrlKey||!selectee.$element.hasClass("ui-selected");that._removeClass(selectee.$element,doSelect?"ui-unselecting":"ui-selected")._addClass(selectee.$element,doSelect?"ui-selecting":"ui-unselecting");selectee.unselecting=!doSelect;selectee.selecting=doSelect;selectee.selected=doSelect;if(doSelect){that._trigger("selecting",event,{selecting:selectee.element})}else{that._trigger("unselecting",event,{unselecting:selectee.element})}return false}})},_mouseDrag:function(event){this.dragged=true;if(this.options.disabled){return}var tmp,that=this,options=this.options,x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){tmp=x2;x2=x1;x1=tmp}if(y1>y2){tmp=y2;y2=y1;y1=tmp}this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$2.data(this,"selectable-item"),hit=false,offset={};if(!selectee||selectee.element===that.element[0]){return}offset.left=selectee.left+that.elementPos.left;offset.right=selectee.right+that.elementPos.left;offset.top=selectee.top+that.elementPos.top;offset.bottom=selectee.bottom+that.elementPos.top;if(options.tolerance==="touch"){hit=!(offset.left>x2||offset.right<x1||offset.top>y2||offset.bottom<y1)}else if(options.tolerance==="fit"){hit=offset.left>x1&&offset.right<x2&&offset.top>y1&&offset.bottom<y2}if(hit){if(selectee.selected){that._removeClass(selectee.$element,"ui-selected");selectee.selected=false}if(selectee.unselecting){that._removeClass(selectee.$element,"ui-unselecting");selectee.unselecting=false}if(!selectee.selecting){that._addClass(selectee.$element,"ui-selecting");selectee.selecting=true;that._trigger("selecting",event,{selecting:selectee.element})}}else{if(selectee.selecting){if((event.metaKey||event.ctrlKey)&&selectee.startselected){that._removeClass(selectee.$element,"ui-selecting");selectee.selecting=false;that._addClass(selectee.$element,"ui-selected");selectee.selected=true}else{that._removeClass(selectee.$element,"ui-selecting");selectee.selecting=false;if(selectee.startselected){that._addClass(selectee.$element,"ui-unselecting");selectee.unselecting=true}that._trigger("unselecting",event,{unselecting:selectee.element})}}if(selectee.selected){if(!event.metaKey&&!event.ctrlKey&&!selectee.startselected){that._removeClass(selectee.$element,"ui-selected");selectee.selected=false;that._addClass(selectee.$element,"ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element})}}}});return false},_mouseStop:function(event){var that=this;this.dragged=false;$2(".ui-unselecting",this.element[0]).each(function(){var selectee=$2.data(this,"selectable-item");that._removeClass(selectee.$element,"ui-unselecting");selectee.unselecting=false;selectee.startselected=false;that._trigger("unselected",event,{unselected:selectee.element})});$2(".ui-selecting",this.element[0]).each(function(){var selectee=$2.data(this,"selectable-item");that._removeClass(selectee.$element,"ui-selecting")._addClass(selectee.$element,"ui-selected");selectee.selecting=false;selectee.selected=true;selectee.startselected=true;that._trigger("selected",event,{selected:selectee.element})});this._trigger("stop",event);this.helper.remove();return false}});/*!
|
|
388
|
+
* jQuery UI Selectmenu 1.12.1
|
|
389
|
+
* http://jqueryui.com
|
|
390
|
+
*
|
|
391
|
+
* Copyright jQuery Foundation and other contributors
|
|
392
|
+
* Released under the MIT license.
|
|
393
|
+
* http://jquery.org/license
|
|
394
|
+
*/var widgetsSelectmenu=$2.widget("ui.selectmenu",[$2.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:false,change:null,close:null,focus:null,open:null,select:null},_create:function(){var selectmenuId=this.element.uniqueId().attr("id");this.ids={element:selectmenuId,button:selectmenuId+"-button",menu:selectmenuId+"-menu"};this._drawButton();this._drawMenu();this._bindFormResetHandler();this._rendered=false;this.menuItems=$2()},_drawButton:function(){var icon,that=this,item=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button);this._on(this.labels,{click:function(event){this.button.focus();event.preventDefault()}});this.element.hide();this.button=$2("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element);this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget");icon=$2("<span>").appendTo(this.button);this._addClass(icon,"ui-selectmenu-icon","ui-icon "+this.options.icons.button);this.buttonItem=this._renderButtonItem(item).appendTo(this.button);if(this.options.width!==false){this._resizeButton()}this._on(this.button,this._buttonEvents);this.button.one("focusin",function(){if(!that._rendered){that._refreshMenu()}})},_drawMenu:function(){var that=this;this.menu=$2("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu});this.menuWrap=$2("<div>").append(this.menu);this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front");this.menuWrap.appendTo(this._appendTo());this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(event,ui){event.preventDefault();that._setSelection();that._select(ui.item.data("ui-selectmenu-item"),event)},focus:function(event,ui){var item=ui.item.data("ui-selectmenu-item");if(that.focusIndex!=null&&item.index!==that.focusIndex){that._trigger("focus",event,{item});if(!that.isOpen){that._select(item,event)}}that.focusIndex=item.index;that.button.attr("aria-activedescendant",that.menuItems.eq(item.index).attr("id"))}}).menu("instance");this.menuInstance._off(this.menu,"mouseleave");this.menuInstance._closeOnDocumentClick=function(){return false};this.menuInstance._isDivider=function(){return false}},refresh:function(){this._refreshMenu();this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{}));if(this.options.width===null){this._resizeButton()}},_refreshMenu:function(){var item,options=this.element.find("option");this.menu.empty();this._parseOptions(options);this._renderMenu(this.menu,this.items);this.menuInstance.refresh();this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper");this._rendered=true;if(!options.length){return}item=this._getSelectedItem();this.menuInstance.focus(null,item);this._setAria(item.data("ui-selectmenu-item"));this._setOption("disabled",this.element.prop("disabled"))},open:function(event){if(this.options.disabled){return}if(!this._rendered){this._refreshMenu()}else{this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active");this.menuInstance.focus(null,this._getSelectedItem())}if(!this.menuItems.length){return}this.isOpen=true;this._toggleAttr();this._resizeMenu();this._position();this._on(this.document,this._documentClick);this._trigger("open",event)},_position:function(){this.menuWrap.position($2.extend({of:this.button},this.options.position))},close:function(event){if(!this.isOpen){return}this.isOpen=false;this._toggleAttr();this.range=null;this._off(this.document);this._trigger("close",event)},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(item){var buttonItem=$2("<span>");this._setText(buttonItem,item.label);this._addClass(buttonItem,"ui-selectmenu-text");return buttonItem},_renderMenu:function(ul,items){var that=this,currentOptgroup="";$2.each(items,function(index2,item){var li;if(item.optgroup!==currentOptgroup){li=$2("<li>",{text:item.optgroup});that._addClass(li,"ui-selectmenu-optgroup","ui-menu-divider"+(item.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""));li.appendTo(ul);currentOptgroup=item.optgroup}that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-selectmenu-item",item)},_renderItem:function(ul,item){var li=$2("<li>"),wrapper=$2("<div>",{title:item.element.attr("title")});if(item.disabled){this._addClass(li,null,"ui-state-disabled")}this._setText(wrapper,item.label);return li.append(wrapper).appendTo(ul)},_setText:function(element,value){if(value){element.text(value)}else{element.html(" ")}},_move:function(direction,event){var item,next,filter=".ui-menu-item";if(this.isOpen){item=this.menuItems.eq(this.focusIndex).parent("li")}else{item=this.menuItems.eq(this.element[0].selectedIndex).parent("li");filter+=":not(.ui-state-disabled)"}if(direction==="first"||direction==="last"){next=item[direction==="first"?"prevAll":"nextAll"](filter).eq(-1)}else{next=item[direction+"All"](filter).eq(0)}if(next.length){this.menuInstance.focus(event,next)}},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(event){this[this.isOpen?"close":"open"](event)},_setSelection:function(){var selection;if(!this.range){return}if(window.getSelection){selection=window.getSelection();selection.removeAllRanges();selection.addRange(this.range)}else{this.range.select()}this.button.focus()},_documentClick:{mousedown:function(event){if(!this.isOpen){return}if(!$2(event.target).closest(".ui-selectmenu-menu, #"+$2.ui.escapeSelector(this.ids.button)).length){this.close(event)}}},_buttonEvents:{mousedown:function(){var selection;if(window.getSelection){selection=window.getSelection();if(selection.rangeCount){this.range=selection.getRangeAt(0)}}else{this.range=document.selection.createRange()}},click:function(event){this._setSelection();this._toggle(event)},keydown:function(event){var preventDefault=true;switch(event.keyCode){case $2.ui.keyCode.TAB:case $2.ui.keyCode.ESCAPE:this.close(event);preventDefault=false;break;case $2.ui.keyCode.ENTER:if(this.isOpen){this._selectFocusedItem(event)}break;case $2.ui.keyCode.UP:if(event.altKey){this._toggle(event)}else{this._move("prev",event)}break;case $2.ui.keyCode.DOWN:if(event.altKey){this._toggle(event)}else{this._move("next",event)}break;case $2.ui.keyCode.SPACE:if(this.isOpen){this._selectFocusedItem(event)}else{this._toggle(event)}break;case $2.ui.keyCode.LEFT:this._move("prev",event);break;case $2.ui.keyCode.RIGHT:this._move("next",event);break;case $2.ui.keyCode.HOME:case $2.ui.keyCode.PAGE_UP:this._move("first",event);break;case $2.ui.keyCode.END:case $2.ui.keyCode.PAGE_DOWN:this._move("last",event);break;default:this.menu.trigger(event);preventDefault=false}if(preventDefault){event.preventDefault()}}},_selectFocusedItem:function(event){var item=this.menuItems.eq(this.focusIndex).parent("li");if(!item.hasClass("ui-state-disabled")){this._select(item.data("ui-selectmenu-item"),event)}},_select:function(item,event){var oldIndex=this.element[0].selectedIndex;this.element[0].selectedIndex=item.index;this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(item));this._setAria(item);this._trigger("select",event,{item});if(item.index!==oldIndex){this._trigger("change",event,{item})}this.close(event)},_setAria:function(item){var id2=this.menuItems.eq(item.index).attr("id");this.button.attr({"aria-labelledby":id2,"aria-activedescendant":id2});this.menu.attr("aria-activedescendant",id2)},_setOption:function(key2,value){if(key2==="icons"){var icon=this.button.find("span.ui-icon");this._removeClass(icon,null,this.options.icons.button)._addClass(icon,null,value.button)}this._super(key2,value);if(key2==="appendTo"){this.menuWrap.appendTo(this._appendTo())}if(key2==="width"){this._resizeButton()}},_setOptionDisabled:function(value){this._super(value);this.menuInstance.option("disabled",value);this.button.attr("aria-disabled",value);this._toggleClass(this.button,null,"ui-state-disabled",value);this.element.prop("disabled",value);if(value){this.button.attr("tabindex",-1);this.close()}else{this.button.attr("tabindex",0)}},_appendTo:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$2(element):this.document.find(element).eq(0)}if(!element||!element[0]){element=this.element.closest(".ui-front, dialog")}if(!element.length){element=this.document[0].body}return element},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen);this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen);this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var width=this.options.width;if(width===false){this.button.css("width","");return}if(width===null){width=this.element.show().outerWidth();this.element.hide()}this.button.outerWidth(width)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var options=this._super();options.disabled=this.element.prop("disabled");return options},_parseOptions:function(options){var that=this,data3=[];options.each(function(index2,item){data3.push(that._parseOption($2(item),index2))});this.items=data3},_parseOption:function(option,index2){var optgroup=option.parent("optgroup");return{element:option,index:index2,value:option.val(),label:option.text(),optgroup:optgroup.attr("label")||"",disabled:optgroup.prop("disabled")||option.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler();this.menuWrap.remove();this.button.remove();this.element.show();this.element.removeUniqueId();this.labels.attr("for",this.ids.element)}}]);/*!
|
|
395
|
+
* jQuery UI Slider 1.12.1
|
|
396
|
+
* http://jqueryui.com
|
|
397
|
+
*
|
|
398
|
+
* Copyright jQuery Foundation and other contributors
|
|
399
|
+
* Released under the MIT license.
|
|
400
|
+
* http://jquery.org/license
|
|
401
|
+
*/var widgetsSlider=$2.widget("ui.slider",$2.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:false,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this._calculateNewMax();this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content");this._refresh();this._animateOff=false},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var i2,handleCount,options=this.options,existingHandles=this.element.find(".ui-slider-handle"),handle="<span tabindex='0'></span>",handles=[];handleCount=options.values&&options.values.length||1;if(existingHandles.length>handleCount){existingHandles.slice(handleCount).remove();existingHandles=existingHandles.slice(0,handleCount)}for(i2=existingHandles.length;i2<handleCount;i2++){handles.push(handle)}this.handles=existingHandles.add($2(handles.join("")).appendTo(this.element));this._addClass(this.handles,"ui-slider-handle","ui-state-default");this.handle=this.handles.eq(0);this.handles.each(function(i3){$2(this).data("ui-slider-handle-index",i3).attr("tabIndex",0)})},_createRange:function(){var options=this.options;if(options.range){if(options.range===true){if(!options.values){options.values=[this._valueMin(),this._valueMin()]}else if(options.values.length&&options.values.length!==2){options.values=[options.values[0],options.values[0]]}else if($2.isArray(options.values)){options.values=options.values.slice(0)}}if(!this.range||!this.range.length){this.range=$2("<div>").appendTo(this.element);this._addClass(this.range,"ui-slider-range")}else{this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max");this.range.css({"left":"","bottom":""})}if(options.range==="min"||options.range==="max"){this._addClass(this.range,"ui-slider-range-"+options.range)}}else{if(this.range){this.range.remove()}this.range=null}},_setupEvents:function(){this._off(this.handles);this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)},_destroy:function(){this.handles.remove();if(this.range){this.range.remove()}this._mouseDestroy()},_mouseCapture:function(event){var position2,normValue,distance,closestHandle,index2,allowed,offset,mouseOverHandle,that=this,o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();position2={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position2);distance=this._valueMax()-this._valueMin()+1;this.handles.each(function(i2){var thisDistance=Math.abs(normValue-that.values(i2));if(distance>thisDistance||distance===thisDistance&&(i2===that._lastChangedValue||that.values(i2)===o.min)){distance=thisDistance;closestHandle=$2(this);index2=i2}});allowed=this._start(event,index2);if(allowed===false){return false}this._mouseSliding=true;this._handleIndex=index2;this._addClass(closestHandle,null,"ui-state-active");closestHandle.trigger("focus");offset=closestHandle.offset();mouseOverHandle=!$2(event.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-closestHandle.width()/2,top:event.pageY-offset.top-closestHandle.height()/2-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(event,index2,normValue)}this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(event){var position2={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position2);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this._removeClass(this.handles,null,"ui-state-active");this._mouseSliding=false;this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position2){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;if(this.orientation==="horizontal"){pixelTotal=this.elementSize.width;pixelMouse=position2.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position2.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}percentMouse=pixelMouse/pixelTotal;if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if(this.orientation==="vertical"){percentMouse=1-percentMouse}valueTotal=this._valueMax()-this._valueMin();valueMouse=this._valueMin()+percentMouse*valueTotal;return this._trimAlignValue(valueMouse)},_uiHash:function(index2,value,values){var uiHash={handle:this.handles[index2],handleIndex:index2,value:value!==void 0?value:this.value()};if(this._hasMultipleValues()){uiHash.value=value!==void 0?value:this.values(index2);uiHash.values=values||this.values()}return uiHash},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(event,index2){return this._trigger("start",event,this._uiHash(index2))},_slide:function(event,index2,newVal){var allowed,otherVal,currentValue=this.value(),newValues=this.values();if(this._hasMultipleValues()){otherVal=this.values(index2?0:1);currentValue=this.values(index2);if(this.options.values.length===2&&this.options.range===true){newVal=index2===0?Math.min(otherVal,newVal):Math.max(otherVal,newVal)}newValues[index2]=newVal}if(newVal===currentValue){return}allowed=this._trigger("slide",event,this._uiHash(index2,newVal,newValues));if(allowed===false){return}if(this._hasMultipleValues()){this.values(index2,newVal)}else{this.value(newVal)}},_stop:function(event,index2){this._trigger("stop",event,this._uiHash(index2))},_change:function(event,index2){if(!this._keySliding&&!this._mouseSliding){this._lastChangedValue=index2;this._trigger("change",event,this._uiHash(index2))}},value:function(newValue){if(arguments.length){this.options.value=this._trimAlignValue(newValue);this._refreshValue();this._change(null,0);return}return this._value()},values:function(index2,newValue){var vals,newValues,i2;if(arguments.length>1){this.options.values[index2]=this._trimAlignValue(newValue);this._refreshValue();this._change(null,index2);return}if(arguments.length){if($2.isArray(arguments[0])){vals=this.options.values;newValues=arguments[0];for(i2=0;i2<vals.length;i2+=1){vals[i2]=this._trimAlignValue(newValues[i2]);this._change(null,i2)}this._refreshValue()}else{if(this._hasMultipleValues()){return this._values(index2)}else{return this.value()}}}else{return this._values()}},_setOption:function(key2,value){var i2,valsLength=0;if(key2==="range"&&this.options.range===true){if(value==="min"){this.options.value=this._values(0);this.options.values=null}else if(value==="max"){this.options.value=this._values(this.options.values.length-1);this.options.values=null}}if($2.isArray(this.options.values)){valsLength=this.options.values.length}this._super(key2,value);switch(key2){case"orientation":this._detectOrientation();this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation);this._refreshValue();if(this.options.range){this._refreshRange(value)}this.handles.css(value==="horizontal"?"bottom":"left","");break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(i2=valsLength-1;i2>=0;i2--){this._change(null,i2)}this._animateOff=false;break;case"step":case"min":case"max":this._animateOff=true;this._calculateNewMax();this._refreshValue();this._animateOff=false;break;case"range":this._animateOff=true;this._refresh();this._animateOff=false;break}},_setOptionDisabled:function(value){this._super(value);this._toggleClass(null,"ui-state-disabled",!!value)},_value:function(){var val2=this.options.value;val2=this._trimAlignValue(val2);return val2},_values:function(index2){var val2,vals,i2;if(arguments.length){val2=this.options.values[index2];val2=this._trimAlignValue(val2);return val2}else if(this._hasMultipleValues()){vals=this.options.values.slice();for(i2=0;i2<vals.length;i2+=1){vals[i2]=this._trimAlignValue(vals[i2])}return vals}else{return[]}},_trimAlignValue:function(val2){if(val2<=this._valueMin()){return this._valueMin()}if(val2>=this._valueMax()){return this._valueMax()}var step=this.options.step>0?this.options.step:1,valModStep=(val2-this._valueMin())%step,alignValue=val2-valModStep;if(Math.abs(valModStep)*2>=step){alignValue+=valModStep>0?step:-step}return parseFloat(alignValue.toFixed(5))},_calculateNewMax:function(){var max=this.options.max,min=this._valueMin(),step=this.options.step,aboveMin=Math.round((max-min)/step)*step;max=aboveMin+min;if(max>this.options.max){max-=step}this.max=parseFloat(max.toFixed(this._precision()))},_precision:function(){var precision=this._precisionOf(this.options.step);if(this.options.min!==null){precision=Math.max(precision,this._precisionOf(this.options.min))}return precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(orientation){if(orientation==="vertical"){this.range.css({"width":"","left":""})}if(orientation==="horizontal"){this.range.css({"height":"","bottom":""})}},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=!this._animateOff?o.animate:false,_set={};if(this._hasMultipleValues()){this.handles.each(function(i2){valPercent=(that.values(i2)-that._valueMin())/(that._valueMax()-that._valueMin())*100;_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";$2(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(that.options.range===true){if(that.orientation==="horizontal"){if(i2===0){that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate)}if(i2===1){that.range[animate?"animate":"css"]({width:valPercent-lastValPercent+"%"},{queue:false,duration:o.animate})}}else{if(i2===0){that.range.stop(1,1)[animate?"animate":"css"]({bottom:valPercent+"%"},o.animate)}if(i2===1){that.range[animate?"animate":"css"]({height:valPercent-lastValPercent+"%"},{queue:false,duration:o.animate})}}}lastValPercent=valPercent})}else{value=this.value();valueMin=this._valueMin();valueMax=this._valueMax();valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);if(oRange==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:100-valPercent+"%"},o.animate)}if(oRange==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:100-valPercent+"%"},o.animate)}}},_handleEvents:{keydown:function(event){var allowed,curVal,newVal,step,index2=$2(event.target).data("ui-slider-handle-index");switch(event.keyCode){case $2.ui.keyCode.HOME:case $2.ui.keyCode.END:case $2.ui.keyCode.PAGE_UP:case $2.ui.keyCode.PAGE_DOWN:case $2.ui.keyCode.UP:case $2.ui.keyCode.RIGHT:case $2.ui.keyCode.DOWN:case $2.ui.keyCode.LEFT:event.preventDefault();if(!this._keySliding){this._keySliding=true;this._addClass($2(event.target),null,"ui-state-active");allowed=this._start(event,index2);if(allowed===false){return}}break}step=this.options.step;if(this._hasMultipleValues()){curVal=newVal=this.values(index2)}else{curVal=newVal=this.value()}switch(event.keyCode){case $2.ui.keyCode.HOME:newVal=this._valueMin();break;case $2.ui.keyCode.END:newVal=this._valueMax();break;case $2.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+(this._valueMax()-this._valueMin())/this.numPages);break;case $2.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-(this._valueMax()-this._valueMin())/this.numPages);break;case $2.ui.keyCode.UP:case $2.ui.keyCode.RIGHT:if(curVal===this._valueMax()){return}newVal=this._trimAlignValue(curVal+step);break;case $2.ui.keyCode.DOWN:case $2.ui.keyCode.LEFT:if(curVal===this._valueMin()){return}newVal=this._trimAlignValue(curVal-step);break}this._slide(event,index2,newVal)},keyup:function(event){var index2=$2(event.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(event,index2);this._change(event,index2);this._removeClass($2(event.target),null,"ui-state-active")}}}});/*!
|
|
402
|
+
* jQuery UI Sortable 1.12.1
|
|
403
|
+
* http://jqueryui.com
|
|
404
|
+
*
|
|
405
|
+
* Copyright jQuery Foundation and other contributors
|
|
406
|
+
* Released under the MIT license.
|
|
407
|
+
* http://jquery.org/license
|
|
408
|
+
*/var widgetsSortable=$2.widget("ui.sortable",$2.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(x2,reference,size){return x2>=reference&&x2<reference+size},_isFloating:function(item){return/left|right/.test(item.css("float"))||/inline|table-cell/.test(item.css("display"))},_create:function(){this.containerCache={};this._addClass("ui-sortable");this.refresh();this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=true},_setOption:function(key2,value){this._super(key2,value);if(key2==="handle"){this._setHandleClassName()}},_setHandleClassName:function(){var that=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");$2.each(this.items,function(){that._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var i2=this.items.length-1;i2>=0;i2--){this.items[i2].item.removeData(this.widgetName+"-item")}return this},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=false,that=this;if(this.reverting){return false}if(this.options.disabled||this.options.type==="static"){return false}this._refreshItems(event);$2(event.target).parents().each(function(){if($2.data(this,that.widgetName+"-item")===that){currentItem=$2(this);return false}});if($2.data(event.target,that.widgetName+"-item")===that){currentItem=$2(event.target)}if(!currentItem){return false}if(this.options.handle&&!overrideHandle){$2(this.options.handle,currentItem).find("*").addBack().each(function(){if(this===event.target){validHandle=true}});if(!validHandle){return false}}this.currentItem=currentItem;this._removeCurrentsFromItems();return true},_mouseStart:function(event,overrideHandle,noActivation){var i2,body,o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$2.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(o.containment){this._setContainment()}if(o.cursor&&o.cursor!=="auto"){body=this.document.find("body");this.storedCursor=body.css("cursor");body.css("cursor",o.cursor);this.storedStylesheet=$2("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(body)}if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",o.opacity)}if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",o.zIndex)}if(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0].tagName!=="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!noActivation){for(i2=this.containers.length-1;i2>=0;i2--){this.containers[i2]._trigger("activate",event,this._uiHash(this))}}if($2.ui.ddmanager){$2.ui.ddmanager.current=this}if($2.ui.ddmanager&&!o.dropBehaviour){$2.ui.ddmanager.prepareOffsets(this,event)}this.dragging=true;this._addClass(this.helper,"ui-sortable-helper");this._mouseDrag(event);return true},_mouseDrag:function(event){var i2,item,itemElement,intersection,o=this.options,scrolled=false;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){if(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0].tagName!=="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed}else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed}else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed}}else{if(event.pageY-this.document.scrollTop()<o.scrollSensitivity){scrolled=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed)}else if(this.window.height()-(event.pageY-this.document.scrollTop())<o.scrollSensitivity){scrolled=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)}if(event.pageX-this.document.scrollLeft()<o.scrollSensitivity){scrolled=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed)}else if(this.window.width()-(event.pageX-this.document.scrollLeft())<o.scrollSensitivity){scrolled=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed)}}if(scrolled!==false&&$2.ui.ddmanager&&!o.dropBehaviour){$2.ui.ddmanager.prepareOffsets(this,event)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=this.position.top+"px"}for(i2=this.items.length-1;i2>=0;i2--){item=this.items[i2];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue}if(item.instance!==this.currentContainer){continue}if(itemElement!==this.currentItem[0]&&this.placeholder[intersection===1?"next":"prev"]()[0]!==itemElement&&!$2.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$2.contains(this.element[0],itemElement):true)){this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item)}else{break}this._trigger("change",event,this._uiHash());break}}this._contactContainers(event);if($2.ui.ddmanager){$2.ui.ddmanager.drag(this,event)}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(event,noPropagation){if(!event){return}if($2.ui.ddmanager&&!this.options.dropBehaviour){$2.ui.ddmanager.drop(this,event)}if(this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};if(!axis||axis==="x"){animation.left=cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)}if(!axis||axis==="y"){animation.top=cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)}this.reverting=true;$2(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event)})}else{this._clear(event,noPropagation)}return false},cancel:function(){if(this.dragging){this._mouseUp(new $2.Event("mouseup",{target:null}));if(this.options.helper==="original"){this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper")}else{this.currentItem.show()}for(var i2=this.containers.length-1;i2>=0;i2--){this.containers[i2]._trigger("deactivate",null,this._uiHash(this));if(this.containers[i2].containerCache.over){this.containers[i2]._trigger("out",null,this._uiHash(this));this.containers[i2].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}$2.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$2(this.domPosition.prev).after(this.currentItem)}else{$2(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];o=o||{};$2(items).each(function(){var res=($2(o.item||this).attr(o.attribute||"id")||"").match(o.expression||/(.+)[\-=_](.+)/);if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}});if(!str.length&&o.key){str.push(o.key+"=")}return str.join("&")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];o=o||{};items.each(function(){ret.push($2(o.item||this).attr(o.attribute||"id")||"")});return ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r2=l+item.width,t2=item.top,b=t2+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElementHeight=this.options.axis==="x"||y1+dyClick>t2&&y1+dyClick<b,isOverElementWidth=this.options.axis==="y"||x1+dxClick>l&&x1+dxClick<r2,isOverElement=isOverElementHeight&&isOverElementWidth;if(this.options.tolerance==="pointer"||this.options.forcePointerForContainers||this.options.tolerance!=="pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"]){return isOverElement}else{return l<x1+this.helperProportions.width/2&&x2-this.helperProportions.width/2<r2&&t2<y1+this.helperProportions.height/2&&y2-this.helperProportions.height/2<b}},_intersectsWithPointer:function(item){var verticalDirection,horizontalDirection,isOverElementHeight=this.options.axis==="x"||this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=this.options.axis==="y"||this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth;if(!isOverElement){return false}verticalDirection=this._getDragVerticalDirection();horizontalDirection=this._getDragHorizontalDirection();return this.floating?horizontalDirection==="right"||verticalDirection==="down"?2:1:verticalDirection&&(verticalDirection==="down"?2:1)},_intersectsWithSides:function(item){var isOverBottomHalf=this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+item.height/2,item.height),isOverRightHalf=this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+item.width/2,item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return horizontalDirection==="right"&&isOverRightHalf||horizontalDirection==="left"&&!isOverRightHalf}else{return verticalDirection&&(verticalDirection==="down"&&isOverBottomHalf||verticalDirection==="up"&&!isOverBottomHalf)}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!==0&&(delta>0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!==0&&(delta>0?"right":"left")},refresh:function(event){this._refreshItems(event);this._setHandleClassName();this.refreshPositions();return this},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){var i2,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected){for(i2=connectWith.length-1;i2>=0;i2--){cur=$2(connectWith[i2],this.document[0]);for(j=cur.length-1;j>=0;j--){inst=$2.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$2.isFunction(inst.options.items)?inst.options.items.call(inst.element):$2(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),inst])}}}}queries.push([$2.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$2(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);function addItems(){items.push(this)}for(i2=queries.length-1;i2>=0;i2--){queries[i2][0].each(addItems)}return $2(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$2.grep(this.items,function(item){for(var j=0;j<list.length;j++){if(list[j]===item.item[0]){return false}}return true})},_refreshItems:function(event){this.items=[];this.containers=[this];var i2,j,cur,inst,targetData,_queries,item,queriesLength,items=this.items,queries=[[$2.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$2(this.options.items,this.element),this]],connectWith=this._connectWith();if(connectWith&&this.ready){for(i2=connectWith.length-1;i2>=0;i2--){cur=$2(connectWith[i2],this.document[0]);for(j=cur.length-1;j>=0;j--){inst=$2.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$2.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$2(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}}for(i2=queries.length-1;i2>=0;i2--){targetData=queries[i2][1];_queries=queries[i2][0];for(j=0,queriesLength=_queries.length;j<queriesLength;j++){item=$2(_queries[j]);item.data(this.widgetName+"-item",targetData);items.push({item,instance:targetData,width:0,height:0,left:0,top:0})}}},refreshPositions:function(fast){this.floating=this.items.length?this.options.axis==="x"||this._isFloating(this.items[0].item):false;if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}var i2,item,t2,p;for(i2=this.items.length-1;i2>=0;i2--){item=this.items[i2];if(item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]){continue}t2=this.options.toleranceElement?$2(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t2.outerWidth();item.height=t2.outerHeight()}p=t2.offset();item.left=p.left;item.top=p.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(i2=this.containers.length-1;i2>=0;i2--){p=this.containers[i2].element.offset();this.containers[i2].containerCache.left=p.left;this.containers[i2].containerCache.top=p.top;this.containers[i2].containerCache.width=this.containers[i2].element.outerWidth();this.containers[i2].containerCache.height=this.containers[i2].element.outerHeight()}}return this},_createPlaceholder:function(that){that=that||this;var className,o=that.options;if(!o.placeholder||o.placeholder.constructor===String){className=o.placeholder;o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$2("<"+nodeName+">",that.document[0]);that._addClass(element,"ui-sortable-placeholder",className||that.currentItem[0].className)._removeClass(element,"ui-sortable-helper");if(nodeName==="tbody"){that._createTrPlaceholder(that.currentItem.find("tr").eq(0),$2("<tr>",that.document[0]).appendTo(element))}else if(nodeName==="tr"){that._createTrPlaceholder(that.currentItem,element)}else if(nodeName==="img"){element.attr("src",that.currentItem.attr("src"))}if(!className){element.css("visibility","hidden")}return element},update:function(container,p){if(className&&!o.forcePlaceholderSize){return}if(!p.height()){p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css("paddingTop")||0,10)-parseInt(that.currentItem.css("paddingBottom")||0,10))}if(!p.width()){p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css("paddingLeft")||0,10)-parseInt(that.currentItem.css("paddingRight")||0,10))}}}}that.placeholder=$2(o.placeholder.element.call(that.element,that.currentItem));that.currentItem.after(that.placeholder);o.placeholder.update(that,that.placeholder)},_createTrPlaceholder:function(sourceTr,targetTr){var that=this;sourceTr.children().each(function(){$2("<td> </td>",that.document[0]).attr("colspan",$2(this).attr("colspan")||1).appendTo(targetTr)})},_contactContainers:function(event){var i2,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,floating,axis,innermostContainer=null,innermostIndex=null;for(i2=this.containers.length-1;i2>=0;i2--){if($2.contains(this.currentItem[0],this.containers[i2].element[0])){continue}if(this._intersectsWith(this.containers[i2].containerCache)){if(innermostContainer&&$2.contains(this.containers[i2].element[0],innermostContainer.element[0])){continue}innermostContainer=this.containers[i2];innermostIndex=i2}else{if(this.containers[i2].containerCache.over){this.containers[i2]._trigger("out",event,this._uiHash(this));this.containers[i2].containerCache.over=0}}}if(!innermostContainer){return}if(this.containers.length===1){if(!this.containers[innermostIndex].containerCache.over){this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1}}else{dist=1e4;itemWithLeastDistance=null;floating=innermostContainer.floating||this._isFloating(this.currentItem);posProperty=floating?"left":"top";sizeProperty=floating?"width":"height";axis=floating?"pageX":"pageY";for(j=this.items.length-1;j>=0;j--){if(!$2.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])){continue}if(this.items[j].item[0]===this.currentItem[0]){continue}cur=this.items[j].item.offset()[posProperty];nearBottom=false;if(event[axis]-cur>this.items[j][sizeProperty]/2){nearBottom=true}if(Math.abs(event[axis]-cur)<dist){dist=Math.abs(event[axis]-cur);itemWithLeastDistance=this.items[j];this.direction=nearBottom?"up":"down"}}if(!itemWithLeastDistance&&!this.options.dropOnEmpty){return}if(this.currentContainer===this.containers[innermostIndex]){if(!this.currentContainer.containerCache.over){this.containers[innermostIndex]._trigger("over",event,this._uiHash());this.currentContainer.containerCache.over=1}return}itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[innermostIndex].element,true);this._trigger("change",event,this._uiHash());this.containers[innermostIndex]._trigger("change",event,this._uiHash(this));this.currentContainer=this.containers[innermostIndex];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1}},_createHelper:function(event){var o=this.options,helper=$2.isFunction(o.helper)?$2(o.helper.apply(this.element[0],[event,this.currentItem])):o.helper==="clone"?this.currentItem.clone():this.currentItem;if(!helper.parents("body").length){$2(o.appendTo!=="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0])}if(helper[0]===this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(!helper[0].style.width||o.forceHelperSize){helper.width(this.currentItem.width())}if(!helper[0].style.height||o.forceHelperSize){helper.height(this.currentItem.height())}return helper},_adjustOffsetFromHelper:function(obj){if(typeof obj==="string"){obj=obj.split(" ")}if($2.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0}}if("left"in obj){this.offset.click.left=obj.left+this.margins.left}if("right"in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if("top"in obj){this.offset.click.top=obj.top+this.margins.top}if("bottom"in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition==="absolute"&&this.scrollParent[0]!==this.document[0]&&$2.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&$2.ui.ie){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var ce,co,over,o=this.options;if(o.containment==="parent"){o.containment=this.helper[0].parentNode}if(o.containment==="document"||o.containment==="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,o.containment==="document"?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,(o.containment==="document"?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(o.containment)){ce=$2(o.containment)[0];co=$2(o.containment).offset();over=$2(ce).css("overflow")!=="hidden";this.containment=[co.left+(parseInt($2(ce).css("borderLeftWidth"),10)||0)+(parseInt($2(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($2(ce).css("borderTopWidth"),10)||0)+(parseInt($2(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($2(ce).css("borderLeftWidth"),10)||0)-(parseInt($2(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($2(ce).css("borderTopWidth"),10)||0)-(parseInt($2(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d==="absolute"?1:-1,scroll=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==this.document[0]&&$2.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop())*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod}},_generatePosition:function(event){var top,left,o=this.options,pageX=event.pageX,pageY=event.pageY,scroll=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==this.document[0]&&$2.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);if(this.cssPosition==="relative"&&!(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?top-this.offset.click.top>=this.containment[1]&&top-this.offset.click.top<=this.containment[3]?top:top-this.offset.click.top>=this.containment[1]?top-o.grid[1]:top+o.grid[1]:top;left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?left-this.offset.click.left>=this.containment[0]&&left-this.offset.click.left<=this.containment[2]?left:left-this.offset.click.left>=this.containment[0]?left-o.grid[0]:left+o.grid[0]:left}}return{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop()),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())}},_rearrange:function(event,i2,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i2.item[0].parentNode.insertBefore(this.placeholder[0],this.direction==="down"?i2.item[0]:i2.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){if(counter===this.counter){this.refreshPositions(!hardRefresh)}})},_clear:function(event,noPropagation){this.reverting=false;var i2,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(i2 in this._storedCSS){if(this._storedCSS[i2]==="auto"||this._storedCSS[i2]==="static"){this._storedCSS[i2]=""}}this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event2){this._trigger("receive",event2,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event2){this._trigger("update",event2,this._uiHash())})}if(this!==this.currentContainer){if(!noPropagation){delayedTriggers.push(function(event2){this._trigger("remove",event2,this._uiHash())});delayedTriggers.push((function(c){return function(event2){c._trigger("receive",event2,this._uiHash(this))}}).call(this,this.currentContainer));delayedTriggers.push((function(c){return function(event2){c._trigger("update",event2,this._uiHash(this))}}).call(this,this.currentContainer))}}function delayEvent(type2,instance,container){return function(event2){container._trigger(type2,event2,instance._uiHash(instance))}}for(i2=this.containers.length-1;i2>=0;i2--){if(!noPropagation){delayedTriggers.push(delayEvent("deactivate",this,this.containers[i2]))}if(this.containers[i2].containerCache.over){delayedTriggers.push(delayEvent("out",this,this.containers[i2]));this.containers[i2].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)}this.dragging=false;if(!noPropagation){this._trigger("beforeStop",event,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(!this.cancelHelperRemoval){if(this.helper[0]!==this.currentItem[0]){this.helper.remove()}this.helper=null}if(!noPropagation){for(i2=0;i2<delayedTriggers.length;i2++){delayedTriggers[i2].call(this,event)}this._trigger("stop",event,this._uiHash())}this.fromOutside=false;return!this.cancelHelperRemoval},_trigger:function(){if($2.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(_inst){var inst=_inst||this;return{helper:inst.helper,placeholder:inst.placeholder||$2([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null}}});/*!
|
|
409
|
+
* jQuery UI Spinner 1.12.1
|
|
410
|
+
* http://jqueryui.com
|
|
411
|
+
*
|
|
412
|
+
* Copyright jQuery Foundation and other contributors
|
|
413
|
+
* Released under the MIT license.
|
|
414
|
+
* http://jquery.org/license
|
|
415
|
+
*/function spinnerModifer(fn2){return function(){var previous=this.element.val();fn2.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger("change")}}}$2.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:true,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);if(this.value()!==""){this._value(this.element.val(),true)}this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var options=this._super();var element=this.element;$2.each(["min","max","step"],function(i2,option){var value=element.attr(option);if(value!=null&&value.length){options[option]=value}});return options},_events:{keydown:function(event){if(this._start(event)&&this._keydown(event)){event.preventDefault()}},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return}this._stop();this._refresh();if(this.previous!==this.element.val()){this._trigger("change",event)}},mousewheel:function(event,delta){if(!delta){return}if(!this.spinning&&!this._start(event)){return false}this._spin((delta>0?1:-1)*this.options.step,event);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){if(this.spinning){this._stop(event)}},100);event.preventDefault()},"mousedown .ui-spinner-button":function(event){var previous;previous=this.element[0]===$2.ui.safeActiveElement(this.document[0])?this.previous:this.element.val();function checkFocus(){var isActive=this.element[0]===$2.ui.safeActiveElement(this.document[0]);if(!isActive){this.element.trigger("focus");this.previous=previous;this._delay(function(){this.previous=previous})}}event.preventDefault();checkFocus.call(this);this.cancelBlur=true;this._delay(function(){delete this.cancelBlur;checkFocus.call(this)});if(this._start(event)===false){return}this._repeat(null,$2(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(event){if(!$2(event.currentTarget).hasClass("ui-state-active")){return}if(this._start(event)===false){return false}this._repeat(null,$2(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance();this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content");this._addClass("ui-spinner-input");this.element.attr("role","spinbutton");this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",true).button({classes:{"ui-button":""}});this._removeClass(this.buttons,"ui-corner-all");this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up");this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down");this.buttons.first().button({"icon":this.options.icons.up,"showLabel":false});this.buttons.last().button({"icon":this.options.icons.down,"showLabel":false});if(this.buttons.height()>Math.ceil(this.uiSpinner.height()*.5)&&this.uiSpinner.height()>0){this.uiSpinner.height(this.uiSpinner.height())}},_keydown:function(event){var options=this.options,keyCode=$2.ui.keyCode;switch(event.keyCode){case keyCode.UP:this._repeat(null,1,event);return true;case keyCode.DOWN:this._repeat(null,-1,event);return true;case keyCode.PAGE_UP:this._repeat(null,options.page,event);return true;case keyCode.PAGE_DOWN:this._repeat(null,-options.page,event);return true}return false},_start:function(event){if(!this.spinning&&this._trigger("start",event)===false){return false}if(!this.counter){this.counter=1}this.spinning=true;return true},_repeat:function(i2,steps,event){i2=i2||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,steps,event)},i2);this._spin(steps*this.options.step,event)},_spin:function(step,event){var value=this.value()||0;if(!this.counter){this.counter=1}value=this._adjustValue(value+step*this._increment(this.counter));if(!this.spinning||this._trigger("spin",event,{value})!==false){this._value(value);this.counter++}},_increment:function(i2){var incremental=this.options.incremental;if(incremental){return $2.isFunction(incremental)?incremental(i2):Math.floor(i2*i2*i2/5e4-i2*i2/500+17*i2/200+1)}return 1},_precision:function(){var precision=this._precisionOf(this.options.step);if(this.options.min!==null){precision=Math.max(precision,this._precisionOf(this.options.min))}return precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1},_adjustValue:function(value){var base,aboveMin,options=this.options;base=options.min!==null?options.min:0;aboveMin=value-base;aboveMin=Math.round(aboveMin/options.step)*options.step;value=base+aboveMin;value=parseFloat(value.toFixed(this._precision()));if(options.max!==null&&value>options.max){return options.max}if(options.min!==null&&value<options.min){return options.min}return value},_stop:function(event){if(!this.spinning){return}clearTimeout(this.timer);clearTimeout(this.mousewheelTimer);this.counter=0;this.spinning=false;this._trigger("stop",event)},_setOption:function(key2,value){var prevValue,first,last;if(key2==="culture"||key2==="numberFormat"){prevValue=this._parse(this.element.val());this.options[key2]=value;this.element.val(this._format(prevValue));return}if(key2==="max"||key2==="min"||key2==="step"){if(typeof value==="string"){value=this._parse(value)}}if(key2==="icons"){first=this.buttons.first().find(".ui-icon");this._removeClass(first,null,this.options.icons.up);this._addClass(first,null,value.up);last=this.buttons.last().find(".ui-icon");this._removeClass(last,null,this.options.icons.down);this._addClass(last,null,value.down)}this._super(key2,value)},_setOptionDisabled:function(value){this._super(value);this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!value);this.element.prop("disabled",!!value);this.buttons.button(value?"disable":"enable")},_setOptions:spinnerModifer(function(options){this._super(options)}),_parse:function(val2){if(typeof val2==="string"&&val2!==""){val2=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(val2,10,this.options.culture):+val2}return val2===""||isNaN(val2)?null:val2},_format:function(value){if(value===""){return""}return window.Globalize&&this.options.numberFormat?Globalize.format(value,this.options.numberFormat,this.options.culture):value},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var value=this.value();if(value===null){return false}return value===this._adjustValue(value)},_value:function(value,allowAny){var parsed;if(value!==""){parsed=this._parse(value);if(parsed!==null){if(!allowAny){parsed=this._adjustValue(parsed)}value=this._format(parsed)}}this.element.val(value);this._refresh()},_destroy:function(){this.element.prop("disabled",false).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:spinnerModifer(function(steps){this._stepUp(steps)}),_stepUp:function(steps){if(this._start()){this._spin((steps||1)*this.options.step);this._stop()}},stepDown:spinnerModifer(function(steps){this._stepDown(steps)}),_stepDown:function(steps){if(this._start()){this._spin((steps||1)*-this.options.step);this._stop()}},pageUp:spinnerModifer(function(pages){this._stepUp((pages||1)*this.options.page)}),pageDown:spinnerModifer(function(pages){this._stepDown((pages||1)*this.options.page)}),value:function(newVal){if(!arguments.length){return this._parse(this.element.val())}spinnerModifer(this._value).call(this,newVal)},widget:function(){return this.uiSpinner}});if($2.uiBackCompat!==false){$2.widget("ui.spinner",$2.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}})}var widgetsSpinner=$2.ui.spinner;/*!
|
|
416
|
+
* jQuery UI Tabs 1.12.1
|
|
417
|
+
* http://jqueryui.com
|
|
418
|
+
*
|
|
419
|
+
* Copyright jQuery Foundation and other contributors
|
|
420
|
+
* Released under the MIT license.
|
|
421
|
+
* http://jquery.org/license
|
|
422
|
+
*/$2.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:false,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(function(){var rhash=/#.*$/;return function(anchor){var anchorUrl,locationUrl;anchorUrl=anchor.href.replace(rhash,"");locationUrl=location.href.replace(rhash,"");try{anchorUrl=decodeURIComponent(anchorUrl)}catch(error){}try{locationUrl=decodeURIComponent(locationUrl)}catch(error){}return anchor.hash.length>1&&anchorUrl===locationUrl}})(),_create:function(){var that=this,options=this.options;this.running=false;this._addClass("ui-tabs","ui-widget ui-widget-content");this._toggleClass("ui-tabs-collapsible",null,options.collapsible);this._processTabs();options.active=this._initialActive();if($2.isArray(options.disabled)){options.disabled=$2.unique(options.disabled.concat($2.map(this.tabs.filter(".ui-state-disabled"),function(li){return that.tabs.index(li)}))).sort()}if(this.options.active!==false&&this.anchors.length){this.active=this._findActive(options.active)}else{this.active=$2()}this._refresh();if(this.active.length){this.load(options.active)}},_initialActive:function(){var active=this.options.active,collapsible=this.options.collapsible,locationHash=location.hash.substring(1);if(active===null){if(locationHash){this.tabs.each(function(i2,tab){if($2(tab).attr("aria-controls")===locationHash){active=i2;return false}})}if(active===null){active=this.tabs.index(this.tabs.filter(".ui-tabs-active"))}if(active===null||active===-1){active=this.tabs.length?0:false}}if(active!==false){active=this.tabs.index(this.tabs.eq(active));if(active===-1){active=collapsible?false:0}}if(!collapsible&&active===false&&this.anchors.length){active=0}return active},_getCreateEventData:function(){return{tab:this.active,panel:!this.active.length?$2():this._getPanelForTab(this.active)}},_tabKeydown:function(event){var focusedTab=$2($2.ui.safeActiveElement(this.document[0])).closest("li"),selectedIndex=this.tabs.index(focusedTab),goingForward=true;if(this._handlePageNav(event)){return}switch(event.keyCode){case $2.ui.keyCode.RIGHT:case $2.ui.keyCode.DOWN:selectedIndex++;break;case $2.ui.keyCode.UP:case $2.ui.keyCode.LEFT:goingForward=false;selectedIndex--;break;case $2.ui.keyCode.END:selectedIndex=this.anchors.length-1;break;case $2.ui.keyCode.HOME:selectedIndex=0;break;case $2.ui.keyCode.SPACE:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex);return;case $2.ui.keyCode.ENTER:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex===this.options.active?false:selectedIndex);return;default:return}event.preventDefault();clearTimeout(this.activating);selectedIndex=this._focusNextTab(selectedIndex,goingForward);if(!event.ctrlKey&&!event.metaKey){focusedTab.attr("aria-selected","false");this.tabs.eq(selectedIndex).attr("aria-selected","true");this.activating=this._delay(function(){this.option("active",selectedIndex)},this.delay)}},_panelKeydown:function(event){if(this._handlePageNav(event)){return}if(event.ctrlKey&&event.keyCode===$2.ui.keyCode.UP){event.preventDefault();this.active.trigger("focus")}},_handlePageNav:function(event){if(event.altKey&&event.keyCode===$2.ui.keyCode.PAGE_UP){this._activate(this._focusNextTab(this.options.active-1,false));return true}if(event.altKey&&event.keyCode===$2.ui.keyCode.PAGE_DOWN){this._activate(this._focusNextTab(this.options.active+1,true));return true}},_findNextTab:function(index2,goingForward){var lastTabIndex=this.tabs.length-1;function constrain(){if(index2>lastTabIndex){index2=0}if(index2<0){index2=lastTabIndex}return index2}while($2.inArray(constrain(),this.options.disabled)!==-1){index2=goingForward?index2+1:index2-1}return index2},_focusNextTab:function(index2,goingForward){index2=this._findNextTab(index2,goingForward);this.tabs.eq(index2).trigger("focus");return index2},_setOption:function(key2,value){if(key2==="active"){this._activate(value);return}this._super(key2,value);if(key2==="collapsible"){this._toggleClass("ui-tabs-collapsible",null,value);if(!value&&this.options.active===false){this._activate(0)}}if(key2==="event"){this._setupEvents(value)}if(key2==="heightStyle"){this._setupHeightStyle(value)}},_sanitizeSelector:function(hash){return hash?hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var options=this.options,lis=this.tablist.children(":has(a[href])");options.disabled=$2.map(lis.filter(".ui-state-disabled"),function(tab){return lis.index(tab)});this._processTabs();if(options.active===false||!this.anchors.length){options.active=false;this.active=$2()}else if(this.active.length&&!$2.contains(this.tablist[0],this.active[0])){if(this.tabs.length===options.disabled.length){options.active=false;this.active=$2()}else{this._activate(this._findNextTab(Math.max(0,options.active-1),false))}}else{options.active=this.tabs.index(this.active)}this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"});if(!this.active.length){this.tabs.eq(0).attr("tabIndex",0)}else{this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0});this._addClass(this.active,"ui-tabs-active","ui-state-active");this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})}},_processTabs:function(){var that=this,prevTabs=this.tabs,prevAnchors=this.anchors,prevPanels=this.panels;this.tablist=this._getList().attr("role","tablist");this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header");this.tablist.on("mousedown"+this.eventNamespace,"> li",function(event){if($2(this).is(".ui-state-disabled")){event.preventDefault()}}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){if($2(this).closest("li").is(".ui-state-disabled")){this.blur()}});this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1});this._addClass(this.tabs,"ui-tabs-tab","ui-state-default");this.anchors=this.tabs.map(function(){return $2("a",this)[0]}).attr({role:"presentation",tabIndex:-1});this._addClass(this.anchors,"ui-tabs-anchor");this.panels=$2();this.anchors.each(function(i2,anchor){var selector2,panel,panelId,anchorId=$2(anchor).uniqueId().attr("id"),tab=$2(anchor).closest("li"),originalAriaControls=tab.attr("aria-controls");if(that._isLocal(anchor)){selector2=anchor.hash;panelId=selector2.substring(1);panel=that.element.find(that._sanitizeSelector(selector2))}else{panelId=tab.attr("aria-controls")||$2({}).uniqueId()[0].id;selector2="#"+panelId;panel=that.element.find(selector2);if(!panel.length){panel=that._createPanel(panelId);panel.insertAfter(that.panels[i2-1]||that.tablist)}panel.attr("aria-live","polite")}if(panel.length){that.panels=that.panels.add(panel)}if(originalAriaControls){tab.data("ui-tabs-aria-controls",originalAriaControls)}tab.attr({"aria-controls":panelId,"aria-labelledby":anchorId});panel.attr("aria-labelledby",anchorId)});this.panels.attr("role","tabpanel");this._addClass(this.panels,"ui-tabs-panel","ui-widget-content");if(prevTabs){this._off(prevTabs.not(this.tabs));this._off(prevAnchors.not(this.anchors));this._off(prevPanels.not(this.panels))}},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(id2){return $2("<div>").attr("id",id2).data("ui-tabs-destroy",true)},_setOptionDisabled:function(disabled){var currentItem,li,i2;if($2.isArray(disabled)){if(!disabled.length){disabled=false}else if(disabled.length===this.anchors.length){disabled=true}}for(i2=0;li=this.tabs[i2];i2++){currentItem=$2(li);if(disabled===true||$2.inArray(i2,disabled)!==-1){currentItem.attr("aria-disabled","true");this._addClass(currentItem,null,"ui-state-disabled")}else{currentItem.removeAttr("aria-disabled");this._removeClass(currentItem,null,"ui-state-disabled")}}this.options.disabled=disabled;this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,disabled===true)},_setupEvents:function(event){var events={};if(event){$2.each(event.split(" "),function(index2,eventName){events[eventName]="_eventHandler"})}this._off(this.anchors.add(this.tabs).add(this.panels));this._on(true,this.anchors,{click:function(event2){event2.preventDefault()}});this._on(this.anchors,events);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(heightStyle){var maxHeight,parent2=this.element.parent();if(heightStyle==="fill"){maxHeight=parent2.height();maxHeight-=this.element.outerHeight()-this.element.height();this.element.siblings(":visible").each(function(){var elem=$2(this),position2=elem.css("position");if(position2==="absolute"||position2==="fixed"){return}maxHeight-=elem.outerHeight(true)});this.element.children().not(this.panels).each(function(){maxHeight-=$2(this).outerHeight(true)});this.panels.each(function(){$2(this).height(Math.max(0,maxHeight-$2(this).innerHeight()+$2(this).height()))}).css("overflow","auto")}else if(heightStyle==="auto"){maxHeight=0;this.panels.each(function(){maxHeight=Math.max(maxHeight,$2(this).height("").height())}).height(maxHeight)}},_eventHandler:function(event){var options=this.options,active=this.active,anchor=$2(event.currentTarget),tab=anchor.closest("li"),clickedIsActive=tab[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$2():this._getPanelForTab(tab),toHide=!active.length?$2():this._getPanelForTab(active),eventData={oldTab:active,oldPanel:toHide,newTab:collapsing?$2():tab,newPanel:toShow};event.preventDefault();if(tab.hasClass("ui-state-disabled")||tab.hasClass("ui-tabs-loading")||this.running||clickedIsActive&&!options.collapsible||this._trigger("beforeActivate",event,eventData)===false){return}options.active=collapsing?false:this.tabs.index(tab);this.active=clickedIsActive?$2():tab;if(this.xhr){this.xhr.abort()}if(!toHide.length&&!toShow.length){$2.error("jQuery UI Tabs: Mismatching fragment identifier.")}if(toShow.length){this.load(this.tabs.index(tab),event)}this._toggle(event,eventData)},_toggle:function(event,eventData){var that=this,toShow=eventData.newPanel,toHide=eventData.oldPanel;this.running=true;function complete(){that.running=false;that._trigger("activate",event,eventData)}function show(){that._addClass(eventData.newTab.closest("li"),"ui-tabs-active","ui-state-active");if(toShow.length&&that.options.show){that._show(toShow,that.options.show,complete)}else{toShow.show();complete()}}if(toHide.length&&this.options.hide){this._hide(toHide,this.options.hide,function(){that._removeClass(eventData.oldTab.closest("li"),"ui-tabs-active","ui-state-active");show()})}else{this._removeClass(eventData.oldTab.closest("li"),"ui-tabs-active","ui-state-active");toHide.hide();show()}toHide.attr("aria-hidden","true");eventData.oldTab.attr({"aria-selected":"false","aria-expanded":"false"});if(toShow.length&&toHide.length){eventData.oldTab.attr("tabIndex",-1)}else if(toShow.length){this.tabs.filter(function(){return $2(this).attr("tabIndex")===0}).attr("tabIndex",-1)}toShow.attr("aria-hidden","false");eventData.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(index2){var anchor,active=this._findActive(index2);if(active[0]===this.active[0]){return}if(!active.length){active=this.active}anchor=active.find(".ui-tabs-anchor")[0];this._eventHandler({target:anchor,currentTarget:anchor,preventDefault:$2.noop})},_findActive:function(index2){return index2===false?$2():this.tabs.eq(index2)},_getIndex:function(index2){if(typeof index2==="string"){index2=this.anchors.index(this.anchors.filter("[href$='"+$2.ui.escapeSelector(index2)+"']"))}return index2},_destroy:function(){if(this.xhr){this.xhr.abort()}this.tablist.removeAttr("role").off(this.eventNamespace);this.anchors.removeAttr("role tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){if($2.data(this,"ui-tabs-destroy")){$2(this).remove()}else{$2(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}});this.tabs.each(function(){var li=$2(this),prev=li.data("ui-tabs-aria-controls");if(prev){li.attr("aria-controls",prev).removeData("ui-tabs-aria-controls")}else{li.removeAttr("aria-controls")}});this.panels.show();if(this.options.heightStyle!=="content"){this.panels.css("height","")}},enable:function(index2){var disabled=this.options.disabled;if(disabled===false){return}if(index2===void 0){disabled=false}else{index2=this._getIndex(index2);if($2.isArray(disabled)){disabled=$2.map(disabled,function(num){return num!==index2?num:null})}else{disabled=$2.map(this.tabs,function(li,num){return num!==index2?num:null})}}this._setOptionDisabled(disabled)},disable:function(index2){var disabled=this.options.disabled;if(disabled===true){return}if(index2===void 0){disabled=true}else{index2=this._getIndex(index2);if($2.inArray(index2,disabled)!==-1){return}if($2.isArray(disabled)){disabled=$2.merge([index2],disabled).sort()}else{disabled=[index2]}}this._setOptionDisabled(disabled)},load:function(index2,event){index2=this._getIndex(index2);var that=this,tab=this.tabs.eq(index2),anchor=tab.find(".ui-tabs-anchor"),panel=this._getPanelForTab(tab),eventData={tab,panel},complete=function(jqXHR,status){if(status==="abort"){that.panels.stop(false,true)}that._removeClass(tab,"ui-tabs-loading");panel.removeAttr("aria-busy");if(jqXHR===that.xhr){delete that.xhr}};if(this._isLocal(anchor[0])){return}this.xhr=$2.ajax(this._ajaxSettings(anchor,event,eventData));if(this.xhr&&this.xhr.statusText!=="canceled"){this._addClass(tab,"ui-tabs-loading");panel.attr("aria-busy","true");this.xhr.done(function(response,status,jqXHR){setTimeout(function(){panel.html(response);that._trigger("load",event,eventData);complete(jqXHR,status)},1)}).fail(function(jqXHR,status){setTimeout(function(){complete(jqXHR,status)},1)})}},_ajaxSettings:function(anchor,event,eventData){var that=this;return{url:anchor.attr("href").replace(/#.*$/,""),beforeSend:function(jqXHR,settings2){return that._trigger("beforeLoad",event,$2.extend({jqXHR,ajaxSettings:settings2},eventData))}}},_getPanelForTab:function(tab){var id2=$2(tab).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+id2))}});if($2.uiBackCompat!==false){$2.widget("ui.tabs",$2.ui.tabs,{_processTabs:function(){this._superApply(arguments);this._addClass(this.tabs,"ui-tab")}})}var widgetsTabs=$2.ui.tabs;/*!
|
|
423
|
+
* jQuery UI Tooltip 1.12.1
|
|
424
|
+
* http://jqueryui.com
|
|
425
|
+
*
|
|
426
|
+
* Copyright jQuery Foundation and other contributors
|
|
427
|
+
* Released under the MIT license.
|
|
428
|
+
* http://jquery.org/license
|
|
429
|
+
*/$2.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var title=$2(this).attr("title")||"";return $2("<a>").text(title).html()},hide:true,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:true,track:false,close:null,open:null},_addDescribedBy:function(elem,id2){var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);describedby.push(id2);elem.data("ui-tooltip-id",id2).attr("aria-describedby",$2.trim(describedby.join(" ")))},_removeDescribedBy:function(elem){var id2=elem.data("ui-tooltip-id"),describedby=(elem.attr("aria-describedby")||"").split(/\s+/),index2=$2.inArray(id2,describedby);if(index2!==-1){describedby.splice(index2,1)}elem.removeData("ui-tooltip-id");describedby=$2.trim(describedby.join(" "));if(describedby){elem.attr("aria-describedby",describedby)}else{elem.removeAttr("aria-describedby")}},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.liveRegion=$2("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body);this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");this.disabledTitles=$2([])},_setOption:function(key2,value){var that=this;this._super(key2,value);if(key2==="content"){$2.each(this.tooltips,function(id2,tooltipData){that._updateContent(tooltipData.element)})}},_setOptionDisabled:function(value){this[value?"_disable":"_enable"]()},_disable:function(){var that=this;$2.each(this.tooltips,function(id2,tooltipData){var event=$2.Event("blur");event.target=event.currentTarget=tooltipData.element[0];that.close(event,true)});this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var element=$2(this);if(element.is("[title]")){return element.data("ui-tooltip-title",element.attr("title")).removeAttr("title")}}))},_enable:function(){this.disabledTitles.each(function(){var element=$2(this);if(element.data("ui-tooltip-title")){element.attr("title",element.data("ui-tooltip-title"))}});this.disabledTitles=$2([])},open:function(event){var that=this,target=$2(event?event.target:this.element).closest(this.options.items);if(!target.length||target.data("ui-tooltip-id")){return}if(target.attr("title")){target.data("ui-tooltip-title",target.attr("title"))}target.data("ui-tooltip-open",true);if(event&&event.type==="mouseover"){target.parents().each(function(){var parent2=$2(this),blurEvent;if(parent2.data("ui-tooltip-open")){blurEvent=$2.Event("blur");blurEvent.target=blurEvent.currentTarget=this;that.close(blurEvent,true)}if(parent2.attr("title")){parent2.uniqueId();that.parents[this.id]={element:this,title:parent2.attr("title")};parent2.attr("title","")}})}this._registerCloseHandlers(event,target);this._updateContent(target,event)},_updateContent:function(target,event){var content,contentOption=this.options.content,that=this,eventType=event?event.type:null;if(typeof contentOption==="string"||contentOption.nodeType||contentOption.jquery){return this._open(event,target,contentOption)}content=contentOption.call(target[0],function(response){that._delay(function(){if(!target.data("ui-tooltip-open")){return}if(event){event.type=eventType}this._open(event,target,response)})});if(content){this._open(event,target,content)}},_open:function(event,target,content){var tooltipData,tooltip,delayedShow,a11yContent,positionOption=$2.extend({},this.options.position);if(!content){return}tooltipData=this._find(target);if(tooltipData){tooltipData.tooltip.find(".ui-tooltip-content").html(content);return}if(target.is("[title]")){if(event&&event.type==="mouseover"){target.attr("title","")}else{target.removeAttr("title")}}tooltipData=this._tooltip(target);tooltip=tooltipData.tooltip;this._addDescribedBy(target,tooltip.attr("id"));tooltip.find(".ui-tooltip-content").html(content);this.liveRegion.children().hide();a11yContent=$2("<div>").html(tooltip.find(".ui-tooltip-content").html());a11yContent.removeAttr("name").find("[name]").removeAttr("name");a11yContent.removeAttr("id").find("[id]").removeAttr("id");a11yContent.appendTo(this.liveRegion);function position2(event2){positionOption.of=event2;if(tooltip.is(":hidden")){return}tooltip.position(positionOption)}if(this.options.track&&event&&/^mouse/.test(event.type)){this._on(this.document,{mousemove:position2});position2(event)}else{tooltip.position($2.extend({of:target},this.options.position))}tooltip.hide();this._show(tooltip,this.options.show);if(this.options.track&&this.options.show&&this.options.show.delay){delayedShow=this.delayedShow=setInterval(function(){if(tooltip.is(":visible")){position2(positionOption.of);clearInterval(delayedShow)}},$2.fx.interval)}this._trigger("open",event,{tooltip})},_registerCloseHandlers:function(event,target){var events={keyup:function(event2){if(event2.keyCode===$2.ui.keyCode.ESCAPE){var fakeEvent=$2.Event(event2);fakeEvent.currentTarget=target[0];this.close(fakeEvent,true)}}};if(target[0]!==this.element[0]){events.remove=function(){this._removeTooltip(this._find(target).tooltip)}}if(!event||event.type==="mouseover"){events.mouseleave="close"}if(!event||event.type==="focusin"){events.focusout="close"}this._on(true,target,events)},close:function(event){var tooltip,that=this,target=$2(event?event.currentTarget:this.element),tooltipData=this._find(target);if(!tooltipData){target.removeData("ui-tooltip-open");return}tooltip=tooltipData.tooltip;if(tooltipData.closing){return}clearInterval(this.delayedShow);if(target.data("ui-tooltip-title")&&!target.attr("title")){target.attr("title",target.data("ui-tooltip-title"))}this._removeDescribedBy(target);tooltipData.hiding=true;tooltip.stop(true);this._hide(tooltip,this.options.hide,function(){that._removeTooltip($2(this))});target.removeData("ui-tooltip-open");this._off(target,"mouseleave focusout keyup");if(target[0]!==this.element[0]){this._off(target,"remove")}this._off(this.document,"mousemove");if(event&&event.type==="mouseleave"){$2.each(this.parents,function(id2,parent2){$2(parent2.element).attr("title",parent2.title);delete that.parents[id2]})}tooltipData.closing=true;this._trigger("close",event,{tooltip});if(!tooltipData.hiding){tooltipData.closing=false}},_tooltip:function(element){var tooltip=$2("<div>").attr("role","tooltip"),content=$2("<div>").appendTo(tooltip),id2=tooltip.uniqueId().attr("id");this._addClass(content,"ui-tooltip-content");this._addClass(tooltip,"ui-tooltip","ui-widget ui-widget-content");tooltip.appendTo(this._appendTo(element));return this.tooltips[id2]={element,tooltip}},_find:function(target){var id2=target.data("ui-tooltip-id");return id2?this.tooltips[id2]:null},_removeTooltip:function(tooltip){tooltip.remove();delete this.tooltips[tooltip.attr("id")]},_appendTo:function(target){var element=target.closest(".ui-front, dialog");if(!element.length){element=this.document[0].body}return element},_destroy:function(){var that=this;$2.each(this.tooltips,function(id2,tooltipData){var event=$2.Event("blur"),element=tooltipData.element;event.target=event.currentTarget=element[0];that.close(event,true);$2("#"+id2).remove();if(element.data("ui-tooltip-title")){if(!element.attr("title")){element.attr("title",element.data("ui-tooltip-title"))}element.removeData("ui-tooltip-title")}});this.liveRegion.remove()}});if($2.uiBackCompat!==false){$2.widget("ui.tooltip",$2.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var tooltipData=this._superApply(arguments);if(this.options.tooltipClass){tooltipData.tooltip.addClass(this.options.tooltipClass)}return tooltipData}})}var widgetsTooltip=$2.ui.tooltip});;(function(factory18){if(typeof define==="function"&&define.amd){define(["jquery"],function($2){return factory18($2)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory18(require("jquery"))}else{factory18(jQuery)}})(function($2){$2.easing.jswing=$2.easing.swing;var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x2){var n1=7.5625,d1=2.75;if(x2<1/d1){return n1*x2*x2}else if(x2<2/d1){return n1*(x2-=1.5/d1)*x2+.75}else if(x2<2.5/d1){return n1*(x2-=2.25/d1)*x2+.9375}else{return n1*(x2-=2.625/d1)*x2+.984375}}$2.extend($2.easing,{def:"easeOutQuad",swing:function(x2){return $2.easing[$2.easing.def](x2)},easeInQuad:function(x2){return x2*x2},easeOutQuad:function(x2){return 1-(1-x2)*(1-x2)},easeInOutQuad:function(x2){return x2<.5?2*x2*x2:1-pow(-2*x2+2,2)/2},easeInCubic:function(x2){return x2*x2*x2},easeOutCubic:function(x2){return 1-pow(1-x2,3)},easeInOutCubic:function(x2){return x2<.5?4*x2*x2*x2:1-pow(-2*x2+2,3)/2},easeInQuart:function(x2){return x2*x2*x2*x2},easeOutQuart:function(x2){return 1-pow(1-x2,4)},easeInOutQuart:function(x2){return x2<.5?8*x2*x2*x2*x2:1-pow(-2*x2+2,4)/2},easeInQuint:function(x2){return x2*x2*x2*x2*x2},easeOutQuint:function(x2){return 1-pow(1-x2,5)},easeInOutQuint:function(x2){return x2<.5?16*x2*x2*x2*x2*x2:1-pow(-2*x2+2,5)/2},easeInSine:function(x2){return 1-cos(x2*PI/2)},easeOutSine:function(x2){return sin(x2*PI/2)},easeInOutSine:function(x2){return-(cos(PI*x2)-1)/2},easeInExpo:function(x2){return x2===0?0:pow(2,10*x2-10)},easeOutExpo:function(x2){return x2===1?1:1-pow(2,-10*x2)},easeInOutExpo:function(x2){return x2===0?0:x2===1?1:x2<.5?pow(2,20*x2-10)/2:(2-pow(2,-20*x2+10))/2},easeInCirc:function(x2){return 1-sqrt(1-pow(x2,2))},easeOutCirc:function(x2){return sqrt(1-pow(x2-1,2))},easeInOutCirc:function(x2){return x2<.5?(1-sqrt(1-pow(2*x2,2)))/2:(sqrt(1-pow(-2*x2+2,2))+1)/2},easeInElastic:function(x2){return x2===0?0:x2===1?1:-pow(2,10*x2-10)*sin((x2*10-10.75)*c4)},easeOutElastic:function(x2){return x2===0?0:x2===1?1:pow(2,-10*x2)*sin((x2*10-.75)*c4)+1},easeInOutElastic:function(x2){return x2===0?0:x2===1?1:x2<.5?-(pow(2,20*x2-10)*sin((20*x2-11.125)*c5))/2:pow(2,-20*x2+10)*sin((20*x2-11.125)*c5)/2+1},easeInBack:function(x2){return c3*x2*x2*x2-c1*x2*x2},easeOutBack:function(x2){return 1+c3*pow(x2-1,3)+c1*pow(x2-1,2)},easeInOutBack:function(x2){return x2<.5?pow(2*x2,2)*((c2+1)*2*x2-c2)/2:(pow(2*x2-2,2)*((c2+1)*(x2*2-2)+c2)+2)/2},easeInBounce:function(x2){return 1-bounceOut(1-x2)},easeOutBounce:bounceOut,easeInOutBounce:function(x2){return x2<.5?(1-bounceOut(1-2*x2))/2:(1+bounceOut(2*x2-1))/2}})});;(function(factory18){"use strict";if(typeof define==="function"&&define.amd){define(["jquery","jquery-ui/sortable"],factory18)}else{factory18(window.jQuery)}})(function($2){"use strict";function isOverAxis(x2,reference,size){return x2>reference&&x2<reference+size}$2.widget("mjs.nestedSortable",$2.extend({},$2.ui.sortable.prototype,{options:{disableParentChange:false,doNotClear:false,expandOnHover:700,isAllowed:function(){return true},isTree:false,listType:"ol",maxLevels:0,protectRoot:false,rootID:null,rtl:false,startCollapsed:false,tabSize:20,branchClass:"mjs-nestedSortable-branch",collapsedClass:"mjs-nestedSortable-collapsed",disableNestingClass:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",expandedClass:"mjs-nestedSortable-expanded",hoveringClass:"mjs-nestedSortable-hovering",leafClass:"mjs-nestedSortable-leaf",disabledClass:"mjs-nestedSortable-disabled"},_create:function(){var self2=this,err;this.element.data("ui-sortable",this.element.data("mjs-nestedSortable"));if(!this.element.is(this.options.listType)){err="nestedSortable: Please check that the listType option is set to your actual list type";throw new Error(err)}if(this.options.isTree&&this.options.expandOnHover){this.options.tolerance="intersect"}$2.ui.sortable.prototype._create.apply(this,arguments);if(this.options.isTree){$2(this.items).each(function(){var $li=this.item,hasCollapsedClass=$li.hasClass(self2.options.collapsedClass),hasExpandedClass=$li.hasClass(self2.options.expandedClass);if($li.children(self2.options.listType).length){$li.addClass(self2.options.branchClass);if(!hasCollapsedClass&&!hasExpandedClass){if(self2.options.startCollapsed){$li.addClass(self2.options.collapsedClass)}else{$li.addClass(self2.options.expandedClass)}}}else{$li.addClass(self2.options.leafClass)}})}},_destroy:function(){this.element.removeData("mjs-nestedSortable").removeData("ui-sortable");return $2.ui.sortable.prototype._destroy.apply(this,arguments)},_mouseDrag:function(event){var i2,item,itemElement,intersection,self2=this,o=this.options,scrolled=false,$document=$2(document),previousTopOffset,parentItem,level,childLevels,itemAfter,itemBefore,newList,method,a,previousItem,nextItem,helperIsNotSibling;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity){scrolled=this.scrollParent.scrollTop()+o.scrollSpeed;this.scrollParent.scrollTop(scrolled)}else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){scrolled=this.scrollParent.scrollTop()-o.scrollSpeed;this.scrollParent.scrollTop(scrolled)}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity){scrolled=this.scrollParent.scrollLeft()+o.scrollSpeed;this.scrollParent.scrollLeft(scrolled)}else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){scrolled=this.scrollParent.scrollLeft()-o.scrollSpeed;this.scrollParent.scrollLeft(scrolled)}}else{if(event.pageY-$document.scrollTop()<o.scrollSensitivity){scrolled=$document.scrollTop()-o.scrollSpeed;$document.scrollTop(scrolled)}else if($2(window).height()-(event.pageY-$document.scrollTop())<o.scrollSensitivity){scrolled=$document.scrollTop()+o.scrollSpeed;$document.scrollTop(scrolled)}if(event.pageX-$document.scrollLeft()<o.scrollSensitivity){scrolled=$document.scrollLeft()-o.scrollSpeed;$document.scrollLeft(scrolled)}else if($2(window).width()-(event.pageX-$document.scrollLeft())<o.scrollSensitivity){scrolled=$document.scrollLeft()+o.scrollSpeed;$document.scrollLeft(scrolled)}}if(scrolled!==false&&$2.ui.ddmanager&&!o.dropBehaviour){$2.ui.ddmanager.prepareOffsets(this,event)}}this.positionAbs=this._convertPositionTo("absolute");previousTopOffset=this.placeholder.offset().top;if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=this.position.top+"px"}this.hovering=this.hovering?this.hovering:null;this.mouseentered=this.mouseentered?this.mouseentered:false;(function(){var _parentItem=this.placeholder.parent().parent();if(_parentItem&&_parentItem.closest(".ui-sortable").length){parentItem=_parentItem}}).call(this);level=this._getLevel(this.placeholder);childLevels=this._getChildLevels(this.helper);newList=document.createElement(o.listType);for(i2=this.items.length-1;i2>=0;i2--){item=this.items[i2];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue}if(item.instance!==this.currentContainer){continue}if(itemElement.className.indexOf(o.disabledClass)!==-1){if(intersection===2){itemAfter=this.items[i2+1];if(itemAfter&&itemAfter.item.hasClass(o.disabledClass)){continue}}else if(intersection===1){itemBefore=this.items[i2-1];if(itemBefore&&itemBefore.item.hasClass(o.disabledClass)){continue}}}method=intersection===1?"next":"prev";if(itemElement!==this.currentItem[0]&&this.placeholder[method]()[0]!==itemElement&&!$2.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$2.contains(this.element[0],itemElement):true)){if(!this.mouseentered){$2(itemElement).mouseenter();this.mouseentered=true}if(o.isTree&&$2(itemElement).hasClass(o.collapsedClass)&&o.expandOnHover){if(!this.hovering){$2(itemElement).addClass(o.hoveringClass);this.hovering=window.setTimeout(function(){$2(itemElement).removeClass(o.collapsedClass).addClass(o.expandedClass);self2.refreshPositions();self2._trigger("expand",event,self2._uiHash())},o.expandOnHover)}}this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){$2(itemElement).mouseleave();this.mouseentered=false;$2(itemElement).removeClass(o.hoveringClass);if(this.hovering){window.clearTimeout(this.hovering)}this.hovering=null;if(o.protectRoot&&!(this.currentItem[0].parentNode===this.element[0]&&itemElement.parentNode!==this.element[0])){if(this.currentItem[0].parentNode!==this.element[0]&&itemElement.parentNode===this.element[0]){if(!$2(itemElement).children(o.listType).length){itemElement.appendChild(newList);if(o.isTree){$2(itemElement).removeClass(o.leafClass).addClass(o.branchClass+" "+o.expandedClass)}}if(this.direction==="down"){a=$2(itemElement).prev().children(o.listType)}else{a=$2(itemElement).children(o.listType)}if(a[0]!==void 0){this._rearrange(event,null,a)}}else{this._rearrange(event,item)}}else if(!o.protectRoot){this._rearrange(event,item)}}else{break}this._clearEmpty(itemElement);this._trigger("change",event,this._uiHash());break}}(function(){var _previousItem=this.placeholder.prev();if(_previousItem.length){previousItem=_previousItem}else{previousItem=null}}).call(this);if(previousItem!=null){while(previousItem[0].nodeName.toLowerCase()!=="li"||previousItem[0].className.indexOf(o.disabledClass)!==-1||previousItem[0]===this.currentItem[0]||previousItem[0]===this.helper[0]){if(previousItem[0].previousSibling){previousItem=$2(previousItem[0].previousSibling)}else{previousItem=null;break}}}(function(){var _nextItem=this.placeholder.next();if(_nextItem.length){nextItem=_nextItem}else{nextItem=null}}).call(this);if(nextItem!=null){while(nextItem[0].nodeName.toLowerCase()!=="li"||nextItem[0].className.indexOf(o.disabledClass)!==-1||nextItem[0]===this.currentItem[0]||nextItem[0]===this.helper[0]){if(nextItem[0].nextSibling){nextItem=$2(nextItem[0].nextSibling)}else{nextItem=null;break}}}this.beyondMaxLevels=0;if(parentItem!=null&&nextItem==null&&!(o.protectRoot&&parentItem[0].parentNode==this.element[0])&&(o.rtl&&this.positionAbs.left+this.helper.outerWidth()>parentItem.offset().left+parentItem.outerWidth()||!o.rtl&&this.positionAbs.left<parentItem.offset().left)){parentItem.after(this.placeholder[0]);helperIsNotSibling=!parentItem.children(o.listItem).children("li:visible:not(.ui-sortable-helper)").length;if(o.isTree&&helperIsNotSibling){parentItem.removeClass(this.options.branchClass+" "+this.options.expandedClass).addClass(this.options.leafClass)}if(typeof parentItem!=="undefined")this._clearEmpty(parentItem[0]);this._trigger("change",event,this._uiHash())}else if(previousItem!=null&&!previousItem.hasClass(o.disableNestingClass)&&(previousItem.children(o.listType).length&&previousItem.children(o.listType).is(":visible")||!previousItem.children(o.listType).length)&&!(o.protectRoot&&this.currentItem[0].parentNode===this.element[0])&&(o.rtl&&this.positionAbs.left+this.helper.outerWidth()<previousItem.offset().left+previousItem.outerWidth()-o.tabSize||!o.rtl&&this.positionAbs.left>previousItem.offset().left+o.tabSize)){this._isAllowed(previousItem,level,level+childLevels+1);if(!previousItem.children(o.listType).length){previousItem[0].appendChild(newList);if(o.isTree){previousItem.removeClass(o.leafClass).addClass(o.branchClass+" "+o.expandedClass)}}if(previousTopOffset&&previousTopOffset<=previousItem.offset().top){previousItem.children(o.listType).prepend(this.placeholder)}else{previousItem.children(o.listType)[0].appendChild(this.placeholder[0])}if(typeof parentItem!=="undefined")this._clearEmpty(parentItem[0]);this._trigger("change",event,this._uiHash())}else{this._isAllowed(parentItem,level,level+childLevels)}this._contactContainers(event);if($2.ui.ddmanager){$2.ui.ddmanager.drag(this,event)}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(event){if(this.beyondMaxLevels){this.placeholder.removeClass(this.options.errorClass);if(this.domPosition.prev){$2(this.domPosition.prev).after(this.placeholder)}else{$2(this.domPosition.parent).prepend(this.placeholder)}this._trigger("revert",event,this._uiHash())}$2("."+this.options.hoveringClass).mouseleave().removeClass(this.options.hoveringClass);this.mouseentered=false;if(this.hovering){window.clearTimeout(this.hovering)}this.hovering=null;this._relocate_event=event;this._pid_current=$2(this.domPosition.parent).parent().attr("id");this._sort_current=this.domPosition.prev?$2(this.domPosition.prev).next().index():0;$2.ui.sortable.prototype._mouseStop.apply(this,arguments)},_intersectsWithSides:function(item){var half=this.options.isTree?.8:.5,isOverBottomHalf=isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+item.height*half,item.height),isOverTopHalf=isOverAxis(this.positionAbs.top+this.offset.click.top,item.top-item.height*half,item.height),isOverRightHalf=isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+item.width/2,item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return horizontalDirection==="right"&&isOverRightHalf||horizontalDirection==="left"&&!isOverRightHalf}else{return verticalDirection&&(verticalDirection==="down"&&isOverBottomHalf||verticalDirection==="up"&&isOverTopHalf)}},_contactContainers:function(){if(this.options.protectRoot&&this.currentItem[0].parentNode===this.element[0]){return}$2.ui.sortable.prototype._contactContainers.apply(this,arguments)},_clear:function(){var i2,item;$2.ui.sortable.prototype._clear.apply(this,arguments);if(!(this._pid_current===this._uiHash().item.parent().parent().attr("id")&&this._sort_current===this._uiHash().item.index())){this._trigger("relocate",this._relocate_event,this._uiHash())}for(i2=this.items.length-1;i2>=0;i2--){item=this.items[i2].item[0];this._clearEmpty(item)}},serialize:function(options){var o=$2.extend({},this.options,options),items=this._getItemsAsjQuery(o&&o.connected),str=[];$2(items).each(function(){var res=($2(o.item||this).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/),pid=($2(o.item||this).parent(o.listType).parent(o.items).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/);if(res){str.push((o.key||res[1])+"["+(o.key&&o.expression?res[1]:res[2])+"]="+(pid?o.key&&o.expression?pid[1]:pid[2]:o.rootID))}});if(!str.length&&o.key){str.push(o.key+"=")}return str.join("&")},toHierarchy:function(options){var o=$2.extend({},this.options,options),ret=[];$2(this.element).children(o.items).each(function(){var level=_recursiveItems(this);ret.push(level)});return ret;function _recursiveItems(item){var id2=($2(item).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/),currentItem;var data2=$2(item).data();if(data2.nestedSortableItem){delete data2.nestedSortableItem}if(id2){currentItem={"id":id2[2]};currentItem=$2.extend({},currentItem,data2);if($2(item).children(o.listType).children(o.items).length>0){currentItem.children=[];$2(item).children(o.listType).children(o.items).each(function(){var level=_recursiveItems(this);currentItem.children.push(level)})}return currentItem}}},toArray:function(options){var o=$2.extend({},this.options,options),sDepth=o.startDepthCount||0,ret=[],left=1;if(!o.excludeRoot){ret.push({"item_id":o.rootID,"parent_id":null,"depth":sDepth,"left":left,"right":($2(o.items,this.element).length+1)*2});left++}$2(this.element).children(o.items).each(function(){left=_recursiveArray(this,sDepth,left)});ret=ret.sort(function(a,b){return a.left-b.left});return ret;function _recursiveArray(item,depth,_left){var right=_left+1,id2,pid,parentItem;if($2(item).children(o.listType).children(o.items).length>0){depth++;$2(item).children(o.listType).children(o.items).each(function(){right=_recursiveArray($2(this),depth,right)});depth--}id2=$2(item).attr(o.attribute||"id").match(o.expression||/(.+)[-=_](.+)/);if(depth===sDepth){pid=o.rootID}else{parentItem=$2(item).parent(o.listType).parent(o.items).attr(o.attribute||"id").match(o.expression||/(.+)[-=_](.+)/);pid=parentItem[2]}if(id2){var name=$2(item).data("name");ret.push({"id":id2[2],"parent_id":pid,"depth":depth,"left":_left,"right":right,"name":name})}_left=right+1;return _left}},_clearEmpty:function(item){function replaceClass(elem,search,replace,swap){if(swap){search=[replace,replace=search][0]}$2(elem).removeClass(search).addClass(replace)}var o=this.options,childrenList=$2(item).children(o.listType),hasChildren=childrenList.is(":not(:empty)");var doNotClear=o.doNotClear||hasChildren||o.protectRoot&&$2(item)[0]===this.element[0];if(o.isTree){replaceClass(item,o.branchClass,o.leafClass,doNotClear);if(doNotClear&&hasChildren){replaceClass(item,o.collapsedClass,o.expandedClass)}}if(!doNotClear){childrenList.remove()}},_getLevel:function(item){var level=1,list;if(this.options.listType){list=item.closest(this.options.listType);while(list&&list.length>0&&!list.is(".ui-sortable")){level++;list=list.parent().closest(this.options.listType)}}return level},_getChildLevels:function(parent2,depth){var self2=this,o=this.options,result=0;depth=depth||0;$2(parent2).children(o.listType).children(o.items).each(function(index2,child){result=Math.max(self2._getChildLevels(child,depth+1),result)});return depth?result+1:result},_isAllowed:function(parentItem,level,levels){var o=this.options,maxLevels=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels"),oldParent=this.currentItem.parent().parent(),disabledByParentchange=o.disableParentChange&&(typeof parentItem!=="undefined"&&!oldParent.is(parentItem)||typeof parentItem==="undefined"&&oldParent.is("li"));if(disabledByParentchange||!o.isAllowed(this.placeholder,parentItem,this.currentItem)){this.placeholder.addClass(o.errorClass);if(maxLevels<levels&&maxLevels!==0){this.beyondMaxLevels=levels-maxLevels}else{this.beyondMaxLevels=1}}else{if(maxLevels<levels&&maxLevels!==0){this.placeholder.addClass(o.errorClass);this.beyondMaxLevels=levels-maxLevels}else{this.placeholder.removeClass(o.errorClass);this.beyondMaxLevels=0}}}}));$2.mjs.nestedSortable.prototype.options=$2.extend({},$2.ui.sortable.prototype.options,$2.mjs.nestedSortable.prototype.options)});;(function(factory18){if(typeof define==="function"&&define.amd){define(["jquery"],factory18)}else{factory18(window.jQuery)}})(function($2){$2.fn.numeric=function(config,callback){if(typeof config==="boolean"){config={decimal:config,negative:true,decimalPlaces:-1}}config=config||{};if(typeof config.negative=="undefined"){config.negative=true}var decimal=config.decimal===false?"":config.decimal||".";var altDecimal=config.altDecimal===false?"":config.altDecimal||decimal;var negative=config.negative===true?true:false;var decimalPlaces=typeof config.decimalPlaces=="undefined"?-1:config.decimalPlaces;callback=typeof callback=="function"?callback:function(){};return this.data("numeric.decimal",decimal).data("numeric.altDecimal",altDecimal).data("numeric.negative",negative).data("numeric.callback",callback).data("numeric.decimalPlaces",decimalPlaces).keypress($2.fn.numeric.keypress).keyup($2.fn.numeric.keyup).blur($2.fn.numeric.blur)};$2.fn.numeric.keypress=function(e2){var decimal=$2.data(this,"numeric.decimal");var negative=$2.data(this,"numeric.negative");var decimalPlaces=$2.data(this,"numeric.decimalPlaces");var altDecimal=$2.data(this,"numeric.altDecimal");var key2=e2.charCode?e2.charCode:e2.keyCode?e2.keyCode:0;if(key2==13&&this.nodeName.toLowerCase()=="input"){return true}else if(key2==13){return false}else if(key2==35||key2==36||key2==37){return false}var allow=false;if(e2.ctrlKey&&key2==97||e2.ctrlKey&&key2==65){return true}if(e2.ctrlKey&&key2==120||e2.ctrlKey&&key2==88){return true}if(e2.ctrlKey&&key2==99||e2.ctrlKey&&key2==67){return true}if(e2.ctrlKey&&key2==122||e2.ctrlKey&&key2==90){return true}if(e2.ctrlKey&&key2==118||e2.ctrlKey&&key2==86||e2.shiftKey&&key2==45){return true}if(key2<48||key2>57){var value=$2(this).val();if($2.inArray("-",value.split(""))!==0&&negative&&key2==45&&(value.length===0||parseInt($2.fn.getSelectionStart(this),10)===0)){return true}if(decimal&&key2==decimal.charCodeAt(0)&&$2.inArray(decimal,value.split(""))!=-1){allow=false}if(key2!=8&&key2!=9&&key2!=13&&key2!=35&&key2!=36&&key2!=37&&key2!=39&&key2!=46){allow=false}else{if(typeof e2.charCode!="undefined"){if(e2.keyCode==e2.which&&e2.which!==0){allow=true;if(e2.which==46){allow=false}}else if(e2.keyCode!==0&&e2.charCode===0&&e2.which===0){allow=true}}}if(decimal&&key2==decimal.charCodeAt(0)||altDecimal&&key2==altDecimal.charCodeAt(0)){if($2.inArray(decimal,value.split(""))==-1){allow=true}else{allow=false}}}else{allow=true;if(decimal&&decimalPlaces>0){var selectionStart=$2.fn.getSelectionStart(this);var selectionEnd=$2.fn.getSelectionEnd(this);var dot=$2.inArray(decimal,$2(this).val().split(""));if(selectionStart===selectionEnd&&dot>=0&&selectionStart>dot&&$2(this).val().length>dot+decimalPlaces){allow=false}}}return allow};$2.fn.numeric.keyup=function(e2){var val2=$2(this).val();if(val2&&val2.length>0){var carat=$2.fn.getSelectionStart(this);var selectionEnd=$2.fn.getSelectionEnd(this);var decimal=$2.data(this,"numeric.decimal");var negative=$2.data(this,"numeric.negative");var decimalPlaces=$2.data(this,"numeric.decimalPlaces");var altDecimal=$2.data(this,"numeric.altDecimal");if(decimal!==""&&decimal!==null){var dot=$2.inArray(decimal,val2.split(""));if(dot===0){this.value="0"+val2;carat++;selectionEnd++}if(dot==1&&val2.charAt(0)=="-"){this.value="-0"+val2.substring(1);carat++;selectionEnd++}val2=this.value}var validChars=[0,1,2,3,4,5,6,7,8,9,"-",decimal];var length=val2.length;for(var i2=length-1;i2>=0;i2--){var ch=val2.charAt(i2);if(i2!==0&&ch=="-"){val2=val2.substring(0,i2)+val2.substring(i2+1)}else if(i2===0&&!negative&&ch=="-"){val2=val2.substring(1)}var validChar=false;for(var j=0;j<validChars.length;j++){if(ch==validChars[j]){validChar=true;break}}if(!validChar&&ch==altDecimal){val2=val2.substring(0,i2)+decimal+val2.substring(i2+1);validChar=true}if(!validChar||ch==" "){val2=val2.substring(0,i2)+val2.substring(i2+1)}}var firstDecimal=$2.inArray(decimal,val2.split(""));if(firstDecimal>0){for(var k=length-1;k>firstDecimal;k--){var chch=val2.charAt(k);if(chch==decimal){val2=val2.substring(0,k)+val2.substring(k+1)}}}if(decimal&&decimalPlaces>0){var dot=$2.inArray(decimal,val2.split(""));if(dot>=0){val2=val2.substring(0,dot+decimalPlaces+1);selectionEnd=Math.min(val2.length,selectionEnd)}}this.value=val2;$2.fn.setSelection(this,[carat,selectionEnd])}};$2.fn.numeric.blur=function(){var decimal=$2.data(this,"numeric.decimal");var callback=$2.data(this,"numeric.callback");var negative=$2.data(this,"numeric.negative");var val2=this.value;if(val2!==""){var re=new RegExp("^"+(negative?"-?":"")+"\\d+$|^"+(negative?"-?":"")+"\\d*"+decimal+"\\d+$");if(!re.exec(val2)){callback.apply(this)}}};$2.fn.removeNumeric=function(){return this.data("numeric.decimal",null).data("numeric.altDecimal",null).data("numeric.negative",null).data("numeric.callback",null).data("numeric.decimalPlaces",null).unbind("keypress",$2.fn.numeric.keypress).unbind("keyup",$2.fn.numeric.keyup).unbind("blur",$2.fn.numeric.blur)};$2.fn.getSelectionStart=function(o){if(o.type==="number"){return void 0}else if(o.createTextRange&&document.selection){var r2=document.selection.createRange().duplicate();r2.moveEnd("character",o.value.length);if(r2.text=="")return o.value.length;return Math.max(0,o.value.lastIndexOf(r2.text))}else{try{return o.selectionStart}catch(e2){return 0}}};$2.fn.getSelectionEnd=function(o){if(o.type==="number"){return void 0}else if(o.createTextRange&&document.selection){var r2=document.selection.createRange().duplicate();r2.moveStart("character",-o.value.length);return r2.text.length}else return o.selectionEnd};$2.fn.setSelection=function(o,p){if(typeof p=="number"){p=[p,p]}if(p&&p.constructor==Array&&p.length==2){if(o.type==="number"){o.focus()}else if(o.createTextRange){var r2=o.createTextRange();r2.collapse(true);r2.moveStart("character",p[0]);r2.moveEnd("character",p[1]-p[0]);r2.select()}else{o.focus();try{if(o.setSelectionRange){o.setSelectionRange(p[0],p[1])}}catch(e2){}}}}});;/**
|
|
430
|
+
* Timeago is a jQuery plugin that makes it easy to support automatically
|
|
431
|
+
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
|
|
432
|
+
*
|
|
433
|
+
* @name timeago
|
|
434
|
+
* @version 1.6.7
|
|
435
|
+
* @requires jQuery >=1.5.0 <4.0
|
|
436
|
+
* @author Ryan McGeary
|
|
437
|
+
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
|
|
438
|
+
*
|
|
439
|
+
* For usage and examples, visit:
|
|
440
|
+
* http://timeago.yarp.com/
|
|
441
|
+
*
|
|
442
|
+
* Copyright (c) 2008-2019, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
|
|
443
|
+
*/(function(factory18){if(typeof define==="function"&&define.amd){define(["jquery"],factory18)}else if(typeof module==="object"&&typeof module.exports==="object"){factory18(require("jquery"))}else{factory18(jQuery)}})(function($2){$2.timeago=function(timestamp){if(timestamp instanceof Date){return inWords(timestamp)}else if(typeof timestamp==="string"){return inWords($2.timeago.parse(timestamp))}else if(typeof timestamp==="number"){return inWords(new Date(timestamp))}else{return inWords($2.timeago.datetime(timestamp))}};var $t=$2.timeago;$2.extend($2.timeago,{settings:{refreshMillis:6e4,allowPast:true,allowFuture:false,localeTitle:false,cutoff:0,autoDispose:true,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(distanceMillis){if(!this.settings.allowPast&&!this.settings.allowFuture){throw"timeago allowPast and allowFuture settings can not both be set to false."}var $l=this.settings.strings;var prefix=$l.prefixAgo;var suffix=$l.suffixAgo;if(this.settings.allowFuture){if(distanceMillis<0){prefix=$l.prefixFromNow;suffix=$l.suffixFromNow}}if(!this.settings.allowPast&&distanceMillis>=0){return this.settings.strings.inPast}var seconds=Math.abs(distanceMillis)/1e3;var minutes=seconds/60;var hours=minutes/60;var days=hours/24;var years=days/365;function substitute(stringOrFunction,number){var string=$2.isFunction(stringOrFunction)?stringOrFunction(number,distanceMillis):stringOrFunction;var value=$l.numbers&&$l.numbers[number]||number;return string.replace(/%d/i,value)}var words=seconds<45&&substitute($l.seconds,Math.round(seconds))||seconds<90&&substitute($l.minute,1)||minutes<45&&substitute($l.minutes,Math.round(minutes))||minutes<90&&substitute($l.hour,1)||hours<24&&substitute($l.hours,Math.round(hours))||hours<42&&substitute($l.day,1)||days<30&&substitute($l.days,Math.round(days))||days<45&&substitute($l.month,1)||days<365&&substitute($l.months,Math.round(days/30))||years<1.5&&substitute($l.year,1)||substitute($l.years,Math.round(years));var separator=$l.wordSeparator||"";if($l.wordSeparator===void 0){separator=" "}return $2.trim([prefix,words,suffix].join(separator))},parse:function(iso8601){var s=$2.trim(iso8601);s=s.replace(/\.\d+/,"");s=s.replace(/-/,"/").replace(/-/,"/");s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2");s=s.replace(/([\+\-]\d\d)$/," $100");return new Date(s)},datetime:function(elem){var iso8601=$t.isTime(elem)?$2(elem).attr("datetime"):$2(elem).attr("title");return $t.parse(iso8601)},isTime:function(elem){return $2(elem).get(0).tagName.toLowerCase()==="time"}});var functions={init:function(){functions.dispose.call(this);var refresh_el=$2.proxy(refresh,this);refresh_el();var $s=$t.settings;if($s.refreshMillis>0){this._timeagoInterval=setInterval(refresh_el,$s.refreshMillis)}},update:function(timestamp){var date=timestamp instanceof Date?timestamp:$t.parse(timestamp);$2(this).data("timeago",{datetime:date});if($t.settings.localeTitle){$2(this).attr("title",date.toLocaleString())}refresh.apply(this)},updateFromDOM:function(){$2(this).data("timeago",{datetime:$t.parse($t.isTime(this)?$2(this).attr("datetime"):$2(this).attr("title"))});refresh.apply(this)},dispose:function(){if(this._timeagoInterval){window.clearInterval(this._timeagoInterval);this._timeagoInterval=null}}};$2.fn.timeago=function(action,options){var fn2=action?functions[action]:functions.init;if(!fn2){throw new Error("Unknown function name '"+action+"' for timeago")}this.each(function(){fn2.call(this,options)});return this};function refresh(){var $s=$t.settings;if($s.autoDispose&&!$2.contains(document.documentElement,this)){$2(this).timeago("dispose");return this}var data2=prepareData(this);if(!isNaN(data2.datetime)){if($s.cutoff===0||Math.abs(distance(data2.datetime))<$s.cutoff){$2(this).text(inWords(data2.datetime))}else{if($2(this).attr("title").length>0){$2(this).text($2(this).attr("title"))}}}return this}function prepareData(element){element=$2(element);if(!element.data("timeago")){element.data("timeago",{datetime:$t.datetime(element)});var text=$2.trim(element.text());if($t.settings.localeTitle){element.attr("title",element.data("timeago").datetime.toLocaleString())}else if(text.length>0&&!($t.isTime(element)&&element.attr("title"))){element.attr("title",text)}}return element.data("timeago")}function inWords(date){return $t.inWords(distance(date))}function distance(date){return new Date().getTime()-date.getTime()}document.createElement("abbr");document.createElement("time")});;;(function(factory18){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory18)}else if(typeof module==="object"&&module.exports){module.exports=function(root,jQuery2){if(jQuery2===void 0){if(typeof window!=="undefined"){jQuery2=require("jquery")}else{jQuery2=require("jquery")(root)}}factory18(jQuery2);return jQuery2}}else{factory18(jQuery)}})(function($2){"use strict";var Crsl=window.Crsl||{};Crsl=(function(){var instanceUid=0;function Crsl2(element,settings2){var _=this,dataSettings;_.defaults={accessibility:true,adaptiveHeight:false,appendArrows:$2(element),appendDots:$2(element),arrows:true,asNavFor:null,prevArrow:'<button class="crsl-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="crsl-next" aria-label="Next" type="button">Next</button>',autoplay:false,autoplaySpeed:3e3,centerMode:false,centerPadding:"50px",cssEase:"ease",customPaging:function(slider,i2){return $2('<button type="button"></button>').text(i2+1)},dots:false,dotsClass:"crsl-dots",draggable:true,easing:"linear",edgeFriction:.35,fade:false,focusOnSelect:false,focusOnChange:false,infinite:true,initialSlide:0,lazyLoad:"ondemand",mobileFirst:false,pauseOnHover:true,pauseOnFocus:true,pauseOnDotsHover:false,respondTo:"window",responsive:null,rows:1,rtl:false,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:true,swipeToSlide:false,touchMove:true,touchThreshold:5,useCSS:true,useTransform:true,variableWidth:false,vertical:false,verticalSwiping:false,waitForAnimate:true,zIndex:1e3};_.initials={animating:false,dragging:false,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:false,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:false,slideOffset:0,swipeLeft:null,swiping:false,$list:null,touchObject:{},transformsEnabled:false,uncrsled:false};$2.extend(_,_.initials);_.activeBreakpoint=null;_.animType=null;_.animProp=null;_.breakpoints=[];_.breakpointSettings=[];_.cssTransitions=false;_.focussed=false;_.interrupted=false;_.hidden="hidden";_.paused=true;_.positionProp=null;_.respondTo=null;_.rowCount=1;_.shouldClick=true;_.$slider=$2(element);_.$slidesCache=null;_.transformType=null;_.transitionType=null;_.visibilityChange="visibilitychange";_.windowWidth=0;_.windowTimer=null;dataSettings=$2(element).data("crsl")||{};_.options=$2.extend({},_.defaults,settings2,dataSettings);_.currentSlide=_.options.initialSlide;_.originalSettings=_.options;_.autoPlay=$2.proxy(_.autoPlay,_);_.autoPlayClear=$2.proxy(_.autoPlayClear,_);_.autoPlayIterator=$2.proxy(_.autoPlayIterator,_);_.changeSlide=$2.proxy(_.changeSlide,_);_.clickHandler=$2.proxy(_.clickHandler,_);_.selectHandler=$2.proxy(_.selectHandler,_);_.setPosition=$2.proxy(_.setPosition,_);_.swipeHandler=$2.proxy(_.swipeHandler,_);_.dragHandler=$2.proxy(_.dragHandler,_);_.keyHandler=$2.proxy(_.keyHandler,_);_.instanceUid=instanceUid++;_.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;_.registerBreakpoints();_.init(true)}return Crsl2})();Crsl.prototype.activateADA=function(){var _=this;_.$slideTrack.find(".crsl-active").attr({"aria-hidden":"false","tabindex":"0"}).find("a, input, button, select").attr({"tabindex":"0"})};Crsl.prototype.addSlide=Crsl.prototype.crslAdd=function(markup,index2,addBefore){var _=this;if(typeof index2==="boolean"){addBefore=index2;index2=null}else if(index2<0||index2>=_.slideCount){return false}_.unload();if(typeof index2==="number"){if(index2===0&&_.$slides.length===0){$2(markup).appendTo(_.$slideTrack)}else if(addBefore){$2(markup).insertBefore(_.$slides.eq(index2))}else{$2(markup).insertAfter(_.$slides.eq(index2))}}else{if(addBefore===true){$2(markup).prependTo(_.$slideTrack)}else{$2(markup).appendTo(_.$slideTrack)}}_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slides.each(function(index3,element){$2(element).attr("data-crsl-index",index3)});_.$slidesCache=_.$slides;_.reinit()};Crsl.prototype.animateHeight=function(){var _=this;if(_.options.slidesToShow===1&&_.options.adaptiveHeight===true&&_.options.vertical===false){var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(true);_.$list.animate({height:targetHeight},_.options.speed)}};Crsl.prototype.animateSlide=function(targetLeft,callback){var animProps={},_=this;_.animateHeight();if(_.options.rtl===true&&_.options.vertical===false){targetLeft=-targetLeft}if(_.transformsEnabled===false){if(_.options.vertical===false){_.$slideTrack.animate({left:targetLeft},_.options.speed,_.options.easing,callback)}else{_.$slideTrack.animate({top:targetLeft},_.options.speed,_.options.easing,callback)}}else{if(_.cssTransitions===false){if(_.options.rtl===true){_.currentLeft=-_.currentLeft}$2({animStart:_.currentLeft}).animate({animStart:targetLeft},{duration:_.options.speed,easing:_.options.easing,step:function(now){now=Math.ceil(now);if(_.options.vertical===false){animProps[_.animType]="translate("+now+"px, 0)";_.$slideTrack.css(animProps)}else{animProps[_.animType]="translate(0, "+now+"px)";_.$slideTrack.css(animProps)}},complete:function(){if(callback){callback.call()}}})}else{_.applyTransition();targetLeft=Math.ceil(targetLeft);if(_.options.vertical===false){animProps[_.animType]="translate3d("+targetLeft+"px, 0, 0)"}else{animProps[_.animType]="translate3d(0, "+targetLeft+"px, 0)"}_.$slideTrack.css(animProps);if(callback){setTimeout(function(){_.disableTransition();callback.call()},_.options.speed)}}}};Crsl.prototype.getNavTarget=function(){var _=this,asNavFor=_.options.asNavFor;if(asNavFor&&asNavFor!==null){asNavFor=$2(asNavFor).not(_.$slider)}return asNavFor};Crsl.prototype.asNavFor=function(index2){var _=this,asNavFor=_.getNavTarget();if(asNavFor!==null&&typeof asNavFor==="object"){asNavFor.each(function(){var target=$2(this).crsl("getCrsl");if(!target.uncrsled){target.slideHandler(index2,true)}})}};Crsl.prototype.applyTransition=function(slide){var _=this,transition={};if(_.options.fade===false){transition[_.transitionType]=_.transformType+" "+_.options.speed+"ms "+_.options.cssEase}else{transition[_.transitionType]="opacity "+_.options.speed+"ms "+_.options.cssEase}if(_.options.fade===false){_.$slideTrack.css(transition)}else{_.$slides.eq(slide).css(transition)}};Crsl.prototype.autoPlay=function(){var _=this;_.autoPlayClear();if(_.slideCount>_.options.slidesToShow){_.autoPlayTimer=setInterval(_.autoPlayIterator,_.options.autoplaySpeed)}};Crsl.prototype.autoPlayClear=function(){var _=this;if(_.autoPlayTimer){clearInterval(_.autoPlayTimer)}};Crsl.prototype.autoPlayIterator=function(){var _=this,slideTo=_.currentSlide+_.options.slidesToScroll;if(!_.paused&&!_.interrupted&&!_.focussed){if(_.options.infinite===false){if(_.direction===1&&_.currentSlide+1===_.slideCount-1){_.direction=0}else if(_.direction===0){slideTo=_.currentSlide-_.options.slidesToScroll;if(_.currentSlide-1===0){_.direction=1}}}_.slideHandler(slideTo)}};Crsl.prototype.buildArrows=function(){var _=this;if(_.options.arrows===true){_.$prevArrow=$2(_.options.prevArrow).addClass("crsl-arrow");_.$nextArrow=$2(_.options.nextArrow).addClass("crsl-arrow");if(_.slideCount>_.options.slidesToShow){_.$prevArrow.removeClass("crsl-hidden").removeAttr("aria-hidden tabindex");_.$nextArrow.removeClass("crsl-hidden").removeAttr("aria-hidden tabindex");if(_.htmlExpr.test(_.options.prevArrow)){_.$prevArrow.prependTo(_.options.appendArrows)}if(_.htmlExpr.test(_.options.nextArrow)){_.$nextArrow.appendTo(_.options.appendArrows)}if(_.options.infinite!==true){_.$prevArrow.addClass("crsl-disabled").attr("aria-disabled","true")}}else{_.$prevArrow.add(_.$nextArrow).addClass("crsl-hidden").attr({"aria-disabled":"true","tabindex":"-1"})}}};Crsl.prototype.buildDots=function(){var _=this,i2,dot;if(_.options.dots===true&&_.slideCount>_.options.slidesToShow){_.$slider.addClass("crsl-dotted");dot=$2("<ul></ul>").addClass(_.options.dotsClass);for(i2=0;i2<=_.getDotCount();i2+=1){dot.append($2("<li></li>").append(_.options.customPaging.call(this,_,i2)))}_.$dots=dot.appendTo(_.options.appendDots);_.$dots.find("li").first().addClass("crsl-active")}};Crsl.prototype.buildOut=function(){var _=this;_.$slides=_.$slider.children(_.options.slide+":not(.crsl-cloned)").addClass("crsl-slide");_.slideCount=_.$slides.length;_.$slides.each(function(index2,element){$2(element).attr("data-crsl-index",index2).data("originalStyling",$2(element).attr("style")||"")});_.$slider.addClass("crsl-slider");if(_.options.rtl===true){_.$slider.attr("dir","rtl")}_.$slideTrack=_.slideCount===0?$2('<div class="crsl-track"></div>').appendTo(_.$slider):_.$slides.wrapAll('<div class="crsl-track"></div>').parent();_.$list=_.$slideTrack.wrap('<div class="crsl-list"></div>').parent();_.$slideTrack.css("opacity",0);if(_.options.centerMode===true||_.options.swipeToSlide===true){_.options.slidesToScroll=1}$2("img[data-lazy]",_.$slider).not("[src]").addClass("crsl-loading");_.setupInfinite();_.buildArrows();_.buildDots();_.updateDots();_.setSlideClasses(typeof _.currentSlide==="number"?_.currentSlide:0);if(_.options.draggable===true){_.$list.addClass("draggable")}};Crsl.prototype.buildRows=function(){var _=this,a,b,c,newSlides,numOfSlides,originalSlides,slidesPerSection;newSlides=document.createDocumentFragment();originalSlides=_.$slider.children();if(_.options.rows>0){slidesPerSection=_.options.slidesPerRow*_.options.rows;numOfSlides=Math.ceil(originalSlides.length/slidesPerSection);for(a=0;a<numOfSlides;a++){var slide=document.createElement("div");for(b=0;b<_.options.rows;b++){var row=document.createElement("div");for(c=0;c<_.options.slidesPerRow;c++){var target=a*slidesPerSection+(b*_.options.slidesPerRow+c);if(originalSlides.get(target)){row.appendChild(originalSlides.get(target))}}slide.appendChild(row)}newSlides.appendChild(slide)}_.$slider.empty().append(newSlides);_.$slider.children().children().children().css({"width":100/_.options.slidesPerRow+"%","display":"inline-block"})}};Crsl.prototype.checkResponsive=function(initial,forceUpdate){var _=this,breakpoint,targetBreakpoint,respondToWidth,triggerBreakpoint=false;var sliderWidth=_.$slider.width();var windowWidth=window.innerWidth||$2(window).width();if(_.respondTo==="window"){respondToWidth=windowWidth}else if(_.respondTo==="slider"){respondToWidth=sliderWidth}else if(_.respondTo==="min"){respondToWidth=Math.min(windowWidth,sliderWidth)}if(_.options.responsive&&_.options.responsive.length&&_.options.responsive!==null){targetBreakpoint=null;for(breakpoint in _.breakpoints){if(_.breakpoints.hasOwnProperty(breakpoint)){if(_.originalSettings.mobileFirst===false){if(respondToWidth<_.breakpoints[breakpoint]){targetBreakpoint=_.breakpoints[breakpoint]}}else{if(respondToWidth>_.breakpoints[breakpoint]){targetBreakpoint=_.breakpoints[breakpoint]}}}}if(targetBreakpoint!==null){if(_.activeBreakpoint!==null){if(targetBreakpoint!==_.activeBreakpoint||forceUpdate){_.activeBreakpoint=targetBreakpoint;if(_.breakpointSettings[targetBreakpoint]==="uncrsl"){_.uncrsl(targetBreakpoint)}else{_.options=$2.extend({},_.originalSettings,_.breakpointSettings[targetBreakpoint]);if(initial===true){_.currentSlide=_.options.initialSlide}_.refresh(initial)}triggerBreakpoint=targetBreakpoint}}else{_.activeBreakpoint=targetBreakpoint;if(_.breakpointSettings[targetBreakpoint]==="uncrsl"){_.uncrsl(targetBreakpoint)}else{_.options=$2.extend({},_.originalSettings,_.breakpointSettings[targetBreakpoint]);if(initial===true){_.currentSlide=_.options.initialSlide}_.refresh(initial)}triggerBreakpoint=targetBreakpoint}}else{if(_.activeBreakpoint!==null){_.activeBreakpoint=null;_.options=_.originalSettings;if(initial===true){_.currentSlide=_.options.initialSlide}_.refresh(initial);triggerBreakpoint=targetBreakpoint}}if(!initial&&triggerBreakpoint!==false){_.$slider.trigger("breakpoint",[_,triggerBreakpoint])}}};Crsl.prototype.changeSlide=function(event,dontAnimate){var _=this,$target=$2(event.currentTarget),indexOffset,slideOffset,unevenOffset;if($target.is("a")){event.preventDefault()}if(!$target.is("li")){$target=$target.closest("li")}unevenOffset=_.slideCount%_.options.slidesToScroll!==0;indexOffset=unevenOffset?0:(_.slideCount-_.currentSlide)%_.options.slidesToScroll;switch(event.data.message){case"previous":slideOffset=indexOffset===0?_.options.slidesToScroll:_.options.slidesToShow-indexOffset;if(_.slideCount>_.options.slidesToShow){_.slideHandler(_.currentSlide-slideOffset,false,dontAnimate)}break;case"next":slideOffset=indexOffset===0?_.options.slidesToScroll:indexOffset;if(_.slideCount>_.options.slidesToShow){_.slideHandler(_.currentSlide+slideOffset,false,dontAnimate)}break;case"index":var index2=event.data.index===0?0:event.data.index||$target.index()*_.options.slidesToScroll;_.slideHandler(_.checkNavigable(index2),false,dontAnimate);$target.children().trigger("focus");break;default:return}};Crsl.prototype.checkNavigable=function(index2){var _=this,navigables,prevNavigable;navigables=_.getNavigableIndexes();prevNavigable=0;if(index2>navigables[navigables.length-1]){index2=navigables[navigables.length-1]}else{for(var n2 in navigables){if(index2<navigables[n2]){index2=prevNavigable;break}prevNavigable=navigables[n2]}}return index2};Crsl.prototype.cleanUpEvents=function(){var _=this;if(_.options.dots&&_.$dots!==null){$2("li",_.$dots).off("click.crsl",_.changeSlide).off("mouseenter.crsl",$2.proxy(_.interrupt,_,true)).off("mouseleave.crsl",$2.proxy(_.interrupt,_,false));if(_.options.accessibility===true){_.$dots.off("keydown.crsl",_.keyHandler)}}_.$slider.off("focus.crsl blur.crsl");if(_.options.arrows===true&&_.slideCount>_.options.slidesToShow){_.$prevArrow&&_.$prevArrow.off("click.crsl",_.changeSlide);_.$nextArrow&&_.$nextArrow.off("click.crsl",_.changeSlide);if(_.options.accessibility===true){_.$prevArrow&&_.$prevArrow.off("keydown.crsl",_.keyHandler);_.$nextArrow&&_.$nextArrow.off("keydown.crsl",_.keyHandler)}}_.$list.off("touchstart.crsl mousedown.crsl",_.swipeHandler);_.$list.off("touchmove.crsl mousemove.crsl",_.swipeHandler);_.$list.off("touchend.crsl mouseup.crsl",_.swipeHandler);_.$list.off("touchcancel.crsl mouseleave.crsl",_.swipeHandler);_.$list.off("click.crsl",_.clickHandler);$2(document).off(_.visibilityChange,_.visibility);_.cleanUpSlideEvents();if(_.options.accessibility===true){_.$list.off("keydown.crsl",_.keyHandler)}if(_.options.focusOnSelect===true){$2(_.$slideTrack).children().off("click.crsl",_.selectHandler)}$2(window).off("orientationchange.crsl.crsl-"+_.instanceUid,_.orientationChange);$2(window).off("resize.crsl.crsl-"+_.instanceUid,_.resize);$2("[draggable!=true]",_.$slideTrack).off("dragstart",_.preventDefault);$2(window).off("load.crsl.crsl-"+_.instanceUid,_.setPosition)};Crsl.prototype.cleanUpSlideEvents=function(){var _=this;_.$list.off("mouseenter.crsl",$2.proxy(_.interrupt,_,true));_.$list.off("mouseleave.crsl",$2.proxy(_.interrupt,_,false))};Crsl.prototype.cleanUpRows=function(){var _=this,originalSlides;if(_.options.rows>0){originalSlides=_.$slides.children().children();originalSlides.removeAttr("style");_.$slider.empty().append(originalSlides)}};Crsl.prototype.clickHandler=function(event){var _=this;if(_.shouldClick===false){event.stopImmediatePropagation();event.stopPropagation();event.preventDefault()}};Crsl.prototype.destroy=function(refresh){var _=this;_.autoPlayClear();_.touchObject={};_.cleanUpEvents();$2(".crsl-cloned",_.$slider).detach();if(_.$dots){_.$dots.remove()}if(_.$prevArrow&&_.$prevArrow.length){_.$prevArrow.removeClass("crsl-disabled crsl-arrow crsl-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display","");if(_.htmlExpr.test(_.options.prevArrow)){_.$prevArrow.remove()}}if(_.$nextArrow&&_.$nextArrow.length){_.$nextArrow.removeClass("crsl-disabled crsl-arrow crsl-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display","");if(_.htmlExpr.test(_.options.nextArrow)){_.$nextArrow.remove()}}if(_.$slides){_.$slides.removeClass("crsl-slide crsl-active crsl-center crsl-visible crsl-current").removeAttr("aria-hidden").removeAttr("data-crsl-index").each(function(){$2(this).attr("style",$2(this).data("originalStyling"))});_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.detach();_.$list.detach();_.$slider.append(_.$slides)}_.cleanUpRows();_.$slider.removeClass("crsl-slider");_.$slider.removeClass("crsl-initialized");_.$slider.removeClass("crsl-dotted");_.uncrsled=true;if(!refresh){_.$slider.trigger("destroy",[_])}};Crsl.prototype.disableTransition=function(slide){var _=this,transition={};transition[_.transitionType]="";if(_.options.fade===false){_.$slideTrack.css(transition)}else{_.$slides.eq(slide).css(transition)}};Crsl.prototype.fadeSlide=function(slideIndex,callback){var _=this;if(_.cssTransitions===false){_.$slides.eq(slideIndex).css({zIndex:_.options.zIndex});_.$slides.eq(slideIndex).animate({opacity:1},_.options.speed,_.options.easing,callback)}else{_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:1,zIndex:_.options.zIndex});if(callback){setTimeout(function(){_.disableTransition(slideIndex);callback.call()},_.options.speed)}}};Crsl.prototype.fadeSlideOut=function(slideIndex){var _=this;if(_.cssTransitions===false){_.$slides.eq(slideIndex).animate({opacity:0,zIndex:_.options.zIndex-2},_.options.speed,_.options.easing)}else{_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:0,zIndex:_.options.zIndex-2})}};Crsl.prototype.filterSlides=Crsl.prototype.crslFilter=function(filter){var _=this;if(filter!==null){_.$slidesCache=_.$slides;_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.filter(filter).appendTo(_.$slideTrack);_.reinit()}};Crsl.prototype.focusHandler=function(){var _=this;_.$slider.off("focus.crsl blur.crsl").on("focus.crsl","*",function(event){var $sf=$2(this);setTimeout(function(){if(_.options.pauseOnFocus){if($sf.is(":focus")){_.focussed=true;_.autoPlay()}}},0)}).on("blur.crsl","*",function(event){var $sf=$2(this);if(_.options.pauseOnFocus){_.focussed=false;_.autoPlay()}})};Crsl.prototype.getCurrent=Crsl.prototype.crslCurrentSlide=function(){var _=this;return _.currentSlide};Crsl.prototype.getDotCount=function(){var _=this;var breakPoint=0;var counter=0;var pagerQty=0;if(_.options.infinite===true){if(_.slideCount<=_.options.slidesToShow){++pagerQty}else{while(breakPoint<_.slideCount){++pagerQty;breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}}}else if(_.options.centerMode===true){pagerQty=_.slideCount}else if(!_.options.asNavFor){pagerQty=1+Math.ceil((_.slideCount-_.options.slidesToShow)/_.options.slidesToScroll)}else{while(breakPoint<_.slideCount){++pagerQty;breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}}return pagerQty-1};Crsl.prototype.getLeft=function(slideIndex){var _=this,targetLeft,verticalHeight,verticalOffset=0,targetSlide,coef;_.slideOffset=0;verticalHeight=_.$slides.first().outerHeight(true);if(_.options.infinite===true){if(_.slideCount>_.options.slidesToShow){_.slideOffset=_.slideWidth*_.options.slidesToShow*-1;coef=-1;if(_.options.vertical===true&&_.options.centerMode===true){if(_.options.slidesToShow===2){coef=-1.5}else if(_.options.slidesToShow===1){coef=-2}}verticalOffset=verticalHeight*_.options.slidesToShow*coef}if(_.slideCount%_.options.slidesToScroll!==0){if(slideIndex+_.options.slidesToScroll>_.slideCount&&_.slideCount>_.options.slidesToShow){if(slideIndex>_.slideCount){_.slideOffset=(_.options.slidesToShow-(slideIndex-_.slideCount))*_.slideWidth*-1;verticalOffset=(_.options.slidesToShow-(slideIndex-_.slideCount))*verticalHeight*-1}else{_.slideOffset=_.slideCount%_.options.slidesToScroll*_.slideWidth*-1;verticalOffset=_.slideCount%_.options.slidesToScroll*verticalHeight*-1}}}}else{if(slideIndex+_.options.slidesToShow>_.slideCount){_.slideOffset=(slideIndex+_.options.slidesToShow-_.slideCount)*_.slideWidth;verticalOffset=(slideIndex+_.options.slidesToShow-_.slideCount)*verticalHeight}}if(_.slideCount<=_.options.slidesToShow){_.slideOffset=0;verticalOffset=0}if(_.options.centerMode===true&&_.slideCount<=_.options.slidesToShow){_.slideOffset=_.slideWidth*Math.floor(_.options.slidesToShow)/2-_.slideWidth*_.slideCount/2}else if(_.options.centerMode===true&&_.options.infinite===true){_.slideOffset+=_.slideWidth*Math.floor(_.options.slidesToShow/2)-_.slideWidth}else if(_.options.centerMode===true){_.slideOffset=0;_.slideOffset+=_.slideWidth*Math.floor(_.options.slidesToShow/2)}if(_.options.vertical===false){targetLeft=slideIndex*_.slideWidth*-1+_.slideOffset}else{targetLeft=slideIndex*verticalHeight*-1+verticalOffset}if(_.options.variableWidth===true){if(_.slideCount<=_.options.slidesToShow||_.options.infinite===false){targetSlide=_.$slideTrack.children(".crsl-slide").eq(slideIndex)}else{targetSlide=_.$slideTrack.children(".crsl-slide").eq(slideIndex+_.options.slidesToShow)}if(_.options.rtl===true){if(targetSlide[0]){targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width())*-1}else{targetLeft=0}}else{targetLeft=targetSlide[0]?targetSlide[0].offsetLeft*-1:0}if(_.options.centerMode===true){if(_.slideCount<=_.options.slidesToShow||_.options.infinite===false){targetSlide=_.$slideTrack.children(".crsl-slide").eq(slideIndex)}else{targetSlide=_.$slideTrack.children(".crsl-slide").eq(slideIndex+_.options.slidesToShow+1)}if(_.options.rtl===true){if(targetSlide[0]){targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width())*-1}else{targetLeft=0}}else{targetLeft=targetSlide[0]?targetSlide[0].offsetLeft*-1:0}targetLeft+=(_.$list.width()-targetSlide.outerWidth())/2}}return targetLeft};Crsl.prototype.getOption=Crsl.prototype.crslGetOption=function(option){var _=this;return _.options[option]};Crsl.prototype.getNavigableIndexes=function(){var _=this,breakPoint=0,counter=0,indexes=[],max;if(_.options.infinite===false){max=_.slideCount}else{breakPoint=_.options.slidesToScroll*-1;counter=_.options.slidesToScroll*-1;max=_.slideCount*2}while(breakPoint<max){indexes.push(breakPoint);breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}return indexes};Crsl.prototype.getCrsl=function(){return this};Crsl.prototype.getSlideCount=function(){var _=this,slidesTraversed,swipedSlide,swipeTarget,centerOffset;centerOffset=_.options.centerMode===true?Math.floor(_.$list.width()/2):0;swipeTarget=_.swipeLeft*-1+centerOffset;if(_.options.swipeToSlide===true){_.$slideTrack.find(".crsl-slide").each(function(index2,slide){var slideOuterWidth,slideOffset,slideRightBoundary;slideOuterWidth=$2(slide).outerWidth();slideOffset=slide.offsetLeft;if(_.options.centerMode!==true){slideOffset+=slideOuterWidth/2}slideRightBoundary=slideOffset+slideOuterWidth;if(swipeTarget<slideRightBoundary){swipedSlide=slide;return false}});slidesTraversed=Math.abs($2(swipedSlide).attr("data-crsl-index")-_.currentSlide)||1;return slidesTraversed}else{return _.options.slidesToScroll}};Crsl.prototype.goTo=Crsl.prototype.crslGoTo=function(slide,dontAnimate){var _=this;_.changeSlide({data:{message:"index",index:parseInt(slide)}},dontAnimate)};Crsl.prototype.init=function(creation){var _=this;if(!$2(_.$slider).hasClass("crsl-initialized")){$2(_.$slider).addClass("crsl-initialized");_.buildRows();_.buildOut();_.setProps();_.startLoad();_.loadSlider();_.initializeEvents();_.updateArrows();_.updateDots();_.checkResponsive(true);_.focusHandler()}if(creation){_.$slider.trigger("init",[_])}if(_.options.accessibility===true){_.initADA()}if(_.options.autoplay){_.paused=false;_.autoPlay()}};Crsl.prototype.initADA=function(){var _=this,numDotGroups=Math.ceil(_.slideCount/_.options.slidesToScroll),tabControlIndexes=_.getNavigableIndexes().filter(function(val2){return val2>=0&&val2<_.slideCount});_.$slides.add(_.$slideTrack.find(".crsl-cloned")).attr({"aria-hidden":"true","tabindex":"-1"}).find("a, input, button, select").attr({"tabindex":"-1"});if(_.$dots!==null){_.$slides.not(_.$slideTrack.find(".crsl-cloned")).each(function(i3){var slideControlIndex=tabControlIndexes.indexOf(i3);$2(this).attr({"role":"tabpanel","id":"crsl-slide"+_.instanceUid+i3,"tabindex":-1});if(slideControlIndex!==-1){var ariaButtonControl="crsl-slide-control"+_.instanceUid+slideControlIndex;if($2("#"+ariaButtonControl).length){$2(this).attr({"aria-describedby":ariaButtonControl})}}});_.$dots.attr("role","tablist").find("li").each(function(i3){var mappedSlideIndex=tabControlIndexes[i3];$2(this).attr({"role":"presentation"});$2(this).find("button").first().attr({"role":"tab","id":"crsl-slide-control"+_.instanceUid+i3,"aria-controls":"crsl-slide"+_.instanceUid+mappedSlideIndex,"aria-label":i3+1+" / "+numDotGroups,"aria-selected":null,"tabindex":"-1"})}).eq(_.currentSlide).find("button").attr({"aria-selected":"true","tabindex":"0"}).end()}for(var i2=_.currentSlide,max=i2+_.options.slidesToShow;i2<max;i2++){if(_.options.focusOnChange){_.$slides.eq(i2).attr({"tabindex":"0"})}else{_.$slides.eq(i2).removeAttr("tabindex")}}_.activateADA()};Crsl.prototype.initArrowEvents=function(){var _=this;if(_.options.arrows===true&&_.slideCount>_.options.slidesToShow){_.$prevArrow.off("click.crsl").on("click.crsl",{message:"previous"},_.changeSlide);_.$nextArrow.off("click.crsl").on("click.crsl",{message:"next"},_.changeSlide);if(_.options.accessibility===true){_.$prevArrow.on("keydown.crsl",_.keyHandler);_.$nextArrow.on("keydown.crsl",_.keyHandler)}}};Crsl.prototype.initDotEvents=function(){var _=this;if(_.options.dots===true&&_.slideCount>_.options.slidesToShow){$2("li",_.$dots).on("click.crsl",{message:"index"},_.changeSlide);if(_.options.accessibility===true){_.$dots.on("keydown.crsl",_.keyHandler)}}if(_.options.dots===true&&_.options.pauseOnDotsHover===true&&_.slideCount>_.options.slidesToShow){$2("li",_.$dots).on("mouseenter.crsl",$2.proxy(_.interrupt,_,true)).on("mouseleave.crsl",$2.proxy(_.interrupt,_,false))}};Crsl.prototype.initSlideEvents=function(){var _=this;if(_.options.pauseOnHover){_.$list.on("mouseenter.crsl",$2.proxy(_.interrupt,_,true));_.$list.on("mouseleave.crsl",$2.proxy(_.interrupt,_,false))}};Crsl.prototype.initializeEvents=function(){var _=this;_.initArrowEvents();_.initDotEvents();_.initSlideEvents();_.$list.on("touchstart.crsl mousedown.crsl",{action:"start"},_.swipeHandler);_.$list.on("touchmove.crsl mousemove.crsl",{action:"move"},_.swipeHandler);_.$list.on("touchend.crsl mouseup.crsl",{action:"end"},_.swipeHandler);_.$list.on("touchcancel.crsl mouseleave.crsl",{action:"end"},_.swipeHandler);_.$list.on("click.crsl",_.clickHandler);$2(document).on(_.visibilityChange,$2.proxy(_.visibility,_));if(_.options.accessibility===true){_.$list.on("keydown.crsl",_.keyHandler)}if(_.options.focusOnSelect===true){$2(_.$slideTrack).children().on("click.crsl",_.selectHandler)}$2(window).on("orientationchange.crsl.crsl-"+_.instanceUid,$2.proxy(_.orientationChange,_));$2(window).on("resize.crsl.crsl-"+_.instanceUid,$2.proxy(_.resize,_));$2("[draggable!=true]",_.$slideTrack).on("dragstart",_.preventDefault);$2(window).on("load.crsl.crsl-"+_.instanceUid,_.setPosition);$2(_.setPosition)};Crsl.prototype.initUI=function(){var _=this;if(_.options.arrows===true&&_.slideCount>_.options.slidesToShow){_.$prevArrow.show();_.$nextArrow.show()}if(_.options.dots===true&&_.slideCount>_.options.slidesToShow){_.$dots.show()}};Crsl.prototype.keyHandler=function(event){var _=this;if(!event.target.tagName.match("TEXTAREA|INPUT|SELECT")){if(event.keyCode===37&&_.options.accessibility===true){_.changeSlide({data:{message:_.options.rtl===true?"next":"previous"}})}else if(event.keyCode===39&&_.options.accessibility===true){_.changeSlide({data:{message:_.options.rtl===true?"previous":"next"}})}}};Crsl.prototype.lazyLoad=function(){var _=this,loadRange,cloneRange,rangeStart,rangeEnd;function loadImages(imagesScope){$2("img[data-lazy]",imagesScope).each(function(){var image=$2(this),imageSource=$2(this).attr("data-lazy"),imageSrcSet=$2(this).attr("data-srcset"),imageSizes=$2(this).attr("data-sizes")||_.$slider.attr("data-sizes"),imageToLoad=document.createElement("img");imageToLoad.onload=function(){image.animate({opacity:0},100,function(){if(imageSrcSet){image.attr("srcset",imageSrcSet);if(imageSizes){image.attr("sizes",imageSizes)}}image.attr("src",imageSource).animate({opacity:1},200,function(){image.removeAttr("data-lazy data-srcset data-sizes").removeClass("crsl-loading")});_.$slider.trigger("lazyLoaded",[_,image,imageSource])})};imageToLoad.onerror=function(){image.removeAttr("data-lazy").removeClass("crsl-loading").addClass("crsl-lazyload-error");_.$slider.trigger("lazyLoadError",[_,image,imageSource])};imageToLoad.src=imageSource})}if(_.options.centerMode===true){if(_.options.infinite===true){rangeStart=_.currentSlide+(_.options.slidesToShow/2+1);rangeEnd=rangeStart+_.options.slidesToShow+2}else{rangeStart=Math.max(0,_.currentSlide-(_.options.slidesToShow/2+1));rangeEnd=2+(_.options.slidesToShow/2+1)+_.currentSlide}}else{rangeStart=_.options.infinite?_.options.slidesToShow+_.currentSlide:_.currentSlide;rangeEnd=Math.ceil(rangeStart+_.options.slidesToShow);if(_.options.fade===true){if(rangeStart>0)rangeStart--;if(rangeEnd<=_.slideCount)rangeEnd++}}loadRange=_.$slider.find(".crsl-slide").slice(rangeStart,rangeEnd);if(_.options.lazyLoad==="anticipated"){var prevSlide=rangeStart-1,nextSlide=rangeEnd,$slides=_.$slider.find(".crsl-slide");for(var i2=0;i2<_.options.slidesToScroll;i2++){if(prevSlide<0)prevSlide=_.slideCount-1;loadRange=loadRange.add($slides.eq(prevSlide));loadRange=loadRange.add($slides.eq(nextSlide));prevSlide--;nextSlide++}}loadImages(loadRange);if(_.slideCount<=_.options.slidesToShow){cloneRange=_.$slider.find(".crsl-slide");loadImages(cloneRange)}else if(_.currentSlide>=_.slideCount-_.options.slidesToShow){cloneRange=_.$slider.find(".crsl-cloned").slice(0,_.options.slidesToShow);loadImages(cloneRange)}else if(_.currentSlide===0){cloneRange=_.$slider.find(".crsl-cloned").slice(_.options.slidesToShow*-1);loadImages(cloneRange)}};Crsl.prototype.loadSlider=function(){var _=this;_.setPosition();_.$slideTrack.css({opacity:"1"});_.$slider.removeClass("crsl-loading");_.initUI();if(_.options.lazyLoad==="progressive"){_.progressiveLazyLoad()}};Crsl.prototype.next=Crsl.prototype.crslNext=function(){var _=this;_.changeSlide({data:{message:"next"}})};Crsl.prototype.orientationChange=function(){var _=this;_.checkResponsive();_.setPosition()};Crsl.prototype.pause=Crsl.prototype.crslPause=function(){var _=this;_.autoPlayClear();_.paused=true};Crsl.prototype.play=Crsl.prototype.crslPlay=function(){var _=this;_.autoPlay();_.options.autoplay=true;_.paused=false;_.focussed=false;_.interrupted=false};Crsl.prototype.postSlide=function(index2){var _=this;if(!_.uncrsled){_.$slider.trigger("afterChange",[_,index2]);_.animating=false;if(_.slideCount>_.options.slidesToShow){_.setPosition()}_.swipeLeft=null;if(_.options.autoplay){_.autoPlay()}if(_.options.accessibility===true){_.initADA();if(_.options.focusOnChange){var $currentSlide=$2(_.$slides.get(_.currentSlide));$currentSlide.attr("tabindex",0).trigger("focus")}}}};Crsl.prototype.prev=Crsl.prototype.crslPrev=function(){var _=this;_.changeSlide({data:{message:"previous"}})};Crsl.prototype.preventDefault=function(event){event.preventDefault()};Crsl.prototype.progressiveLazyLoad=function(tryCount){tryCount=tryCount||1;var _=this,$imgsToLoad=$2("img[data-lazy]",_.$slider),image,imageSource,imageSrcSet,imageSizes,imageToLoad;if($imgsToLoad.length){image=$imgsToLoad.first();imageSource=image.attr("data-lazy");imageSrcSet=image.attr("data-srcset");imageSizes=image.attr("data-sizes")||_.$slider.attr("data-sizes");imageToLoad=document.createElement("img");imageToLoad.onload=function(){if(imageSrcSet){image.attr("srcset",imageSrcSet);if(imageSizes){image.attr("sizes",imageSizes)}}image.attr("src",imageSource).removeAttr("data-lazy data-srcset data-sizes").removeClass("crsl-loading");if(_.options.adaptiveHeight===true){_.setPosition()}_.$slider.trigger("lazyLoaded",[_,image,imageSource]);_.progressiveLazyLoad()};imageToLoad.onerror=function(){if(tryCount<3){setTimeout(function(){_.progressiveLazyLoad(tryCount+1)},500)}else{image.removeAttr("data-lazy").removeClass("crsl-loading").addClass("crsl-lazyload-error");_.$slider.trigger("lazyLoadError",[_,image,imageSource]);_.progressiveLazyLoad()}};imageToLoad.src=imageSource}else{_.$slider.trigger("allImagesLoaded",[_])}};Crsl.prototype.refresh=function(initializing){var _=this,currentSlide,lastVisibleIndex;lastVisibleIndex=_.slideCount-_.options.slidesToShow;if(!_.options.infinite&&_.currentSlide>lastVisibleIndex){_.currentSlide=lastVisibleIndex}if(_.slideCount<=_.options.slidesToShow){_.currentSlide=0}currentSlide=_.currentSlide;_.destroy(true);$2.extend(_,_.initials,{currentSlide});_.init();if(!initializing){_.changeSlide({data:{message:"index",index:currentSlide}},false)}};Crsl.prototype.registerBreakpoints=function(){var _=this,breakpoint,currentBreakpoint,l,responsiveSettings=_.options.responsive||null;if(Array.isArray(responsiveSettings)&&responsiveSettings.length){_.respondTo=_.options.respondTo||"window";for(breakpoint in responsiveSettings){l=_.breakpoints.length-1;if(responsiveSettings.hasOwnProperty(breakpoint)){currentBreakpoint=responsiveSettings[breakpoint].breakpoint;while(l>=0){if(_.breakpoints[l]&&_.breakpoints[l]===currentBreakpoint){_.breakpoints.splice(l,1)}l--}_.breakpoints.push(currentBreakpoint);_.breakpointSettings[currentBreakpoint]=responsiveSettings[breakpoint].settings}}_.breakpoints.sort(function(a,b){return _.options.mobileFirst?a-b:b-a})}};Crsl.prototype.reinit=function(){var _=this;_.$slides=_.$slideTrack.children(_.options.slide).addClass("crsl-slide");_.slideCount=_.$slides.length;if(_.currentSlide>=_.slideCount&&_.currentSlide!==0){_.currentSlide=_.currentSlide-_.options.slidesToScroll}if(_.slideCount<=_.options.slidesToShow){_.currentSlide=0}_.registerBreakpoints();_.setProps();_.setupInfinite();_.buildArrows();_.updateArrows();_.initArrowEvents();_.buildDots();_.updateDots();_.initDotEvents();_.cleanUpSlideEvents();_.initSlideEvents();_.checkResponsive(false,true);if(_.options.focusOnSelect===true){$2(_.$slideTrack).children().on("click.crsl",_.selectHandler)}_.setSlideClasses(typeof _.currentSlide==="number"?_.currentSlide:0);_.setPosition();_.focusHandler();_.paused=!_.options.autoplay;_.autoPlay();_.$slider.trigger("reInit",[_])};Crsl.prototype.resize=function(){var _=this;if($2(window).width()!==_.windowWidth){clearTimeout(_.windowDelay);_.windowDelay=window.setTimeout(function(){_.windowWidth=$2(window).width();_.checkResponsive();if(!_.uncrsled){_.setPosition()}},50)}};Crsl.prototype.removeSlide=Crsl.prototype.crslRemove=function(index2,removeBefore,removeAll){var _=this;if(typeof index2==="boolean"){removeBefore=index2;index2=removeBefore===true?0:_.slideCount-1}else{index2=removeBefore===true?--index2:index2}if(_.slideCount<1||index2<0||index2>_.slideCount-1){return false}_.unload();if(removeAll===true){_.$slideTrack.children().remove()}else{_.$slideTrack.children(this.options.slide).eq(index2).remove()}_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slidesCache=_.$slides;_.reinit()};Crsl.prototype.setCSS=function(position){var _=this,positionProps={},x2,y;if(_.options.rtl===true){position=-position}x2=_.positionProp=="left"?Math.ceil(position)+"px":"0";y=_.positionProp=="top"?Math.ceil(position)+"px":"0";positionProps[_.positionProp]=position;if(_.transformsEnabled===false){_.$slideTrack.css(positionProps)}else{positionProps={};if(_.cssTransitions===false){positionProps[_.animType]="translate("+x2+", "+y+")";_.$slideTrack.css(positionProps)}else{positionProps[_.animType]="translate3d("+x2+", "+y+", 0)";_.$slideTrack.css(positionProps)}}};Crsl.prototype.setDimensions=function(){var _=this;if(_.options.vertical===false){if(_.options.centerMode===true){_.$list.css({padding:"0px "+_.options.centerPadding})}}else{_.$list.height(_.$slides.first().outerHeight(true)*_.options.slidesToShow);if(_.options.centerMode===true){_.$list.css({padding:_.options.centerPadding+" 0px"})}}_.listWidth=_.$list.width();_.listHeight=_.$list.height();if(_.options.vertical===false&&_.options.variableWidth===false){_.slideWidth=Math.ceil(_.listWidth/_.options.slidesToShow);_.$slideTrack.width(Math.ceil(_.slideWidth*_.$slideTrack.children(".crsl-slide").length))}else if(_.options.variableWidth===true){_.$slideTrack.width(5e3*_.slideCount)}else{_.slideWidth=Math.ceil(_.listWidth);_.$slideTrack.height(Math.ceil(_.$slides.first().outerHeight(true)*_.$slideTrack.children(".crsl-slide").length))}var offset=_.$slides.first().outerWidth(true)-_.$slides.first().width();if(_.options.variableWidth===false)_.$slideTrack.children(".crsl-slide").width(_.slideWidth-offset)};Crsl.prototype.setFade=function(){var _=this,targetLeft;_.$slides.each(function(index2,element){targetLeft=_.slideWidth*index2*-1;if(_.options.rtl===true){$2(element).css({position:"relative",right:targetLeft,top:"0",zIndex:_.options.zIndex-2,opacity:"0"})}else{$2(element).css({position:"relative",left:targetLeft,top:"0",zIndex:_.options.zIndex-2,opacity:"0"})}});_.$slides.eq(_.currentSlide).css({zIndex:_.options.zIndex-1,opacity:"1"})};Crsl.prototype.setHeight=function(){var _=this;if(_.options.slidesToShow===1&&_.options.adaptiveHeight===true&&_.options.vertical===false){var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(true);_.$list.css("height",targetHeight+"px")}};Crsl.prototype.setOption=Crsl.prototype.crslSetOption=function(){var _=this,l,item,option,value,refresh=false,type2;if($2.isPlainObject(arguments[0])){option=arguments[0];refresh=arguments[1];type2="multiple"}else if(typeof arguments[0]==="string"){option=arguments[0];value=arguments[1];refresh=arguments[2];if(arguments[0]==="responsive"&&Array.isArray(arguments[1])){type2="responsive"}else if(typeof arguments[1]!=="undefined"){type2="single"}}if(type2==="single"){_.options[option]=value}else if(type2==="multiple"){$2.each(option,function(opt,val2){_.options[opt]=val2})}else if(type2==="responsive"){for(item in value){if(!Array.isArray(_.options.responsive)){_.options.responsive=[value[item]]}else{l=_.options.responsive.length-1;while(l>=0){if(_.options.responsive[l].breakpoint===value[item].breakpoint){_.options.responsive.splice(l,1)}l--}_.options.responsive.push(value[item])}}}if(refresh){_.unload();_.reinit()}};Crsl.prototype.setPosition=function(){var _=this;_.setDimensions();_.setHeight();if(_.options.fade===false){_.setCSS(_.getLeft(_.currentSlide))}else{_.setFade()}_.$slider.trigger("setPosition",[_])};Crsl.prototype.setProps=function(){var _=this,bodyStyle=document.body.style;_.positionProp=_.options.vertical===true?"top":"left";if(_.positionProp==="top"){_.$slider.addClass("crsl-vertical")}else{_.$slider.removeClass("crsl-vertical")}if(bodyStyle.WebkitTransition!==void 0||bodyStyle.MozTransition!==void 0||bodyStyle.msTransition!==void 0){if(_.options.useCSS===true){_.cssTransitions=true}}if(_.options.fade){if(typeof _.options.zIndex==="number"){if(_.options.zIndex<3){_.options.zIndex=3}}else{_.options.zIndex=_.defaults.zIndex}}if(bodyStyle.OTransform!==void 0){_.animType="OTransform";_.transformType="-o-transform";_.transitionType="OTransition";if(bodyStyle.perspectiveProperty===void 0&&bodyStyle.webkitPerspective===void 0)_.animType=false}if(bodyStyle.MozTransform!==void 0){_.animType="MozTransform";_.transformType="-moz-transform";_.transitionType="MozTransition";if(bodyStyle.perspectiveProperty===void 0&&bodyStyle.MozPerspective===void 0)_.animType=false}if(bodyStyle.webkitTransform!==void 0){_.animType="webkitTransform";_.transformType="-webkit-transform";_.transitionType="webkitTransition";if(bodyStyle.perspectiveProperty===void 0&&bodyStyle.webkitPerspective===void 0)_.animType=false}if(bodyStyle.msTransform!==void 0){_.animType="msTransform";_.transformType="-ms-transform";_.transitionType="msTransition";if(bodyStyle.msTransform===void 0)_.animType=false}if(bodyStyle.transform!==void 0&&_.animType!==false){_.animType="transform";_.transformType="transform";_.transitionType="transition"}_.transformsEnabled=_.options.useTransform&&(_.animType!==null&&_.animType!==false)};Crsl.prototype.setSlideClasses=function(index2){var _=this,centerOffset,allSlides,indexOffset,remainder;allSlides=_.$slider.find(".crsl-slide").removeClass("crsl-active crsl-center crsl-current").attr("aria-hidden","true");_.$slides.eq(index2).addClass("crsl-current");if(_.options.centerMode===true){var evenCoef;if(_.options.slidesToShow>=_.$slides.length){evenCoef=-1;centerOffset=_.options.slidesToShow=_.$slides.length}else{evenCoef=_.options.slidesToShow%2===0?1:0;centerOffset=Math.floor(_.options.slidesToShow/2)}if(_.options.infinite===true){if(index2>=centerOffset&&index2<=_.slideCount-1-centerOffset){_.$slides.slice(index2-centerOffset+evenCoef,index2+centerOffset+1).addClass("crsl-active").attr("aria-hidden","false")}else{indexOffset=_.options.slidesToShow+index2;allSlides.slice(indexOffset-centerOffset+1+evenCoef,indexOffset+centerOffset+2).addClass("crsl-active").attr("aria-hidden","false")}if(index2===0){allSlides.eq(_.options.slidesToShow+_.slideCount+1).addClass("crsl-center")}else if(index2===_.slideCount-1){allSlides.eq(_.options.slidesToShow).addClass("crsl-center")}}_.$slides.eq(index2).addClass("crsl-center")}else{if(index2>=0&&index2<=_.slideCount-_.options.slidesToShow){_.$slides.slice(index2,index2+_.options.slidesToShow).addClass("crsl-active").attr("aria-hidden","false")}else if(allSlides.length<=_.options.slidesToShow){allSlides.addClass("crsl-active").attr("aria-hidden","false")}else{remainder=_.slideCount%_.options.slidesToShow;indexOffset=_.options.infinite===true?_.options.slidesToShow+index2:index2;if(_.options.slidesToShow==_.options.slidesToScroll&&_.slideCount-index2<_.options.slidesToShow){allSlides.slice(indexOffset-(_.options.slidesToShow-remainder),indexOffset+remainder).addClass("crsl-active").attr("aria-hidden","false")}else{allSlides.slice(indexOffset,indexOffset+_.options.slidesToShow).addClass("crsl-active").attr("aria-hidden","false")}}}if(_.options.lazyLoad==="ondemand"||_.options.lazyLoad==="anticipated"){_.lazyLoad()}};Crsl.prototype.setupInfinite=function(){var _=this,i2,slideIndex,infiniteCount;if(_.options.fade===true){_.options.centerMode=false}if(_.options.infinite===true&&_.options.fade===false){slideIndex=null;if(_.slideCount>_.options.slidesToShow){if(_.options.centerMode===true){infiniteCount=_.options.slidesToShow+1}else{infiniteCount=_.options.slidesToShow}for(i2=_.slideCount;i2>_.slideCount-infiniteCount;i2-=1){slideIndex=i2-1;$2(_.$slides[slideIndex]).clone(true).removeAttr("id").attr("data-crsl-index",slideIndex-_.slideCount).prependTo(_.$slideTrack).addClass("crsl-cloned")}for(i2=0;i2<infiniteCount+_.slideCount;i2+=1){slideIndex=i2;$2(_.$slides[slideIndex]).clone(true).removeAttr("id").attr("data-crsl-index",slideIndex+_.slideCount).appendTo(_.$slideTrack).addClass("crsl-cloned")}_.$slideTrack.find(".crsl-cloned").find("[id]").each(function(){$2(this).removeAttr("id")})}}};Crsl.prototype.interrupt=function(toggle){var _=this;if(!toggle){_.autoPlay()}_.interrupted=toggle};Crsl.prototype.selectHandler=function(event){var _=this;var targetElement=$2(event.target).is(".crsl-slide")?$2(event.target):$2(event.target).parents(".crsl-slide");var index2=parseInt(targetElement.attr("data-crsl-index"));if(!index2)index2=0;if(_.slideCount<=_.options.slidesToShow){_.slideHandler(index2,false,true);return}_.slideHandler(index2)};Crsl.prototype.slideHandler=function(index2,sync,dontAnimate){var targetSlide,animSlide,oldSlide,slideLeft,targetLeft=null,_=this,navTarget;sync=sync||false;if(_.animating===true&&_.options.waitForAnimate===true){return}if(_.options.fade===true&&_.currentSlide===index2){return}if(sync===false){_.asNavFor(index2)}targetSlide=index2;targetLeft=_.getLeft(targetSlide);slideLeft=_.getLeft(_.currentSlide);_.currentLeft=_.swipeLeft===null?slideLeft:_.swipeLeft;if(_.options.infinite===false&&_.options.centerMode===false&&(index2<0||index2>_.getDotCount()*_.options.slidesToScroll)){if(_.options.fade===false){targetSlide=_.currentSlide;if(dontAnimate!==true&&_.slideCount>_.options.slidesToShow){_.animateSlide(slideLeft,function(){_.postSlide(targetSlide)})}else{_.postSlide(targetSlide)}}return}else if(_.options.infinite===false&&_.options.centerMode===true&&(index2<0||index2>_.slideCount-_.options.slidesToScroll)){if(_.options.fade===false){targetSlide=_.currentSlide;if(dontAnimate!==true&&_.slideCount>_.options.slidesToShow){_.animateSlide(slideLeft,function(){_.postSlide(targetSlide)})}else{_.postSlide(targetSlide)}}return}if(_.options.autoplay){clearInterval(_.autoPlayTimer)}if(targetSlide<0){if(_.slideCount%_.options.slidesToScroll!==0){animSlide=_.slideCount-_.slideCount%_.options.slidesToScroll}else{animSlide=_.slideCount+targetSlide}}else if(targetSlide>=_.slideCount){if(_.slideCount%_.options.slidesToScroll!==0){animSlide=0}else{animSlide=targetSlide-_.slideCount}}else{animSlide=targetSlide}_.animating=true;_.$slider.trigger("beforeChange",[_,_.currentSlide,animSlide]);oldSlide=_.currentSlide;_.currentSlide=animSlide;_.setSlideClasses(_.currentSlide);if(_.options.asNavFor){navTarget=_.getNavTarget();navTarget=navTarget.crsl("getCrsl");if(navTarget.slideCount<=navTarget.options.slidesToShow){navTarget.setSlideClasses(_.currentSlide)}}_.updateDots();_.updateArrows();if(_.options.fade===true){if(dontAnimate!==true){_.fadeSlideOut(oldSlide);_.fadeSlide(animSlide,function(){_.postSlide(animSlide)})}else{_.postSlide(animSlide)}_.animateHeight();return}if(dontAnimate!==true&&_.slideCount>_.options.slidesToShow){_.animateSlide(targetLeft,function(){_.postSlide(animSlide)})}else{_.postSlide(animSlide)}};Crsl.prototype.startLoad=function(){var _=this;if(_.options.arrows===true&&_.slideCount>_.options.slidesToShow){_.$prevArrow.hide();_.$nextArrow.hide()}if(_.options.dots===true&&_.slideCount>_.options.slidesToShow){_.$dots.hide()}_.$slider.addClass("crsl-loading")};Crsl.prototype.swipeDirection=function(){var xDist,yDist,r2,swipeAngle,_=this;xDist=_.touchObject.startX-_.touchObject.curX;yDist=_.touchObject.startY-_.touchObject.curY;r2=Math.atan2(yDist,xDist);swipeAngle=Math.round(r2*180/Math.PI);if(swipeAngle<0){swipeAngle=360-Math.abs(swipeAngle)}if(swipeAngle<=45&&swipeAngle>=0){return _.options.rtl===false?"left":"right"}if(swipeAngle<=360&&swipeAngle>=315){return _.options.rtl===false?"left":"right"}if(swipeAngle>=135&&swipeAngle<=225){return _.options.rtl===false?"right":"left"}if(_.options.verticalSwiping===true){if(swipeAngle>=35&&swipeAngle<=135){return"down"}else{return"up"}}return"vertical"};Crsl.prototype.swipeEnd=function(event){var _=this,slideCount,direction;_.dragging=false;_.swiping=false;if(_.scrolling){_.scrolling=false;return false}_.interrupted=false;_.shouldClick=_.touchObject.swipeLength>10?false:true;if(_.touchObject.curX===void 0){return false}if(_.touchObject.edgeHit===true){_.$slider.trigger("edge",[_,_.swipeDirection()])}if(_.touchObject.swipeLength>=_.touchObject.minSwipe){direction=_.swipeDirection();switch(direction){case"left":case"down":slideCount=_.options.swipeToSlide?_.checkNavigable(_.currentSlide+_.getSlideCount()):_.currentSlide+_.getSlideCount();_.currentDirection=0;break;case"right":case"up":slideCount=_.options.swipeToSlide?_.checkNavigable(_.currentSlide-_.getSlideCount()):_.currentSlide-_.getSlideCount();_.currentDirection=1;break;default:}if(direction!="vertical"){_.slideHandler(slideCount);_.touchObject={};_.$slider.trigger("swipe",[_,direction])}}else{if(_.touchObject.startX!==_.touchObject.curX){_.slideHandler(_.currentSlide);_.touchObject={}}}};Crsl.prototype.swipeHandler=function(event){var _=this;if(_.options.swipe===false||"ontouchend"in document&&_.options.swipe===false){return}else if(_.options.draggable===false&&event.type.indexOf("mouse")!==-1){return}_.touchObject.fingerCount=event.originalEvent&&event.originalEvent.touches!==void 0?event.originalEvent.touches.length:1;_.touchObject.minSwipe=_.listWidth/_.options.touchThreshold;if(_.options.verticalSwiping===true){_.touchObject.minSwipe=_.listHeight/_.options.touchThreshold}switch(event.data.action){case"start":_.swipeStart(event);break;case"move":_.swipeMove(event);break;case"end":_.swipeEnd(event);break}};Crsl.prototype.swipeMove=function(event){var _=this,edgeWasHit=false,curLeft,swipeDirection,swipeLength,positionOffset,touches,verticalSwipeLength;touches=event.originalEvent!==void 0?event.originalEvent.touches:null;if(!_.dragging||_.scrolling||touches&&touches.length!==1){return false}curLeft=_.getLeft(_.currentSlide);_.touchObject.curX=touches!==void 0?touches[0].pageX:event.clientX;_.touchObject.curY=touches!==void 0?touches[0].pageY:event.clientY;_.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curX-_.touchObject.startX,2)));verticalSwipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curY-_.touchObject.startY,2)));if(!_.options.verticalSwiping&&!_.swiping&&verticalSwipeLength>4){_.scrolling=true;return false}if(_.options.verticalSwiping===true){_.touchObject.swipeLength=verticalSwipeLength}swipeDirection=_.swipeDirection();if(event.originalEvent!==void 0&&_.touchObject.swipeLength>4){_.swiping=true;event.preventDefault()}positionOffset=(_.options.rtl===false?1:-1)*(_.touchObject.curX>_.touchObject.startX?1:-1);if(_.options.verticalSwiping===true){positionOffset=_.touchObject.curY>_.touchObject.startY?1:-1}swipeLength=_.touchObject.swipeLength;_.touchObject.edgeHit=false;if(_.options.infinite===false){if(_.currentSlide===0&&swipeDirection==="right"||_.currentSlide>=_.getDotCount()&&swipeDirection==="left"){swipeLength=_.touchObject.swipeLength*_.options.edgeFriction;_.touchObject.edgeHit=true}}if(_.options.vertical===false){_.swipeLeft=curLeft+swipeLength*positionOffset}else{_.swipeLeft=curLeft+swipeLength*(_.$list.height()/_.listWidth)*positionOffset}if(_.options.verticalSwiping===true){_.swipeLeft=curLeft+swipeLength*positionOffset}if(_.options.fade===true||_.options.touchMove===false){return false}if(_.animating===true){_.swipeLeft=null;return false}_.setCSS(_.swipeLeft)};Crsl.prototype.swipeStart=function(event){var _=this,touches;_.interrupted=true;if(_.touchObject.fingerCount!==1||_.slideCount<=_.options.slidesToShow){_.touchObject={};return false}if(event.originalEvent!==void 0&&event.originalEvent.touches!==void 0){touches=event.originalEvent.touches[0]}_.touchObject.startX=_.touchObject.curX=touches!==void 0?touches.pageX:event.clientX;_.touchObject.startY=_.touchObject.curY=touches!==void 0?touches.pageY:event.clientY;_.dragging=true};Crsl.prototype.unfilterSlides=Crsl.prototype.crslUnfilter=function(){var _=this;if(_.$slidesCache!==null){_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.appendTo(_.$slideTrack);_.reinit()}};Crsl.prototype.unload=function(){var _=this;$2(".crsl-cloned",_.$slider).remove();if(_.$dots){_.$dots.remove()}if(_.$prevArrow&&_.htmlExpr.test(_.options.prevArrow)){_.$prevArrow.remove()}if(_.$nextArrow&&_.htmlExpr.test(_.options.nextArrow)){_.$nextArrow.remove()}_.$slides.removeClass("crsl-slide crsl-active crsl-visible crsl-current").attr("aria-hidden","true").css("width","")};Crsl.prototype.uncrsl=function(fromBreakpoint){var _=this;_.$slider.trigger("uncrsl",[_,fromBreakpoint]);_.destroy()};Crsl.prototype.updateArrows=function(){var _=this,centerOffset;centerOffset=Math.floor(_.options.slidesToShow/2);if(_.options.arrows===true&&_.slideCount>_.options.slidesToShow&&!_.options.infinite){_.$prevArrow.removeClass("crsl-disabled").attr("aria-disabled","false");_.$nextArrow.removeClass("crsl-disabled").attr("aria-disabled","false");if(_.currentSlide===0){_.$prevArrow.addClass("crsl-disabled").attr("aria-disabled","true");_.$nextArrow.removeClass("crsl-disabled").attr("aria-disabled","false")}else if(_.currentSlide>=_.slideCount-_.options.slidesToShow&&_.options.centerMode===false){_.$nextArrow.addClass("crsl-disabled").attr("aria-disabled","true");_.$prevArrow.removeClass("crsl-disabled").attr("aria-disabled","false")}else if(_.currentSlide>=_.slideCount-1&&_.options.centerMode===true){_.$nextArrow.addClass("crsl-disabled").attr("aria-disabled","true");_.$prevArrow.removeClass("crsl-disabled").attr("aria-disabled","false")}}};Crsl.prototype.updateDots=function(){var _=this;if(_.$dots!==null){_.$dots.find("li").removeClass("crsl-active").end();_.$dots.find("li").eq(Math.floor(_.currentSlide/_.options.slidesToScroll)).addClass("crsl-active")}};Crsl.prototype.visibility=function(){var _=this;if(_.options.autoplay){if(document[_.hidden]){_.interrupted=true}else{_.interrupted=false}}};$2.fn.crsl=function(){var _=this,opt=arguments[0],args=Array.prototype.slice.call(arguments,1),l=_.length,i2,ret;for(i2=0;i2<l;i2++){if(typeof opt=="object"||typeof opt=="undefined")_[i2].crsl=new Crsl(_[i2],opt);else ret=_[i2].crsl[opt].apply(_[i2].crsl,args);if(typeof ret!="undefined")return ret}return _}});;/**
|
|
444
|
+
* (c) Iconify
|
|
445
|
+
*
|
|
446
|
+
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
447
|
+
* files at https://github.com/iconify/iconify
|
|
448
|
+
*
|
|
449
|
+
* Licensed under MIT.
|
|
450
|
+
*
|
|
451
|
+
* @license MIT
|
|
452
|
+
* @version 3.1.1
|
|
453
|
+
*/var Iconify=(function(exports2){"use strict";const defaultIconDimensions=Object.freeze({left:0,top:0,width:16,height:16});const defaultIconTransformations=Object.freeze({rotate:0,vFlip:false,hFlip:false});const defaultIconProps=Object.freeze({...defaultIconDimensions,...defaultIconTransformations});const defaultExtendedIconProps=Object.freeze({...defaultIconProps,body:"",hidden:false});function mergeIconTransformations(obj1,obj2){const result={};if(!obj1.hFlip!==!obj2.hFlip){result.hFlip=true}if(!obj1.vFlip!==!obj2.vFlip){result.vFlip=true}const rotate=((obj1.rotate||0)+(obj2.rotate||0))%4;if(rotate){result.rotate=rotate}return result}function mergeIconData(parent2,child){const result=mergeIconTransformations(parent2,child);for(const key2 in defaultExtendedIconProps){if(key2 in defaultIconTransformations){if(key2 in parent2&&!(key2 in result)){result[key2]=defaultIconTransformations[key2]}}else if(key2 in child){result[key2]=child[key2]}else if(key2 in parent2){result[key2]=parent2[key2]}}return result}function getIconsTree(data2,names){const icons=data2.icons;const aliases=data2.aliases||Object.create(null);const resolved=Object.create(null);function resolve(name){if(icons[name]){return resolved[name]=[]}if(!(name in resolved)){resolved[name]=null;const parent2=aliases[name]&&aliases[name].parent;const value=parent2&&resolve(parent2);if(value){resolved[name]=[parent2].concat(value)}}return resolved[name]}(names||Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);return resolved}function internalGetIconData(data2,name,tree){const icons=data2.icons;const aliases=data2.aliases||Object.create(null);let currentProps={};function parse(name2){currentProps=mergeIconData(icons[name2]||aliases[name2],currentProps)}parse(name);tree.forEach(parse);return mergeIconData(data2,currentProps)}function parseIconSet(data2,callback2){const names=[];if(typeof data2!=="object"||typeof data2.icons!=="object"){return names}if(data2.not_found instanceof Array){data2.not_found.forEach(name=>{callback2(name,null);names.push(name)})}const tree=getIconsTree(data2);for(const name in tree){const item=tree[name];if(item){callback2(name,internalGetIconData(data2,name,item));names.push(name)}}return names}const matchIconName=/^[a-z0-9]+(-[a-z0-9]+)*$/;const stringToIcon=(value,validate,allowSimpleName,provider="")=>{const colonSeparated=value.split(":");if(value.slice(0,1)==="@"){if(colonSeparated.length<2||colonSeparated.length>3){return null}provider=colonSeparated.shift().slice(1)}if(colonSeparated.length>3||!colonSeparated.length){return null}if(colonSeparated.length>1){const name2=colonSeparated.pop();const prefix=colonSeparated.pop();const result={provider:colonSeparated.length>0?colonSeparated[0]:provider,prefix,name:name2};return validate&&!validateIconName(result)?null:result}const name=colonSeparated[0];const dashSeparated=name.split("-");if(dashSeparated.length>1){const result={provider,prefix:dashSeparated.shift(),name:dashSeparated.join("-")};return validate&&!validateIconName(result)?null:result}if(allowSimpleName&&provider===""){const result={provider,prefix:"",name};return validate&&!validateIconName(result,allowSimpleName)?null:result}return null};const validateIconName=(icon,allowSimpleName)=>{if(!icon){return false}return!!((icon.provider===""||icon.provider.match(matchIconName))&&(allowSimpleName&&icon.prefix===""||icon.prefix.match(matchIconName))&&icon.name.match(matchIconName))};const optionalPropertyDefaults={provider:"",aliases:{},not_found:{},...defaultIconDimensions};function checkOptionalProps(item,defaults){for(const prop in defaults){if(prop in item&&typeof item[prop]!==typeof defaults[prop]){return false}}return true}function quicklyValidateIconSet(obj){if(typeof obj!=="object"||obj===null){return null}const data2=obj;if(typeof data2.prefix!=="string"||!obj.icons||typeof obj.icons!=="object"){return null}if(!checkOptionalProps(obj,optionalPropertyDefaults)){return null}const icons=data2.icons;for(const name in icons){const icon=icons[name];if(!name.match(matchIconName)||typeof icon.body!=="string"||!checkOptionalProps(icon,defaultExtendedIconProps)){return null}}const aliases=data2.aliases||Object.create(null);for(const name in aliases){const icon=aliases[name];const parent2=icon.parent;if(!name.match(matchIconName)||typeof parent2!=="string"||!icons[parent2]&&!aliases[parent2]||!checkOptionalProps(icon,defaultExtendedIconProps)){return null}}return data2}const dataStorage=Object.create(null);function newStorage(provider,prefix){return{provider,prefix,icons:Object.create(null),missing:new Set}}function getStorage(provider,prefix){const providerStorage=dataStorage[provider]||(dataStorage[provider]=Object.create(null));return providerStorage[prefix]||(providerStorage[prefix]=newStorage(provider,prefix))}function addIconSet(storage2,data2){if(!quicklyValidateIconSet(data2)){return[]}return parseIconSet(data2,(name,icon)=>{if(icon){storage2.icons[name]=icon}else{storage2.missing.add(name)}})}function addIconToStorage(storage2,name,icon){try{if(typeof icon.body==="string"){storage2.icons[name]={...icon};return true}}catch(err){}return false}function listIcons(provider,prefix){let allIcons=[];const providers=typeof provider==="string"?[provider]:Object.keys(dataStorage);providers.forEach(provider2=>{const prefixes=typeof provider2==="string"&&typeof prefix==="string"?[prefix]:Object.keys(dataStorage[provider2]||{});prefixes.forEach(prefix2=>{const storage2=getStorage(provider2,prefix2);allIcons=allIcons.concat(Object.keys(storage2.icons).map(name=>(provider2!==""?"@"+provider2+":":"")+prefix2+":"+name))})});return allIcons}let simpleNames=false;function allowSimpleNames(allow){if(typeof allow==="boolean"){simpleNames=allow}return simpleNames}function getIconData(name){const icon=typeof name==="string"?stringToIcon(name,true,simpleNames):name;if(icon){const storage2=getStorage(icon.provider,icon.prefix);const iconName=icon.name;return storage2.icons[iconName]||(storage2.missing.has(iconName)?null:void 0)}}function addIcon(name,data2){const icon=stringToIcon(name,true,simpleNames);if(!icon){return false}const storage2=getStorage(icon.provider,icon.prefix);return addIconToStorage(storage2,icon.name,data2)}function addCollection(data2,provider){if(typeof data2!=="object"){return false}if(typeof provider!=="string"){provider=data2.provider||""}if(simpleNames&&!provider&&!data2.prefix){let added=false;if(quicklyValidateIconSet(data2)){data2.prefix="";parseIconSet(data2,(name,icon)=>{if(icon&&addIcon(name,icon)){added=true}})}return added}const prefix=data2.prefix;if(!validateIconName({provider,prefix,name:"a"})){return false}const storage2=getStorage(provider,prefix);return!!addIconSet(storage2,data2)}function iconExists(name){return!!getIconData(name)}function getIcon(name){const result=getIconData(name);return result?{...defaultIconProps,...result}:null}const defaultIconSizeCustomisations=Object.freeze({width:null,height:null});const defaultIconCustomisations=Object.freeze({...defaultIconSizeCustomisations,...defaultIconTransformations});const unitsSplit=/(-?[0-9.]*[0-9]+[0-9.]*)/g;const unitsTest=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function calculateSize(size,ratio,precision){if(ratio===1){return size}precision=precision||100;if(typeof size==="number"){return Math.ceil(size*ratio*precision)/precision}if(typeof size!=="string"){return size}const oldParts=size.split(unitsSplit);if(oldParts===null||!oldParts.length){return size}const newParts=[];let code=oldParts.shift();let isNumber=unitsTest.test(code);while(true){if(isNumber){const num=parseFloat(code);if(isNaN(num)){newParts.push(code)}else{newParts.push(Math.ceil(num*ratio*precision)/precision)}}else{newParts.push(code)}code=oldParts.shift();if(code===void 0){return newParts.join("")}isNumber=!isNumber}}const isUnsetKeyword=value=>value==="unset"||value==="undefined"||value==="none";function iconToSVG(icon,customisations){const fullIcon={...defaultIconProps,...icon};const fullCustomisations={...defaultIconCustomisations,...customisations};const box={left:fullIcon.left,top:fullIcon.top,width:fullIcon.width,height:fullIcon.height};let body=fullIcon.body;[fullIcon,fullCustomisations].forEach(props2=>{const transformations=[];const hFlip=props2.hFlip;const vFlip=props2.vFlip;let rotation=props2.rotate;if(hFlip){if(vFlip){rotation+=2}else{transformations.push("translate("+(box.width+box.left).toString()+" "+(0-box.top).toString()+")");transformations.push("scale(-1 1)");box.top=box.left=0}}else if(vFlip){transformations.push("translate("+(0-box.left).toString()+" "+(box.height+box.top).toString()+")");transformations.push("scale(1 -1)");box.top=box.left=0}let tempValue;if(rotation<0){rotation-=Math.floor(rotation/4)*4}rotation=rotation%4;switch(rotation){case 1:tempValue=box.height/2+box.top;transformations.unshift("rotate(90 "+tempValue.toString()+" "+tempValue.toString()+")");break;case 2:transformations.unshift("rotate(180 "+(box.width/2+box.left).toString()+" "+(box.height/2+box.top).toString()+")");break;case 3:tempValue=box.width/2+box.left;transformations.unshift("rotate(-90 "+tempValue.toString()+" "+tempValue.toString()+")");break}if(rotation%2===1){if(box.left!==box.top){tempValue=box.left;box.left=box.top;box.top=tempValue}if(box.width!==box.height){tempValue=box.width;box.width=box.height;box.height=tempValue}}if(transformations.length){body='<g transform="'+transformations.join(" ")+'">'+body+"</g>"}});const customisationsWidth=fullCustomisations.width;const customisationsHeight=fullCustomisations.height;const boxWidth=box.width;const boxHeight=box.height;let width;let height;if(customisationsWidth===null){height=customisationsHeight===null?"1em":customisationsHeight==="auto"?boxHeight:customisationsHeight;width=calculateSize(height,boxWidth/boxHeight)}else{width=customisationsWidth==="auto"?boxWidth:customisationsWidth;height=customisationsHeight===null?calculateSize(width,boxHeight/boxWidth):customisationsHeight==="auto"?boxHeight:customisationsHeight}const attributes={};const setAttr=(prop,value)=>{if(!isUnsetKeyword(value)){attributes[prop]=value.toString()}};setAttr("width",width);setAttr("height",height);attributes.viewBox=box.left.toString()+" "+box.top.toString()+" "+boxWidth.toString()+" "+boxHeight.toString();return{attributes,body}}const regex=/\sid="(\S+)"/g;const randomPrefix="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let counter=0;function replaceIDs(body,prefix=randomPrefix){const ids=[];let match;while(match=regex.exec(body)){ids.push(match[1])}if(!ids.length){return body}const suffix="suffix"+(Math.random()*16777216|Date.now()).toString(16);ids.forEach(id2=>{const newID=typeof prefix==="function"?prefix(id2):prefix+(counter++).toString();const escapedID=id2.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");body=body.replace(new RegExp('([#;"])('+escapedID+')([")]|\\.[a-z])',"g"),"$1"+newID+suffix+"$3")});body=body.replace(new RegExp(suffix,"g"),"");return body}const browserStorageConfig={local:true,session:true};const browserStorageEmptyItems={local:new Set,session:new Set};let browserStorageStatus=false;function setBrowserStorageStatus(status){browserStorageStatus=status}const browserCacheVersion="iconify2";const browserCachePrefix="iconify";const browserCacheCountKey=browserCachePrefix+"-count";const browserCacheVersionKey=browserCachePrefix+"-version";const browserStorageHour=36e5;const browserStorageCacheExpiration=168;function getStoredItem(func,key2){try{return func.getItem(key2)}catch(err){}}function setStoredItem(func,key2,value){try{func.setItem(key2,value);return true}catch(err){}}function removeStoredItem(func,key2){try{func.removeItem(key2)}catch(err){}}function setBrowserStorageItemsCount(storage2,value){return setStoredItem(storage2,browserCacheCountKey,value.toString())}function getBrowserStorageItemsCount(storage2){return parseInt(getStoredItem(storage2,browserCacheCountKey))||0}let _window=typeof window==="undefined"?{}:window;function getBrowserStorage(key2){const attr=key2+"Storage";try{if(_window&&_window[attr]&&typeof _window[attr].length==="number"){return _window[attr]}}catch(err){}browserStorageConfig[key2]=false}function iterateBrowserStorage(key2,callback2){const func=getBrowserStorage(key2);if(!func){return}const version=getStoredItem(func,browserCacheVersionKey);if(version!==browserCacheVersion){if(version){const total2=getBrowserStorageItemsCount(func);for(let i2=0;i2<total2;i2++){removeStoredItem(func,browserCachePrefix+i2.toString())}}setStoredItem(func,browserCacheVersionKey,browserCacheVersion);setBrowserStorageItemsCount(func,0);return}const minTime=Math.floor(Date.now()/browserStorageHour)-browserStorageCacheExpiration;const parseItem=index2=>{const name=browserCachePrefix+index2.toString();const item=getStoredItem(func,name);if(typeof item!=="string"){return}try{const data2=JSON.parse(item);if(typeof data2==="object"&&typeof data2.cached==="number"&&data2.cached>minTime&&typeof data2.provider==="string"&&typeof data2.data==="object"&&typeof data2.data.prefix==="string"&&callback2(data2,index2)){return true}}catch(err){}removeStoredItem(func,name)};let total=getBrowserStorageItemsCount(func);for(let i2=total-1;i2>=0;i2--){if(!parseItem(i2)){if(i2===total-1){total--;setBrowserStorageItemsCount(func,total)}else{browserStorageEmptyItems[key2].add(i2)}}}}function initBrowserStorage(){if(browserStorageStatus){return}setBrowserStorageStatus(true);for(const key2 in browserStorageConfig){iterateBrowserStorage(key2,item=>{const iconSet=item.data;const provider=item.provider;const prefix=iconSet.prefix;const storage2=getStorage(provider,prefix);if(!addIconSet(storage2,iconSet).length){return false}const lastModified=iconSet.lastModified||-1;storage2.lastModifiedCached=storage2.lastModifiedCached?Math.min(storage2.lastModifiedCached,lastModified):lastModified;return true})}}function toggleBrowserCache(storage2,value){switch(storage2){case"local":case"session":browserStorageConfig[storage2]=value;break;case"all":for(const key2 in browserStorageConfig){browserStorageConfig[key2]=value}break}}const storage=Object.create(null);function setAPIModule(provider,item){storage[provider]=item}function getAPIModule(provider){return storage[provider]||storage[""]}function createAPIConfig(source){let resources;if(typeof source.resources==="string"){resources=[source.resources]}else{resources=source.resources;if(!(resources instanceof Array)||!resources.length){return null}}const result={resources,path:source.path||"/",maxURL:source.maxURL||500,rotate:source.rotate||750,timeout:source.timeout||5e3,random:source.random===true,index:source.index||0,dataAfterTimeout:source.dataAfterTimeout!==false};return result}const configStorage=Object.create(null);const fallBackAPISources=["https://api.simplesvg.com","https://api.unisvg.com"];const fallBackAPI=[];while(fallBackAPISources.length>0){if(fallBackAPISources.length===1){fallBackAPI.push(fallBackAPISources.shift())}else{if(Math.random()>.5){fallBackAPI.push(fallBackAPISources.shift())}else{fallBackAPI.push(fallBackAPISources.pop())}}}configStorage[""]=createAPIConfig({resources:["https://api.iconify.design"].concat(fallBackAPI)});function addAPIProvider(provider,customConfig){const config=createAPIConfig(customConfig);if(config===null){return false}configStorage[provider]=config;return true}function getAPIConfig(provider){return configStorage[provider]}function listAPIProviders(){return Object.keys(configStorage)}const detectFetch=()=>{let callback2;try{callback2=fetch;if(typeof callback2==="function"){return callback2}}catch(err){}};let fetchModule=detectFetch();function setFetch(fetch2){fetchModule=fetch2}function getFetch(){return fetchModule}function calculateMaxLength(provider,prefix){const config=getAPIConfig(provider);if(!config){return 0}let result;if(!config.maxURL){result=0}else{let maxHostLength=0;config.resources.forEach(item=>{const host=item;maxHostLength=Math.max(maxHostLength,host.length)});const url=prefix+".json?icons=";result=config.maxURL-maxHostLength-config.path.length-url.length}return result}function shouldAbort(status){return status===404}const prepare=(provider,prefix,icons)=>{const results=[];const maxLength=calculateMaxLength(provider,prefix);const type2="icons";let item={type:type2,provider,prefix,icons:[]};let length=0;icons.forEach((name,index2)=>{length+=name.length+1;if(length>=maxLength&&index2>0){results.push(item);item={type:type2,provider,prefix,icons:[]};length=name.length}item.icons.push(name)});results.push(item);return results};function getPath(provider){if(typeof provider==="string"){const config=getAPIConfig(provider);if(config){return config.path}}return"/"}const send=(host,params,callback2)=>{if(!fetchModule){callback2("abort",424);return}let path=getPath(params.provider);switch(params.type){case"icons":{const prefix=params.prefix;const icons=params.icons;const iconsList=icons.join(",");const urlParams=new URLSearchParams({icons:iconsList});path+=prefix+".json?"+urlParams.toString();break}case"custom":{const uri=params.uri;path+=uri.slice(0,1)==="/"?uri.slice(1):uri;break}default:callback2("abort",400);return}let defaultError=503;fetchModule(host+path).then(response=>{const status=response.status;if(status!==200){setTimeout(()=>{callback2(shouldAbort(status)?"abort":"next",status)});return}defaultError=501;return response.json()}).then(data2=>{if(typeof data2!=="object"||data2===null){setTimeout(()=>{if(data2===404){callback2("abort",data2)}else{callback2("next",defaultError)}});return}setTimeout(()=>{callback2("success",data2)})}).catch(()=>{callback2("next",defaultError)})};const fetchAPIModule={prepare,send};function sortIcons(icons){const result={loaded:[],missing:[],pending:[]};const storage2=Object.create(null);icons.sort((a,b)=>{if(a.provider!==b.provider){return a.provider.localeCompare(b.provider)}if(a.prefix!==b.prefix){return a.prefix.localeCompare(b.prefix)}return a.name.localeCompare(b.name)});let lastIcon={provider:"",prefix:"",name:""};icons.forEach(icon=>{if(lastIcon.name===icon.name&&lastIcon.prefix===icon.prefix&&lastIcon.provider===icon.provider){return}lastIcon=icon;const provider=icon.provider;const prefix=icon.prefix;const name=icon.name;const providerStorage=storage2[provider]||(storage2[provider]=Object.create(null));const localStorage2=providerStorage[prefix]||(providerStorage[prefix]=getStorage(provider,prefix));let list;if(name in localStorage2.icons){list=result.loaded}else if(prefix===""||localStorage2.missing.has(name)){list=result.missing}else{list=result.pending}const item={provider,prefix,name};list.push(item)});return result}function removeCallback(storages,id2){storages.forEach(storage2=>{const items=storage2.loaderCallbacks;if(items){storage2.loaderCallbacks=items.filter(row=>row.id!==id2)}})}function updateCallbacks(storage2){if(!storage2.pendingCallbacksFlag){storage2.pendingCallbacksFlag=true;setTimeout(()=>{storage2.pendingCallbacksFlag=false;const items=storage2.loaderCallbacks?storage2.loaderCallbacks.slice(0):[];if(!items.length){return}let hasPending=false;const provider=storage2.provider;const prefix=storage2.prefix;items.forEach(item=>{const icons=item.icons;const oldLength=icons.pending.length;icons.pending=icons.pending.filter(icon=>{if(icon.prefix!==prefix){return true}const name=icon.name;if(storage2.icons[name]){icons.loaded.push({provider,prefix,name})}else if(storage2.missing.has(name)){icons.missing.push({provider,prefix,name})}else{hasPending=true;return true}return false});if(icons.pending.length!==oldLength){if(!hasPending){removeCallback([storage2],item.id)}item.callback(icons.loaded.slice(0),icons.missing.slice(0),icons.pending.slice(0),item.abort)}})})}}let idCounter=0;function storeCallback(callback2,icons,pendingSources){const id2=idCounter++;const abort=removeCallback.bind(null,pendingSources,id2);if(!icons.pending.length){return abort}const item={id:id2,icons,callback:callback2,abort};pendingSources.forEach(storage2=>{(storage2.loaderCallbacks||(storage2.loaderCallbacks=[])).push(item)});return abort}function listToIcons(list,validate=true,simpleNames2=false){const result=[];list.forEach(item=>{const icon=typeof item==="string"?stringToIcon(item,validate,simpleNames2):item;if(icon){result.push(icon)}});return result}var defaultConfig={resources:[],index:0,timeout:2e3,rotate:750,random:false,dataAfterTimeout:false};function sendQuery(config,payload,query,done){const resourcesCount=config.resources.length;const startIndex=config.random?Math.floor(Math.random()*resourcesCount):config.index;let resources;if(config.random){let list=config.resources.slice(0);resources=[];while(list.length>1){const nextIndex=Math.floor(Math.random()*list.length);resources.push(list[nextIndex]);list=list.slice(0,nextIndex).concat(list.slice(nextIndex+1))}resources=resources.concat(list)}else{resources=config.resources.slice(startIndex).concat(config.resources.slice(0,startIndex))}const startTime=Date.now();let status="pending";let queriesSent=0;let lastError;let timer=null;let queue=[];let doneCallbacks=[];if(typeof done==="function"){doneCallbacks.push(done)}function resetTimer(){if(timer){clearTimeout(timer);timer=null}}function abort(){if(status==="pending"){status="aborted"}resetTimer();queue.forEach(item=>{if(item.status==="pending"){item.status="aborted"}});queue=[]}function subscribe(callback2,overwrite){if(overwrite){doneCallbacks=[]}if(typeof callback2==="function"){doneCallbacks.push(callback2)}}function getQueryStatus(){return{startTime,payload,status,queriesSent,queriesPending:queue.length,subscribe,abort}}function failQuery(){status="failed";doneCallbacks.forEach(callback2=>{callback2(void 0,lastError)})}function clearQueue(){queue.forEach(item=>{if(item.status==="pending"){item.status="aborted"}});queue=[]}function moduleResponse(item,response,data2){const isError=response!=="success";queue=queue.filter(queued=>queued!==item);switch(status){case"pending":break;case"failed":if(isError||!config.dataAfterTimeout){return}break;default:return}if(response==="abort"){lastError=data2;failQuery();return}if(isError){lastError=data2;if(!queue.length){if(!resources.length){failQuery()}else{execNext()}}return}resetTimer();clearQueue();if(!config.random){const index2=config.resources.indexOf(item.resource);if(index2!==-1&&index2!==config.index){config.index=index2}}status="completed";doneCallbacks.forEach(callback2=>{callback2(data2)})}function execNext(){if(status!=="pending"){return}resetTimer();const resource=resources.shift();if(resource===void 0){if(queue.length){timer=setTimeout(()=>{resetTimer();if(status==="pending"){clearQueue();failQuery()}},config.timeout);return}failQuery();return}const item={status:"pending",resource,callback:(status2,data2)=>{moduleResponse(item,status2,data2)}};queue.push(item);queriesSent++;timer=setTimeout(execNext,config.rotate);query(resource,payload,item.callback)}setTimeout(execNext);return getQueryStatus}function initRedundancy(cfg){const config={...defaultConfig,...cfg};let queries=[];function cleanup(){queries=queries.filter(item=>item().status==="pending")}function query(payload,queryCallback,doneCallback){const query2=sendQuery(config,payload,queryCallback,(data2,error)=>{cleanup();if(doneCallback){doneCallback(data2,error)}});queries.push(query2);return query2}function find(callback2){return queries.find(value=>{return callback2(value)})||null}const instance={query,find,setIndex:index2=>{config.index=index2},getIndex:()=>config.index,cleanup};return instance}function emptyCallback$1(){}const redundancyCache=Object.create(null);function getRedundancyCache(provider){if(!redundancyCache[provider]){const config=getAPIConfig(provider);if(!config){return}const redundancy=initRedundancy(config);const cachedReundancy={config,redundancy};redundancyCache[provider]=cachedReundancy}return redundancyCache[provider]}function sendAPIQuery(target,query,callback2){let redundancy;let send2;if(typeof target==="string"){const api=getAPIModule(target);if(!api){callback2(void 0,424);return emptyCallback$1}send2=api.send;const cached=getRedundancyCache(target);if(cached){redundancy=cached.redundancy}}else{const config=createAPIConfig(target);if(config){redundancy=initRedundancy(config);const moduleKey=target.resources?target.resources[0]:"";const api=getAPIModule(moduleKey);if(api){send2=api.send}}}if(!redundancy||!send2){callback2(void 0,424);return emptyCallback$1}return redundancy.query(query,send2,callback2)().abort}function updateLastModified(storage2,lastModified){const lastValue=storage2.lastModifiedCached;if(lastValue&&lastValue>=lastModified){return lastValue===lastModified}storage2.lastModifiedCached=lastModified;if(lastValue){for(const key2 in browserStorageConfig){iterateBrowserStorage(key2,item=>{const iconSet=item.data;return item.provider!==storage2.provider||iconSet.prefix!==storage2.prefix||iconSet.lastModified===lastModified})}}return true}function storeInBrowserStorage(storage2,data2){if(!browserStorageStatus){initBrowserStorage()}function store(key2){let func;if(!browserStorageConfig[key2]||!(func=getBrowserStorage(key2))){return}const set=browserStorageEmptyItems[key2];let index2;if(set.size){set.delete(index2=Array.from(set).shift())}else{index2=getBrowserStorageItemsCount(func);if(!setBrowserStorageItemsCount(func,index2+1)){return}}const item={cached:Math.floor(Date.now()/browserStorageHour),provider:storage2.provider,data:data2};return setStoredItem(func,browserCachePrefix+index2.toString(),JSON.stringify(item))}if(data2.lastModified&&!updateLastModified(storage2,data2.lastModified)){return}if(!Object.keys(data2.icons).length){return}if(data2.not_found){data2=Object.assign({},data2);delete data2.not_found}if(!store("local")){store("session")}}function emptyCallback(){}function loadedNewIcons(storage2){if(!storage2.iconsLoaderFlag){storage2.iconsLoaderFlag=true;setTimeout(()=>{storage2.iconsLoaderFlag=false;updateCallbacks(storage2)})}}function loadNewIcons(storage2,icons){if(!storage2.iconsToLoad){storage2.iconsToLoad=icons}else{storage2.iconsToLoad=storage2.iconsToLoad.concat(icons).sort()}if(!storage2.iconsQueueFlag){storage2.iconsQueueFlag=true;setTimeout(()=>{storage2.iconsQueueFlag=false;const{provider,prefix}=storage2;const icons2=storage2.iconsToLoad;delete storage2.iconsToLoad;let api;if(!icons2||!(api=getAPIModule(provider))){return}const params=api.prepare(provider,prefix,icons2);params.forEach(item=>{sendAPIQuery(provider,item,data2=>{if(typeof data2!=="object"){item.icons.forEach(name=>{storage2.missing.add(name)})}else{try{const parsed=addIconSet(storage2,data2);if(!parsed.length){return}const pending=storage2.pendingIcons;if(pending){parsed.forEach(name=>{pending.delete(name)})}storeInBrowserStorage(storage2,data2)}catch(err){console.error(err)}}loadedNewIcons(storage2)})})})}}const isPending=icon=>{const storage2=getStorage(icon.provider,icon.prefix);const pending=storage2.pendingIcons;return!!(pending&&pending.has(icon.name))};const loadIcons=(icons,callback2)=>{const cleanedIcons=listToIcons(icons,true,allowSimpleNames());const sortedIcons=sortIcons(cleanedIcons);if(!sortedIcons.pending.length){let callCallback=true;if(callback2){setTimeout(()=>{if(callCallback){callback2(sortedIcons.loaded,sortedIcons.missing,sortedIcons.pending,emptyCallback)}})}return()=>{callCallback=false}}const newIcons=Object.create(null);const sources=[];let lastProvider,lastPrefix;sortedIcons.pending.forEach(icon=>{const{provider,prefix}=icon;if(prefix===lastPrefix&&provider===lastProvider){return}lastProvider=provider;lastPrefix=prefix;sources.push(getStorage(provider,prefix));const providerNewIcons=newIcons[provider]||(newIcons[provider]=Object.create(null));if(!providerNewIcons[prefix]){providerNewIcons[prefix]=[]}});sortedIcons.pending.forEach(icon=>{const{provider,prefix,name}=icon;const storage2=getStorage(provider,prefix);const pendingQueue=storage2.pendingIcons||(storage2.pendingIcons=new Set);if(!pendingQueue.has(name)){pendingQueue.add(name);newIcons[provider][prefix].push(name)}});sources.forEach(storage2=>{const{provider,prefix}=storage2;if(newIcons[provider][prefix].length){loadNewIcons(storage2,newIcons[provider][prefix])}});return callback2?storeCallback(callback2,sortedIcons,sources):emptyCallback};const loadIcon=icon=>{return new Promise((fulfill,reject)=>{const iconObj=typeof icon==="string"?stringToIcon(icon,true):icon;if(!iconObj){reject(icon);return}loadIcons([iconObj||icon],loaded=>{if(loaded.length&&iconObj){const data2=getIconData(iconObj);if(data2){fulfill({...defaultIconProps,...data2});return}}reject(icon)})})};function mergeCustomisations(defaults,item){const result={...defaults};for(const key2 in item){const value=item[key2];const valueType=typeof value;if(key2 in defaultIconSizeCustomisations){if(value===null||value&&(valueType==="string"||valueType==="number")){result[key2]=value}}else if(valueType===typeof result[key2]){result[key2]=key2==="rotate"?value%4:value}}return result}const defaultExtendedIconCustomisations={...defaultIconCustomisations,inline:false};const blockClass="iconify";const inlineClass="iconify-inline";const elementDataProperty="iconifyData"+Date.now();let nodes2=[];function findRootNode(node){for(let i2=0;i2<nodes2.length;i2++){const item=nodes2[i2];const root=typeof item.node==="function"?item.node():item.node;if(root===node){return item}}}function addRootNode(root,autoRemove=false){let node=findRootNode(root);if(node){if(node.temporary){node.temporary=autoRemove}return node}node={node:root,temporary:autoRemove};nodes2.push(node);return node}function addBodyNode(){if(document.documentElement){return addRootNode(document.documentElement)}nodes2.push({node:()=>{return document.documentElement}})}function removeRootNode(root){nodes2=nodes2.filter(node=>root!==node&&root!==(typeof node.node==="function"?node.node():node.node))}function listRootNodes(){return nodes2}function onReady(callback2){const doc2=document;if(doc2.readyState&&doc2.readyState!=="loading"){callback2()}else{doc2.addEventListener("DOMContentLoaded",callback2)}}let callback=null;const observerParams={childList:true,subtree:true,attributes:true};function queueScan(node){if(!node.observer){return}const observer=node.observer;if(!observer.pendingScan){observer.pendingScan=setTimeout(()=>{delete observer.pendingScan;if(callback){callback(node)}})}}function checkMutations(node,mutations){if(!node.observer){return}const observer=node.observer;if(!observer.pendingScan){for(let i2=0;i2<mutations.length;i2++){const item=mutations[i2];if(item.addedNodes&&item.addedNodes.length>0||item.type==="attributes"&&item.target[elementDataProperty]!==void 0){if(!observer.paused){queueScan(node)}return}}}}function continueObserving(node,root){node.observer.instance.observe(root,observerParams)}function startObserver(node){let observer=node.observer;if(observer&&observer.instance){return}const root=typeof node.node==="function"?node.node():node.node;if(!root||!window){return}if(!observer){observer={paused:0};node.observer=observer}observer.instance=new window.MutationObserver(checkMutations.bind(null,node));continueObserving(node,root);if(!observer.paused){queueScan(node)}}function startObservers(){listRootNodes().forEach(startObserver)}function stopObserver(node){if(!node.observer){return}const observer=node.observer;if(observer.pendingScan){clearTimeout(observer.pendingScan);delete observer.pendingScan}if(observer.instance){observer.instance.disconnect();delete observer.instance}}function initObserver(cb2){const isRestart=callback!==null;if(callback!==cb2){callback=cb2;if(isRestart){listRootNodes().forEach(stopObserver)}}if(isRestart){startObservers();return}onReady(startObservers)}function pauseObservingNode(node){(node?[node]:listRootNodes()).forEach(node2=>{if(!node2.observer){node2.observer={paused:1};return}const observer=node2.observer;observer.paused++;if(observer.paused>1||!observer.instance){return}const instance=observer.instance;instance.disconnect()})}function pauseObserver(root){if(root){const node=findRootNode(root);if(node){pauseObservingNode(node)}}else{pauseObservingNode()}}function resumeObservingNode(observer){(observer?[observer]:listRootNodes()).forEach(node=>{if(!node.observer){startObserver(node);return}const observer2=node.observer;if(observer2.paused){observer2.paused--;if(!observer2.paused){const root=typeof node.node==="function"?node.node():node.node;if(!root){return}else if(observer2.instance){continueObserving(node,root)}else{startObserver(node)}}}})}function resumeObserver(root){if(root){const node=findRootNode(root);if(node){resumeObservingNode(node)}}else{resumeObservingNode()}}function observe(root,autoRemove=false){const node=addRootNode(root,autoRemove);startObserver(node);return node}function stopObserving(root){const node=findRootNode(root);if(node){stopObserver(node);removeRootNode(root)}}function propsChanged(props1,props2){if(props1.name!==props2.name||props1.mode!==props2.mode){return true}const customisations1=props1.customisations;const customisations2=props2.customisations;for(const key2 in defaultExtendedIconCustomisations){if(customisations1[key2]!==customisations2[key2]){return true}}return false}function rotateFromString(value,defaultValue=0){const units=value.replace(/^-?[0-9.]*/,"");function cleanup(value2){while(value2<0){value2+=4}return value2%4}if(units===""){const num=parseInt(value);return isNaN(num)?0:cleanup(num)}else if(units!==value){let split=0;switch(units){case"%":split=25;break;case"deg":split=90}if(split){let num=parseFloat(value.slice(0,value.length-units.length));if(isNaN(num)){return 0}num=num/split;return num%1===0?cleanup(num):0}}return defaultValue}const separator=/[\s,]+/;function flipFromString(custom,flip){flip.split(separator).forEach(str=>{const value=str.trim();switch(value){case"horizontal":custom.hFlip=true;break;case"vertical":custom.vFlip=true;break}})}const sizeAttributes=["width","height"];const booleanAttributes=["inline","hFlip","vFlip"];function getBooleanAttribute(value,key2){if(value===key2||value==="true"){return true}if(value===""||value==="false"){return false}return null}function getElementProps(element){const name=element.getAttribute("data-icon");const icon=typeof name==="string"&&stringToIcon(name,true);if(!icon){return null}const customisations={...defaultExtendedIconCustomisations,inline:element.classList&&element.classList.contains(inlineClass)};sizeAttributes.forEach(attr=>{const value=element.getAttribute("data-"+attr);if(value){customisations[attr]=value}});const rotation=element.getAttribute("data-rotate");if(typeof rotation==="string"){customisations.rotate=rotateFromString(rotation)}const flip=element.getAttribute("data-flip");if(typeof flip==="string"){flipFromString(customisations,flip)}booleanAttributes.forEach(attr=>{const key2="data-"+attr;const value=getBooleanAttribute(element.getAttribute(key2),key2);if(typeof value==="boolean"){customisations[attr]=value}});const mode=element.getAttribute("data-mode");return{name,icon,customisations,mode}}const selector2="svg."+blockClass+", i."+blockClass+", span."+blockClass+", i."+inlineClass+", span."+inlineClass;function scanRootNode(root){const nodes3=[];root.querySelectorAll(selector2).forEach(node=>{const props2=node[elementDataProperty]||node.tagName.toLowerCase()!=="svg"?getElementProps(node):null;if(props2){nodes3.push({node,props:props2})}});return nodes3}function iconToHTML(body,attributes){let renderAttribsHTML=body.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const attr in attributes){renderAttribsHTML+=" "+attr+'="'+attributes[attr]+'"'}return'<svg xmlns="http://www.w3.org/2000/svg"'+renderAttribsHTML+">"+body+"</svg>"}let policy;function createPolicy(){try{policy=window.trustedTypes.createPolicy("iconify",{createHTML:s=>s})}catch(err){policy=null}}function cleanUpInnerHTML(html){if(policy===void 0){createPolicy()}return policy?policy.createHTML(html):html}function iconClasses(iconName){const classesToAdd=new Set(["iconify"]);["provider","prefix"].forEach(attr=>{if(iconName[attr]){classesToAdd.add("iconify--"+iconName[attr])}});return classesToAdd}function applyClasses(svg,classes,previouslyAddedClasses,placeholder){const svgClasses=svg.classList;if(placeholder){const placeholderClasses=placeholder.classList;Array.from(placeholderClasses).forEach(item=>{svgClasses.add(item)})}const addedClasses=[];classes.forEach(item=>{if(!svgClasses.contains(item)){svgClasses.add(item);addedClasses.push(item)}else if(previouslyAddedClasses.has(item)){addedClasses.push(item)}});previouslyAddedClasses.forEach(item=>{if(!classes.has(item)){svgClasses.remove(item)}});return addedClasses}function applyStyle(svg,styles,previouslyAddedStyles){const svgStyle=svg.style;(previouslyAddedStyles||[]).forEach(prop=>{svgStyle.removeProperty(prop)});const appliedStyles=[];for(const prop in styles){if(!svgStyle.getPropertyValue(prop)){appliedStyles.push(prop);svgStyle.setProperty(prop,styles[prop])}}return appliedStyles}function renderInlineSVG(element,props2,iconData){let span;try{span=document.createElement("span")}catch(err){return element}const customisations=props2.customisations;const renderData=iconToSVG(iconData,customisations);const oldData=element[elementDataProperty];const html=iconToHTML(replaceIDs(renderData.body),{"aria-hidden":"true","role":"img",...renderData.attributes});span.innerHTML=cleanUpInnerHTML(html);const svg=span.childNodes[0];const placeholderAttributes=element.attributes;for(let i2=0;i2<placeholderAttributes.length;i2++){const item=placeholderAttributes.item(i2);const name=item.name;if(name!=="class"&&!svg.hasAttribute(name)){svg.setAttribute(name,item.value)}}const classesToAdd=iconClasses(props2.icon);const addedClasses=applyClasses(svg,classesToAdd,new Set(oldData&&oldData.addedClasses),element);const addedStyles=applyStyle(svg,customisations.inline?{"vertical-align":"-0.125em"}:{},oldData&&oldData.addedStyles);const newData={...props2,status:"loaded",addedClasses,addedStyles};svg[elementDataProperty]=newData;if(element.parentNode){element.parentNode.replaceChild(svg,element)}return svg}function encodeSVGforURL(svg){return svg.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function svgToData(svg){return"data:image/svg+xml,"+encodeSVGforURL(svg)}function svgToURL(svg){return'url("'+svgToData(svg)+'")'}const commonProps={display:"inline-block"};const monotoneProps={"background-color":"currentColor"};const coloredProps={"background-color":"transparent"};const propsToAdd={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"};const propsToAddTo={"-webkit-mask":monotoneProps,"mask":monotoneProps,"background":coloredProps};for(const prefix in propsToAddTo){const list=propsToAddTo[prefix];for(const prop in propsToAdd){list[prefix+"-"+prop]=propsToAdd[prop]}}function fixSize(value){return value+(value.match(/^[-0-9.]+$/)?"px":"")}function renderBackground(element,props2,iconData,useMask){const customisations=props2.customisations;const renderData=iconToSVG(iconData,customisations);const renderAttribs=renderData.attributes;const oldData=element[elementDataProperty];const html=iconToHTML(renderData.body,{...renderAttribs,width:iconData.width+"",height:iconData.height+""});const classesToAdd=iconClasses(props2.icon);const addedClasses=applyClasses(element,classesToAdd,new Set(oldData&&oldData.addedClasses));const url=svgToURL(html);const newStyles={"--svg":url,"width":fixSize(renderAttribs.width),"height":fixSize(renderAttribs.height),...commonProps,...useMask?monotoneProps:coloredProps};if(customisations.inline){newStyles["vertical-align"]="-0.125em"}const addedStyles=applyStyle(element,newStyles,oldData&&oldData.addedStyles);const newData={...props2,status:"loaded",addedClasses,addedStyles};element[elementDataProperty]=newData;return element}let scanQueued=false;function checkPendingIcons(){if(!scanQueued){scanQueued=true;setTimeout(()=>{if(scanQueued){scanQueued=false;scanDOM()}})}}function scanDOM(rootNode,addTempNode=false){const iconsToLoad=Object.create(null);function getIcon2(icon,load){const{provider,prefix,name}=icon;const storage2=getStorage(provider,prefix);const storedIcon=storage2.icons[name];if(storedIcon){return{status:"loaded",icon:storedIcon}}if(storage2.missing.has(name)){return{status:"missing"}}if(load&&!isPending(icon)){const providerIconsToLoad=iconsToLoad[provider]||(iconsToLoad[provider]=Object.create(null));const set=providerIconsToLoad[prefix]||(providerIconsToLoad[prefix]=new Set);set.add(name)}return{status:"loading"}}(rootNode?[rootNode]:listRootNodes()).forEach(observedNode=>{const root=typeof observedNode.node==="function"?observedNode.node():observedNode.node;if(!root||!root.querySelectorAll){return}let hasPlaceholders=false;let paused=false;function render(element,props2,iconData){if(!paused){paused=true;pauseObservingNode(observedNode)}if(element.tagName.toUpperCase()!=="SVG"){const mode=props2.mode;const isMask=mode==="mask"||(mode==="bg"?false:mode==="style"?iconData.body.indexOf("currentColor")!==-1:null);if(typeof isMask==="boolean"){renderBackground(element,props2,{...defaultIconProps,...iconData},isMask);return}}renderInlineSVG(element,props2,iconData)}scanRootNode(root).forEach(({node,props:props2})=>{const oldData=node[elementDataProperty];if(!oldData){const{status,icon}=getIcon2(props2.icon,true);if(icon){render(node,props2,icon);return}hasPlaceholders=hasPlaceholders||status==="loading";node[elementDataProperty]={...props2,status};return}let item;if(!propsChanged(oldData,props2)){const oldStatus=oldData.status;if(oldStatus!=="loading"){return}item=getIcon2(props2.icon,false);if(!item.icon){oldData.status=item.status;return}}else{item=getIcon2(props2.icon,oldData.name!==props2.name);if(!item.icon){hasPlaceholders=hasPlaceholders||item.status==="loading";Object.assign(oldData,{...props2,status:item.status});return}}render(node,props2,item.icon)});if(observedNode.temporary&&!hasPlaceholders){stopObserving(root)}else if(addTempNode&&hasPlaceholders){observe(root,true)}else if(paused&&observedNode.observer){resumeObservingNode(observedNode)}});for(const provider in iconsToLoad){const providerIconsToLoad=iconsToLoad[provider];for(const prefix in providerIconsToLoad){const set=providerIconsToLoad[prefix];loadIcons(Array.from(set).map(name=>({provider,prefix,name})),checkPendingIcons)}}}function scanElement(root){const node=findRootNode(root);if(!node){scanDOM({node:root,temporary:true},true)}else{scanDOM(node)}}function generateIcon(name,customisations,returnString=false){const iconData=getIconData(name);if(!iconData){return null}const iconName=stringToIcon(name);const changes=mergeCustomisations(defaultExtendedIconCustomisations,customisations||{});const result=renderInlineSVG(document.createElement("span"),{name,icon:iconName,customisations:changes},iconData);return returnString?result.outerHTML:result}function getVersion(){return"3.1.1"}function renderSVG(name,customisations){return generateIcon(name,customisations,false)}function renderHTML(name,customisations){return generateIcon(name,customisations,true)}function renderIcon(name,customisations){const iconData=getIconData(name);if(!iconData){return null}const changes=mergeCustomisations(defaultExtendedIconCustomisations,customisations||{});return iconToSVG(iconData,changes)}function scan(root){if(root){scanElement(root)}else{scanDOM()}}if(typeof document!=="undefined"&&typeof window!=="undefined"){addBodyNode();const _window2=window;if(_window2.IconifyPreload!==void 0){const preload=_window2.IconifyPreload;const err="Invalid IconifyPreload syntax.";if(typeof preload==="object"&&preload!==null){(preload instanceof Array?preload:[preload]).forEach(item=>{try{if(typeof item!=="object"||item===null||item instanceof Array||typeof item.icons!=="object"||typeof item.prefix!=="string"||!addCollection(item)){console.error(err)}}catch(e2){console.error(err)}})}}setTimeout(()=>{initObserver(scanDOM);scanDOM()})}function enableCache(storage2,enable){toggleBrowserCache(storage2,enable!==false)}function disableCache(storage2){toggleBrowserCache(storage2,true)}setAPIModule("",fetchAPIModule);if(typeof document!=="undefined"&&typeof window!=="undefined"){initBrowserStorage();const _window2=window;if(_window2.IconifyProviders!==void 0){const providers=_window2.IconifyProviders;if(typeof providers==="object"&&providers!==null){for(const key2 in providers){const err="IconifyProviders["+key2+"] is invalid.";try{const value=providers[key2];if(typeof value!=="object"||!value||value.resources===void 0){continue}if(!addAPIProvider(key2,value)){console.error(err)}}catch(e2){console.error(err)}}}}}const _api={getAPIConfig,setAPIModule,sendAPIQuery,setFetch,getFetch,listAPIProviders};const Iconify2={_api,addAPIProvider,loadIcons,loadIcon,iconExists,getIcon,listIcons,addIcon,addCollection,replaceIDs,calculateSize,buildIcon:iconToSVG,getVersion,renderSVG,renderHTML,renderIcon,scan,observe,stopObserving,pauseObserver,resumeObserver,enableCache,disableCache};exports2._api=_api;exports2.addAPIProvider=addAPIProvider;exports2.addCollection=addCollection;exports2.addIcon=addIcon;exports2.buildIcon=iconToSVG;exports2.calculateSize=calculateSize;exports2.default=Iconify2;exports2.disableCache=disableCache;exports2.enableCache=enableCache;exports2.getIcon=getIcon;exports2.getVersion=getVersion;exports2.iconExists=iconExists;exports2.listIcons=listIcons;exports2.loadIcon=loadIcon;exports2.loadIcons=loadIcons;exports2.observe=observe;exports2.pauseObserver=pauseObserver;exports2.renderHTML=renderHTML;exports2.renderIcon=renderIcon;exports2.renderSVG=renderSVG;exports2.replaceIDs=replaceIDs;exports2.resumeObserver=resumeObserver;exports2.scan=scan;exports2.stopObserving=stopObserving;Object.defineProperty(exports2,"__esModule",{value:true});return exports2})({});if(typeof exports==="object"){try{exports.__esModule=true;exports.default=Iconify;for(var key in Iconify){exports[key]=Iconify[key]}}catch(err){}}try{if(self.Iconify===void 0){self.Iconify=Iconify}}catch(err){};(function(root,factory18){if(typeof define==="function"&&define.amd){define([],factory18)}else if(typeof module==="object"&&module.exports){module.exports=factory18()}else{root.Rellax=factory18()}})(typeof window!=="undefined"?window:global,function(){var Rellax=function(el2,options){"use strict";var self2=Object.create(Rellax.prototype);var posY=0;var screenY=0;var posX=0;var screenX=0;var blocks=[];var pause2=true;var loop=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return setTimeout(callback,1e3/60)};var loopId=null;var supportsPassive=false;try{var opts=Object.defineProperty({},"passive",{get:function(){supportsPassive=true}});window.addEventListener("testPassive",null,opts);window.removeEventListener("testPassive",null,opts)}catch(e2){}var clearLoop=window.cancelAnimationFrame||window.mozCancelAnimationFrame||clearTimeout;var transformProp=window.transformProp||(function(){var testEl=document.createElement("div");if(testEl.style.transform===null){var vendors=["Webkit","Moz","ms"];for(var vendor in vendors){if(testEl.style[vendors[vendor]+"Transform"]!==void 0){return vendors[vendor]+"Transform"}}}return"transform"})();self2.options={speed:-2,verticalSpeed:null,horizontalSpeed:null,breakpoints:[576,768,1201],center:false,wrapper:null,relativeToWrapper:false,round:true,vertical:true,horizontal:false,verticalScrollAxis:"y",horizontalScrollAxis:"x",callback:function(){}};if(options){Object.keys(options).forEach(function(key2){self2.options[key2]=options[key2]})}function validateCustomBreakpoints(){if(self2.options.breakpoints.length===3&&Array.isArray(self2.options.breakpoints)){var isAscending=true;var isNumerical=true;var lastVal;self2.options.breakpoints.forEach(function(i2){if(typeof i2!=="number")isNumerical=false;if(lastVal!==null){if(i2<lastVal)isAscending=false}lastVal=i2});if(isAscending&&isNumerical)return}self2.options.breakpoints=[576,768,1201];console.warn("Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted")}if(options&&options.breakpoints){validateCustomBreakpoints()}if(!el2){el2=".rellax"}var elements=typeof el2==="string"?document.querySelectorAll(el2):[el2];if(elements.length>0){self2.elems=elements}else{console.warn("Rellax: The elements you're trying to select don't exist.");return}if(self2.options.wrapper){if(!self2.options.wrapper.nodeType){var wrapper=document.querySelector(self2.options.wrapper);if(wrapper){self2.options.wrapper=wrapper}else{console.warn("Rellax: The wrapper you're trying to use doesn't exist.");return}}}var currentBreakpoint;var getCurrentBreakpoint=function(w){var bp=self2.options.breakpoints;if(w<bp[0])return"xs";if(w>=bp[0]&&w<bp[1])return"sm";if(w>=bp[1]&&w<bp[2])return"md";return"lg"};var cacheBlocks=function(){for(var i2=0;i2<self2.elems.length;i2++){var block=createBlock(self2.elems[i2]);blocks.push(block)}};var init2=function(){for(var i2=0;i2<blocks.length;i2++){self2.elems[i2].style.cssText=blocks[i2].style}blocks=[];screenY=window.innerHeight;screenX=window.innerWidth;currentBreakpoint=getCurrentBreakpoint(screenX);setPosition();cacheBlocks();animate();if(pause2){window.addEventListener("resize",init2);pause2=false;update()}};var createBlock=function(el3){var dataPercentage=el3.getAttribute("data-rellax-percentage");var dataSpeed=el3.getAttribute("data-rellax-speed");var dataXsSpeed=el3.getAttribute("data-rellax-xs-speed");var dataMobileSpeed=el3.getAttribute("data-rellax-mobile-speed");var dataTabletSpeed=el3.getAttribute("data-rellax-tablet-speed");var dataDesktopSpeed=el3.getAttribute("data-rellax-desktop-speed");var dataVerticalSpeed=el3.getAttribute("data-rellax-vertical-speed");var dataHorizontalSpeed=el3.getAttribute("data-rellax-horizontal-speed");var dataVericalScrollAxis=el3.getAttribute("data-rellax-vertical-scroll-axis");var dataHorizontalScrollAxis=el3.getAttribute("data-rellax-horizontal-scroll-axis");var dataZindex=el3.getAttribute("data-rellax-zindex")||0;var dataMin=el3.getAttribute("data-rellax-min");var dataMax=el3.getAttribute("data-rellax-max");var dataMinX=el3.getAttribute("data-rellax-min-x");var dataMaxX=el3.getAttribute("data-rellax-max-x");var dataMinY=el3.getAttribute("data-rellax-min-y");var dataMaxY=el3.getAttribute("data-rellax-max-y");var mapBreakpoints;var breakpoints=true;if(!dataXsSpeed&&!dataMobileSpeed&&!dataTabletSpeed&&!dataDesktopSpeed){breakpoints=false}else{mapBreakpoints={"xs":dataXsSpeed,"sm":dataMobileSpeed,"md":dataTabletSpeed,"lg":dataDesktopSpeed}}var wrapperPosY=self2.options.wrapper?self2.options.wrapper.scrollTop:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;if(self2.options.relativeToWrapper){var scrollPosY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;wrapperPosY=scrollPosY-self2.options.wrapper.offsetTop}var posY2=self2.options.vertical?dataPercentage||self2.options.center?wrapperPosY:0:0;var posX2=self2.options.horizontal?dataPercentage||self2.options.center?self2.options.wrapper?self2.options.wrapper.scrollLeft:window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft:0:0;var blockTop=posY2+el3.getBoundingClientRect().top;var blockHeight=el3.clientHeight||el3.offsetHeight||el3.scrollHeight;var blockLeft=posX2+el3.getBoundingClientRect().left;var blockWidth=el3.clientWidth||el3.offsetWidth||el3.scrollWidth;var percentageY=dataPercentage?dataPercentage:(posY2-blockTop+screenY)/(blockHeight+screenY);var percentageX=dataPercentage?dataPercentage:(posX2-blockLeft+screenX)/(blockWidth+screenX);if(self2.options.center){percentageX=.5;percentageY=.5}var speed=breakpoints&&mapBreakpoints[currentBreakpoint]!==null?Number(mapBreakpoints[currentBreakpoint]):dataSpeed?dataSpeed:self2.options.speed;var verticalSpeed=dataVerticalSpeed?dataVerticalSpeed:self2.options.verticalSpeed;var horizontalSpeed=dataHorizontalSpeed?dataHorizontalSpeed:self2.options.horizontalSpeed;var verticalScrollAxis=dataVericalScrollAxis?dataVericalScrollAxis:self2.options.verticalScrollAxis;var horizontalScrollAxis=dataHorizontalScrollAxis?dataHorizontalScrollAxis:self2.options.horizontalScrollAxis;var bases=updatePosition(percentageX,percentageY,speed,verticalSpeed,horizontalSpeed);var style=el3.style.cssText;var transform="";var searchResult=/transform\s*:/i.exec(style);if(searchResult){var index2=searchResult.index;var trimmedStyle=style.slice(index2);var delimiter=trimmedStyle.indexOf(";");if(delimiter){transform=" "+trimmedStyle.slice(11,delimiter).replace(/\s/g,"")}else{transform=" "+trimmedStyle.slice(11).replace(/\s/g,"")}}return{baseX:bases.x,baseY:bases.y,top:blockTop,left:blockLeft,height:blockHeight,width:blockWidth,speed,verticalSpeed,horizontalSpeed,verticalScrollAxis,horizontalScrollAxis,style,transform,zindex:dataZindex,min:dataMin,max:dataMax,minX:dataMinX,maxX:dataMaxX,minY:dataMinY,maxY:dataMaxY}};var setPosition=function(){var oldY=posY;var oldX=posX;posY=self2.options.wrapper?self2.options.wrapper.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset;posX=self2.options.wrapper?self2.options.wrapper.scrollLeft:(document.documentElement||document.body.parentNode||document.body).scrollLeft||window.pageXOffset;if(self2.options.relativeToWrapper){var scrollPosY=(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset;posY=scrollPosY-self2.options.wrapper.offsetTop}if(oldY!=posY&&self2.options.vertical){return true}if(oldX!=posX&&self2.options.horizontal){return true}return false};var updatePosition=function(percentageX,percentageY,speed,verticalSpeed,horizontalSpeed){var result={};var valueX=(horizontalSpeed?horizontalSpeed:speed)*(100*(1-percentageX));var valueY=(verticalSpeed?verticalSpeed:speed)*(100*(1-percentageY));result.x=self2.options.round?Math.round(valueX):Math.round(valueX*100)/100;result.y=self2.options.round?Math.round(valueY):Math.round(valueY*100)/100;return result};var deferredUpdate=function(){window.removeEventListener("resize",deferredUpdate);window.removeEventListener("orientationchange",deferredUpdate);(self2.options.wrapper?self2.options.wrapper:window).removeEventListener("scroll",deferredUpdate);(self2.options.wrapper?self2.options.wrapper:document).removeEventListener("touchmove",deferredUpdate);loopId=loop(update)};var update=function(){if(setPosition()&&pause2===false){animate();loopId=loop(update)}else{loopId=null;window.addEventListener("resize",deferredUpdate);window.addEventListener("orientationchange",deferredUpdate);(self2.options.wrapper?self2.options.wrapper:window).addEventListener("scroll",deferredUpdate,supportsPassive?{passive:true}:false);(self2.options.wrapper?self2.options.wrapper:document).addEventListener("touchmove",deferredUpdate,supportsPassive?{passive:true}:false)}};var animate=function(){var positions;for(var i2=0;i2<self2.elems.length;i2++){var verticalScrollAxis=blocks[i2].verticalScrollAxis.toLowerCase();var horizontalScrollAxis=blocks[i2].horizontalScrollAxis.toLowerCase();var verticalScrollX=verticalScrollAxis.indexOf("x")!=-1?posY:0;var verticalScrollY=verticalScrollAxis.indexOf("y")!=-1?posY:0;var horizontalScrollX=horizontalScrollAxis.indexOf("x")!=-1?posX:0;var horizontalScrollY=horizontalScrollAxis.indexOf("y")!=-1?posX:0;var percentageY=(verticalScrollY+horizontalScrollY-blocks[i2].top+screenY)/(blocks[i2].height+screenY);var percentageX=(verticalScrollX+horizontalScrollX-blocks[i2].left+screenX)/(blocks[i2].width+screenX);positions=updatePosition(percentageX,percentageY,blocks[i2].speed,blocks[i2].verticalSpeed,blocks[i2].horizontalSpeed);var positionY=positions.y-blocks[i2].baseY;var positionX=positions.x-blocks[i2].baseX;if(blocks[i2].min!==null){if(self2.options.vertical&&!self2.options.horizontal){positionY=positionY<=blocks[i2].min?blocks[i2].min:positionY}if(self2.options.horizontal&&!self2.options.vertical){positionX=positionX<=blocks[i2].min?blocks[i2].min:positionX}}if(blocks[i2].minY!=null){positionY=positionY<=blocks[i2].minY?blocks[i2].minY:positionY}if(blocks[i2].minX!=null){positionX=positionX<=blocks[i2].minX?blocks[i2].minX:positionX}if(blocks[i2].max!==null){if(self2.options.vertical&&!self2.options.horizontal){positionY=positionY>=blocks[i2].max?blocks[i2].max:positionY}if(self2.options.horizontal&&!self2.options.vertical){positionX=positionX>=blocks[i2].max?blocks[i2].max:positionX}}if(blocks[i2].maxY!=null){positionY=positionY>=blocks[i2].maxY?blocks[i2].maxY:positionY}if(blocks[i2].maxX!=null){positionX=positionX>=blocks[i2].maxX?blocks[i2].maxX:positionX}var zindex=blocks[i2].zindex;var translate="translate3d("+(self2.options.horizontal?positionX:"0")+"px,"+(self2.options.vertical?positionY:"0")+"px,"+zindex+"px) "+blocks[i2].transform;self2.elems[i2].style[transformProp]=translate}self2.options.callback(positions)};self2.destroy=function(){for(var i2=0;i2<self2.elems.length;i2++){self2.elems[i2].style.cssText=blocks[i2].style}if(!pause2){window.removeEventListener("resize",init2);pause2=true}clearLoop(loopId);loopId=null};init2();self2.refresh=init2;return self2};return Rellax});;/*!
|
|
454
|
+
* headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it
|
|
455
|
+
* Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js
|
|
456
|
+
* License: MIT
|
|
457
|
+
*/(function(global2,factory18){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory18():typeof define==="function"&&define.amd?define(factory18):(global2=global2||self,global2.Headroom=factory18())})(this,function(){"use strict";function isBrowser(){return typeof window!=="undefined"}function passiveEventsSupported(){var supported=false;try{var options={get passive(){supported=true}};window.addEventListener("test",options,options);window.removeEventListener("test",options,options)}catch(err){supported=false}return supported}function isSupported(){return!!(isBrowser()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame)}function isDocument(obj){return obj.nodeType===9}function isWindow(obj){return obj&&obj.document&&isDocument(obj.document)}function windowScroller(win){var doc2=win.document;var body=doc2.body;var html=doc2.documentElement;return{scrollHeight:function(){return Math.max(body.scrollHeight,html.scrollHeight,body.offsetHeight,html.offsetHeight,body.clientHeight,html.clientHeight)},height:function(){return win.innerHeight||html.clientHeight||body.clientHeight},scrollY:function(){if(win.pageYOffset!==void 0){return win.pageYOffset}return(html||body.parentNode||body).scrollTop}}}function elementScroller(element){return{scrollHeight:function(){return Math.max(element.scrollHeight,element.offsetHeight,element.clientHeight)},height:function(){return Math.max(element.offsetHeight,element.clientHeight)},scrollY:function(){return element.scrollTop}}}function createScroller(element){return isWindow(element)?windowScroller(element):elementScroller(element)}function trackScroll(element,options,callback){var isPassiveSupported=passiveEventsSupported();var rafId;var scrolled=false;var scroller=createScroller(element);var lastScrollY=scroller.scrollY();var details={};function update(){var scrollY=Math.round(scroller.scrollY());var height=scroller.height();var scrollHeight=scroller.scrollHeight();details.scrollY=scrollY;details.lastScrollY=lastScrollY;details.direction=scrollY>lastScrollY?"down":"up";details.distance=Math.abs(scrollY-lastScrollY);details.isOutOfBounds=scrollY<0||scrollY+height>scrollHeight;details.top=scrollY<=options.offset[details.direction];details.bottom=scrollY+height>=scrollHeight;details.toleranceExceeded=details.distance>options.tolerance[details.direction];callback(details);lastScrollY=scrollY;scrolled=false}function handleScroll(){if(!scrolled){scrolled=true;rafId=requestAnimationFrame(update)}}var eventOptions=isPassiveSupported?{passive:true,capture:false}:false;element.addEventListener("scroll",handleScroll,eventOptions);update();return{destroy:function(){cancelAnimationFrame(rafId);element.removeEventListener("scroll",handleScroll,eventOptions)}}}function normalizeUpDown(t2){return t2===Object(t2)?t2:{down:t2,up:t2}}function Headroom2(elem,options){options=options||{};Object.assign(this,Headroom2.options,options);this.classes=Object.assign({},Headroom2.options.classes,options.classes);this.elem=elem;this.tolerance=normalizeUpDown(this.tolerance);this.offset=normalizeUpDown(this.offset);this.initialised=false;this.frozen=false}Headroom2.prototype={constructor:Headroom2,init:function(){if(Headroom2.cutsTheMustard&&!this.initialised){this.addClass("initial");this.initialised=true;setTimeout(function(self2){self2.scrollTracker=trackScroll(self2.scroller,{offset:self2.offset,tolerance:self2.tolerance},self2.update.bind(self2))},100,this)}return this},destroy:function(){this.initialised=false;Object.keys(this.classes).forEach(this.removeClass,this);this.scrollTracker.destroy()},unpin:function(){if(this.hasClass("pinned")||!this.hasClass("unpinned")){this.addClass("unpinned");this.removeClass("pinned");if(this.onUnpin){this.onUnpin.call(this)}}},pin:function(){if(this.hasClass("unpinned")){this.addClass("pinned");this.removeClass("unpinned");if(this.onPin){this.onPin.call(this)}}},freeze:function(){this.frozen=true;this.addClass("frozen")},unfreeze:function(){this.frozen=false;this.removeClass("frozen")},top:function(){if(!this.hasClass("top")){this.addClass("top");this.removeClass("notTop");if(this.onTop){this.onTop.call(this)}}},notTop:function(){if(!this.hasClass("notTop")){this.addClass("notTop");this.removeClass("top");if(this.onNotTop){this.onNotTop.call(this)}}},bottom:function(){if(!this.hasClass("bottom")){this.addClass("bottom");this.removeClass("notBottom");if(this.onBottom){this.onBottom.call(this)}}},notBottom:function(){if(!this.hasClass("notBottom")){this.addClass("notBottom");this.removeClass("bottom");if(this.onNotBottom){this.onNotBottom.call(this)}}},shouldUnpin:function(details){var scrollingDown=details.direction==="down";return scrollingDown&&!details.top&&details.toleranceExceeded},shouldPin:function(details){var scrollingUp=details.direction==="up";return scrollingUp&&details.toleranceExceeded||details.top},addClass:function(className){this.elem.classList.add.apply(this.elem.classList,this.classes[className].split(" "))},removeClass:function(className){this.elem.classList.remove.apply(this.elem.classList,this.classes[className].split(" "))},hasClass:function(className){return this.classes[className].split(" ").every(function(cls){return this.classList.contains(cls)},this.elem)},update:function(details){if(details.isOutOfBounds){return}if(this.frozen===true){return}if(details.top){this.top()}else{this.notTop()}if(details.bottom){this.bottom()}else{this.notBottom()}if(this.shouldUnpin(details)){this.unpin()}else if(this.shouldPin(details)){this.pin()}}};Headroom2.options={tolerance:{up:0,down:0},offset:0,scroller:isBrowser()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}};Headroom2.cutsTheMustard=isSupported();return Headroom2});;/*!
|
|
458
|
+
* headroom.js v0.9.4 - Give your page some headroom. Hide your header until you need it
|
|
459
|
+
* Copyright (c) 2017 Nick Williams - http://wicky.nillia.ms/headroom.js
|
|
460
|
+
* License: MIT
|
|
461
|
+
*/(function($2){if(!$2){return}$2.fn.headroom=function(option){return this.each(function(){var $this=$2(this),data2=$this.data("headroom"),options=typeof option==="object"&&option;options=$2.extend(true,{},Headroom.options,options);if(!data2){data2=new Headroom(this,options);data2.init();$this.data("headroom",data2)}if(typeof option==="string"){data2[option]();if(option==="destroy"){$this.removeData("headroom")}}})};$2("[data-headroom]").each(function(){var $this=$2(this);$this.headroom($this.data())})})(window.Zepto||window.jQuery);;/*!
|
|
462
|
+
* in-view 0.6.1 - Get notified when a DOM element enters or exits the viewport.
|
|
463
|
+
* Copyright (c) 2016 Cam Wiegert <cam@camwiegert.com> - https://camwiegert.github.io/in-view
|
|
464
|
+
* License: MIT
|
|
465
|
+
*/!(function(t2,e2){"object"==typeof exports&&"object"==typeof module?module.exports=e2():"function"==typeof define&&define.amd?define([],e2):"object"==typeof exports?exports.inView=e2():t2.inView=e2()})(this,function(){return(function(t2){function e2(r2){if(n2[r2])return n2[r2].exports;var i2=n2[r2]={exports:{},id:r2,loaded:false};return t2[r2].call(i2.exports,i2,i2.exports,e2),i2.loaded=true,i2.exports}var n2={};return e2.m=t2,e2.c=n2,e2.p="",e2(0)})([function(t2,e2,n2){"use strict";function r2(t3){return t3&&t3.__esModule?t3:{"default":t3}}var i2=n2(2),o=r2(i2);t2.exports=o["default"]},function(t2,e2){function n2(t3){var e3=typeof t3;return null!=t3&&("object"==e3||"function"==e3)}t2.exports=n2},function(t2,e2,n2){"use strict";function r2(t3){return t3&&t3.__esModule?t3:{"default":t3}}Object.defineProperty(e2,"__esModule",{value:true});var i2=n2(9),o=r2(i2),u=n2(3),f=r2(u),s=n2(4),c=function(){if("undefined"!=typeof window){var t3=100,e3=["scroll","resize","load"],n3={history:[]},r3={offset:{},threshold:0,test:s.inViewport},i3=(0,o["default"])(function(){n3.history.forEach(function(t4){n3[t4].check()})},t3);e3.forEach(function(t4){return addEventListener(t4,i3)}),window.MutationObserver&&addEventListener("DOMContentLoaded",function(){new MutationObserver(i3).observe(document.body,{attributes:true,childList:true,subtree:true})});var u2=function(t4){if("string"==typeof t4){var e4=[].slice.call(document.querySelectorAll(t4));return n3.history.indexOf(t4)>-1?n3[t4].elements=e4:(n3[t4]=(0,f["default"])(e4,r3),n3.history.push(t4)),n3[t4]}};return u2.offset=function(t4){if(void 0===t4)return r3.offset;var e4=function(t5){return"number"==typeof t5};return["top","right","bottom","left"].forEach(e4(t4)?function(e5){return r3.offset[e5]=t4}:function(n4){return e4(t4[n4])?r3.offset[n4]=t4[n4]:null}),r3.offset},u2.threshold=function(t4){return"number"==typeof t4&&t4>=0&&t4<=1?r3.threshold=t4:r3.threshold},u2.test=function(t4){return"function"==typeof t4?r3.test=t4:r3.test},u2.is=function(t4){return r3.test(t4,r3)},u2.offset(0),u2}};e2["default"]=c()},function(t2,e2){"use strict";function n2(t3,e3){if(!(t3 instanceof e3))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e2,"__esModule",{value:true});var r2=(function(){function t3(t4,e3){for(var n3=0;n3<e3.length;n3++){var r3=e3[n3];r3.enumerable=r3.enumerable||false,r3.configurable=true,"value"in r3&&(r3.writable=true),Object.defineProperty(t4,r3.key,r3)}}return function(e3,n3,r3){return n3&&t3(e3.prototype,n3),r3&&t3(e3,r3),e3}})(),i2=(function(){function t3(e3,r3){n2(this,t3),this.options=r3,this.elements=e3,this.current=[],this.handlers={enter:[],exit:[]},this.singles={enter:[],exit:[]}}return r2(t3,[{key:"check",value:function(){var t4=this;return this.elements.forEach(function(e3){var n3=t4.options.test(e3,t4.options),r3=t4.current.indexOf(e3),i3=r3>-1,o=n3&&!i3,u=!n3&&i3;o&&(t4.current.push(e3),t4.emit("enter",e3)),u&&(t4.current.splice(r3,1),t4.emit("exit",e3))}),this}},{key:"on",value:function(t4,e3){return this.handlers[t4].push(e3),this}},{key:"once",value:function(t4,e3){return this.singles[t4].unshift(e3),this}},{key:"emit",value:function(t4,e3){for(;this.singles[t4].length;)this.singles[t4].pop()(e3);for(var n3=this.handlers[t4].length;--n3>-1;)this.handlers[t4][n3](e3);return this}}]),t3})();e2["default"]=function(t3,e3){return new i2(t3,e3)}},function(t2,e2){"use strict";function n2(t3,e3){var n3=t3.getBoundingClientRect(),r2=n3.top,i2=n3.right,o=n3.bottom,u=n3.left,f=n3.width,s=n3.height,c={t:o,r:window.innerWidth-u,b:window.innerHeight-r2,l:i2},a={x:e3.threshold*f,y:e3.threshold*s};return c.t>e3.offset.top+a.y&&c.r>e3.offset.right+a.x&&c.b>e3.offset.bottom+a.y&&c.l>e3.offset.left+a.x}Object.defineProperty(e2,"__esModule",{value:true}),e2.inViewport=n2},function(t2,e2){(function(e3){var n2="object"==typeof e3&&e3&&e3.Object===Object&&e3;t2.exports=n2}).call(e2,(function(){return this})())},function(t2,e2,n2){var r2=n2(5),i2="object"==typeof self&&self&&self.Object===Object&&self,o=r2||i2||Function("return this")();t2.exports=o},function(t2,e2,n2){function r2(t3,e3,n3){function r3(e4){var n4=x2,r4=m;return x2=m=void 0,E=e4,w=t3.apply(r4,n4)}function a(t4){return E=t4,j=setTimeout(h,e3),M?r3(t4):w}function l(t4){var n4=t4-O,r4=t4-E,i3=e3-n4;return _?c(i3,g-r4):i3}function d(t4){var n4=t4-O,r4=t4-E;return void 0===O||n4>=e3||n4<0||_&&r4>=g}function h(){var t4=o();return d(t4)?p(t4):void(j=setTimeout(h,l(t4)))}function p(t4){return j=void 0,T&&x2?r3(t4):(x2=m=void 0,w)}function v(){void 0!==j&&clearTimeout(j),E=0,x2=O=m=j=void 0}function y(){return void 0===j?w:p(o())}function b(){var t4=o(),n4=d(t4);if(x2=arguments,m=this,O=t4,n4){if(void 0===j)return a(O);if(_)return j=setTimeout(h,e3),r3(O)}return void 0===j&&(j=setTimeout(h,e3)),w}var x2,m,g,w,j,O,E=0,M=false,_=false,T=true;if("function"!=typeof t3)throw new TypeError(f);return e3=u(e3)||0,i2(n3)&&(M=!!n3.leading,_="maxWait"in n3,g=_?s(u(n3.maxWait)||0,e3):g,T="trailing"in n3?!!n3.trailing:T),b.cancel=v,b.flush=y,b}var i2=n2(1),o=n2(8),u=n2(10),f="Expected a function",s=Math.max,c=Math.min;t2.exports=r2},function(t2,e2,n2){var r2=n2(6),i2=function(){return r2.Date.now()};t2.exports=i2},function(t2,e2,n2){function r2(t3,e3,n3){var r3=true,f=true;if("function"!=typeof t3)throw new TypeError(u);return o(n3)&&(r3="leading"in n3?!!n3.leading:r3,f="trailing"in n3?!!n3.trailing:f),i2(t3,e3,{leading:r3,maxWait:e3,trailing:f})}var i2=n2(7),o=n2(1),u="Expected a function";t2.exports=r2},function(t2,e2){function n2(t3){return t3}t2.exports=n2}])});;(function(global2,factory18){typeof exports==="object"&&typeof module!=="undefined"?factory18(exports):typeof define==="function"&&define.amd?define(["exports"],factory18):(global2=global2||self,factory18(global2.window=global2.window||{}))})(this,(function(exports2){"use strict";function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass}function _assertThisInitialized(self2){if(self2===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self2}/*!
|
|
466
|
+
* GSAP 3.15.0
|
|
467
|
+
* https://gsap.com
|
|
468
|
+
*
|
|
469
|
+
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
470
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
471
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
472
|
+
*/var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:false,delay:0},_suppressOverwrites,_reverting,_context,_bigNum=1e8,_tinyNum=1/_bigNum,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function _isString2(value){return typeof value==="string"},_isFunction=function _isFunction2(value){return typeof value==="function"},_isNumber=function _isNumber2(value){return typeof value==="number"},_isUndefined=function _isUndefined2(value){return typeof value==="undefined"},_isObject=function _isObject2(value){return typeof value==="object"},_isNotFalse=function _isNotFalse2(value){return value!==false},_windowExists=function _windowExists2(){return typeof window!=="undefined"},_isFuncOrString=function _isFuncOrString2(value){return _isFunction(value)||_isString(value)},_isTypedArray=typeof ArrayBuffer==="function"&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_randomExp=/random\([^)]+\)/g,_commaDelimExp=/,\s*/g,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win,_coreInitted,_doc,_globals={},_installScope={},_coreReady,_install=function _install2(scope){return(_installScope=_merge(scope,_globals))&&gsap2},_missingPlugin=function _missingPlugin2(property,value){return console.warn("Invalid property",property,"set to",value,"Missing plugin? gsap.registerPlugin()")},_warn=function _warn2(message,suppress){return!suppress&&console.warn(message)},_addGlobal=function _addGlobal2(name,obj){return name&&(_globals[name]=obj)&&_installScope&&(_installScope[name]=obj)||_globals},_emptyFunc=function _emptyFunc2(){return 0},_startAtRevertConfig={suppressEvents:true,isStart:true,kill:false},_revertConfigNoKill={suppressEvents:true,kill:false},_revertConfig={suppressEvents:true},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function _harness2(targets){var target=targets[0],harnessPlugin,i2;_isObject(target)||_isFunction(target)||(targets=[targets]);if(!(harnessPlugin=(target._gsap||{}).harness)){i2=_harnessPlugins.length;while(i2--&&!_harnessPlugins[i2].targetTest(target)){}harnessPlugin=_harnessPlugins[i2]}i2=targets.length;while(i2--){targets[i2]&&(targets[i2]._gsap||(targets[i2]._gsap=new GSCache(targets[i2],harnessPlugin)))||targets.splice(i2,1)}return targets},_getCache=function _getCache2(target){return target._gsap||_harness(toArray(target))[0]._gsap},_getProperty=function _getProperty2(target,property,v){return(v=target[property])&&_isFunction(v)?target[property]():_isUndefined(v)&&target.getAttribute&&target.getAttribute(property)||v},_forEachName=function _forEachName2(names,func){return(names=names.split(",")).forEach(func)||names},_round=function _round2(value){return Math.round(value*1e5)/1e5||0},_roundPrecise=function _roundPrecise2(value){return Math.round(value*1e7)/1e7||0},_parseRelative=function _parseRelative2(start,value){var operator=value.charAt(0),end=parseFloat(value.substr(2));start=parseFloat(start);return operator==="+"?start+end:operator==="-"?start-end:operator==="*"?start*end:start/end},_arrayContainsAny=function _arrayContainsAny2(toSearch,toFind){var l=toFind.length,i2=0;for(;toSearch.indexOf(toFind[i2])<0&&++i2<l;){}return i2<l},_lazyRender=function _lazyRender2(){var l=_lazyTweens.length,a=_lazyTweens.slice(0),i2,tween;_lazyLookup={};_lazyTweens.length=0;for(i2=0;i2<l;i2++){tween=a[i2];tween&&tween._lazy&&(tween.render(tween._lazy[0],tween._lazy[1],true)._lazy=0)}},_isRevertWorthy=function _isRevertWorthy2(animation){return!!(animation._initted||animation._startAt||animation.add)},_lazySafeRender=function _lazySafeRender2(animation,time,suppressEvents,force){_lazyTweens.length&&!_reverting&&_lazyRender();animation.render(time,suppressEvents,force||!!(_reverting&&time<0&&_isRevertWorthy(animation)));_lazyTweens.length&&!_reverting&&_lazyRender()},_numericIfPossible=function _numericIfPossible2(value){var n2=parseFloat(value);return(n2||n2===0)&&(value+"").match(_delimitedValueExp).length<2?n2:_isString(value)?value.trim():value},_passThrough=function _passThrough2(p){return p},_setDefaults=function _setDefaults2(obj,defaults){for(var p in defaults){p in obj||(obj[p]=defaults[p])}return obj},_setKeyframeDefaults=function _setKeyframeDefaults2(excludeDuration){return function(obj,defaults){for(var p in defaults){p in obj||p==="duration"&&excludeDuration||p==="ease"||(obj[p]=defaults[p])}}},_merge=function _merge2(base,toMerge){for(var p in toMerge){base[p]=toMerge[p]}return base},_mergeDeep=function _mergeDeep2(base,toMerge){for(var p in toMerge){p!=="__proto__"&&p!=="constructor"&&p!=="prototype"&&(base[p]=_isObject(toMerge[p])?_mergeDeep2(base[p]||(base[p]={}),toMerge[p]):toMerge[p])}return base},_copyExcluding=function _copyExcluding2(obj,excluding){var copy={},p;for(p in obj){p in excluding||(copy[p]=obj[p])}return copy},_inheritDefaults=function _inheritDefaults2(vars2){var parent2=vars2.parent||_globalTimeline,func=vars2.keyframes?_setKeyframeDefaults(_isArray(vars2.keyframes)):_setDefaults;if(_isNotFalse(vars2.inherit)){while(parent2){func(vars2,parent2.vars.defaults);parent2=parent2.parent||parent2._dp}}return vars2},_arraysMatch=function _arraysMatch2(a1,a2){var i2=a1.length,match=i2===a2.length;while(match&&i2--&&a1[i2]===a2[i2]){}return i2<0},_addLinkedListItem=function _addLinkedListItem2(parent2,child,firstProp,lastProp,sortBy){if(firstProp===void 0){firstProp="_first"}if(lastProp===void 0){lastProp="_last"}var prev=parent2[lastProp],t2;if(sortBy){t2=child[sortBy];while(prev&&prev[sortBy]>t2){prev=prev._prev}}if(prev){child._next=prev._next;prev._next=child}else{child._next=parent2[firstProp];parent2[firstProp]=child}if(child._next){child._next._prev=child}else{parent2[lastProp]=child}child._prev=prev;child.parent=child._dp=parent2;return child},_removeLinkedListItem=function _removeLinkedListItem2(parent2,child,firstProp,lastProp){if(firstProp===void 0){firstProp="_first"}if(lastProp===void 0){lastProp="_last"}var prev=child._prev,next=child._next;if(prev){prev._next=next}else if(parent2[firstProp]===child){parent2[firstProp]=next}if(next){next._prev=prev}else if(parent2[lastProp]===child){parent2[lastProp]=prev}child._next=child._prev=child.parent=null},_removeFromParent=function _removeFromParent2(child,onlyIfParentHasAutoRemove){child.parent&&(!onlyIfParentHasAutoRemove||child.parent.autoRemoveChildren)&&child.parent.remove&&child.parent.remove(child);child._act=0},_uncache=function _uncache2(animation,child){if(animation&&(!child||child._end>animation._dur||child._start<0)){var a=animation;while(a){a._dirty=1;a=a.parent}}return animation},_recacheAncestors=function _recacheAncestors2(animation){var parent2=animation.parent;while(parent2&&parent2.parent){parent2._dirty=1;parent2.totalDuration();parent2=parent2.parent}return animation},_rewindStartAt=function _rewindStartAt2(tween,totalTime,suppressEvents,force){return tween._startAt&&(_reverting?tween._startAt.revert(_revertConfigNoKill):tween.vars.immediateRender&&!tween.vars.autoRevert||tween._startAt.render(totalTime,true,force))},_hasNoPausedAncestors=function _hasNoPausedAncestors2(animation){return!animation||animation._ts&&_hasNoPausedAncestors2(animation.parent)},_elapsedCycleDuration=function _elapsedCycleDuration2(animation){return animation._repeat?_animationCycle(animation._tTime,animation=animation.duration()+animation._rDelay)*animation:0},_animationCycle=function _animationCycle2(tTime,cycleDuration){var whole=Math.floor(tTime=_roundPrecise(tTime/cycleDuration));return tTime&&whole===tTime?whole-1:whole},_parentToChildTotalTime=function _parentToChildTotalTime2(parentTime,child){return(parentTime-child._start)*child._ts+(child._ts>=0?0:child._dirty?child.totalDuration():child._tDur)},_setEnd=function _setEnd2(animation){return animation._end=_roundPrecise(animation._start+(animation._tDur/Math.abs(animation._ts||animation._rts||_tinyNum)||0))},_alignPlayhead=function _alignPlayhead2(animation,totalTime){var parent2=animation._dp;if(parent2&&parent2.smoothChildTiming&&animation._ts){animation._start=_roundPrecise(parent2._time-(animation._ts>0?totalTime/animation._ts:((animation._dirty?animation.totalDuration():animation._tDur)-totalTime)/-animation._ts));_setEnd(animation);parent2._dirty||_uncache(parent2,animation)}return animation},_postAddChecks=function _postAddChecks2(timeline,child){var t2;if(child._time||!child._dur&&child._initted||child._start<timeline._time&&(child._dur||!child.add)){t2=_parentToChildTotalTime(timeline.rawTime(),child);if(!child._dur||_clamp(0,child.totalDuration(),t2)-child._tTime>_tinyNum){child.render(t2,true)}}if(_uncache(timeline,child)._dp&&timeline._initted&&timeline._time>=timeline._dur&&timeline._ts){if(timeline._dur<timeline.duration()){t2=timeline;while(t2._dp){t2.rawTime()>=0&&t2.totalTime(t2._tTime);t2=t2._dp}}timeline._zTime=-_tinyNum}},_addToTimeline=function _addToTimeline2(timeline,child,position,skipChecks){child.parent&&_removeFromParent(child);child._start=_roundPrecise((_isNumber(position)?position:position||timeline!==_globalTimeline?_parsePosition(timeline,position,child):timeline._time)+child._delay);child._end=_roundPrecise(child._start+(child.totalDuration()/Math.abs(child.timeScale())||0));_addLinkedListItem(timeline,child,"_first","_last",timeline._sort?"_start":0);_isFromOrFromStart(child)||(timeline._recent=child);skipChecks||_postAddChecks(timeline,child);timeline._ts<0&&_alignPlayhead(timeline,timeline._tTime);return timeline},_scrollTrigger=function _scrollTrigger2(animation,trigger){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",trigger))&&_globals.ScrollTrigger.create(trigger,animation)},_attemptInitTween=function _attemptInitTween2(tween,time,force,suppressEvents,tTime){_initTween(tween,time,tTime);if(!tween._initted){return 1}if(!force&&tween._pt&&!_reverting&&(tween._dur&&tween.vars.lazy!==false||!tween._dur&&tween.vars.lazy)&&_lastRenderedFrame!==_ticker.frame){_lazyTweens.push(tween);tween._lazy=[tTime,suppressEvents];return 1}},_parentPlayheadIsBeforeStart=function _parentPlayheadIsBeforeStart2(_ref){var parent2=_ref.parent;return parent2&&parent2._ts&&parent2._initted&&!parent2._lock&&(parent2.rawTime()<0||_parentPlayheadIsBeforeStart2(parent2))},_isFromOrFromStart=function _isFromOrFromStart2(_ref2){var data2=_ref2.data;return data2==="isFromStart"||data2==="isStart"},_renderZeroDurationTween=function _renderZeroDurationTween2(tween,totalTime,suppressEvents,force){var prevRatio=tween.ratio,ratio=totalTime<0||!totalTime&&(!tween._start&&_parentPlayheadIsBeforeStart(tween)&&!(!tween._initted&&_isFromOrFromStart(tween))||(tween._ts<0||tween._dp._ts<0)&&!_isFromOrFromStart(tween))?0:1,repeatDelay=tween._rDelay,tTime=0,pt,iteration,prevIteration;if(repeatDelay&&tween._repeat){tTime=_clamp(0,tween._tDur,totalTime);iteration=_animationCycle(tTime,repeatDelay);tween._yoyo&&iteration&1&&(ratio=1-ratio);if(iteration!==_animationCycle(tween._tTime,repeatDelay)){prevRatio=1-ratio;tween.vars.repeatRefresh&&tween._initted&&tween.invalidate()}}if(ratio!==prevRatio||_reverting||force||tween._zTime===_tinyNum||!totalTime&&tween._zTime){if(!tween._initted&&_attemptInitTween(tween,totalTime,force,suppressEvents,tTime)){return}prevIteration=tween._zTime;tween._zTime=totalTime||(suppressEvents?_tinyNum:0);suppressEvents||(suppressEvents=totalTime&&!prevIteration);tween.ratio=ratio;tween._from&&(ratio=1-ratio);tween._time=0;tween._tTime=tTime;pt=tween._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next}totalTime<0&&_rewindStartAt(tween,totalTime,suppressEvents,true);tween._onUpdate&&!suppressEvents&&_callback(tween,"onUpdate");tTime&&tween._repeat&&!suppressEvents&&tween.parent&&_callback(tween,"onRepeat");if((totalTime>=tween._tDur||totalTime<0)&&tween.ratio===ratio){ratio&&_removeFromParent(tween,1);if(!suppressEvents&&!_reverting){_callback(tween,ratio?"onComplete":"onReverseComplete",true);tween._prom&&tween._prom()}}}else if(!tween._zTime){tween._zTime=totalTime}},_findNextPauseTween=function _findNextPauseTween2(animation,prevTime,time){var child;if(time>prevTime){child=animation._first;while(child&&child._start<=time){if(child.data==="isPause"&&child._start>prevTime){return child}child=child._next}}else{child=animation._last;while(child&&child._start>=time){if(child.data==="isPause"&&child._start<prevTime){return child}child=child._prev}}},_setDuration=function _setDuration2(animation,duration,skipUncache,leavePlayhead){var repeat=animation._repeat,dur=_roundPrecise(duration)||0,totalProgress=animation._tTime/animation._tDur;totalProgress&&!leavePlayhead&&(animation._time*=dur/animation._dur);animation._dur=dur;animation._tDur=!repeat?dur:repeat<0?1e10:_roundPrecise(dur*(repeat+1)+animation._rDelay*repeat);totalProgress>0&&!leavePlayhead&&_alignPlayhead(animation,animation._tTime=animation._tDur*totalProgress);animation.parent&&_setEnd(animation);skipUncache||_uncache(animation.parent,animation);return animation},_onUpdateTotalDuration=function _onUpdateTotalDuration2(animation){return animation instanceof Timeline?_uncache(animation):_setDuration(animation,animation._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function _parsePosition2(animation,position,percentAnimation){var labels=animation.labels,recent=animation._recent||_zeroPosition,clippedDuration=animation.duration()>=_bigNum?recent.endTime(false):animation._dur,i2,offset,isPercent;if(_isString(position)&&(isNaN(position)||position in labels)){offset=position.charAt(0);isPercent=position.substr(-1)==="%";i2=position.indexOf("=");if(offset==="<"||offset===">"){i2>=0&&(position=position.replace(/=/,""));return(offset==="<"?recent._start:recent.endTime(recent._repeat>=0))+(parseFloat(position.substr(1))||0)*(isPercent?(i2<0?recent:percentAnimation).totalDuration()/100:1)}if(i2<0){position in labels||(labels[position]=clippedDuration);return labels[position]}offset=parseFloat(position.charAt(i2-1)+position.substr(i2+1));if(isPercent&&percentAnimation){offset=offset/100*(_isArray(percentAnimation)?percentAnimation[0]:percentAnimation).totalDuration()}return i2>1?_parsePosition2(animation,position.substr(0,i2-1),percentAnimation)+offset:clippedDuration+offset}return position==null?clippedDuration:+position},_createTweenType=function _createTweenType2(type2,params,timeline){var isLegacy=_isNumber(params[1]),varsIndex=(isLegacy?2:1)+(type2<2?0:1),vars2=params[varsIndex],irVars,parent2;isLegacy&&(vars2.duration=params[1]);vars2.parent=timeline;if(type2){irVars=vars2;parent2=timeline;while(parent2&&!("immediateRender"in irVars)){irVars=parent2.vars.defaults||{};parent2=_isNotFalse(parent2.vars.inherit)&&parent2.parent}vars2.immediateRender=_isNotFalse(irVars.immediateRender);type2<2?vars2.runBackwards=1:vars2.startAt=params[varsIndex-1]}return new Tween(params[0],vars2,params[varsIndex+1])},_conditionalReturn=function _conditionalReturn2(value,func){return value||value===0?func(value):func},_clamp=function _clamp2(min,max,value){return value<min?min:value>max?max:value},getUnit=function getUnit2(value,v){return!_isString(value)||!(v=_unitExp.exec(value))?"":v[1]},clamp=function clamp2(min,max,value){return _conditionalReturn(value,function(v){return _clamp(min,max,v)})},_slice=[].slice,_isArrayLike=function _isArrayLike2(value,nonEmpty){return value&&_isObject(value)&&"length"in value&&(!nonEmpty&&!value.length||value.length-1 in value&&_isObject(value[0]))&&!value.nodeType&&value!==_win},_flatten=function _flatten2(ar,leaveStrings,accumulator){if(accumulator===void 0){accumulator=[]}return ar.forEach(function(value){var _accumulator;return _isString(value)&&!leaveStrings||_isArrayLike(value,1)?(_accumulator=accumulator).push.apply(_accumulator,toArray(value)):accumulator.push(value)})||accumulator},toArray=function toArray2(value,scope,leaveStrings){return _context&&!scope&&_context.selector?_context.selector(value):_isString(value)&&!leaveStrings&&(_coreInitted||!_wake())?_slice.call((scope||_doc).querySelectorAll(value),0):_isArray(value)?_flatten(value,leaveStrings):_isArrayLike(value)?_slice.call(value,0):value?[value]:[]},selector2=function selector3(value){value=toArray(value)[0]||_warn("Invalid scope")||{};return function(v){var el2=value.current||value.nativeElement||value;return toArray(v,el2.querySelectorAll?el2:el2===value?_warn("Invalid scope")||_doc.createElement("div"):value)}},shuffle=function shuffle2(a){return a.sort(function(){return .5-Math.random()})},distribute=function distribute2(v){if(_isFunction(v)){return v}var vars2=_isObject(v)?v:{each:v},ease=_parseEase(vars2.ease),from=vars2.from||0,base=parseFloat(vars2.base)||0,cache={},isDecimal=from>0&&from<1,ratios=isNaN(from)||isDecimal,axis=vars2.axis,ratioX=from,ratioY=from;if(_isString(from)){ratioX=ratioY={center:.5,edges:.5,end:1}[from]||0}else if(!isDecimal&&ratios){ratioX=from[0];ratioY=from[1]}return function(i2,target,a){var l=(a||vars2).length,distances=cache[l],originX,originY,x2,y,d,j,max,min,wrapAt;if(!distances){wrapAt=vars2.grid==="auto"?0:(vars2.grid||[1,_bigNum])[1];if(!wrapAt){max=-_bigNum;while(max<(max=a[wrapAt++].getBoundingClientRect().left)&&wrapAt<l){}wrapAt<l&&wrapAt--}distances=cache[l]=[];originX=ratios?Math.min(wrapAt,l)*ratioX-.5:from%wrapAt;originY=wrapAt===_bigNum?0:ratios?l*ratioY/wrapAt-.5:from/wrapAt|0;max=0;min=_bigNum;for(j=0;j<l;j++){x2=j%wrapAt-originX;y=originY-(j/wrapAt|0);distances[j]=d=!axis?_sqrt(x2*x2+y*y):Math.abs(axis==="y"?y:x2);d>max&&(max=d);d<min&&(min=d)}from==="random"&&shuffle(distances);distances.max=max-min;distances.min=min;distances.v=l=(parseFloat(vars2.amount)||parseFloat(vars2.each)*(wrapAt>l?l-1:!axis?Math.max(wrapAt,l/wrapAt):axis==="y"?l/wrapAt:wrapAt)||0)*(from==="edges"?-1:1);distances.b=l<0?base-l:base;distances.u=getUnit(vars2.amount||vars2.each)||0;ease=ease&&l<0?_invertEase(ease):ease}l=(distances[i2]-distances.min)/distances.max||0;return _roundPrecise(distances.b+(ease?ease(l):l)*distances.v)+distances.u}},_roundModifier=function _roundModifier2(v){var p=Math.pow(10,((v+"").split(".")[1]||"").length);return function(raw){var n2=_roundPrecise(Math.round(parseFloat(raw)/v)*v*p);return(n2-n2%1)/p+(_isNumber(raw)?0:getUnit(raw))}},snap=function snap2(snapTo,value){var isArray=_isArray(snapTo),radius,is2D;if(!isArray&&_isObject(snapTo)){radius=isArray=snapTo.radius||_bigNum;if(snapTo.values){snapTo=toArray(snapTo.values);if(is2D=!_isNumber(snapTo[0])){radius*=radius}}else{snapTo=_roundModifier(snapTo.increment)}}return _conditionalReturn(value,!isArray?_roundModifier(snapTo):_isFunction(snapTo)?function(raw){is2D=snapTo(raw);return Math.abs(is2D-raw)<=radius?is2D:raw}:function(raw){var x2=parseFloat(is2D?raw.x:raw),y=parseFloat(is2D?raw.y:0),min=_bigNum,closest=0,i2=snapTo.length,dx,dy;while(i2--){if(is2D){dx=snapTo[i2].x-x2;dy=snapTo[i2].y-y;dx=dx*dx+dy*dy}else{dx=Math.abs(snapTo[i2]-x2)}if(dx<min){min=dx;closest=i2}}closest=!radius||min<=radius?snapTo[closest]:raw;return is2D||closest===raw||_isNumber(raw)?closest:closest+getUnit(raw)})},random=function random2(min,max,roundingIncrement,returnFunction){return _conditionalReturn(_isArray(min)?!max:roundingIncrement===true?!!(roundingIncrement=0):!returnFunction,function(){return _isArray(min)?min[~~(Math.random()*min.length)]:(roundingIncrement=roundingIncrement||1e-5)&&(returnFunction=roundingIncrement<1?Math.pow(10,(roundingIncrement+"").length-2):1)&&Math.floor(Math.round((min-roundingIncrement/2+Math.random()*(max-min+roundingIncrement*.99))/roundingIncrement)*roundingIncrement*returnFunction)/returnFunction})},pipe=function pipe2(){for(var _len=arguments.length,functions=new Array(_len),_key=0;_key<_len;_key++){functions[_key]=arguments[_key]}return function(value){return functions.reduce(function(v,f){return f(v)},value)}},unitize=function unitize2(func,unit){return function(value){return func(parseFloat(value))+(unit||getUnit(value))}},normalize=function normalize2(min,max,value){return mapRange(min,max,0,1,value)},_wrapArray=function _wrapArray2(a,wrapper,value){return _conditionalReturn(value,function(index2){return a[~~wrapper(index2)]})},wrap=function wrap2(min,max,value){var range=max-min;return _isArray(min)?_wrapArray(min,wrap2(0,min.length),max):_conditionalReturn(value,function(value2){return(range+(value2-min)%range)%range+min})},wrapYoyo=function wrapYoyo2(min,max,value){var range=max-min,total=range*2;return _isArray(min)?_wrapArray(min,wrapYoyo2(0,min.length-1),max):_conditionalReturn(value,function(value2){value2=(total+(value2-min)%total)%total||0;return min+(value2>range?total-value2:value2)})},_replaceRandom=function _replaceRandom2(s){return s.replace(_randomExp,function(match){var arIndex=match.indexOf("[")+1,values=match.substring(arIndex||7,arIndex?match.indexOf("]"):match.length-1).split(_commaDelimExp);return random(arIndex?values:+values[0],arIndex?0:+values[1],+values[2]||1e-5)})},mapRange=function mapRange2(inMin,inMax,outMin,outMax,value){var inRange=inMax-inMin,outRange=outMax-outMin;return _conditionalReturn(value,function(value2){return outMin+((value2-inMin)/inRange*outRange||0)})},interpolate=function interpolate2(start,end,progress,mutate){var func=isNaN(start+end)?0:function(p2){return(1-p2)*start+p2*end};if(!func){var isString=_isString(start),master={},p,i2,interpolators,l,il;progress===true&&(mutate=1)&&(progress=null);if(isString){start={p:start};end={p:end}}else if(_isArray(start)&&!_isArray(end)){interpolators=[];l=start.length;il=l-2;for(i2=1;i2<l;i2++){interpolators.push(interpolate2(start[i2-1],start[i2]))}l--;func=function func2(p2){p2*=l;var i3=Math.min(il,~~p2);return interpolators[i3](p2-i3)};progress=end}else if(!mutate){start=_merge(_isArray(start)?[]:{},start)}if(!interpolators){for(p in end){_addPropTween.call(master,start,p,"get",end[p])}func=function func2(p2){return _renderPropTweens(p2,master)||(isString?start.p:start)}}}return _conditionalReturn(progress,func)},_getLabelInDirection=function _getLabelInDirection2(timeline,fromTime,backward){var labels=timeline.labels,min=_bigNum,p,distance,label;for(p in labels){distance=labels[p]-fromTime;if(distance<0===!!backward&&distance&&min>(distance=Math.abs(distance))){label=p;min=distance}}return label},_callback=function _callback2(animation,type2,executeLazyFirst){var v=animation.vars,callback=v[type2],prevContext=_context,context=animation._ctx,params,scope,result;if(!callback){return}params=v[type2+"Params"];scope=v.callbackScope||animation;executeLazyFirst&&_lazyTweens.length&&_lazyRender();context&&(_context=context);result=params?callback.apply(scope,params):callback.call(scope);_context=prevContext;return result},_interrupt=function _interrupt2(animation){_removeFromParent(animation);animation.scrollTrigger&&animation.scrollTrigger.kill(!!_reverting);animation.progress()<1&&_callback(animation,"onInterrupt");return animation},_quickTween,_registerPluginQueue=[],_createPlugin=function _createPlugin2(config){if(!config)return;config=!config.name&&config["default"]||config;if(_windowExists()||config.headless){var name=config.name,isFunc=_isFunction(config),Plugin=name&&!isFunc&&config.init?function(){this._props=[]}:config,instanceDefaults={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},statics={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};_wake();if(config!==Plugin){if(_plugins[name]){return}_setDefaults(Plugin,_setDefaults(_copyExcluding(config,instanceDefaults),statics));_merge(Plugin.prototype,_merge(instanceDefaults,_copyExcluding(config,statics)));_plugins[Plugin.prop=name]=Plugin;if(config.targetTest){_harnessPlugins.push(Plugin);_reservedProps[name]=1}name=(name==="css"?"CSS":name.charAt(0).toUpperCase()+name.substr(1))+"Plugin"}_addGlobal(name,Plugin);config.register&&config.register(gsap2,Plugin,PropTween)}else{_registerPluginQueue.push(config)}},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function _hue2(h,m1,m2){h+=h<0?1:h>1?-1:0;return(h*6<1?m1+(m2-m1)*h*6:h<.5?m2:h*3<2?m1+(m2-m1)*(2/3-h)*6:m1)*_255+.5|0},splitColor=function splitColor2(v,toHSL,forceAlpha){var a=!v?_colorLookup.black:_isNumber(v)?[v>>16,v>>8&_255,v&_255]:0,r2,g,b,h,s,l,max,min,d,wasHSL;if(!a){if(v.substr(-1)===","){v=v.substr(0,v.length-1)}if(_colorLookup[v]){a=_colorLookup[v]}else if(v.charAt(0)==="#"){if(v.length<6){r2=v.charAt(1);g=v.charAt(2);b=v.charAt(3);v="#"+r2+r2+g+g+b+b+(v.length===5?v.charAt(4)+v.charAt(4):"")}if(v.length===9){a=parseInt(v.substr(1,6),16);return[a>>16,a>>8&_255,a&_255,parseInt(v.substr(7),16)/255]}v=parseInt(v.substr(1),16);a=[v>>16,v>>8&_255,v&_255]}else if(v.substr(0,3)==="hsl"){a=wasHSL=v.match(_strictNumExp);if(!toHSL){h=+a[0]%360/360;s=+a[1]/100;l=+a[2]/100;g=l<=.5?l*(s+1):l+s-l*s;r2=l*2-g;a.length>3&&(a[3]*=1);a[0]=_hue(h+1/3,r2,g);a[1]=_hue(h,r2,g);a[2]=_hue(h-1/3,r2,g)}else if(~v.indexOf("=")){a=v.match(_numExp);forceAlpha&&a.length<4&&(a[3]=1);return a}}else{a=v.match(_strictNumExp)||_colorLookup.transparent}a=a.map(Number)}if(toHSL&&!wasHSL){r2=a[0]/_255;g=a[1]/_255;b=a[2]/_255;max=Math.max(r2,g,b);min=Math.min(r2,g,b);l=(max+min)/2;if(max===min){h=s=0}else{d=max-min;s=l>.5?d/(2-max-min):d/(max+min);h=max===r2?(g-b)/d+(g<b?6:0):max===g?(b-r2)/d+2:(r2-g)/d+4;h*=60}a[0]=~~(h+.5);a[1]=~~(s*100+.5);a[2]=~~(l*100+.5)}forceAlpha&&a.length<4&&(a[3]=1);return a},_colorOrderData=function _colorOrderData2(v){var values=[],c=[],i2=-1;v.split(_colorExp).forEach(function(v2){var a=v2.match(_numWithUnitExp)||[];values.push.apply(values,a);c.push(i2+=a.length+1)});values.c=c;return values},_formatColors=function _formatColors2(s,toHSL,orderMatchData){var result="",colors=(s+result).match(_colorExp),type2=toHSL?"hsla(":"rgba(",i2=0,c,shell,d,l;if(!colors){return s}colors=colors.map(function(color){return(color=splitColor(color,toHSL,1))&&type2+(toHSL?color[0]+","+color[1]+"%,"+color[2]+"%,"+color[3]:color.join(","))+")"});if(orderMatchData){d=_colorOrderData(s);c=orderMatchData.c;if(c.join(result)!==d.c.join(result)){shell=s.replace(_colorExp,"1").split(_numWithUnitExp);l=shell.length-1;for(;i2<l;i2++){result+=shell[i2]+(~c.indexOf(i2)?colors.shift()||type2+"0,0,0,0)":(d.length?d:colors.length?colors:orderMatchData).shift())}}}if(!shell){shell=s.split(_colorExp);l=shell.length-1;for(;i2<l;i2++){result+=shell[i2]+colors[i2]}}return result+shell[l]},_colorExp=(function(){var s="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",p;for(p in _colorLookup){s+="|"+p+"\\b"}return new RegExp(s+")","gi")})(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function _colorStringFilter2(a){var combined=a.join(" "),toHSL;_colorExp.lastIndex=0;if(_colorExp.test(combined)){toHSL=_hslExp.test(combined);a[1]=_formatColors(a[1],toHSL);a[0]=_formatColors(a[0],toHSL,_colorOrderData(a[1]));return true}},_tickerActive,_ticker=(function(){var _getTime=Date.now,_lagThreshold=500,_adjustedLag=33,_startTime=_getTime(),_lastUpdate=_startTime,_gap=1e3/240,_nextTime=_gap,_listeners2=[],_id,_req,_raf,_self,_delta,_i,_tick=function _tick2(v){var elapsed=_getTime()-_lastUpdate,manual=v===true,overlap,dispatch,time,frame;(elapsed>_lagThreshold||elapsed<0)&&(_startTime+=elapsed-_adjustedLag);_lastUpdate+=elapsed;time=_lastUpdate-_startTime;overlap=time-_nextTime;if(overlap>0||manual){frame=++_self.frame;_delta=time-_self.time*1e3;_self.time=time=time/1e3;_nextTime+=overlap+(overlap>=_gap?4:_gap-overlap);dispatch=1}manual||(_id=_req(_tick2));if(dispatch){for(_i=0;_i<_listeners2.length;_i++){_listeners2[_i](time,_delta,frame,v)}}};_self={time:0,frame:0,tick:function tick2(){_tick(true)},deltaRatio:function deltaRatio(fps){return _delta/(1e3/(fps||60))},wake:function wake(){if(_coreReady){if(!_coreInitted&&_windowExists()){_win=_coreInitted=window;_doc=_win.document||{};_globals.gsap=gsap2;(_win.gsapVersions||(_win.gsapVersions=[])).push(gsap2.version);_install(_installScope||_win.GreenSockGlobals||!_win.gsap&&_win||{});_registerPluginQueue.forEach(_createPlugin)}_raf=typeof requestAnimationFrame!=="undefined"&&requestAnimationFrame;_id&&_self.sleep();_req=_raf||function(f){return setTimeout(f,_nextTime-_self.time*1e3+1|0)};_tickerActive=1;_tick(2)}},sleep:function sleep(){(_raf?cancelAnimationFrame:clearTimeout)(_id);_tickerActive=0;_req=_emptyFunc},lagSmoothing:function lagSmoothing(threshold,adjustedLag){_lagThreshold=threshold||Infinity;_adjustedLag=Math.min(adjustedLag||33,_lagThreshold)},fps:function fps(_fps){_gap=1e3/(_fps||240);_nextTime=_self.time*1e3+_gap},add:function add(callback,once,prioritize){var func=once?function(t2,d,f,v){callback(t2,d,f,v);_self.remove(func)}:callback;_self.remove(callback);_listeners2[prioritize?"unshift":"push"](func);_wake();return func},remove:function remove(callback,i2){~(i2=_listeners2.indexOf(callback))&&_listeners2.splice(i2,1)&&_i>=i2&&_i--},_listeners:_listeners2};return _self})(),_wake=function _wake2(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function _parseObjectInString2(value){var obj={},split=value.substr(1,value.length-3).split(":"),key2=split[0],i2=1,l=split.length,index2,val2,parsedVal;for(;i2<l;i2++){val2=split[i2];index2=i2!==l-1?val2.lastIndexOf(","):val2.length;parsedVal=val2.substr(0,index2);obj[key2]=isNaN(parsedVal)?parsedVal.replace(_quotesExp,"").trim():+parsedVal;key2=val2.substr(index2+1).trim()}return obj},_valueInParentheses=function _valueInParentheses2(value){var open=value.indexOf("(")+1,close=value.indexOf(")"),nested=value.indexOf("(",open);return value.substring(open,~nested&&nested<close?value.indexOf(")",close+1):close)},_configEaseFromString=function _configEaseFromString2(name){var split=(name+"").split("("),ease=_easeMap[split[0]];return ease&&split.length>1&&ease.config?ease.config.apply(null,~name.indexOf("{")?[_parseObjectInString(split[1])]:_valueInParentheses(name).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(name)?_easeMap._CE("",name):ease},_invertEase=function _invertEase2(ease){return function(p){return 1-ease(1-p)}},_parseEase=function _parseEase2(ease,defaultEase){return!ease?defaultEase:(_isFunction(ease)?ease:_easeMap[ease]||_configEaseFromString(ease))||defaultEase},_insertEase=function _insertEase2(names,easeIn,easeOut,easeInOut){if(easeOut===void 0){easeOut=function easeOut2(p){return 1-easeIn(1-p)}}if(easeInOut===void 0){easeInOut=function easeInOut2(p){return p<.5?easeIn(p*2)/2:1-easeIn((1-p)*2)/2}}var ease={easeIn,easeOut,easeInOut},lowercaseName;_forEachName(names,function(name){_easeMap[name]=_globals[name]=ease;_easeMap[lowercaseName=name.toLowerCase()]=easeOut;for(var p in ease){_easeMap[lowercaseName+(p==="easeIn"?".in":p==="easeOut"?".out":".inOut")]=_easeMap[name+"."+p]=ease[p]}});return ease},_easeInOutFromOut=function _easeInOutFromOut2(easeOut){return function(p){return p<.5?(1-easeOut(1-p*2))/2:.5+easeOut((p-.5)*2)/2}},_configElastic=function _configElastic2(type2,amplitude,period){var p1=amplitude>=1?amplitude:1,p2=(period||(type2?.3:.45))/(amplitude<1?amplitude:1),p3=p2/_2PI*(Math.asin(1/p1)||0),easeOut=function easeOut2(p){return p===1?1:p1*Math.pow(2,-10*p)*_sin((p-p3)*p2)+1},ease=type2==="out"?easeOut:type2==="in"?function(p){return 1-easeOut(1-p)}:_easeInOutFromOut(easeOut);p2=_2PI/p2;ease.config=function(amplitude2,period2){return _configElastic2(type2,amplitude2,period2)};return ease},_configBack=function _configBack2(type2,overshoot){if(overshoot===void 0){overshoot=1.70158}var easeOut=function easeOut2(p){return p?--p*p*((overshoot+1)*p+overshoot)+1:0},ease=type2==="out"?easeOut:type2==="in"?function(p){return 1-easeOut(1-p)}:_easeInOutFromOut(easeOut);ease.config=function(overshoot2){return _configBack2(type2,overshoot2)};return ease};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",function(name,i2){var power=i2<5?i2+1:i2;_insertEase(name+",Power"+(power-1),i2?function(p){return Math.pow(p,power)}:function(p){return p},function(p){return 1-Math.pow(1-p,power)},function(p){return p<.5?Math.pow(p*2,power)/2:1-Math.pow((1-p)*2,power)/2})});_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn;_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic());(function(n2,c){var n1=1/c,n22=2*n1,n3=2.5*n1,easeOut=function easeOut2(p){return p<n1?n2*p*p:p<n22?n2*Math.pow(p-1.5/c,2)+.75:p<n3?n2*(p-=2.25/c)*p+.9375:n2*Math.pow(p-2.625/c,2)+.984375};_insertEase("Bounce",function(p){return 1-easeOut(1-p)},easeOut)})(7.5625,2.75);_insertEase("Expo",function(p){return Math.pow(2,10*(p-1))*p+p*p*p*p*p*p*(1-p)});_insertEase("Circ",function(p){return-(_sqrt(1-p*p)-1)});_insertEase("Sine",function(p){return p===1?1:-_cos(p*_HALF_PI)+1});_insertEase("Back",_configBack("in"),_configBack("out"),_configBack());_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function config(steps,immediateStart){if(steps===void 0){steps=1}var p1=1/steps,p2=steps+(immediateStart?0:1),p3=immediateStart?1:0,max=1-_tinyNum;return function(p){return((p2*_clamp(0,max,p)|0)+p3)*p1}}};_defaults.ease=_easeMap["quad.out"];_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(name){return _callbackNames+=name+","+name+"Params,"});var GSCache=function GSCache2(target,harness){this.id=_gsID++;target._gsap=this;this.target=target;this.harness=harness;this.get=harness?harness.get:_getProperty;this.set=harness?harness.getSetter:_getSetter};var Animation=(function(){function Animation2(vars2){this.vars=vars2;this._delay=+vars2.delay||0;if(this._repeat=vars2.repeat===Infinity?-2:vars2.repeat||0){this._rDelay=vars2.repeatDelay||0;this._yoyo=!!vars2.yoyo||!!vars2.yoyoEase}this._ts=1;_setDuration(this,+vars2.duration,1,1);this.data=vars2.data;if(_context){this._ctx=_context;_context.data.push(this)}_tickerActive||_ticker.wake()}var _proto=Animation2.prototype;_proto.delay=function delay(value){if(value||value===0){this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+value-this._delay);this._delay=value;return this}return this._delay};_proto.duration=function duration(value){return arguments.length?this.totalDuration(this._repeat>0?value+(value+this._rDelay)*this._repeat:value):this.totalDuration()&&this._dur};_proto.totalDuration=function totalDuration(value){if(!arguments.length){return this._tDur}this._dirty=0;return _setDuration(this,this._repeat<0?value:(value-this._repeat*this._rDelay)/(this._repeat+1))};_proto.totalTime=function totalTime(_totalTime,suppressEvents){_wake();if(!arguments.length){return this._tTime}var parent2=this._dp;if(parent2&&parent2.smoothChildTiming&&this._ts){_alignPlayhead(this,_totalTime);!parent2._dp||parent2.parent||_postAddChecks(parent2,this);while(parent2&&parent2.parent){if(parent2.parent._time!==parent2._start+(parent2._ts>=0?parent2._tTime/parent2._ts:(parent2.totalDuration()-parent2._tTime)/-parent2._ts)){parent2.totalTime(parent2._tTime,true)}parent2=parent2.parent}if(!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&_totalTime<this._tDur||this._ts<0&&_totalTime>0||!this._tDur&&!_totalTime)){_addToTimeline(this._dp,this,this._start-this._delay)}}if(this._tTime!==_totalTime||!this._dur&&!suppressEvents||this._initted&&Math.abs(this._zTime)===_tinyNum||!this._initted&&this._dur&&_totalTime||!_totalTime&&!this._initted&&(this.add||this._ptLookup)){this._ts||(this._pTime=_totalTime);_lazySafeRender(this,_totalTime,suppressEvents)}return this};_proto.time=function time(value,suppressEvents){return arguments.length?this.totalTime(Math.min(this.totalDuration(),value+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(value?this._dur:0),suppressEvents):this._time};_proto.totalProgress=function totalProgress(value,suppressEvents){return arguments.length?this.totalTime(this.totalDuration()*value,suppressEvents):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0};_proto.progress=function progress(value,suppressEvents){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-value:value)+_elapsedCycleDuration(this),suppressEvents):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0};_proto.iteration=function iteration(value,suppressEvents){var cycleDuration=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(value-1)*cycleDuration,suppressEvents):this._repeat?_animationCycle(this._tTime,cycleDuration)+1:1};_proto.timeScale=function timeScale(value,suppressEvents){if(!arguments.length){return this._rts===-_tinyNum?0:this._rts}if(this._rts===value){return this}var tTime=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;this._rts=+value||0;this._ts=this._ps||value===-_tinyNum?0:this._rts;this.totalTime(_clamp(-Math.abs(this._delay),this.totalDuration(),tTime),suppressEvents!==false);_setEnd(this);return _recacheAncestors(this)};_proto.paused=function paused(value){if(!arguments.length){return this._ps}if(this._ps!==value){this._ps=value;if(value){this._pTime=this._tTime||Math.max(-this._delay,this.rawTime());this._ts=this._act=0}else{_wake();this._ts=this._rts;this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum))}}return this};_proto.startTime=function startTime(value){if(arguments.length){this._start=_roundPrecise(value);var parent2=this.parent||this._dp;parent2&&(parent2._sort||!this.parent)&&_addToTimeline(parent2,this,this._start-this._delay);return this}return this._start};_proto.endTime=function endTime(includeRepeats){return this._start+(_isNotFalse(includeRepeats)?this.totalDuration():this.duration())/Math.abs(this._ts||1)};_proto.rawTime=function rawTime(wrapRepeats){var parent2=this.parent||this._dp;return!parent2?this._tTime:wrapRepeats&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):!this._ts?this._tTime:_parentToChildTotalTime(parent2.rawTime(wrapRepeats),this)};_proto.revert=function revert(config){if(config===void 0){config=_revertConfig}var prevIsReverting=_reverting;_reverting=config;if(_isRevertWorthy(this)){this.timeline&&this.timeline.revert(config);this.totalTime(-.01,config.suppressEvents)}this.data!=="nested"&&config.kill!==false&&this.kill();_reverting=prevIsReverting;return this};_proto.globalTime=function globalTime(rawTime){var animation=this,time=arguments.length?rawTime:animation.rawTime();while(animation){time=animation._start+time/(Math.abs(animation._ts)||1);animation=animation._dp}return!this.parent&&this._sat?this._sat.globalTime(rawTime):time};_proto.repeat=function repeat(value){if(arguments.length){this._repeat=value===Infinity?-2:value;return _onUpdateTotalDuration(this)}return this._repeat===-2?Infinity:this._repeat};_proto.repeatDelay=function repeatDelay(value){if(arguments.length){var time=this._time;this._rDelay=value;_onUpdateTotalDuration(this);return time?this.time(time):this}return this._rDelay};_proto.yoyo=function yoyo(value){if(arguments.length){this._yoyo=value;return this}return this._yoyo};_proto.seek=function seek(position,suppressEvents){return this.totalTime(_parsePosition(this,position),_isNotFalse(suppressEvents))};_proto.restart=function restart(includeDelay,suppressEvents){this.play().totalTime(includeDelay?-this._delay:0,_isNotFalse(suppressEvents));this._dur||(this._zTime=-_tinyNum);return this};_proto.play=function play(from,suppressEvents){from!=null&&this.seek(from,suppressEvents);return this.reversed(false).paused(false)};_proto.reverse=function reverse(from,suppressEvents){from!=null&&this.seek(from||this.totalDuration(),suppressEvents);return this.reversed(true).paused(false)};_proto.pause=function pause2(atTime,suppressEvents){atTime!=null&&this.seek(atTime,suppressEvents);return this.paused(true)};_proto.resume=function resume2(){return this.paused(false)};_proto.reversed=function reversed(value){if(arguments.length){!!value!==this.reversed()&&this.timeScale(-this._rts||(value?-_tinyNum:0));return this}return this._rts<0};_proto.invalidate=function invalidate(){this._initted=this._act=0;this._zTime=-_tinyNum;return this};_proto.isActive=function isActive(){var parent2=this.parent||this._dp,start=this._start,rawTime;return!!(!parent2||this._ts&&this._initted&&parent2.isActive()&&(rawTime=parent2.rawTime(true))>=start&&rawTime<this.endTime(true)-_tinyNum)};_proto.eventCallback=function eventCallback(type2,callback,params){var vars2=this.vars;if(arguments.length>1){if(!callback){delete vars2[type2]}else{vars2[type2]=callback;params&&(vars2[type2+"Params"]=params);type2==="onUpdate"&&(this._onUpdate=callback)}return this}return vars2[type2]};_proto.then=function then(onFulfilled){var self2=this,prevProm=self2._prom;return new Promise(function(resolve){var f=_isFunction(onFulfilled)?onFulfilled:_passThrough,_resolve=function _resolve2(){var _then=self2.then;self2.then=null;prevProm&&prevProm();_isFunction(f)&&(f=f(self2))&&(f.then||f===self2)&&(self2.then=_then);resolve(f);self2.then=_then};if(self2._initted&&self2.totalProgress()===1&&self2._ts>=0||!self2._tTime&&self2._ts<0){_resolve()}else{self2._prom=_resolve}})};_proto.kill=function kill(){_interrupt(this)};return Animation2})();_setDefaults(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:false,parent:null,_initted:false,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:false,_rts:1});var Timeline=(function(_Animation){_inheritsLoose(Timeline2,_Animation);function Timeline2(vars2,position){var _this;if(vars2===void 0){vars2={}}_this=_Animation.call(this,vars2)||this;_this.labels={};_this.smoothChildTiming=!!vars2.smoothChildTiming;_this.autoRemoveChildren=!!vars2.autoRemoveChildren;_this._sort=_isNotFalse(vars2.sortChildren);_globalTimeline&&_addToTimeline(vars2.parent||_globalTimeline,_assertThisInitialized(_this),position);vars2.reversed&&_this.reverse();vars2.paused&&_this.paused(true);vars2.scrollTrigger&&_scrollTrigger(_assertThisInitialized(_this),vars2.scrollTrigger);return _this}var _proto2=Timeline2.prototype;_proto2.to=function to(targets,vars2,position){_createTweenType(0,arguments,this);return this};_proto2.from=function from(targets,vars2,position){_createTweenType(1,arguments,this);return this};_proto2.fromTo=function fromTo(targets,fromVars,toVars,position){_createTweenType(2,arguments,this);return this};_proto2.set=function set(targets,vars2,position){vars2.duration=0;vars2.parent=this;_inheritDefaults(vars2).repeatDelay||(vars2.repeat=0);vars2.immediateRender=!!vars2.immediateRender;new Tween(targets,vars2,_parsePosition(this,position),1);return this};_proto2.call=function call(callback,params,position){return _addToTimeline(this,Tween.delayedCall(0,callback,params),position)};_proto2.staggerTo=function staggerTo(targets,duration,vars2,stagger,position,onCompleteAll,onCompleteAllParams){vars2.duration=duration;vars2.stagger=vars2.stagger||stagger;vars2.onComplete=onCompleteAll;vars2.onCompleteParams=onCompleteAllParams;vars2.parent=this;new Tween(targets,vars2,_parsePosition(this,position));return this};_proto2.staggerFrom=function staggerFrom(targets,duration,vars2,stagger,position,onCompleteAll,onCompleteAllParams){vars2.runBackwards=1;_inheritDefaults(vars2).immediateRender=_isNotFalse(vars2.immediateRender);return this.staggerTo(targets,duration,vars2,stagger,position,onCompleteAll,onCompleteAllParams)};_proto2.staggerFromTo=function staggerFromTo(targets,duration,fromVars,toVars,stagger,position,onCompleteAll,onCompleteAllParams){toVars.startAt=fromVars;_inheritDefaults(toVars).immediateRender=_isNotFalse(toVars.immediateRender);return this.staggerTo(targets,duration,toVars,stagger,position,onCompleteAll,onCompleteAllParams)};_proto2.render=function render(totalTime,suppressEvents,force){var prevTime=this._time,tDur=this._dirty?this.totalDuration():this._tDur,dur=this._dur,tTime=totalTime<=0?0:_roundPrecise(totalTime),crossingStart=this._zTime<0!==totalTime<0&&(this._initted||!dur),time,child,next,iteration,cycleDuration,prevPaused,pauseTween,timeScale,prevStart,prevIteration,yoyo,isYoyo;this!==_globalTimeline&&tTime>tDur&&totalTime>=0&&(tTime=tDur);if(tTime!==this._tTime||force||crossingStart){if(prevTime!==this._time&&dur){tTime+=this._time-prevTime;totalTime+=this._time-prevTime}time=tTime;prevStart=this._start;timeScale=this._ts;prevPaused=!timeScale;if(crossingStart){dur||(prevTime=this._zTime);(totalTime||!suppressEvents)&&(this._zTime=totalTime)}if(this._repeat){yoyo=this._yoyo;cycleDuration=dur+this._rDelay;if(this._repeat<-1&&totalTime<0){return this.totalTime(cycleDuration*100+totalTime,suppressEvents,force)}time=_roundPrecise(tTime%cycleDuration);if(tTime===tDur){iteration=this._repeat;time=dur}else{prevIteration=_roundPrecise(tTime/cycleDuration);iteration=~~prevIteration;if(iteration&&iteration===prevIteration){time=dur;iteration--}time>dur&&(time=dur)}prevIteration=_animationCycle(this._tTime,cycleDuration);!prevTime&&this._tTime&&prevIteration!==iteration&&this._tTime-prevIteration*cycleDuration-this._dur<=0&&(prevIteration=iteration);if(yoyo&&iteration&1){time=dur-time;isYoyo=1}if(iteration!==prevIteration&&!this._lock){var rewinding=yoyo&&prevIteration&1,doesWrap=rewinding===(yoyo&&iteration&1);iteration<prevIteration&&(rewinding=!rewinding);prevTime=rewinding?0:tTime%dur?dur:tTime;this._lock=1;this.render(prevTime||(isYoyo?0:_roundPrecise(iteration*cycleDuration)),suppressEvents,!dur)._lock=0;this._tTime=tTime;!suppressEvents&&this.parent&&_callback(this,"onRepeat");if(this.vars.repeatRefresh&&!isYoyo){this.invalidate()._lock=1;prevIteration=iteration}if(prevTime&&prevTime!==this._time||prevPaused!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act){return this}dur=this._dur;tDur=this._tDur;if(doesWrap){this._lock=2;prevTime=rewinding?dur:-1e-4;this.render(prevTime,true);this.vars.repeatRefresh&&!isYoyo&&this.invalidate()}this._lock=0;if(!this._ts&&!prevPaused){return this}}}if(this._hasPause&&!this._forcing&&this._lock<2){pauseTween=_findNextPauseTween(this,_roundPrecise(prevTime),_roundPrecise(time));if(pauseTween){tTime-=time-(time=pauseTween._start)}}this._tTime=tTime;this._time=time;this._act=!!timeScale;if(!this._initted){this._onUpdate=this.vars.onUpdate;this._initted=1;this._zTime=totalTime;prevTime=0}if(!prevTime&&tTime&&dur&&!suppressEvents&&!prevIteration){_callback(this,"onStart");if(this._tTime!==tTime){return this}}if(time>=prevTime&&totalTime>=0){child=this._first;while(child){next=child._next;if((child._act||time>=child._start)&&child._ts&&pauseTween!==child){if(child.parent!==this){return this.render(totalTime,suppressEvents,force)}child.render(child._ts>0?(time-child._start)*child._ts:(child._dirty?child.totalDuration():child._tDur)+(time-child._start)*child._ts,suppressEvents,force);if(time!==this._time||!this._ts&&!prevPaused){pauseTween=0;next&&(tTime+=this._zTime=-_tinyNum);break}}child=next}}else{child=this._last;var adjustedTime=totalTime<0?totalTime:time;while(child){next=child._prev;if((child._act||adjustedTime<=child._end)&&child._ts&&pauseTween!==child){if(child.parent!==this){return this.render(totalTime,suppressEvents,force)}child.render(child._ts>0?(adjustedTime-child._start)*child._ts:(child._dirty?child.totalDuration():child._tDur)+(adjustedTime-child._start)*child._ts,suppressEvents,force||_reverting&&_isRevertWorthy(child));if(time!==this._time||!this._ts&&!prevPaused){pauseTween=0;next&&(tTime+=this._zTime=adjustedTime?-_tinyNum:_tinyNum);break}}child=next}}if(pauseTween&&!suppressEvents){this.pause();pauseTween.render(time>=prevTime?0:-_tinyNum)._zTime=time>=prevTime?1:-1;if(this._ts){this._start=prevStart;_setEnd(this);return this.render(totalTime,suppressEvents,force)}}this._onUpdate&&!suppressEvents&&_callback(this,"onUpdate",true);if(tTime===tDur&&this._tTime>=this.totalDuration()||!tTime&&prevTime){if(prevStart===this._start||Math.abs(timeScale)!==Math.abs(this._ts)){if(!this._lock){(totalTime||!dur)&&(tTime===tDur&&this._ts>0||!tTime&&this._ts<0)&&_removeFromParent(this,1);if(!suppressEvents&&!(totalTime<0&&!prevTime)&&(tTime||prevTime||!tDur)){_callback(this,tTime===tDur&&totalTime>=0?"onComplete":"onReverseComplete",true);this._prom&&!(tTime<tDur&&this.timeScale()>0)&&this._prom()}}}}}return this};_proto2.add=function add(child,position){var _this2=this;_isNumber(position)||(position=_parsePosition(this,position,child));if(!(child instanceof Animation)){if(_isArray(child)){child.forEach(function(obj){return _this2.add(obj,position)});return this}if(_isString(child)){return this.addLabel(child,position)}if(_isFunction(child)){child=Tween.delayedCall(0,child)}else{return this}}return this!==child?_addToTimeline(this,child,position):this};_proto2.getChildren=function getChildren(nested,tweens,timelines,ignoreBeforeTime){if(nested===void 0){nested=true}if(tweens===void 0){tweens=true}if(timelines===void 0){timelines=true}if(ignoreBeforeTime===void 0){ignoreBeforeTime=-_bigNum}var a=[],child=this._first;while(child){if(child._start>=ignoreBeforeTime){if(child instanceof Tween){tweens&&a.push(child)}else{timelines&&a.push(child);nested&&a.push.apply(a,child.getChildren(true,tweens,timelines))}}child=child._next}return a};_proto2.getById=function getById(id2){var animations=this.getChildren(1,1,1),i2=animations.length;while(i2--){if(animations[i2].vars.id===id2){return animations[i2]}}};_proto2.remove=function remove(child){if(_isString(child)){return this.removeLabel(child)}if(_isFunction(child)){return this.killTweensOf(child)}child.parent===this&&_removeLinkedListItem(this,child);if(child===this._recent){this._recent=this._last}return _uncache(this)};_proto2.totalTime=function totalTime(_totalTime2,suppressEvents){if(!arguments.length){return this._tTime}this._forcing=1;if(!this._dp&&this._ts){this._start=_roundPrecise(_ticker.time-(this._ts>0?_totalTime2/this._ts:(this.totalDuration()-_totalTime2)/-this._ts))}_Animation.prototype.totalTime.call(this,_totalTime2,suppressEvents);this._forcing=0;return this};_proto2.addLabel=function addLabel(label,position){this.labels[label]=_parsePosition(this,position);return this};_proto2.removeLabel=function removeLabel(label){delete this.labels[label];return this};_proto2.addPause=function addPause(position,callback,params){var t2=Tween.delayedCall(0,callback||_emptyFunc,params);t2.data="isPause";this._hasPause=1;return _addToTimeline(this,t2,_parsePosition(this,position))};_proto2.removePause=function removePause(position){var child=this._first;position=_parsePosition(this,position);while(child){if(child._start===position&&child.data==="isPause"){_removeFromParent(child)}child=child._next}};_proto2.killTweensOf=function killTweensOf(targets,props2,onlyActive){var tweens=this.getTweensOf(targets,onlyActive),i2=tweens.length;while(i2--){_overwritingTween!==tweens[i2]&&tweens[i2].kill(targets,props2)}return this};_proto2.getTweensOf=function getTweensOf(targets,onlyActive){var a=[],parsedTargets=toArray(targets),child=this._first,isGlobalTime=_isNumber(onlyActive),children;while(child){if(child instanceof Tween){if(_arrayContainsAny(child._targets,parsedTargets)&&(isGlobalTime?(!_overwritingTween||child._initted&&child._ts)&&child.globalTime(0)<=onlyActive&&child.globalTime(child.totalDuration())>onlyActive:!onlyActive||child.isActive())){a.push(child)}}else if((children=child.getTweensOf(parsedTargets,onlyActive)).length){a.push.apply(a,children)}child=child._next}return a};_proto2.tweenTo=function tweenTo(position,vars2){vars2=vars2||{};var tl=this,endTime=_parsePosition(tl,position),_vars=vars2,startAt=_vars.startAt,_onStart=_vars.onStart,onStartParams=_vars.onStartParams,immediateRender=_vars.immediateRender,initted,tween=Tween.to(tl,_setDefaults({ease:vars2.ease||"none",lazy:false,immediateRender:false,time:endTime,overwrite:"auto",duration:vars2.duration||Math.abs((endTime-(startAt&&"time"in startAt?startAt.time:tl._time))/tl.timeScale())||_tinyNum,onStart:function onStart(){tl.pause();if(!initted){var duration=vars2.duration||Math.abs((endTime-(startAt&&"time"in startAt?startAt.time:tl._time))/tl.timeScale());tween._dur!==duration&&_setDuration(tween,duration,0,1).render(tween._time,true,true);initted=1}_onStart&&_onStart.apply(tween,onStartParams||[])}},vars2));return immediateRender?tween.render(0):tween};_proto2.tweenFromTo=function tweenFromTo(fromPosition,toPosition,vars2){return this.tweenTo(toPosition,_setDefaults({startAt:{time:_parsePosition(this,fromPosition)}},vars2))};_proto2.recent=function recent(){return this._recent};_proto2.nextLabel=function nextLabel(afterTime){if(afterTime===void 0){afterTime=this._time}return _getLabelInDirection(this,_parsePosition(this,afterTime))};_proto2.previousLabel=function previousLabel(beforeTime){if(beforeTime===void 0){beforeTime=this._time}return _getLabelInDirection(this,_parsePosition(this,beforeTime),1)};_proto2.currentLabel=function currentLabel(value){return arguments.length?this.seek(value,true):this.previousLabel(this._time+_tinyNum)};_proto2.shiftChildren=function shiftChildren(amount,adjustLabels,ignoreBeforeTime){if(ignoreBeforeTime===void 0){ignoreBeforeTime=0}var child=this._first,labels=this.labels,p;amount=_roundPrecise(amount);while(child){if(child._start>=ignoreBeforeTime){child._start+=amount;child._end+=amount}child=child._next}if(adjustLabels){for(p in labels){if(labels[p]>=ignoreBeforeTime){labels[p]+=amount}}}return _uncache(this)};_proto2.invalidate=function invalidate(soft){var child=this._first;this._lock=0;while(child){child.invalidate(soft);child=child._next}return _Animation.prototype.invalidate.call(this,soft)};_proto2.clear=function clear(includeLabels){if(includeLabels===void 0){includeLabels=true}var child=this._first,next;while(child){next=child._next;this.remove(child);child=next}this._dp&&(this._time=this._tTime=this._pTime=0);includeLabels&&(this.labels={});return _uncache(this)};_proto2.totalDuration=function totalDuration(value){var max=0,self2=this,child=self2._last,prevStart=_bigNum,prev,start,parent2;if(arguments.length){return self2.timeScale((self2._repeat<0?self2.duration():self2.totalDuration())/(self2.reversed()?-value:value))}if(self2._dirty){parent2=self2.parent;while(child){prev=child._prev;child._dirty&&child.totalDuration();start=child._start;if(start>prevStart&&self2._sort&&child._ts&&!self2._lock){self2._lock=1;_addToTimeline(self2,child,start-child._delay,1)._lock=0}else{prevStart=start}if(start<0&&child._ts){max-=start;if(!parent2&&!self2._dp||parent2&&parent2.smoothChildTiming){self2._start+=_roundPrecise(start/self2._ts);self2._time-=start;self2._tTime-=start}self2.shiftChildren(-start,false,-Infinity);prevStart=0}child._end>max&&child._ts&&(max=child._end);child=prev}_setDuration(self2,self2===_globalTimeline&&self2._time>max?self2._time:max,1,1);self2._dirty=0}return self2._tDur};Timeline2.updateRoot=function updateRoot(time){if(_globalTimeline._ts){_lazySafeRender(_globalTimeline,_parentToChildTotalTime(time,_globalTimeline));_lastRenderedFrame=_ticker.frame}if(_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var child=_globalTimeline._first;if(!child||!child._ts){if(_config.autoSleep&&_ticker._listeners.length<2){while(child&&!child._ts){child=child._next}child||_ticker.sleep()}}}};return Timeline2})(Animation);_setDefaults(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function _addComplexStringPropTween2(target,prop,start,end,setter,stringFilter,funcParam){var pt=new PropTween(this._pt,target,prop,0,1,_renderComplexString,null,setter),index2=0,matchIndex=0,result,startNums,color,endNum,chunk,startNum,hasRandom,a;pt.b=start;pt.e=end;start+="";end+="";if(hasRandom=~end.indexOf("random(")){end=_replaceRandom(end)}if(stringFilter){a=[start,end];stringFilter(a,target,prop);start=a[0];end=a[1]}startNums=start.match(_complexStringNumExp)||[];while(result=_complexStringNumExp.exec(end)){endNum=result[0];chunk=end.substring(index2,result.index);if(color){color=(color+1)%5}else if(chunk.substr(-5)==="rgba("){color=1}if(endNum!==startNums[matchIndex++]){startNum=parseFloat(startNums[matchIndex-1])||0;pt._pt={_next:pt._pt,p:chunk||matchIndex===1?chunk:",",s:startNum,c:endNum.charAt(1)==="="?_parseRelative(startNum,endNum)-startNum:parseFloat(endNum)-startNum,m:color&&color<4?Math.round:0};index2=_complexStringNumExp.lastIndex}}pt.c=index2<end.length?end.substring(index2,end.length):"";pt.fp=funcParam;if(_relExp.test(end)||hasRandom){pt.e=0}this._pt=pt;return pt},_addPropTween=function _addPropTween2(target,prop,start,end,index2,targets,modifier,stringFilter,funcParam,optional){_isFunction(end)&&(end=end(index2||0,target,targets));var currentValue=target[prop],parsedStart=start!=="get"?start:!_isFunction(currentValue)?currentValue:funcParam?target[prop.indexOf("set")||!_isFunction(target["get"+prop.substr(3)])?prop:"get"+prop.substr(3)](funcParam):target[prop](),setter=!_isFunction(currentValue)?_setterPlain:funcParam?_setterFuncWithParam:_setterFunc,pt;if(_isString(end)){if(~end.indexOf("random(")){end=_replaceRandom(end)}if(end.charAt(1)==="="){pt=_parseRelative(parsedStart,end)+(getUnit(parsedStart)||0);if(pt||pt===0){end=pt}}}if(!optional||parsedStart!==end||_forceAllPropTweens){if(!isNaN(parsedStart*end)&&end!==""){pt=new PropTween(this._pt,target,prop,+parsedStart||0,end-(parsedStart||0),typeof currentValue==="boolean"?_renderBoolean:_renderPlain,0,setter);funcParam&&(pt.fp=funcParam);modifier&&pt.modifier(modifier,this,target);return this._pt=pt}!currentValue&&!(prop in target)&&_missingPlugin(prop,end);return _addComplexStringPropTween.call(this,target,prop,parsedStart,end,setter,stringFilter||_config.stringFilter,funcParam)}},_processVars=function _processVars2(vars2,index2,target,targets,tween){_isFunction(vars2)&&(vars2=_parseFuncOrString(vars2,tween,index2,target,targets));if(!_isObject(vars2)||vars2.style&&vars2.nodeType||_isArray(vars2)||_isTypedArray(vars2)){return _isString(vars2)?_parseFuncOrString(vars2,tween,index2,target,targets):vars2}var copy={},p;for(p in vars2){copy[p]=_parseFuncOrString(vars2[p],tween,index2,target,targets)}return copy},_checkPlugin=function _checkPlugin2(property,vars2,tween,index2,target,targets){var plugin,pt,ptLookup,i2;if(_plugins[property]&&(plugin=new _plugins[property]).init(target,plugin.rawVars?vars2[property]:_processVars(vars2[property],index2,target,targets,tween),tween,index2,targets)!==false){tween._pt=pt=new PropTween(tween._pt,target,property,0,1,plugin.render,plugin,0,plugin.priority);if(tween!==_quickTween){ptLookup=tween._ptLookup[tween._targets.indexOf(target)];i2=plugin._props.length;while(i2--){ptLookup[plugin._props[i2]]=pt}}}return plugin},_overwritingTween,_forceAllPropTweens,_initTween=function _initTween2(tween,time,tTime){var vars2=tween.vars,ease=vars2.ease,startAt=vars2.startAt,immediateRender=vars2.immediateRender,lazy=vars2.lazy,onUpdate=vars2.onUpdate,runBackwards=vars2.runBackwards,yoyoEase=vars2.yoyoEase,keyframes=vars2.keyframes,autoRevert=vars2.autoRevert,dur=tween._dur,prevStartAt=tween._startAt,targets=tween._targets,parent2=tween.parent,fullTargets=parent2&&parent2.data==="nested"?parent2.vars.targets:targets,autoOverwrite=tween._overwrite==="auto"&&!_suppressOverwrites,tl=tween.timeline,reverseEase=vars2.easeReverse||yoyoEase,cleanVars,i2,p,pt,target,hasPriority,gsData,harness,plugin,ptLookup,index2,harnessVars,overwritten;tl&&(!keyframes||!ease)&&(ease="none");tween._ease=_parseEase(ease,_defaults.ease);tween._rEase=reverseEase&&(_parseEase(reverseEase)||tween._ease);tween._from=!tl&&!!vars2.runBackwards;if(tween._from)tween.ratio=1;if(!tl||keyframes&&!vars2.stagger){harness=targets[0]?_getCache(targets[0]).harness:0;harnessVars=harness&&vars2[harness.prop];cleanVars=_copyExcluding(vars2,_reservedProps);if(prevStartAt){prevStartAt._zTime<0&&prevStartAt.progress(1);time<0&&runBackwards&&immediateRender&&!autoRevert?prevStartAt.render(-1,true):prevStartAt.revert(runBackwards&&dur?_revertConfigNoKill:_startAtRevertConfig);prevStartAt._lazy=0}if(startAt){_removeFromParent(tween._startAt=Tween.set(targets,_setDefaults({data:"isStart",overwrite:false,parent:parent2,immediateRender:true,lazy:!prevStartAt&&_isNotFalse(lazy),startAt:null,delay:0,onUpdate:onUpdate&&function(){return _callback(tween,"onUpdate")},stagger:0},startAt)));tween._startAt._dp=0;tween._startAt._sat=tween;time<0&&(_reverting||!immediateRender&&!autoRevert)&&tween._startAt.revert(_revertConfigNoKill);if(immediateRender){if(dur&&time<=0&&tTime<=0){time&&(tween._zTime=time);return}}}else if(runBackwards&&dur){if(!prevStartAt){time&&(immediateRender=false);p=_setDefaults({overwrite:false,data:"isFromStart",lazy:immediateRender&&!prevStartAt&&_isNotFalse(lazy),immediateRender,stagger:0,parent:parent2},cleanVars);harnessVars&&(p[harness.prop]=harnessVars);_removeFromParent(tween._startAt=Tween.set(targets,p));tween._startAt._dp=0;tween._startAt._sat=tween;time<0&&(_reverting?tween._startAt.revert(_revertConfigNoKill):tween._startAt.render(-1,true));tween._zTime=time;if(!immediateRender){_initTween2(tween._startAt,_tinyNum,_tinyNum)}else if(!time){return}}}tween._pt=tween._ptCache=0;lazy=dur&&_isNotFalse(lazy)||lazy&&!dur;for(i2=0;i2<targets.length;i2++){target=targets[i2];gsData=target._gsap||_harness(targets)[i2]._gsap;tween._ptLookup[i2]=ptLookup={};_lazyLookup[gsData.id]&&_lazyTweens.length&&_lazyRender();index2=fullTargets===targets?i2:fullTargets.indexOf(target);if(harness&&(plugin=new harness).init(target,harnessVars||cleanVars,tween,index2,fullTargets)!==false){tween._pt=pt=new PropTween(tween._pt,target,plugin.name,0,1,plugin.render,plugin,0,plugin.priority);plugin._props.forEach(function(name){ptLookup[name]=pt});plugin.priority&&(hasPriority=1)}if(!harness||harnessVars){for(p in cleanVars){if(_plugins[p]&&(plugin=_checkPlugin(p,cleanVars,tween,index2,target,fullTargets))){plugin.priority&&(hasPriority=1)}else{ptLookup[p]=pt=_addPropTween.call(tween,target,p,"get",cleanVars[p],index2,fullTargets,0,vars2.stringFilter)}}}tween._op&&tween._op[i2]&&tween.kill(target,tween._op[i2]);if(autoOverwrite&&tween._pt){_overwritingTween=tween;_globalTimeline.killTweensOf(target,ptLookup,tween.globalTime(time));overwritten=!tween.parent;_overwritingTween=0}tween._pt&&lazy&&(_lazyLookup[gsData.id]=1)}hasPriority&&_sortPropTweensByPriority(tween);tween._onInit&&tween._onInit(tween)}tween._onUpdate=onUpdate;tween._initted=(!tween._op||tween._pt)&&!overwritten;keyframes&&time<=0&&tl.render(_bigNum,true,true)},_updatePropTweens=function _updatePropTweens2(tween,property,value,start,startIsRelative,ratio,time,skipRecursion){var ptCache=(tween._pt&&tween._ptCache||(tween._ptCache={}))[property],pt,rootPT,lookup,i2;if(!ptCache){ptCache=tween._ptCache[property]=[];lookup=tween._ptLookup;i2=tween._targets.length;while(i2--){pt=lookup[i2][property];if(pt&&pt.d&&pt.d._pt){pt=pt.d._pt;while(pt&&pt.p!==property&&pt.fp!==property){pt=pt._next}}if(!pt){_forceAllPropTweens=1;tween.vars[property]="+=0";_initTween(tween,time);_forceAllPropTweens=0;return skipRecursion?_warn(property+" not eligible for reset. Try splitting into individual properties"):1}ptCache.push(pt)}}i2=ptCache.length;while(i2--){rootPT=ptCache[i2];pt=rootPT._pt||rootPT;pt.s=(start||start===0)&&!startIsRelative?start:pt.s+(start||0)+ratio*pt.c;pt.c=value-pt.s;rootPT.e&&(rootPT.e=_round(value)+getUnit(rootPT.e));rootPT.b&&(rootPT.b=pt.s+getUnit(rootPT.b))}},_addAliasesToVars=function _addAliasesToVars2(targets,vars2){var harness=targets[0]?_getCache(targets[0]).harness:0,propertyAliases=harness&&harness.aliases,copy,p,i2,aliases;if(!propertyAliases){return vars2}copy=_merge({},vars2);for(p in propertyAliases){if(p in copy){aliases=propertyAliases[p].split(",");i2=aliases.length;while(i2--){copy[aliases[i2]]=copy[p]}}}return copy},_parseKeyframe=function _parseKeyframe2(prop,obj,allProps,easeEach){var ease=obj.ease||easeEach||"power1.inOut",p,a;if(_isArray(obj)){a=allProps[prop]||(allProps[prop]=[]);obj.forEach(function(value,i2){return a.push({t:i2/(obj.length-1)*100,v:value,e:ease})})}else{for(p in obj){a=allProps[p]||(allProps[p]=[]);p==="ease"||a.push({t:parseFloat(prop),v:obj[p],e:ease})}}},_parseFuncOrString=function _parseFuncOrString2(value,tween,i2,target,targets){return _isFunction(value)?value.call(tween,i2,target,targets):_isString(value)&&~value.indexOf("random(")?_replaceRandom(value):value},_staggerTweenProps=_callbackNames+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",_staggerPropsToSkip={};_forEachName(_staggerTweenProps+",id,stagger,delay,duration,paused,scrollTrigger",function(name){return _staggerPropsToSkip[name]=1});var Tween=(function(_Animation2){_inheritsLoose(Tween2,_Animation2);function Tween2(targets,vars2,position,skipInherit){var _this3;if(typeof vars2==="number"){position.duration=vars2;vars2=position;position=null}_this3=_Animation2.call(this,skipInherit?vars2:_inheritDefaults(vars2))||this;var _this3$vars=_this3.vars,duration=_this3$vars.duration,delay=_this3$vars.delay,immediateRender=_this3$vars.immediateRender,stagger=_this3$vars.stagger,overwrite=_this3$vars.overwrite,keyframes=_this3$vars.keyframes,defaults=_this3$vars.defaults,scrollTrigger=_this3$vars.scrollTrigger,parent2=vars2.parent||_globalTimeline,parsedTargets=(_isArray(targets)||_isTypedArray(targets)?_isNumber(targets[0]):"length"in vars2)?[targets]:toArray(targets),tl,i2,copy,l,p,curTarget,staggerFunc,staggerVarsToMerge;_this3._targets=parsedTargets.length?_harness(parsedTargets):_warn("GSAP target "+targets+" not found. https://gsap.com",!_config.nullTargetWarn)||[];_this3._ptLookup=[];_this3._overwrite=overwrite;if(keyframes||stagger||_isFuncOrString(duration)||_isFuncOrString(delay)){vars2=_this3.vars;var easeReverse=vars2.easeReverse||vars2.yoyoEase;tl=_this3.timeline=new Timeline({data:"nested",defaults:defaults||{},targets:parent2&&parent2.data==="nested"?parent2.vars.targets:parsedTargets});tl.kill();tl.parent=tl._dp=_assertThisInitialized(_this3);tl._start=0;if(stagger||_isFuncOrString(duration)||_isFuncOrString(delay)){l=parsedTargets.length;staggerFunc=stagger&&distribute(stagger);if(_isObject(stagger)){for(p in stagger){if(~_staggerTweenProps.indexOf(p)){staggerVarsToMerge||(staggerVarsToMerge={});staggerVarsToMerge[p]=stagger[p]}}}for(i2=0;i2<l;i2++){copy=_copyExcluding(vars2,_staggerPropsToSkip);copy.stagger=0;easeReverse&&(copy.easeReverse=easeReverse);staggerVarsToMerge&&_merge(copy,staggerVarsToMerge);curTarget=parsedTargets[i2];copy.duration=+_parseFuncOrString(duration,_assertThisInitialized(_this3),i2,curTarget,parsedTargets);copy.delay=(+_parseFuncOrString(delay,_assertThisInitialized(_this3),i2,curTarget,parsedTargets)||0)-_this3._delay;if(!stagger&&l===1&©.delay){_this3._delay=delay=copy.delay;_this3._start+=delay;copy.delay=0}tl.to(curTarget,copy,staggerFunc?staggerFunc(i2,curTarget,parsedTargets):0);tl._ease=_easeMap.none}tl.duration()?duration=delay=0:_this3.timeline=0}else if(keyframes){_inheritDefaults(_setDefaults(tl.vars.defaults,{ease:"none"}));tl._ease=_parseEase(keyframes.ease||vars2.ease||"none");var time=0,a,kf,v;if(_isArray(keyframes)){keyframes.forEach(function(frame){return tl.to(parsedTargets,frame,">")});tl.duration()}else{copy={};for(p in keyframes){p==="ease"||p==="easeEach"||_parseKeyframe(p,keyframes[p],copy,keyframes.easeEach)}for(p in copy){a=copy[p].sort(function(a2,b){return a2.t-b.t});time=0;for(i2=0;i2<a.length;i2++){kf=a[i2];v={ease:kf.e,duration:(kf.t-(i2?a[i2-1].t:0))/100*duration};v[p]=kf.v;tl.to(parsedTargets,v,time);time+=v.duration}}tl.duration()<duration&&tl.to({},{duration:duration-tl.duration()})}}duration||_this3.duration(duration=tl.duration())}else{_this3.timeline=0}if(overwrite===true&&!_suppressOverwrites){_overwritingTween=_assertThisInitialized(_this3);_globalTimeline.killTweensOf(parsedTargets);_overwritingTween=0}_addToTimeline(parent2,_assertThisInitialized(_this3),position);vars2.reversed&&_this3.reverse();vars2.paused&&_this3.paused(true);if(immediateRender||!duration&&!keyframes&&_this3._start===_roundPrecise(parent2._time)&&_isNotFalse(immediateRender)&&_hasNoPausedAncestors(_assertThisInitialized(_this3))&&parent2.data!=="nested"){_this3._tTime=-_tinyNum;_this3.render(Math.max(0,-delay)||0)}scrollTrigger&&_scrollTrigger(_assertThisInitialized(_this3),scrollTrigger);return _this3}var _proto3=Tween2.prototype;_proto3.render=function render(totalTime,suppressEvents,force){var prevTime=this._time,tDur=this._tDur,dur=this._dur,isNegative=totalTime<0,tTime=totalTime>tDur-_tinyNum&&!isNegative?tDur:totalTime<_tinyNum?0:totalTime,time,pt,iteration,cycleDuration,prevIteration,isYoyo,ratio,timeline;if(!dur){_renderZeroDurationTween(this,totalTime,suppressEvents,force)}else if(tTime!==this._tTime||!totalTime||force||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==isNegative||this._lazy){time=tTime;timeline=this.timeline;if(this._repeat){cycleDuration=dur+this._rDelay;if(this._repeat<-1&&isNegative){return this.totalTime(cycleDuration*100+totalTime,suppressEvents,force)}time=_roundPrecise(tTime%cycleDuration);if(tTime===tDur){iteration=this._repeat;time=dur}else{prevIteration=_roundPrecise(tTime/cycleDuration);iteration=~~prevIteration;if(iteration&&iteration===prevIteration){time=dur;iteration--}else if(time>dur){time=dur}}isYoyo=this._yoyo&&iteration&1;if(isYoyo)time=dur-time;prevIteration=_animationCycle(this._tTime,cycleDuration);if(time===prevTime&&!force&&this._initted&&iteration===prevIteration){this._tTime=tTime;return this}if(iteration!==prevIteration){if(this.vars.repeatRefresh&&!isYoyo&&!this._lock&&time!==cycleDuration&&this._initted){this._lock=force=1;this.render(_roundPrecise(cycleDuration*iteration),true).invalidate()._lock=0}}}if(!this._initted){if(_attemptInitTween(this,isNegative?totalTime:time,force,suppressEvents,tTime)){this._tTime=0;return this}if(prevTime!==this._time&&!(force&&this.vars.repeatRefresh&&iteration!==prevIteration)){return this}if(dur!==this._dur){return this.render(totalTime,suppressEvents,force)}}if(this._rEase){var inv=time<prevTime;if(inv!==this._inv){var segDur=inv?prevTime:dur-prevTime;this._inv=inv;if(this._from)this.ratio=1-this.ratio;this._invRatio=this.ratio;this._invTime=prevTime;this._invRecip=segDur?(inv?-1:1)/segDur:0;this._invScale=inv?-this.ratio:1-this.ratio;this._invEase=inv?this._rEase:this._ease}this.ratio=ratio=this._invRatio+this._invScale*this._invEase((time-this._invTime)*this._invRecip)}else{this.ratio=ratio=this._ease(time/dur)}if(this._from)this.ratio=ratio=1-ratio;this._tTime=tTime;this._time=time;if(!this._act&&this._ts){this._act=1;this._lazy=0}if(!prevTime&&tTime&&!suppressEvents&&!prevIteration){_callback(this,"onStart");if(this._tTime!==tTime){return this}}pt=this._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next}timeline&&timeline.render(totalTime<0?totalTime:timeline._dur*timeline._ease(time/this._dur),suppressEvents,force)||this._startAt&&(this._zTime=totalTime);if(this._onUpdate&&!suppressEvents){isNegative&&_rewindStartAt(this,totalTime,suppressEvents,force);_callback(this,"onUpdate")}this._repeat&&iteration!==prevIteration&&this.vars.onRepeat&&!suppressEvents&&this.parent&&_callback(this,"onRepeat");if((tTime===this._tDur||!tTime)&&this._tTime===tTime){isNegative&&!this._onUpdate&&_rewindStartAt(this,totalTime,true,true);(totalTime||!dur)&&(tTime===this._tDur&&this._ts>0||!tTime&&this._ts<0)&&_removeFromParent(this,1);if(!suppressEvents&&!(isNegative&&!prevTime)&&(tTime||prevTime||isYoyo)){_callback(this,tTime===tDur?"onComplete":"onReverseComplete",true);this._prom&&!(tTime<tDur&&this.timeScale()>0)&&this._prom()}}}return this};_proto3.targets=function targets(){return this._targets};_proto3.invalidate=function invalidate(soft){(!soft||!this.vars.runBackwards)&&(this._startAt=0);this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0;this._ptLookup=[];this.timeline&&this.timeline.invalidate(soft);return _Animation2.prototype.invalidate.call(this,soft)};_proto3.resetTo=function resetTo(property,value,start,startIsRelative,skipRecursion){_tickerActive||_ticker.wake();this._ts||this.play();var time=Math.min(this._dur,(this._dp._time-this._start)*this._ts),ratio;this._initted||_initTween(this,time);ratio=this._ease(time/this._dur);if(_updatePropTweens(this,property,value,start,startIsRelative,ratio,time,skipRecursion)){return this.resetTo(property,value,start,startIsRelative,1)}_alignPlayhead(this,0);this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0);return this.render(0)};_proto3.kill=function kill(targets,vars2){if(vars2===void 0){vars2="all"}if(!targets&&(!vars2||vars2==="all")){this._lazy=this._pt=0;this.parent?_interrupt(this):this.scrollTrigger&&this.scrollTrigger.kill(!!_reverting);return this}if(this.timeline){var tDur=this.timeline.totalDuration();this.timeline.killTweensOf(targets,vars2,_overwritingTween&&_overwritingTween.vars.overwrite!==true)._first||_interrupt(this);this.parent&&tDur!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/tDur,0,1);return this}var parsedTargets=this._targets,killingTargets=targets?toArray(targets):parsedTargets,propTweenLookup=this._ptLookup,firstPT=this._pt,overwrittenProps,curLookup,curOverwriteProps,props2,p,pt,i2;if((!vars2||vars2==="all")&&_arraysMatch(parsedTargets,killingTargets)){vars2==="all"&&(this._pt=0);return _interrupt(this)}overwrittenProps=this._op=this._op||[];if(vars2!=="all"){if(_isString(vars2)){p={};_forEachName(vars2,function(name){return p[name]=1});vars2=p}vars2=_addAliasesToVars(parsedTargets,vars2)}i2=parsedTargets.length;while(i2--){if(~killingTargets.indexOf(parsedTargets[i2])){curLookup=propTweenLookup[i2];if(vars2==="all"){overwrittenProps[i2]=vars2;props2=curLookup;curOverwriteProps={}}else{curOverwriteProps=overwrittenProps[i2]=overwrittenProps[i2]||{};props2=vars2}for(p in props2){pt=curLookup&&curLookup[p];if(pt){if(!("kill"in pt.d)||pt.d.kill(p)===true){_removeLinkedListItem(this,pt,"_pt")}delete curLookup[p]}if(curOverwriteProps!=="all"){curOverwriteProps[p]=1}}}}this._initted&&!this._pt&&firstPT&&_interrupt(this);return this};Tween2.to=function to(targets,vars2){return new Tween2(targets,vars2,arguments[2])};Tween2.from=function from(targets,vars2){return _createTweenType(1,arguments)};Tween2.delayedCall=function delayedCall(delay,callback,params,scope){return new Tween2(callback,0,{immediateRender:false,lazy:false,overwrite:false,delay,onComplete:callback,onReverseComplete:callback,onCompleteParams:params,onReverseCompleteParams:params,callbackScope:scope})};Tween2.fromTo=function fromTo(targets,fromVars,toVars){return _createTweenType(2,arguments)};Tween2.set=function set(targets,vars2){vars2.duration=0;vars2.repeatDelay||(vars2.repeat=0);return new Tween2(targets,vars2)};Tween2.killTweensOf=function killTweensOf(targets,props2,onlyActive){return _globalTimeline.killTweensOf(targets,props2,onlyActive)};return Tween2})(Animation);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});_forEachName("staggerTo,staggerFrom,staggerFromTo",function(name){Tween[name]=function(){var tl=new Timeline,params=_slice.call(arguments,0);params.splice(name==="staggerFromTo"?5:4,0,0);return tl[name].apply(tl,params)}});var _setterPlain=function _setterPlain2(target,property,value){return target[property]=value},_setterFunc=function _setterFunc2(target,property,value){return target[property](value)},_setterFuncWithParam=function _setterFuncWithParam2(target,property,value,data2){return target[property](data2.fp,value)},_setterAttribute=function _setterAttribute2(target,property,value){return target.setAttribute(property,value)},_getSetter=function _getSetter2(target,property){return _isFunction(target[property])?_setterFunc:_isUndefined(target[property])&&target.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function _renderPlain2(ratio,data2){return data2.set(data2.t,data2.p,Math.round((data2.s+data2.c*ratio)*1e6)/1e6,data2)},_renderBoolean=function _renderBoolean2(ratio,data2){return data2.set(data2.t,data2.p,!!(data2.s+data2.c*ratio),data2)},_renderComplexString=function _renderComplexString2(ratio,data2){var pt=data2._pt,s="";if(!ratio&&data2.b){s=data2.b}else if(ratio===1&&data2.e){s=data2.e}else{while(pt){s=pt.p+(pt.m?pt.m(pt.s+pt.c*ratio):Math.round((pt.s+pt.c*ratio)*1e4)/1e4)+s;pt=pt._next}s+=data2.c}data2.set(data2.t,data2.p,s,data2)},_renderPropTweens=function _renderPropTweens2(ratio,data2){var pt=data2._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next}},_addPluginModifier=function _addPluginModifier2(modifier,tween,target,property){var pt=this._pt,next;while(pt){next=pt._next;pt.p===property&&pt.modifier(modifier,tween,target);pt=next}},_killPropTweensOf=function _killPropTweensOf2(property){var pt=this._pt,hasNonDependentRemaining,next;while(pt){next=pt._next;if(pt.p===property&&!pt.op||pt.op===property){_removeLinkedListItem(this,pt,"_pt")}else if(!pt.dep){hasNonDependentRemaining=1}pt=next}return!hasNonDependentRemaining},_setterWithModifier=function _setterWithModifier2(target,property,value,data2){data2.mSet(target,property,data2.m.call(data2.tween,value,data2.mt),data2)},_sortPropTweensByPriority=function _sortPropTweensByPriority2(parent2){var pt=parent2._pt,next,pt2,first,last;while(pt){next=pt._next;pt2=first;while(pt2&&pt2.pr>pt.pr){pt2=pt2._next}if(pt._prev=pt2?pt2._prev:last){pt._prev._next=pt}else{first=pt}if(pt._next=pt2){pt2._prev=pt}else{last=pt}pt=next}parent2._pt=first};var PropTween=(function(){function PropTween2(next,target,prop,start,change,renderer,data2,setter,priority){this.t=target;this.s=start;this.c=change;this.p=prop;this.r=renderer||_renderPlain;this.d=data2||this;this.set=setter||_setterPlain;this.pr=priority||0;this._next=next;if(next){next._prev=this}}var _proto4=PropTween2.prototype;_proto4.modifier=function modifier(func,tween,target){this.mSet=this.mSet||this.set;this.set=_setterWithModifier;this.m=func;this.mt=target;this.tween=tween};return PropTween2})();_forEachName(_callbackNames+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(name){return _reservedProps[name]=1});_globals.TweenMax=_globals.TweenLite=Tween;_globals.TimelineLite=_globals.TimelineMax=Timeline;_globalTimeline=new Timeline({sortChildren:false,defaults:_defaults,autoRemoveChildren:true,id:"root",smoothChildTiming:true});_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function _dispatch2(type2){return(_listeners[type2]||_emptyArray).map(function(f){return f()})},_onMediaChange=function _onMediaChange2(){var time=Date.now(),matches=[];if(time-_lastMediaTime>2){_dispatch("matchMediaInit");_media.forEach(function(c){var queries=c.queries,conditions=c.conditions,match,p,anyMatch,toggled;for(p in queries){match=_win.matchMedia(queries[p]).matches;match&&(anyMatch=1);if(match!==conditions[p]){conditions[p]=match;toggled=1}}if(toggled){c.revert();anyMatch&&matches.push(c)}});_dispatch("matchMediaRevert");matches.forEach(function(c){return c.onMatch(c,function(func){return c.add(null,func)})});_lastMediaTime=time;_dispatch("matchMedia")}};var Context=(function(){function Context2(func,scope){this.selector=scope&&selector2(scope);this.data=[];this._r=[];this.isReverted=false;this.id=_contextID++;func&&this.add(func)}var _proto5=Context2.prototype;_proto5.add=function add(name,func,scope){if(_isFunction(name)){scope=func;func=name;name=_isFunction}var self2=this,f=function f2(){var prev=_context,prevSelector=self2.selector,result;prev&&prev!==self2&&prev.data.push(self2);scope&&(self2.selector=selector2(scope));_context=self2;result=func.apply(self2,arguments);_isFunction(result)&&self2._r.push(result);_context=prev;self2.selector=prevSelector;self2.isReverted=false;return result};self2.last=f;return name===_isFunction?f(self2,function(func2){return self2.add(null,func2)}):name?self2[name]=f:f};_proto5.ignore=function ignore(func){var prev=_context;_context=null;func(this);_context=prev};_proto5.getTweens=function getTweens(){var a=[];this.data.forEach(function(e2){return e2 instanceof Context2?a.push.apply(a,e2.getTweens()):e2 instanceof Tween&&!(e2.parent&&e2.parent.data==="nested")&&a.push(e2)});return a};_proto5.clear=function clear(){this._r.length=this.data.length=0};_proto5.kill=function kill(revert,matchMedia){var _this4=this;if(revert){(function(){var tweens=_this4.getTweens(),i3=_this4.data.length,t2;while(i3--){t2=_this4.data[i3];if(t2.data==="isFlip"){t2.revert();t2.getChildren(true,true,false).forEach(function(tween){return tweens.splice(tweens.indexOf(tween),1)})}}tweens.map(function(t3){return{g:t3._dur||t3._delay||t3._sat&&!t3._sat.vars.immediateRender?t3.globalTime(0):-Infinity,t:t3}}).sort(function(a,b){return b.g-a.g||-Infinity}).forEach(function(o){return o.t.revert(revert)});i3=_this4.data.length;while(i3--){t2=_this4.data[i3];if(t2 instanceof Timeline){if(t2.data!=="nested"){t2.scrollTrigger&&t2.scrollTrigger.revert();t2.kill()}}else{!(t2 instanceof Tween)&&t2.revert&&t2.revert(revert)}}_this4._r.forEach(function(f){return f(revert,_this4)});_this4.isReverted=true})()}else{this.data.forEach(function(e2){return e2.kill&&e2.kill()})}this.clear();if(matchMedia){var i2=_media.length;while(i2--){_media[i2].id===this.id&&_media.splice(i2,1)}}};_proto5.revert=function revert(config){this.kill(config||{})};return Context2})();var MatchMedia=(function(){function MatchMedia2(scope){this.contexts=[];this.scope=scope;_context&&_context.data.push(this)}var _proto6=MatchMedia2.prototype;_proto6.add=function add(conditions,func,scope){_isObject(conditions)||(conditions={matches:conditions});var context=new Context(0,scope||this.scope),cond=context.conditions={},mq,p,active;_context&&!context.selector&&(context.selector=_context.selector);this.contexts.push(context);func=context.add("onMatch",func);context.queries=conditions;for(p in conditions){if(p==="all"){active=1}else{mq=_win.matchMedia(conditions[p]);if(mq){_media.indexOf(context)<0&&_media.push(context);(cond[p]=mq.matches)&&(active=1);mq.addListener?mq.addListener(_onMediaChange):mq.addEventListener("change",_onMediaChange)}}}active&&func(context,function(f){return context.add(null,f)});return this};_proto6.revert=function revert(config){this.kill(config||{})};_proto6.kill=function kill(revert){this.contexts.forEach(function(c){return c.kill(revert,true)})};return MatchMedia2})();var _gsap={registerPlugin:function registerPlugin(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}args.forEach(function(config){return _createPlugin(config)})},timeline:function timeline(vars2){return new Timeline(vars2)},getTweensOf:function getTweensOf(targets,onlyActive){return _globalTimeline.getTweensOf(targets,onlyActive)},getProperty:function getProperty(target,property,unit,uncache){_isString(target)&&(target=toArray(target)[0]);var getter=_getCache(target||{}).get,format=unit?_passThrough:_numericIfPossible;unit==="native"&&(unit="");return!target?target:!property?function(property2,unit2,uncache2){return format((_plugins[property2]&&_plugins[property2].get||getter)(target,property2,unit2,uncache2))}:format((_plugins[property]&&_plugins[property].get||getter)(target,property,unit,uncache))},quickSetter:function quickSetter(target,property,unit){target=toArray(target);if(target.length>1){var setters=target.map(function(t2){return gsap2.quickSetter(t2,property,unit)}),l=setters.length;return function(value){var i2=l;while(i2--){setters[i2](value)}}}target=target[0]||{};var Plugin=_plugins[property],cache=_getCache(target),p=cache.harness&&(cache.harness.aliases||{})[property]||property,setter=Plugin?function(value){var p2=new Plugin;_quickTween._pt=0;p2.init(target,unit?value+unit:value,_quickTween,0,[target]);p2.render(1,p2);_quickTween._pt&&_renderPropTweens(1,_quickTween)}:cache.set(target,p);return Plugin?setter:function(value){return setter(target,p,unit?value+unit:value,cache,1)}},quickTo:function quickTo(target,property,vars2){var _setDefaults2;var tween=gsap2.to(target,_setDefaults((_setDefaults2={},_setDefaults2[property]="+=0.1",_setDefaults2.paused=true,_setDefaults2.stagger=0,_setDefaults2),vars2||{})),func=function func2(value,start,startIsRelative){return tween.resetTo(property,value,start,startIsRelative)};func.tween=tween;return func},isTweening:function isTweening(targets){return _globalTimeline.getTweensOf(targets,true).length>0},defaults:function defaults(value){value&&value.ease&&(value.ease=_parseEase(value.ease,_defaults.ease));return _mergeDeep(_defaults,value||{})},config:function config(value){return _mergeDeep(_config,value||{})},registerEffect:function registerEffect(_ref3){var name=_ref3.name,effect=_ref3.effect,plugins=_ref3.plugins,defaults=_ref3.defaults,extendTimeline=_ref3.extendTimeline;(plugins||"").split(",").forEach(function(pluginName){return pluginName&&!_plugins[pluginName]&&!_globals[pluginName]&&_warn(name+" effect requires "+pluginName+" plugin.")});_effects[name]=function(targets,vars2,tl){return effect(toArray(targets),_setDefaults(vars2||{},defaults),tl)};if(extendTimeline){Timeline.prototype[name]=function(targets,vars2,position){return this.add(_effects[name](targets,_isObject(vars2)?vars2:(position=vars2)&&{},this),position)}}},registerEase:function registerEase(name,ease){_easeMap[name]=_parseEase(ease)},parseEase:function parseEase(ease,defaultEase){return arguments.length?_parseEase(ease,defaultEase):_easeMap},getById:function getById(id2){return _globalTimeline.getById(id2)},exportRoot:function exportRoot(vars2,includeDelayedCalls){if(vars2===void 0){vars2={}}var tl=new Timeline(vars2),child,next;tl.smoothChildTiming=_isNotFalse(vars2.smoothChildTiming);_globalTimeline.remove(tl);tl._dp=0;tl._time=tl._tTime=_globalTimeline._time;child=_globalTimeline._first;while(child){next=child._next;if(includeDelayedCalls||!(!child._dur&&child instanceof Tween&&child.vars.onComplete===child._targets[0])){_addToTimeline(tl,child,child._start-child._delay)}child=next}_addToTimeline(_globalTimeline,tl,0);return tl},context:function context(func,scope){return func?new Context(func,scope):_context},matchMedia:function matchMedia(scope){return new MatchMedia(scope)},matchMediaRefresh:function matchMediaRefresh(){return _media.forEach(function(c){var cond=c.conditions,found,p;for(p in cond){if(cond[p]){cond[p]=false;found=1}}found&&c.revert()})||_onMediaChange()},addEventListener:function addEventListener2(type2,callback){var a=_listeners[type2]||(_listeners[type2]=[]);~a.indexOf(callback)||a.push(callback)},removeEventListener:function removeEventListener(type2,callback){var a=_listeners[type2],i2=a&&a.indexOf(callback);i2>=0&&a.splice(i2,1)},utils:{wrap,wrapYoyo,distribute,random,snap,normalize,getUnit,clamp,splitColor,toArray,selector:selector2,mapRange,pipe,unitize,interpolate,shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween,globals:_addGlobal,Tween,Timeline,Animation,getCache:_getCache,_removeLinkedListItem,reverting:function reverting(){return _reverting},context:function context(toAdd){if(toAdd&&_context){_context.data.push(toAdd);toAdd._ctx=_context}return _context},suppressOverwrites:function suppressOverwrites(value){return _suppressOverwrites=value}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",function(name){return _gsap[name]=Tween[name]});_ticker.add(Timeline.updateRoot);_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function _getPluginPropTween2(plugin,prop){var pt=plugin._pt;while(pt&&pt.p!==prop&&pt.op!==prop&&pt.fp!==prop){pt=pt._next}return pt},_addModifiers=function _addModifiers2(tween,modifiers){var targets=tween._targets,p,i2,pt;for(p in modifiers){i2=targets.length;while(i2--){pt=tween._ptLookup[i2][p];if(pt&&(pt=pt.d)){if(pt._pt){pt=_getPluginPropTween(pt,p)}pt&&pt.modifier&&pt.modifier(modifiers[p],tween,targets[i2],p)}}}},_buildModifierPlugin=function _buildModifierPlugin2(name,modifier){return{name,headless:1,rawVars:1,init:function init2(target,vars2,tween){tween._onInit=function(tween2){var temp2,p;if(_isString(vars2)){temp2={};_forEachName(vars2,function(name2){return temp2[name2]=1});vars2=temp2}if(modifier){temp2={};for(p in vars2){temp2[p]=modifier(vars2[p])}vars2=temp2}_addModifiers(tween2,vars2)}}}};var gsap2=_gsap.registerPlugin({name:"attr",init:function init2(target,vars2,tween,index2,targets){var p,pt,v;this.tween=tween;for(p in vars2){v=target.getAttribute(p)||"";pt=this.add(target,"setAttribute",(v||0)+"",vars2[p],index2,targets,0,0,p);pt.op=p;pt.b=v;this._props.push(p)}},render:function render(ratio,data2){var pt=data2._pt;while(pt){_reverting?pt.set(pt.t,pt.p,pt.b,pt):pt.r(ratio,pt.d);pt=pt._next}}},{name:"endArray",headless:1,init:function init2(target,value){var i2=value.length;while(i2--){this.add(target,i2,target[i2]||0,value[i2],0,0,0,0,0,1)}}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap2.version="3.15.0";_coreReady=1;_windowExists()&&_wake();var Power0=_easeMap.Power0,Power1=_easeMap.Power1,Power2=_easeMap.Power2,Power3=_easeMap.Power3,Power4=_easeMap.Power4,Linear=_easeMap.Linear,Quad=_easeMap.Quad,Cubic=_easeMap.Cubic,Quart=_easeMap.Quart,Quint=_easeMap.Quint,Strong=_easeMap.Strong,Elastic=_easeMap.Elastic,Back=_easeMap.Back,SteppedEase=_easeMap.SteppedEase,Bounce=_easeMap.Bounce,Sine=_easeMap.Sine,Expo=_easeMap.Expo,Circ=_easeMap.Circ;var _win$1,_doc$1,_docElement,_pluginInitted,_tempDiv,_tempDivStyler,_recentSetterPlugin,_reverting$1,_windowExists$1=function _windowExists2(){return typeof window!=="undefined"},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum$1=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function _renderCSSProp2(ratio,data2){return data2.set(data2.t,data2.p,Math.round((data2.s+data2.c*ratio)*1e4)/1e4+data2.u,data2)},_renderPropWithEnd=function _renderPropWithEnd2(ratio,data2){return data2.set(data2.t,data2.p,ratio===1?data2.e:Math.round((data2.s+data2.c*ratio)*1e4)/1e4+data2.u,data2)},_renderCSSPropWithBeginning=function _renderCSSPropWithBeginning2(ratio,data2){return data2.set(data2.t,data2.p,ratio?Math.round((data2.s+data2.c*ratio)*1e4)/1e4+data2.u:data2.b,data2)},_renderCSSPropWithBeginningAndEnd=function _renderCSSPropWithBeginningAndEnd2(ratio,data2){return data2.set(data2.t,data2.p,ratio===1?data2.e:ratio?Math.round((data2.s+data2.c*ratio)*1e4)/1e4+data2.u:data2.b,data2)},_renderRoundedCSSProp=function _renderRoundedCSSProp2(ratio,data2){var value=data2.s+data2.c*ratio;data2.set(data2.t,data2.p,~~(value+(value<0?-.5:.5))+data2.u,data2)},_renderNonTweeningValue=function _renderNonTweeningValue2(ratio,data2){return data2.set(data2.t,data2.p,ratio?data2.e:data2.b,data2)},_renderNonTweeningValueOnlyAtEnd=function _renderNonTweeningValueOnlyAtEnd2(ratio,data2){return data2.set(data2.t,data2.p,ratio!==1?data2.b:data2.e,data2)},_setterCSSStyle=function _setterCSSStyle2(target,property,value){return target.style[property]=value},_setterCSSProp=function _setterCSSProp2(target,property,value){return target.style.setProperty(property,value)},_setterTransform=function _setterTransform2(target,property,value){return target._gsap[property]=value},_setterScale=function _setterScale2(target,property,value){return target._gsap.scaleX=target._gsap.scaleY=value},_setterScaleWithRender=function _setterScaleWithRender2(target,property,value,data2,ratio){var cache=target._gsap;cache.scaleX=cache.scaleY=value;cache.renderTransform(ratio,cache)},_setterTransformWithRender=function _setterTransformWithRender2(target,property,value,data2,ratio){var cache=target._gsap;cache[property]=value;cache.renderTransform(ratio,cache)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function _saveStyle2(property,isNotCSS){var _this=this;var target=this.target,style=target.style,cache=target._gsap;if(property in _transformProps&&style){this.tfm=this.tfm||{};if(property!=="transform"){property=_propertyAliases[property]||property;~property.indexOf(",")?property.split(",").forEach(function(a){return _this.tfm[a]=_get(target,a)}):this.tfm[property]=cache.x?cache[property]:_get(target,property);property===_transformOriginProp&&(this.tfm.zOrigin=cache.zOrigin)}else{return _propertyAliases.transform.split(",").forEach(function(p){return _saveStyle2.call(_this,p,isNotCSS)})}if(this.props.indexOf(_transformProp)>=0){return}if(cache.svg){this.svgo=target.getAttribute("data-svg-origin");this.props.push(_transformOriginProp,isNotCSS,"")}property=_transformProp}(style||isNotCSS)&&this.props.push(property,isNotCSS,style[property])},_removeIndependentTransforms=function _removeIndependentTransforms2(style){if(style.translate){style.removeProperty("translate");style.removeProperty("scale");style.removeProperty("rotate")}},_revertStyle=function _revertStyle2(){var props2=this.props,target=this.target,style=target.style,cache=target._gsap,i2,p;for(i2=0;i2<props2.length;i2+=3){if(!props2[i2+1]){props2[i2+2]?style[props2[i2]]=props2[i2+2]:style.removeProperty(props2[i2].substr(0,2)==="--"?props2[i2]:props2[i2].replace(_capsExp,"-$1").toLowerCase())}else if(props2[i2+1]===2){target[props2[i2]](props2[i2+2])}else{target[props2[i2]]=props2[i2+2]}}if(this.tfm){for(p in this.tfm){cache[p]=this.tfm[p]}if(cache.svg){cache.renderTransform();target.setAttribute("data-svg-origin",this.svgo||"")}i2=_reverting$1();if((!i2||!i2.isStart)&&!style[_transformProp]){_removeIndependentTransforms(style);if(cache.zOrigin&&style[_transformOriginProp]){style[_transformOriginProp]+=" "+cache.zOrigin+"px";cache.zOrigin=0;cache.renderTransform()}cache.uncache=1}}},_getStyleSaver=function _getStyleSaver2(target,properties){var saver={target,props:[],revert:_revertStyle,save:_saveStyle};target._gsap||gsap2.core.getCache(target);properties&&target.style&&target.nodeType&&properties.split(",").forEach(function(p){return saver.save(p)});return saver},_supports3D,_createElement=function _createElement2(type2,ns){var e2=_doc$1.createElementNS?_doc$1.createElementNS((ns||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),type2):_doc$1.createElement(type2);return e2&&e2.style?e2:_doc$1.createElement(type2)},_getComputedProperty=function _getComputedProperty2(target,property,skipPrefixFallback){var cs=getComputedStyle(target);return cs[property]||cs.getPropertyValue(property.replace(_capsExp,"-$1").toLowerCase())||cs.getPropertyValue(property)||!skipPrefixFallback&&_getComputedProperty2(target,_checkPropPrefix(property)||property,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function _checkPropPrefix2(property,element,preferPrefix){var e2=element||_tempDiv,s=e2.style,i2=5;if(property in s&&!preferPrefix){return property}property=property.charAt(0).toUpperCase()+property.substr(1);while(i2--&&!(_prefixes[i2]+property in s)){}return i2<0?null:(i2===3?"ms":i2>=0?_prefixes[i2]:"")+property},_initCore=function _initCore2(){if(_windowExists$1()&&window.document){_win$1=window;_doc$1=_win$1.document;_docElement=_doc$1.documentElement;_tempDiv=_createElement("div")||{style:{}};_tempDivStyler=_createElement("div");_transformProp=_checkPropPrefix(_transformProp);_transformOriginProp=_transformProp+"Origin";_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0";_supports3D=!!_checkPropPrefix("perspective");_reverting$1=gsap2.core.reverting;_pluginInitted=1}},_getReparentedCloneBBox=function _getReparentedCloneBBox2(target){var owner=target.ownerSVGElement,svg=_createElement("svg",owner&&owner.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),clone2=target.cloneNode(true),bbox;clone2.style.display="block";svg.appendChild(clone2);_docElement.appendChild(svg);try{bbox=clone2.getBBox()}catch(e2){}svg.removeChild(clone2);_docElement.removeChild(svg);return bbox},_getAttributeFallbacks=function _getAttributeFallbacks2(target,attributesArray){var i2=attributesArray.length;while(i2--){if(target.hasAttribute(attributesArray[i2])){return target.getAttribute(attributesArray[i2])}}},_getBBox=function _getBBox2(target){var bounds,cloned;try{bounds=target.getBBox()}catch(error){bounds=_getReparentedCloneBBox(target);cloned=1}bounds&&(bounds.width||bounds.height)||cloned||(bounds=_getReparentedCloneBBox(target));return bounds&&!bounds.width&&!bounds.x&&!bounds.y?{x:+_getAttributeFallbacks(target,["x","cx","x1"])||0,y:+_getAttributeFallbacks(target,["y","cy","y1"])||0,width:0,height:0}:bounds},_isSVG=function _isSVG2(e2){return!!(e2.getCTM&&(!e2.parentNode||e2.ownerSVGElement)&&_getBBox(e2))},_removeProperty=function _removeProperty2(target,property){if(property){var style=target.style,first2Chars;if(property in _transformProps&&property!==_transformOriginProp){property=_transformProp}if(style.removeProperty){first2Chars=property.substr(0,2);if(first2Chars==="ms"||property.substr(0,6)==="webkit"){property="-"+property}style.removeProperty(first2Chars==="--"?property:property.replace(_capsExp,"-$1").toLowerCase())}else{style.removeAttribute(property)}}},_addNonTweeningPT=function _addNonTweeningPT2(plugin,target,property,beginning,end,onlySetAtEnd){var pt=new PropTween(plugin._pt,target,property,0,1,onlySetAtEnd?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);plugin._pt=pt;pt.b=beginning;pt.e=end;plugin._props.push(property);return pt},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function _convertToUnit2(target,property,value,unit){var curValue=parseFloat(value)||0,curUnit=(value+"").trim().substr((curValue+"").length)||"px",style=_tempDiv.style,horizontal=_horizontalExp.test(property),isRootSVG=target.tagName.toLowerCase()==="svg",measureProperty=(isRootSVG?"client":"offset")+(horizontal?"Width":"Height"),amount=100,toPixels=unit==="px",toPercent=unit==="%",px,parent2,cache,isSVG;if(unit===curUnit||!curValue||_nonConvertibleUnits[unit]||_nonConvertibleUnits[curUnit]){return curValue}curUnit!=="px"&&!toPixels&&(curValue=_convertToUnit2(target,property,value,"px"));isSVG=target.getCTM&&_isSVG(target);if((toPercent||curUnit==="%")&&(_transformProps[property]||~property.indexOf("adius"))){px=isSVG?target.getBBox()[horizontal?"width":"height"]:target[measureProperty];return _round(toPercent?curValue/px*amount:curValue/100*px)}style[horizontal?"width":"height"]=amount+(toPixels?curUnit:unit);parent2=unit!=="rem"&&~property.indexOf("adius")||unit==="em"&&target.appendChild&&!isRootSVG?target:target.parentNode;if(isSVG){parent2=(target.ownerSVGElement||{}).parentNode}if(!parent2||parent2===_doc$1||!parent2.appendChild){parent2=_doc$1.body}cache=parent2._gsap;if(cache&&toPercent&&cache.width&&horizontal&&cache.time===_ticker.time&&!cache.uncache){return _round(curValue/cache.width*amount)}else{if(toPercent&&(property==="height"||property==="width")){var v=target.style[property];target.style[property]=amount+unit;px=target[measureProperty];v?target.style[property]=v:_removeProperty(target,property)}else{(toPercent||curUnit==="%")&&!_nonStandardLayouts[_getComputedProperty(parent2,"display")]&&(style.position=_getComputedProperty(target,"position"));parent2===target&&(style.position="static");parent2.appendChild(_tempDiv);px=_tempDiv[measureProperty];parent2.removeChild(_tempDiv);style.position="absolute"}if(horizontal&&toPercent){cache=_getCache(parent2);cache.time=_ticker.time;cache.width=parent2[measureProperty]}}return _round(toPixels?px*curValue/amount:px&&curValue?amount/px*curValue:0)},_get=function _get2(target,property,unit,uncache){var value;_pluginInitted||_initCore();if(property in _propertyAliases&&property!=="transform"){property=_propertyAliases[property];if(~property.indexOf(",")){property=property.split(",")[0]}}if(_transformProps[property]&&property!=="transform"){value=_parseTransform(target,uncache);value=property!=="transformOrigin"?value[property]:value.svg?value.origin:_firstTwoOnly(_getComputedProperty(target,_transformOriginProp))+" "+value.zOrigin+"px"}else{value=target.style[property];if(!value||value==="auto"||uncache||~(value+"").indexOf("calc(")){value=_specialProps[property]&&_specialProps[property](target,property,unit)||_getComputedProperty(target,property)||_getProperty(target,property)||(property==="opacity"?1:0)}}return unit&&!~(value+"").trim().indexOf(" ")?_convertToUnit(target,property,value,unit)+unit:value},_tweenComplexCSSString=function _tweenComplexCSSString2(target,prop,start,end){if(!start||start==="none"){var p=_checkPropPrefix(prop,target,1),s=p&&_getComputedProperty(target,p,1);if(s&&s!==start){prop=p;start=s}else if(prop==="borderColor"){start=_getComputedProperty(target,"borderTopColor")}}var pt=new PropTween(this._pt,target.style,prop,0,1,_renderComplexString),index2=0,matchIndex=0,a,result,startValues,startNum,color,startValue,endValue,endNum,chunk,endUnit,startUnit,endValues;pt.b=start;pt.e=end;start+="";end+="";if(end.substring(0,6)==="var(--"){end=_getComputedProperty(target,end.substring(4,end.indexOf(")")))}if(end==="auto"){startValue=target.style[prop];target.style[prop]=end;end=_getComputedProperty(target,prop)||end;startValue?target.style[prop]=startValue:_removeProperty(target,prop)}a=[start,end];_colorStringFilter(a);start=a[0];end=a[1];startValues=start.match(_numWithUnitExp)||[];endValues=end.match(_numWithUnitExp)||[];if(endValues.length){while(result=_numWithUnitExp.exec(end)){endValue=result[0];chunk=end.substring(index2,result.index);if(color){color=(color+1)%5}else if(chunk.substr(-5)==="rgba("||chunk.substr(-5)==="hsla("){color=1}if(endValue!==(startValue=startValues[matchIndex++]||"")){startNum=parseFloat(startValue)||0;startUnit=startValue.substr((startNum+"").length);endValue.charAt(1)==="="&&(endValue=_parseRelative(startNum,endValue)+startUnit);endNum=parseFloat(endValue);endUnit=endValue.substr((endNum+"").length);index2=_numWithUnitExp.lastIndex-endUnit.length;if(!endUnit){endUnit=endUnit||_config.units[prop]||startUnit;if(index2===end.length){end+=endUnit;pt.e+=endUnit}}if(startUnit!==endUnit){startNum=_convertToUnit(target,prop,startValue,endUnit)||0}pt._pt={_next:pt._pt,p:chunk||matchIndex===1?chunk:",",s:startNum,c:endNum-startNum,m:color&&color<4||prop==="zIndex"?Math.round:0}}}pt.c=index2<end.length?end.substring(index2,end.length):""}else{pt.r=prop==="display"&&end==="none"?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue}_relExp.test(end)&&(pt.e=0);this._pt=pt;return pt},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function _convertKeywordsToPercentages2(value){var split=value.split(" "),x2=split[0],y=split[1]||"50%";if(x2==="top"||x2==="bottom"||y==="left"||y==="right"){value=x2;x2=y;y=value}split[0]=_keywordToPercent[x2]||x2;split[1]=_keywordToPercent[y]||y;return split.join(" ")},_renderClearProps=function _renderClearProps2(ratio,data2){if(data2.tween&&data2.tween._time===data2.tween._dur){var target=data2.t,style=target.style,props2=data2.u,cache=target._gsap,prop,clearTransforms,i2;if(props2==="all"||props2===true){style.cssText="";clearTransforms=1}else{props2=props2.split(",");i2=props2.length;while(--i2>-1){prop=props2[i2];if(_transformProps[prop]){clearTransforms=1;prop=prop==="transformOrigin"?_transformOriginProp:_transformProp}_removeProperty(target,prop)}}if(clearTransforms){_removeProperty(target,_transformProp);if(cache){cache.svg&&target.removeAttribute("transform");style.scale=style.rotate=style.translate="none";_parseTransform(target,1);cache.uncache=1;_removeIndependentTransforms(style)}}}},_specialProps={clearProps:function clearProps(plugin,target,property,endValue,tween){if(tween.data!=="isFromStart"){var pt=plugin._pt=new PropTween(plugin._pt,target,property,0,0,_renderClearProps);pt.u=endValue;pt.pr=-10;pt.tween=tween;plugin._props.push(property);return 1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function _isNullTransform2(value){return value==="matrix(1, 0, 0, 1, 0, 0)"||value==="none"||!value},_getComputedTransformMatrixAsArray=function _getComputedTransformMatrixAsArray2(target){var matrixString=_getComputedProperty(target,_transformProp);return _isNullTransform(matrixString)?_identity2DMatrix:matrixString.substr(7).match(_numExp).map(_round)},_getMatrix=function _getMatrix2(target,force2D){var cache=target._gsap||_getCache(target),style=target.style,matrix=_getComputedTransformMatrixAsArray(target),parent2,nextSibling,temp2,addedToDOM;if(cache.svg&&target.getAttribute("transform")){temp2=target.transform.baseVal.consolidate().matrix;matrix=[temp2.a,temp2.b,temp2.c,temp2.d,temp2.e,temp2.f];return matrix.join(",")==="1,0,0,1,0,0"?_identity2DMatrix:matrix}else if(matrix===_identity2DMatrix&&!target.offsetParent&&target!==_docElement&&!cache.svg){temp2=style.display;style.display="block";parent2=target.parentNode;if(!parent2||!target.offsetParent&&!target.getBoundingClientRect().width){addedToDOM=1;nextSibling=target.nextElementSibling;_docElement.appendChild(target)}matrix=_getComputedTransformMatrixAsArray(target);temp2?style.display=temp2:_removeProperty(target,"display");if(addedToDOM){nextSibling?parent2.insertBefore(target,nextSibling):parent2?parent2.appendChild(target):_docElement.removeChild(target)}}return force2D&&matrix.length>6?[matrix[0],matrix[1],matrix[4],matrix[5],matrix[12],matrix[13]]:matrix},_applySVGOrigin=function _applySVGOrigin2(target,origin,originIsAbsolute,smooth,matrixArray,pluginToAddPropTweensTo){var cache=target._gsap,matrix=matrixArray||_getMatrix(target,true),xOriginOld=cache.xOrigin||0,yOriginOld=cache.yOrigin||0,xOffsetOld=cache.xOffset||0,yOffsetOld=cache.yOffset||0,a=matrix[0],b=matrix[1],c=matrix[2],d=matrix[3],tx2=matrix[4],ty=matrix[5],originSplit=origin.split(" "),xOrigin=parseFloat(originSplit[0])||0,yOrigin=parseFloat(originSplit[1])||0,bounds,determinant,x2,y;if(!originIsAbsolute){bounds=_getBBox(target);xOrigin=bounds.x+(~originSplit[0].indexOf("%")?xOrigin/100*bounds.width:xOrigin);yOrigin=bounds.y+(~(originSplit[1]||originSplit[0]).indexOf("%")?yOrigin/100*bounds.height:yOrigin)}else if(matrix!==_identity2DMatrix&&(determinant=a*d-b*c)){x2=xOrigin*(d/determinant)+yOrigin*(-c/determinant)+(c*ty-d*tx2)/determinant;y=xOrigin*(-b/determinant)+yOrigin*(a/determinant)-(a*ty-b*tx2)/determinant;xOrigin=x2;yOrigin=y}if(smooth||smooth!==false&&cache.smooth){tx2=xOrigin-xOriginOld;ty=yOrigin-yOriginOld;cache.xOffset=xOffsetOld+(tx2*a+ty*c)-tx2;cache.yOffset=yOffsetOld+(tx2*b+ty*d)-ty}else{cache.xOffset=cache.yOffset=0}cache.xOrigin=xOrigin;cache.yOrigin=yOrigin;cache.smooth=!!smooth;cache.origin=origin;cache.originIsAbsolute=!!originIsAbsolute;target.style[_transformOriginProp]="0px 0px";if(pluginToAddPropTweensTo){_addNonTweeningPT(pluginToAddPropTweensTo,cache,"xOrigin",xOriginOld,xOrigin);_addNonTweeningPT(pluginToAddPropTweensTo,cache,"yOrigin",yOriginOld,yOrigin);_addNonTweeningPT(pluginToAddPropTweensTo,cache,"xOffset",xOffsetOld,cache.xOffset);_addNonTweeningPT(pluginToAddPropTweensTo,cache,"yOffset",yOffsetOld,cache.yOffset)}target.setAttribute("data-svg-origin",xOrigin+" "+yOrigin)},_parseTransform=function _parseTransform2(target,uncache){var cache=target._gsap||new GSCache(target);if("x"in cache&&!uncache&&!cache.uncache){return cache}var style=target.style,invertedScaleX=cache.scaleX<0,px="px",deg="deg",cs=getComputedStyle(target),origin=_getComputedProperty(target,_transformOriginProp)||"0",x2,y,z,scaleX,scaleY,rotation,rotationX,rotationY,skewX,skewY,perspective,xOrigin,yOrigin,matrix,angle,cos,sin,a,b,c,d,a12,a22,t1,t2,t3,a13,a23,a33,a42,a43,a32;x2=y=z=rotation=rotationX=rotationY=skewX=skewY=perspective=0;scaleX=scaleY=1;cache.svg=!!(target.getCTM&&_isSVG(target));if(cs.translate){if(cs.translate!=="none"||cs.scale!=="none"||cs.rotate!=="none"){style[_transformProp]=(cs.translate!=="none"?"translate3d("+(cs.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(cs.rotate!=="none"?"rotate("+cs.rotate+") ":"")+(cs.scale!=="none"?"scale("+cs.scale.split(" ").join(",")+") ":"")+(cs[_transformProp]!=="none"?cs[_transformProp]:"")}style.scale=style.rotate=style.translate="none"}matrix=_getMatrix(target,cache.svg);if(cache.svg){if(cache.uncache){t2=target.getBBox();origin=cache.xOrigin-t2.x+"px "+(cache.yOrigin-t2.y)+"px";t1=""}else{t1=!uncache&&target.getAttribute("data-svg-origin")}_applySVGOrigin(target,t1||origin,!!t1||cache.originIsAbsolute,cache.smooth!==false,matrix)}xOrigin=cache.xOrigin||0;yOrigin=cache.yOrigin||0;if(matrix!==_identity2DMatrix){a=matrix[0];b=matrix[1];c=matrix[2];d=matrix[3];x2=a12=matrix[4];y=a22=matrix[5];if(matrix.length===6){scaleX=Math.sqrt(a*a+b*b);scaleY=Math.sqrt(d*d+c*c);rotation=a||b?_atan2(b,a)*_RAD2DEG:0;skewX=c||d?_atan2(c,d)*_RAD2DEG+rotation:0;skewX&&(scaleY*=Math.abs(Math.cos(skewX*_DEG2RAD)));if(cache.svg){x2-=xOrigin-(xOrigin*a+yOrigin*c);y-=yOrigin-(xOrigin*b+yOrigin*d)}}else{a32=matrix[6];a42=matrix[7];a13=matrix[8];a23=matrix[9];a33=matrix[10];a43=matrix[11];x2=matrix[12];y=matrix[13];z=matrix[14];angle=_atan2(a32,a33);rotationX=angle*_RAD2DEG;if(angle){cos=Math.cos(-angle);sin=Math.sin(-angle);t1=a12*cos+a13*sin;t2=a22*cos+a23*sin;t3=a32*cos+a33*sin;a13=a12*-sin+a13*cos;a23=a22*-sin+a23*cos;a33=a32*-sin+a33*cos;a43=a42*-sin+a43*cos;a12=t1;a22=t2;a32=t3}angle=_atan2(-c,a33);rotationY=angle*_RAD2DEG;if(angle){cos=Math.cos(-angle);sin=Math.sin(-angle);t1=a*cos-a13*sin;t2=b*cos-a23*sin;t3=c*cos-a33*sin;a43=d*sin+a43*cos;a=t1;b=t2;c=t3}angle=_atan2(b,a);rotation=angle*_RAD2DEG;if(angle){cos=Math.cos(angle);sin=Math.sin(angle);t1=a*cos+b*sin;t2=a12*cos+a22*sin;b=b*cos-a*sin;a22=a22*cos-a12*sin;a=t1;a12=t2}if(rotationX&&Math.abs(rotationX)+Math.abs(rotation)>359.9){rotationX=rotation=0;rotationY=180-rotationY}scaleX=_round(Math.sqrt(a*a+b*b+c*c));scaleY=_round(Math.sqrt(a22*a22+a32*a32));angle=_atan2(a12,a22);skewX=Math.abs(angle)>2e-4?angle*_RAD2DEG:0;perspective=a43?1/(a43<0?-a43:a43):0}if(cache.svg){t1=target.getAttribute("transform");cache.forceCSS=target.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(target,_transformProp));t1&&target.setAttribute("transform",t1)}}if(Math.abs(skewX)>90&&Math.abs(skewX)<270){if(invertedScaleX){scaleX*=-1;skewX+=rotation<=0?180:-180;rotation+=rotation<=0?180:-180}else{scaleY*=-1;skewX+=skewX<=0?180:-180}}uncache=uncache||cache.uncache;cache.x=x2-((cache.xPercent=x2&&(!uncache&&cache.xPercent||(Math.round(target.offsetWidth/2)===Math.round(-x2)?-50:0)))?target.offsetWidth*cache.xPercent/100:0)+px;cache.y=y-((cache.yPercent=y&&(!uncache&&cache.yPercent||(Math.round(target.offsetHeight/2)===Math.round(-y)?-50:0)))?target.offsetHeight*cache.yPercent/100:0)+px;cache.z=z+px;cache.scaleX=_round(scaleX);cache.scaleY=_round(scaleY);cache.rotation=_round(rotation)+deg;cache.rotationX=_round(rotationX)+deg;cache.rotationY=_round(rotationY)+deg;cache.skewX=skewX+deg;cache.skewY=skewY+deg;cache.transformPerspective=perspective+px;if(cache.zOrigin=parseFloat(origin.split(" ")[2])||!uncache&&cache.zOrigin||0){style[_transformOriginProp]=_firstTwoOnly(origin)}cache.xOffset=cache.yOffset=0;cache.force3D=_config.force3D;cache.renderTransform=cache.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms;cache.uncache=0;return cache},_firstTwoOnly=function _firstTwoOnly2(value){return(value=value.split(" "))[0]+" "+value[1]},_addPxTranslate=function _addPxTranslate2(target,start,value){var unit=getUnit(start);return _round(parseFloat(start)+parseFloat(_convertToUnit(target,"x",value+"px",unit)))+unit},_renderNon3DTransforms=function _renderNon3DTransforms2(ratio,cache){cache.z="0px";cache.rotationY=cache.rotationX="0deg";cache.force3D=0;_renderCSSTransforms(ratio,cache)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function _renderCSSTransforms2(ratio,cache){var _ref=cache||this,xPercent=_ref.xPercent,yPercent=_ref.yPercent,x2=_ref.x,y=_ref.y,z=_ref.z,rotation=_ref.rotation,rotationY=_ref.rotationY,rotationX=_ref.rotationX,skewX=_ref.skewX,skewY=_ref.skewY,scaleX=_ref.scaleX,scaleY=_ref.scaleY,transformPerspective=_ref.transformPerspective,force3D=_ref.force3D,target=_ref.target,zOrigin=_ref.zOrigin,transforms="",use3D=force3D==="auto"&&ratio&&ratio!==1||force3D===true;if(zOrigin&&(rotationX!==_zeroDeg||rotationY!==_zeroDeg)){var angle=parseFloat(rotationY)*_DEG2RAD,a13=Math.sin(angle),a33=Math.cos(angle),cos;angle=parseFloat(rotationX)*_DEG2RAD;cos=Math.cos(angle);x2=_addPxTranslate(target,x2,a13*cos*-zOrigin);y=_addPxTranslate(target,y,-Math.sin(angle)*-zOrigin);z=_addPxTranslate(target,z,a33*cos*-zOrigin+zOrigin)}if(transformPerspective!==_zeroPx){transforms+="perspective("+transformPerspective+_endParenthesis}if(xPercent||yPercent){transforms+="translate("+xPercent+"%, "+yPercent+"%) "}if(use3D||x2!==_zeroPx||y!==_zeroPx||z!==_zeroPx){transforms+=z!==_zeroPx||use3D?"translate3d("+x2+", "+y+", "+z+") ":"translate("+x2+", "+y+_endParenthesis}if(rotation!==_zeroDeg){transforms+="rotate("+rotation+_endParenthesis}if(rotationY!==_zeroDeg){transforms+="rotateY("+rotationY+_endParenthesis}if(rotationX!==_zeroDeg){transforms+="rotateX("+rotationX+_endParenthesis}if(skewX!==_zeroDeg||skewY!==_zeroDeg){transforms+="skew("+skewX+", "+skewY+_endParenthesis}if(scaleX!==1||scaleY!==1){transforms+="scale("+scaleX+", "+scaleY+_endParenthesis}target.style[_transformProp]=transforms||"translate(0, 0)"},_renderSVGTransforms=function _renderSVGTransforms2(ratio,cache){var _ref2=cache||this,xPercent=_ref2.xPercent,yPercent=_ref2.yPercent,x2=_ref2.x,y=_ref2.y,rotation=_ref2.rotation,skewX=_ref2.skewX,skewY=_ref2.skewY,scaleX=_ref2.scaleX,scaleY=_ref2.scaleY,target=_ref2.target,xOrigin=_ref2.xOrigin,yOrigin=_ref2.yOrigin,xOffset=_ref2.xOffset,yOffset=_ref2.yOffset,forceCSS=_ref2.forceCSS,tx2=parseFloat(x2),ty=parseFloat(y),a11,a21,a12,a22,temp2;rotation=parseFloat(rotation);skewX=parseFloat(skewX);skewY=parseFloat(skewY);if(skewY){skewY=parseFloat(skewY);skewX+=skewY;rotation+=skewY}if(rotation||skewX){rotation*=_DEG2RAD;skewX*=_DEG2RAD;a11=Math.cos(rotation)*scaleX;a21=Math.sin(rotation)*scaleX;a12=Math.sin(rotation-skewX)*-scaleY;a22=Math.cos(rotation-skewX)*scaleY;if(skewX){skewY*=_DEG2RAD;temp2=Math.tan(skewX-skewY);temp2=Math.sqrt(1+temp2*temp2);a12*=temp2;a22*=temp2;if(skewY){temp2=Math.tan(skewY);temp2=Math.sqrt(1+temp2*temp2);a11*=temp2;a21*=temp2}}a11=_round(a11);a21=_round(a21);a12=_round(a12);a22=_round(a22)}else{a11=scaleX;a22=scaleY;a21=a12=0}if(tx2&&!~(x2+"").indexOf("px")||ty&&!~(y+"").indexOf("px")){tx2=_convertToUnit(target,"x",x2,"px");ty=_convertToUnit(target,"y",y,"px")}if(xOrigin||yOrigin||xOffset||yOffset){tx2=_round(tx2+xOrigin-(xOrigin*a11+yOrigin*a12)+xOffset);ty=_round(ty+yOrigin-(xOrigin*a21+yOrigin*a22)+yOffset)}if(xPercent||yPercent){temp2=target.getBBox();tx2=_round(tx2+xPercent/100*temp2.width);ty=_round(ty+yPercent/100*temp2.height)}temp2="matrix("+a11+","+a21+","+a12+","+a22+","+tx2+","+ty+")";target.setAttribute("transform",temp2);forceCSS&&(target.style[_transformProp]=temp2)},_addRotationalPropTween=function _addRotationalPropTween2(plugin,target,property,startNum,endValue){var cap=360,isString=_isString(endValue),endNum=parseFloat(endValue)*(isString&&~endValue.indexOf("rad")?_RAD2DEG:1),change=endNum-startNum,finalValue=startNum+change+"deg",direction,pt;if(isString){direction=endValue.split("_")[1];if(direction==="short"){change%=cap;if(change!==change%(cap/2)){change+=change<0?cap:-cap}}if(direction==="cw"&&change<0){change=(change+cap*_bigNum$1)%cap-~~(change/cap)*cap}else if(direction==="ccw"&&change>0){change=(change-cap*_bigNum$1)%cap-~~(change/cap)*cap}}plugin._pt=pt=new PropTween(plugin._pt,target,property,startNum,change,_renderPropWithEnd);pt.e=finalValue;pt.u="deg";plugin._props.push(property);return pt},_assign=function _assign2(target,source){for(var p in source){target[p]=source[p]}return target},_addRawTransformPTs=function _addRawTransformPTs2(plugin,transforms,target){var startCache=_assign({},target._gsap),exclude="perspective,force3D,transformOrigin,svgOrigin",style=target.style,endCache,p,startValue,endValue,startNum,endNum,startUnit,endUnit;if(startCache.svg){startValue=target.getAttribute("transform");target.setAttribute("transform","");style[_transformProp]=transforms;endCache=_parseTransform(target,1);_removeProperty(target,_transformProp);target.setAttribute("transform",startValue)}else{startValue=getComputedStyle(target)[_transformProp];style[_transformProp]=transforms;endCache=_parseTransform(target,1);style[_transformProp]=startValue}for(p in _transformProps){startValue=startCache[p];endValue=endCache[p];if(startValue!==endValue&&exclude.indexOf(p)<0){startUnit=getUnit(startValue);endUnit=getUnit(endValue);startNum=startUnit!==endUnit?_convertToUnit(target,p,startValue,endUnit):parseFloat(startValue);endNum=parseFloat(endValue);plugin._pt=new PropTween(plugin._pt,endCache,p,startNum,endNum-startNum,_renderCSSProp);plugin._pt.u=endUnit||0;plugin._props.push(p)}}_assign(endCache,startCache)};_forEachName("padding,margin,Width,Radius",function(name,index2){var t2="Top",r2="Right",b="Bottom",l="Left",props2=(index2<3?[t2,r2,b,l]:[t2+l,t2+r2,b+r2,b+l]).map(function(side){return index2<2?name+side:"border"+side+name});_specialProps[index2>1?"border"+name:name]=function(plugin,target,property,endValue,tween){var a,vars2;if(arguments.length<4){a=props2.map(function(prop){return _get(plugin,prop,property)});vars2=a.join(" ");return vars2.split(a[0]).length===5?a[0]:vars2}a=(endValue+"").split(" ");vars2={};props2.forEach(function(prop,i2){return vars2[prop]=a[i2]=a[i2]||a[(i2-1)/2|0]});plugin.init(target,vars2,tween)}});var CSSPlugin={name:"css",register:_initCore,targetTest:function targetTest(target){return target.style&&target.nodeType},init:function init2(target,vars2,tween,index2,targets){var props2=this._props,style=target.style,startAt=tween.vars.startAt,startValue,endValue,endNum,startNum,type2,specialProp,p,startUnit,endUnit,relative,isTransformRelated,transformPropTween,cache,smooth,hasPriority,inlineProps,finalTransformValue;_pluginInitted||_initCore();this.styles=this.styles||_getStyleSaver(target);inlineProps=this.styles.props;this.tween=tween;for(p in vars2){if(p==="autoRound"){continue}endValue=vars2[p];if(_plugins[p]&&_checkPlugin(p,vars2,tween,index2,target,targets)){continue}type2=typeof endValue;specialProp=_specialProps[p];if(type2==="function"){endValue=endValue.call(tween,index2,target,targets);type2=typeof endValue}if(type2==="string"&&~endValue.indexOf("random(")){endValue=_replaceRandom(endValue)}if(specialProp){specialProp(this,target,p,endValue,tween)&&(hasPriority=1)}else if(p.substr(0,2)==="--"){startValue=(getComputedStyle(target).getPropertyValue(p)+"").trim();endValue+="";_colorExp.lastIndex=0;if(!_colorExp.test(startValue)){startUnit=getUnit(startValue);endUnit=getUnit(endValue);endUnit?startUnit!==endUnit&&(startValue=_convertToUnit(target,p,startValue,endUnit)+endUnit):startUnit&&(endValue+=startUnit)}this.add(style,"setProperty",startValue,endValue,index2,targets,0,0,p);props2.push(p);inlineProps.push(p,0,style[p])}else if(type2!=="undefined"){if(startAt&&p in startAt){startValue=typeof startAt[p]==="function"?startAt[p].call(tween,index2,target,targets):startAt[p];_isString(startValue)&&~startValue.indexOf("random(")&&(startValue=_replaceRandom(startValue));getUnit(startValue+"")||startValue==="auto"||(startValue+=_config.units[p]||getUnit(_get(target,p))||"");(startValue+"").charAt(1)==="="&&(startValue=_get(target,p))}else{startValue=_get(target,p)}startNum=parseFloat(startValue);relative=type2==="string"&&endValue.charAt(1)==="="&&endValue.substr(0,2);relative&&(endValue=endValue.substr(2));endNum=parseFloat(endValue);if(p in _propertyAliases){if(p==="autoAlpha"){if(startNum===1&&_get(target,"visibility")==="hidden"&&endNum){startNum=0}inlineProps.push("visibility",0,style.visibility);_addNonTweeningPT(this,style,"visibility",startNum?"inherit":"hidden",endNum?"inherit":"hidden",!endNum)}if(p!=="scale"&&p!=="transform"){p=_propertyAliases[p];~p.indexOf(",")&&(p=p.split(",")[0])}}isTransformRelated=p in _transformProps;if(isTransformRelated){this.styles.save(p);finalTransformValue=endValue;if(type2==="string"&&endValue.substring(0,6)==="var(--"){endValue=_getComputedProperty(target,endValue.substring(4,endValue.indexOf(")")));if(endValue.substring(0,5)==="calc("){var origPerspective=target.style.perspective;target.style.perspective=endValue;endValue=_getComputedProperty(target,"perspective");origPerspective?target.style.perspective=origPerspective:_removeProperty(target,"perspective")}endNum=parseFloat(endValue)}if(!transformPropTween){cache=target._gsap;cache.renderTransform&&!vars2.parseTransform||_parseTransform(target,vars2.parseTransform);smooth=vars2.smoothOrigin!==false&&cache.smooth;transformPropTween=this._pt=new PropTween(this._pt,style,_transformProp,0,1,cache.renderTransform,cache,0,-1);transformPropTween.dep=1}if(p==="scale"){this._pt=new PropTween(this._pt,cache,"scaleY",cache.scaleY,(relative?_parseRelative(cache.scaleY,relative+endNum):endNum)-cache.scaleY||0,_renderCSSProp);this._pt.u=0;props2.push("scaleY",p);p+="X"}else if(p==="transformOrigin"){inlineProps.push(_transformOriginProp,0,style[_transformOriginProp]);endValue=_convertKeywordsToPercentages(endValue);if(cache.svg){_applySVGOrigin(target,endValue,0,smooth,0,this)}else{endUnit=parseFloat(endValue.split(" ")[2])||0;endUnit!==cache.zOrigin&&_addNonTweeningPT(this,cache,"zOrigin",cache.zOrigin,endUnit);_addNonTweeningPT(this,style,p,_firstTwoOnly(startValue),_firstTwoOnly(endValue))}continue}else if(p==="svgOrigin"){_applySVGOrigin(target,endValue,1,smooth,0,this);continue}else if(p in _rotationalProperties){_addRotationalPropTween(this,cache,p,startNum,relative?_parseRelative(startNum,relative+endValue):endValue);continue}else if(p==="smoothOrigin"){_addNonTweeningPT(this,cache,"smooth",cache.smooth,endValue);continue}else if(p==="force3D"){cache[p]=endValue;continue}else if(p==="transform"){_addRawTransformPTs(this,endValue,target);continue}}else if(!(p in style)){p=_checkPropPrefix(p)||p}if(isTransformRelated||(endNum||endNum===0)&&(startNum||startNum===0)&&!_complexExp.test(endValue)&&p in style){startUnit=(startValue+"").substr((startNum+"").length);endNum||(endNum=0);endUnit=getUnit(endValue)||(p in _config.units?_config.units[p]:startUnit);startUnit!==endUnit&&(startNum=_convertToUnit(target,p,startValue,endUnit));this._pt=new PropTween(this._pt,isTransformRelated?cache:style,p,startNum,(relative?_parseRelative(startNum,relative+endNum):endNum)-startNum,!isTransformRelated&&(endUnit==="px"||p==="zIndex")&&vars2.autoRound!==false?_renderRoundedCSSProp:_renderCSSProp);this._pt.u=endUnit||0;if(isTransformRelated&&finalTransformValue!==endValue){this._pt.b=startValue;this._pt.e=finalTransformValue;this._pt.r=_renderCSSPropWithBeginningAndEnd}else if(startUnit!==endUnit&&endUnit!=="%"){this._pt.b=startValue;this._pt.r=_renderCSSPropWithBeginning}}else if(!(p in style)){if(p in target){this.add(target,p,startValue||target[p],relative?relative+endValue:endValue,index2,targets)}else if(p!=="parseTransform"){_missingPlugin(p,endValue);continue}}else{_tweenComplexCSSString.call(this,target,p,startValue,relative?relative+endValue:endValue)}isTransformRelated||(p in style?inlineProps.push(p,0,style[p]):typeof target[p]==="function"?inlineProps.push(p,2,target[p]()):inlineProps.push(p,1,startValue||target[p]));props2.push(p)}}hasPriority&&_sortPropTweensByPriority(this)},render:function render(ratio,data2){if(data2.tween._time||!_reverting$1()){var pt=data2._pt;while(pt){pt.r(ratio,pt.d);pt=pt._next}}else{data2.styles.revert()}},get:_get,aliases:_propertyAliases,getSetter:function getSetter(target,property,plugin){var p=_propertyAliases[property];p&&p.indexOf(",")<0&&(property=p);return property in _transformProps&&property!==_transformOriginProp&&(target._gsap.x||_get(target,"x"))?plugin&&_recentSetterPlugin===plugin?property==="scale"?_setterScale:_setterTransform:(_recentSetterPlugin=plugin||{})&&(property==="scale"?_setterScaleWithRender:_setterTransformWithRender):target.style&&!_isUndefined(target.style[property])?_setterCSSStyle:~property.indexOf("-")?_setterCSSProp:_getSetter(target,property)},core:{_removeProperty,_getMatrix}};gsap2.utils.checkPrefix=_checkPropPrefix;gsap2.core.getStyleSaver=_getStyleSaver;(function(positionAndScale,rotation,others,aliases){var all=_forEachName(positionAndScale+","+rotation+","+others,function(name){_transformProps[name]=1});_forEachName(rotation,function(name){_config.units[name]="deg";_rotationalProperties[name]=1});_propertyAliases[all[13]]=positionAndScale+","+rotation;_forEachName(aliases,function(name){var split=name.split(":");_propertyAliases[split[1]]=all[split[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(name){_config.units[name]="px"});gsap2.registerPlugin(CSSPlugin);var gsapWithCSS=gsap2.registerPlugin(CSSPlugin)||gsap2,TweenMaxWithCSS=gsapWithCSS.core.Tween;exports2.Back=Back;exports2.Bounce=Bounce;exports2.CSSPlugin=CSSPlugin;exports2.Circ=Circ;exports2.Cubic=Cubic;exports2.Elastic=Elastic;exports2.Expo=Expo;exports2.Linear=Linear;exports2.Power0=Power0;exports2.Power1=Power1;exports2.Power2=Power2;exports2.Power3=Power3;exports2.Power4=Power4;exports2.Quad=Quad;exports2.Quart=Quart;exports2.Quint=Quint;exports2.Sine=Sine;exports2.SteppedEase=SteppedEase;exports2.Strong=Strong;exports2.TimelineLite=Timeline;exports2.TimelineMax=Timeline;exports2.TweenLite=Tween;exports2.TweenMax=TweenMaxWithCSS;exports2.default=gsapWithCSS;exports2.gsap=gsapWithCSS;if(typeof window==="undefined"||window!==exports2){Object.defineProperty(exports2,"__esModule",{value:true})}else{delete window.default}}));;(function(global2,factory18){typeof exports==="object"&&typeof module!=="undefined"?factory18(exports):typeof define==="function"&&define.amd?define(["exports"],factory18):(global2=global2||self,factory18(global2.window=global2.window||{}))})(this,(function(exports2){"use strict";/*!
|
|
473
|
+
* ScrollToPlugin 3.15.0
|
|
474
|
+
* https://gsap.com
|
|
475
|
+
*
|
|
476
|
+
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
477
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
478
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
479
|
+
*/var gsap2,_coreInitted,_window,_docEl,_body,_toArray,_config,ScrollTrigger,_windowExists=function _windowExists2(){return typeof window!=="undefined"},_getGSAP=function _getGSAP2(){return gsap2||_windowExists()&&(gsap2=window.gsap)&&gsap2.registerPlugin&&gsap2},_isString=function _isString2(value){return typeof value==="string"},_isFunction=function _isFunction2(value){return typeof value==="function"},_max=function _max2(element,axis){var dim=axis==="x"?"Width":"Height",scroll="scroll"+dim,client="client"+dim;return element===_window||element===_docEl||element===_body?Math.max(_docEl[scroll],_body[scroll])-(_window["inner"+dim]||_docEl[client]||_body[client]):element[scroll]-element["offset"+dim]},_buildGetter=function _buildGetter2(e2,axis){var p="scroll"+(axis==="x"?"Left":"Top");if(e2===_window){if(e2.pageXOffset!=null){p="page"+axis.toUpperCase()+"Offset"}else{e2=_docEl[p]!=null?_docEl:_body}}return function(){return e2[p]}},_clean=function _clean2(value,index2,target,targets){_isFunction(value)&&(value=value(index2,target,targets));if(typeof value!=="object"){return _isString(value)&&value!=="max"&&value.charAt(1)!=="="?{x:value,y:value}:{y:value}}else if(value.nodeType){return{y:value,x:value}}else{var result={},p;for(p in value){result[p]=p!=="onAutoKill"&&_isFunction(value[p])?value[p](index2,target,targets):value[p]}return result}},_getOffset=function _getOffset2(element,container){element=_toArray(element)[0];if(!element||!element.getBoundingClientRect){return console.warn("scrollTo target doesn't exist. Using 0")||{x:0,y:0}}var rect=element.getBoundingClientRect(),isRoot=!container||container===_window||container===_body,cRect=isRoot?{top:_docEl.clientTop-(_window.pageYOffset||_docEl.scrollTop||_body.scrollTop||0),left:_docEl.clientLeft-(_window.pageXOffset||_docEl.scrollLeft||_body.scrollLeft||0)}:container.getBoundingClientRect(),offsets={x:rect.left-cRect.left,y:rect.top-cRect.top};if(!isRoot&&container){offsets.x+=_buildGetter(container,"x")();offsets.y+=_buildGetter(container,"y")()}return offsets},_parseVal=function _parseVal2(value,target,axis,currentVal,offset){return!isNaN(value)&&typeof value!=="object"?parseFloat(value)-offset:_isString(value)&&value.charAt(1)==="="?parseFloat(value.substr(2))*(value.charAt(0)==="-"?-1:1)+currentVal-offset:value==="max"?_max(target,axis)-offset:Math.min(_max(target,axis),_getOffset(value,target)[axis]-offset)},_initCore=function _initCore2(){gsap2=_getGSAP();if(_windowExists()&&gsap2&&typeof document!=="undefined"&&document.body){_window=window;_body=document.body;_docEl=document.documentElement;_toArray=gsap2.utils.toArray;gsap2.config({autoKillThreshold:7});_config=gsap2.config();_coreInitted=1}};var ScrollToPlugin2={version:"3.15.0",name:"scrollTo",rawVars:1,register:function register(core){gsap2=core;_initCore()},init:function init2(target,value,tween,index2,targets){_coreInitted||_initCore();var data2=this,snapType=gsap2.getProperty(target,"scrollSnapType");data2.isWin=target===_window;data2.target=target;data2.tween=tween;value=_clean(value,index2,target,targets);data2.vars=value;data2.autoKill=!!("autoKill"in value?value:_config).autoKill;data2.getX=_buildGetter(target,"x");data2.getY=_buildGetter(target,"y");data2.x=data2.xPrev=data2.getX();data2.y=data2.yPrev=data2.getY();ScrollTrigger||(ScrollTrigger=gsap2.core.globals().ScrollTrigger);gsap2.getProperty(target,"scrollBehavior")==="smooth"&&gsap2.set(target,{scrollBehavior:"auto"});if(snapType&&snapType!=="none"){data2.snap=1;data2.snapInline=target.style.scrollSnapType;target.style.scrollSnapType="none"}if(value.x!=null){data2.add(data2,"x",data2.x,_parseVal(value.x,target,"x",data2.x,value.offsetX||0),index2,targets);data2._props.push("scrollTo_x")}else{data2.skipX=1}if(value.y!=null){data2.add(data2,"y",data2.y,_parseVal(value.y,target,"y",data2.y,value.offsetY||0),index2,targets);data2._props.push("scrollTo_y")}else{data2.skipY=1}},render:function render(ratio,data2){var pt=data2._pt,target=data2.target,tween=data2.tween,autoKill=data2.autoKill,xPrev=data2.xPrev,yPrev=data2.yPrev,isWin=data2.isWin,snap=data2.snap,snapInline=data2.snapInline,x2,y,yDif,xDif,threshold;while(pt){pt.r(ratio,pt.d);pt=pt._next}x2=isWin||!data2.skipX?data2.getX():xPrev;y=isWin||!data2.skipY?data2.getY():yPrev;yDif=y-yPrev;xDif=x2-xPrev;threshold=_config.autoKillThreshold;if(data2.x<0){data2.x=0}if(data2.y<0){data2.y=0}if(autoKill){if(!data2.skipX&&(xDif>threshold||xDif<-threshold)&&x2<_max(target,"x")){data2.skipX=1}if(!data2.skipY&&(yDif>threshold||yDif<-threshold)&&y<_max(target,"y")){data2.skipY=1}if(data2.skipX&&data2.skipY){tween.kill();data2.vars.onAutoKill&&data2.vars.onAutoKill.apply(tween,data2.vars.onAutoKillParams||[])}}if(isWin){_window.scrollTo(!data2.skipX?data2.x:x2,!data2.skipY?data2.y:y)}else{data2.skipY||(target.scrollTop=data2.y);data2.skipX||(target.scrollLeft=data2.x)}if(snap&&(ratio===1||ratio===0)){y=target.scrollTop;x2=target.scrollLeft;snapInline?target.style.scrollSnapType=snapInline:target.style.removeProperty("scroll-snap-type");target.scrollTop=y+1;target.scrollLeft=x2+1;target.scrollTop=y;target.scrollLeft=x2}data2.xPrev=data2.x;data2.yPrev=data2.y;ScrollTrigger&&ScrollTrigger.update()},kill:function kill(property){var both=property==="scrollTo",i2=this._props.indexOf(property);if(both||property==="scrollTo_x"){this.skipX=1}if(both||property==="scrollTo_y"){this.skipY=1}i2>-1&&this._props.splice(i2,1);return!this._props.length}};ScrollToPlugin2.max=_max;ScrollToPlugin2.getOffset=_getOffset;ScrollToPlugin2.buildGetter=_buildGetter;ScrollToPlugin2.config=function(vars2){_config||_initCore()||(_config=gsap2.config());for(var p in vars2){_config[p]=vars2[p]}};_getGSAP()&&gsap2.registerPlugin(ScrollToPlugin2);exports2.ScrollToPlugin=ScrollToPlugin2;exports2.default=ScrollToPlugin2;Object.defineProperty(exports2,"__esModule",{value:true})}));;gsap.registerPlugin(ScrollToPlugin);;(function(root,factory18){if(typeof define==="function"&&define.amd){define(["jquery"],function($2){return root.returnExportsGlobal=factory18($2)})}else if(typeof exports==="object"){module.exports=factory18(require("jquery"))}else{factory18(jQuery)}})(this,function($2){"use strict";var EditableCaret,InputCaret,Mirror,Utils,discoveryIframeOf,methods,oDocument,oFrame,oWindow,pluginName,setContextBy;pluginName="caret";EditableCaret=(function(){function EditableCaret2($inputor){this.$inputor=$inputor;this.domInputor=this.$inputor[0]}EditableCaret2.prototype.setPos=function(pos){var fn2,found,offset,sel;if(sel=oWindow.getSelection()){offset=0;found=false;(fn2=function(pos2,parent2){var node,range,_i,_len,_ref,_results;_ref=parent2.childNodes;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];if(found){break}if(node.nodeType===3){if(offset+node.length>=pos2){found=true;range=oDocument.createRange();range.setStart(node,pos2-offset);sel.removeAllRanges();sel.addRange(range);break}else{_results.push(offset+=node.length)}}else{_results.push(fn2(pos2,node))}}return _results})(pos,this.domInputor)}return this.domInputor};EditableCaret2.prototype.getIEPosition=function(){return this.getPosition()};EditableCaret2.prototype.getPosition=function(){var inputor_offset,offset;offset=this.getOffset();inputor_offset=this.$inputor.offset();offset.left-=inputor_offset.left;offset.top-=inputor_offset.top;return offset};EditableCaret2.prototype.getOldIEPos=function(){var preCaretTextRange,textRange;textRange=oDocument.selection.createRange();preCaretTextRange=oDocument.body.createTextRange();preCaretTextRange.moveToElementText(this.domInputor);preCaretTextRange.setEndPoint("EndToEnd",textRange);return preCaretTextRange.text.length};EditableCaret2.prototype.getPos=function(){var clonedRange,pos,range;if(range=this.range()){clonedRange=range.cloneRange();clonedRange.selectNodeContents(this.domInputor);clonedRange.setEnd(range.endContainer,range.endOffset);pos=clonedRange.toString().length;clonedRange.detach();return pos}else if(oDocument.selection){return this.getOldIEPos()}};EditableCaret2.prototype.getOldIEOffset=function(){var range,rect;range=oDocument.selection.createRange().duplicate();range.moveStart("character",-1);rect=range.getBoundingClientRect();return{height:rect.bottom-rect.top,left:rect.left,top:rect.top}};EditableCaret2.prototype.getOffset=function(pos){var clonedRange,offset,range,rect,shadowCaret;if(oWindow.getSelection&&(range=this.range())){if(range.endOffset-1>0&&range.endContainer!==this.domInputor){clonedRange=range.cloneRange();clonedRange.setStart(range.endContainer,range.endOffset-1);clonedRange.setEnd(range.endContainer,range.endOffset);rect=clonedRange.getBoundingClientRect();offset={height:rect.height,left:rect.left+rect.width,top:rect.top};clonedRange.detach()}if(!offset||(offset!=null?offset.height:void 0)===0){clonedRange=range.cloneRange();shadowCaret=$2(oDocument.createTextNode("|"));clonedRange.insertNode(shadowCaret[0]);clonedRange.selectNode(shadowCaret[0]);rect=clonedRange.getBoundingClientRect();offset={height:rect.height,left:rect.left,top:rect.top};shadowCaret.remove();clonedRange.detach()}}else if(oDocument.selection){offset=this.getOldIEOffset()}if(offset){offset.top+=$2(oWindow).scrollTop();offset.left+=$2(oWindow).scrollLeft()}return offset};EditableCaret2.prototype.range=function(){var sel;if(!oWindow.getSelection){return}sel=oWindow.getSelection();if(sel.rangeCount>0){return sel.getRangeAt(0)}else{return null}};return EditableCaret2})();InputCaret=(function(){function InputCaret2($inputor){this.$inputor=$inputor;this.domInputor=this.$inputor[0]}InputCaret2.prototype.getIEPos=function(){var endRange,inputor,len,normalizedValue,pos,range,textInputRange;inputor=this.domInputor;range=oDocument.selection.createRange();pos=0;if(range&&range.parentElement()===inputor){normalizedValue=inputor.value.replace(/\r\n/g,"\n");len=normalizedValue.length;textInputRange=inputor.createTextRange();textInputRange.moveToBookmark(range.getBookmark());endRange=inputor.createTextRange();endRange.collapse(false);if(textInputRange.compareEndPoints("StartToEnd",endRange)>-1){pos=len}else{pos=-textInputRange.moveStart("character",-len)}}return pos};InputCaret2.prototype.getPos=function(){if(oDocument.selection){return this.getIEPos()}else{return this.domInputor.selectionStart}};InputCaret2.prototype.setPos=function(pos){var inputor,range;inputor=this.domInputor;if(oDocument.selection){range=inputor.createTextRange();range.move("character",pos);range.select()}else if(inputor.setSelectionRange){inputor.setSelectionRange(pos,pos)}return inputor};InputCaret2.prototype.getIEOffset=function(pos){var h,textRange,x2,y;textRange=this.domInputor.createTextRange();pos||(pos=this.getPos());textRange.move("character",pos);x2=textRange.boundingLeft;y=textRange.boundingTop;h=textRange.boundingHeight;return{left:x2,top:y,height:h}};InputCaret2.prototype.getOffset=function(pos){var $inputor,offset,position;$inputor=this.$inputor;if(oDocument.selection){offset=this.getIEOffset(pos);offset.top+=$2(oWindow).scrollTop()+$inputor.scrollTop();offset.left+=$2(oWindow).scrollLeft()+$inputor.scrollLeft();return offset}else{offset=$inputor.offset();position=this.getPosition(pos);return offset={left:offset.left+position.left-$inputor.scrollLeft(),top:offset.top+position.top-$inputor.scrollTop(),height:position.height}}};InputCaret2.prototype.getPosition=function(pos){var $inputor,at_rect,end_range,format,html,mirror,start_range;$inputor=this.$inputor;format=function(value){value=value.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>");if(/firefox/i.test(navigator.userAgent)){value=value.replace(/\s/g," ")}return value};if(pos===void 0){pos=this.getPos()}start_range=$inputor.val().slice(0,pos);end_range=$inputor.val().slice(pos);html="<span style='position: relative; display: inline;'>"+format(start_range)+"</span>";html+="<span id='caret' style='position: relative; display: inline;'>|</span>";html+="<span style='position: relative; display: inline;'>"+format(end_range)+"</span>";mirror=new Mirror($inputor);return at_rect=mirror.create(html).rect()};InputCaret2.prototype.getIEPosition=function(pos){var h,inputorOffset,offset,x2,y;offset=this.getIEOffset(pos);inputorOffset=this.$inputor.offset();x2=offset.left-inputorOffset.left;y=offset.top-inputorOffset.top;h=offset.height;return{left:x2,top:y,height:h}};return InputCaret2})();Mirror=(function(){Mirror2.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"];function Mirror2($inputor){this.$inputor=$inputor}Mirror2.prototype.mirrorCss=function(){var css,_this=this;css={position:"absolute",left:-9999,top:0,zIndex:-2e4};if(this.$inputor.prop("tagName")==="TEXTAREA"){this.css_attr.push("width")}$2.each(this.css_attr,function(i2,p){return css[p]=_this.$inputor.css(p)});return css};Mirror2.prototype.create=function(html){this.$mirror=$2("<div></div>");this.$mirror.css(this.mirrorCss());this.$mirror.html(html);this.$inputor.after(this.$mirror);return this};Mirror2.prototype.rect=function(){var $flag,pos,rect;$flag=this.$mirror.find("#caret");pos=$flag.position();rect={left:pos.left,top:pos.top,height:$flag.height()};this.$mirror.remove();return rect};return Mirror2})();Utils={contentEditable:function($inputor){return!!($inputor[0].contentEditable&&$inputor[0].contentEditable==="true")}};methods={pos:function(pos){if(pos||pos===0){return this.setPos(pos)}else{return this.getPos()}},position:function(pos){if(oDocument.selection){return this.getIEPosition(pos)}else{return this.getPosition(pos)}},offset:function(pos){var offset;offset=this.getOffset(pos);return offset}};oDocument=null;oWindow=null;oFrame=null;setContextBy=function(settings2){var iframe;if(iframe=settings2!=null?settings2.iframe:void 0){oFrame=iframe;oWindow=iframe.contentWindow;return oDocument=iframe.contentDocument||oWindow.document}else{oFrame=void 0;oWindow=window;return oDocument=document}};discoveryIframeOf=function($dom){var error;oDocument=$dom[0].ownerDocument;oWindow=oDocument.defaultView||oDocument.parentWindow;try{return oFrame=oWindow.frameElement}catch(_error){error=_error}};$2.fn.caret=function(method,value,settings2){var caret;if(methods[method]){if($2.isPlainObject(value)){setContextBy(value);value=void 0}else{setContextBy(settings2)}caret=Utils.contentEditable(this)?new EditableCaret(this):new InputCaret(this);return methods[method].apply(caret,[value])}else{return $2.error("Method "+method+" does not exist on jQuery.caret")}};$2.fn.caret.EditableCaret=EditableCaret;$2.fn.caret.InputCaret=InputCaret;$2.fn.caret.Utils=Utils;$2.fn.caret.apis=methods});;(function($2){$2.fn.tagEditorInput=function(){var t2=" ",e2=$2(this),n2=parseInt(e2.css("fontSize")),i2=$2("<span/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:e2.css("fontSize"),fontFamily:e2.css("fontFamily"),fontWeight:e2.css("fontWeight"),letterSpacing:e2.css("letterSpacing"),whiteSpace:"nowrap"}),s=function(){if(t2!==(t2=e2.val())){i2.text(t2);var s2=i2.width()+n2;20>s2&&(s2=20),s2!=e2.width()&&e2.width(s2)}};return i2.insertAfter(e2),e2.bind("keyup keydown focus",s)};$2.fn.tagEditor=function(options,val2,blur){function escape(tag){return tag.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var blur_result,o=$2.extend({},$2.fn.tagEditor.defaults,options),selector2=this;o.dregex=new RegExp("["+o.delimiter.replace("-","-")+"]","g");if(typeof options=="string"){var response=[];selector2.each(function(){var el2=$2(this),o2=el2.data("options"),ed=el2.next(".tag-editor");if(options=="getTags")response.push({field:el2[0],editor:ed,tags:ed.data("tags")});else if(options=="addTag"){if(o2.maxTags&&ed.data("tags").length>=o2.maxTags)return false;$2('<li><div class="tag-editor-spacer"> '+o2.delimiter[0]+'</div><div class="tag-editor-tag"></div><div class="tag-editor-delete"><i></i></div></li>').appendTo(ed).find(".tag-editor-tag").html('<input type="text" maxlength="'+o2.maxLength+'">').addClass("active").find("input").val(val2).blur();if(!blur)ed.click();else $2(".placeholder",ed).remove()}else if(options=="removeTag"){$2(".tag-editor-tag",ed).filter(function(){return $2(this).text()==val2}).closest("li").find(".tag-editor-delete").click();if(!blur)ed.click()}else if(options=="destroy"){el2.removeClass("tag-editor-hidden-src").removeData("options").off("focus.tag-editor").next(".tag-editor").remove()}});return options=="getTags"?response:this}if(window.getSelection)$2(document).off("keydown.tag-editor").on("keydown.tag-editor",function(e2){if(e2.which==8||e2.which==46||e2.ctrlKey&&e2.which==88){try{var sel=getSelection(),el2=document.activeElement.tagName!="INPUT"?$2(sel.getRangeAt(0).startContainer.parentNode).closest(".tag-editor"):0}catch(e3){el2=0}if(sel.rangeCount>0&&el2&&el2.length){var tags=[],splits=sel.toString().split(el2.prev().data("options").dregex);for(i=0;i<splits.length;i++){var tag=$2.trim(splits[i]);if(tag)tags.push(tag)}$2(".tag-editor-tag",el2).each(function(){if(~$2.inArray($2(this).text(),tags))$2(this).closest("li").find(".tag-editor-delete").click()});return false}}});return selector2.each(function(){var el2=$2(this),tag_list=[];var ed=$2("<ul "+(o.clickDelete?'oncontextmenu="return false;" ':"")+'class="tag-editor"></ul>').insertAfter(el2);el2.addClass("tag-editor-hidden-src").data("options",o).on("focus.tag-editor",function(){ed.click()});ed.append('<li style="width:1px"> </li>');var new_tag='<li><div class="tag-editor-spacer"> '+o.delimiter[0]+'</div><div class="tag-editor-tag"></div><div class="tag-editor-delete"><i></i></div></li>';function set_placeholder(){if(o.placeholder&&!tag_list.length&&!$2(".deleted, .placeholder, input",ed).length)ed.append('<li class="placeholder"><div>'+o.placeholder+"</div></li>")}function update_globals(init2){var old_tags=tag_list.toString();tag_list=$2(".tag-editor-tag:not(.deleted)",ed).map(function(i3,e2){var val3=$2.trim($2(this).hasClass("active")?$2(this).find("input").val():$2(e2).text());if(val3)return val3}).get();ed.data("tags",tag_list);el2.val(tag_list.join(o.delimiter[0]));if(!init2){if(old_tags!=tag_list.toString())o.onChange(el2,ed,tag_list)}set_placeholder()}ed.click(function(e2,closest_tag){var d,dist=99999,loc;if(window.getSelection&&getSelection()!="")return;if(o.maxTags&&ed.data("tags").length>=o.maxTags){ed.find("input").blur();return false}blur_result=true;$2("input:focus",ed).blur();if(!blur_result)return false;blur_result=true;$2(".placeholder",ed).remove();if(closest_tag&&closest_tag.length)loc="before";else{$2(".tag-editor-tag",ed).each(function(){var tag2=$2(this),to=tag2.offset(),tag_x=to.left,tag_y=to.top;if(e2.pageY>=tag_y&&e2.pageY<=tag_y+tag2.height()){if(e2.pageX<tag_x)loc="before",d=tag_x-e2.pageX;else loc="after",d=e2.pageX-tag_x-tag2.width();if(d<dist)dist=d,closest_tag=tag2}})}if(loc=="before"){$2(new_tag).insertBefore(closest_tag.closest("li")).find(".tag-editor-tag").click()}else if(loc=="after")$2(new_tag).insertAfter(closest_tag.closest("li")).find(".tag-editor-tag").click();else $2(new_tag).appendTo(ed).find(".tag-editor-tag").click();return false});ed.on("click",".tag-editor-delete",function(e2){if($2(this).prev().hasClass("active")){$2(this).closest("li").find("input").caret(-1);return false}var li=$2(this).closest("li"),tag2=li.find(".tag-editor-tag");if(o.beforeTagDelete(el2,ed,tag_list,tag2.text())===false)return false;tag2.addClass("deleted").animate({width:0},o.animateDelete,function(){li.remove();set_placeholder()});update_globals();return false});if(o.clickDelete)ed.on("mousedown",".tag-editor-tag",function(e2){if(e2.ctrlKey||e2.which>1){var li=$2(this).closest("li"),tag2=li.find(".tag-editor-tag");if(o.beforeTagDelete(el2,ed,tag_list,tag2.text())===false)return false;tag2.addClass("deleted").animate({width:0},o.animateDelete,function(){li.remove();set_placeholder()});update_globals();return false}});ed.on("click",".tag-editor-tag",function(e2){if(o.clickDelete&&(e2.ctrlKey||e2.which>1))return false;if(!$2(this).hasClass("active")){var tag2=$2(this).text();var left_percent=Math.abs(($2(this).offset().left-e2.pageX)/$2(this).width()),caret_pos=parseInt(tag2.length*left_percent),input=$2(this).html('<input type="text" maxlength="'+o.maxLength+'" value="'+escape(tag2)+'">').addClass("active").find("input");input.data("old_tag",tag2).tagEditorInput().focus().caret(caret_pos);if(o.autocomplete){var aco=$2.extend({},o.autocomplete);var ac_select="select"in aco?o.autocomplete.select:"";aco.select=function(e3,ui){if(ac_select)ac_select(e3,ui);setTimeout(function(){ed.trigger("click",[$2(".active",ed).find("input").closest("li").next("li").find(".tag-editor-tag")])},20)};input.autocomplete(aco)}}return false});function split_cleanup(input){var li=input.closest("li"),sub_tags=input.val().replace(/ +/," ").split(o.dregex),old_tag=input.data("old_tag"),old_tags=tag_list.slice(0),exceeded=false,cb_val2;for(var i3=0;i3<sub_tags.length;i3++){tag=$2.trim(sub_tags[i3]).slice(0,o.maxLength);if(o.forceLowercase)tag=tag.toLowerCase();cb_val2=o.beforeTagSave(el2,ed,old_tags,old_tag,tag);tag=cb_val2||tag;if(cb_val2===false||!tag)continue;if(o.removeDuplicates&&~$2.inArray(tag,old_tags))$2(".tag-editor-tag",ed).each(function(){if($2(this).text()==tag)$2(this).closest("li").remove()});old_tags.push(tag);li.before('<li><div class="tag-editor-spacer"> '+o.delimiter[0]+'</div><div class="tag-editor-tag">'+escape(tag)+'</div><div class="tag-editor-delete"><i></i></div></li>');if(o.maxTags&&old_tags.length>=o.maxTags){exceeded=true;break}}input.attr("maxlength",o.maxLength).removeData("old_tag").val("");if(exceeded)input.blur();else input.focus();update_globals()}ed.on("blur","input",function(e2){e2.stopPropagation();var input=$2(this),old_tag=input.data("old_tag"),tag2=$2.trim(input.val().replace(/ +/," ").replace(o.dregex,o.delimiter[0]));if(!tag2){if(old_tag&&o.beforeTagDelete(el2,ed,tag_list,old_tag)===false){input.val(old_tag).focus();blur_result=false;update_globals();return}try{input.closest("li").remove()}catch(e3){}if(old_tag)update_globals()}else if(tag2.indexOf(o.delimiter[0])>=0){split_cleanup(input);return}else if(tag2!=old_tag){if(o.forceLowercase)tag2=tag2.toLowerCase();cb_val=o.beforeTagSave(el2,ed,tag_list,old_tag,tag2);tag2=cb_val||tag2;if(cb_val===false){if(old_tag){input.val(old_tag).focus();blur_result=false;update_globals();return}try{input.closest("li").remove()}catch(e3){}if(old_tag)update_globals()}else if(o.removeDuplicates)$2(".tag-editor-tag:not(.active)",ed).each(function(){if($2(this).text()==tag2)$2(this).closest("li").remove()})}input.parent().html(escape(tag2)).removeClass("active");if(tag2!=old_tag)update_globals();set_placeholder()});var pasted_content;ed.on("paste","input",function(e2){$2(this).removeAttr("maxlength");pasted_content=$2(this);setTimeout(function(){split_cleanup(pasted_content)},30)});var inp;ed.on("keypress","input",function(e2){if(o.delimiter.indexOf(String.fromCharCode(e2.which))>=0){inp=$2(this);setTimeout(function(){split_cleanup(inp)},20)}});ed.on("keydown","input",function(e2){var $t=$2(this);if((e2.which==37||!o.autocomplete&&e2.which==38)&&!$t.caret()||e2.which==8&&!$t.val()){var prev_tag=$t.closest("li").prev("li").find(".tag-editor-tag");if(prev_tag.length)prev_tag.click().find("input").caret(-1);else if($t.val()&&!(o.maxTags&&ed.data("tags").length>=o.maxTags))$2(new_tag).insertBefore($t.closest("li")).find(".tag-editor-tag").click();return false}else if((e2.which==39||!o.autocomplete&&e2.which==40)&&$t.caret()==$t.val().length){var next_tag=$t.closest("li").next("li").find(".tag-editor-tag");if(next_tag.length)next_tag.click().find("input").caret(0);else if($t.val())ed.click();return false}else if(e2.which==9){if(e2.shiftKey){var prev_tag=$t.closest("li").prev("li").find(".tag-editor-tag");if(prev_tag.length)prev_tag.click().find("input").caret(0);else if($t.val()&&!(o.maxTags&&ed.data("tags").length>=o.maxTags))$2(new_tag).insertBefore($t.closest("li")).find(".tag-editor-tag").click();else{el2.attr("disabled","disabled");setTimeout(function(){el2.removeAttr("disabled")},30);return}return false}else{var next_tag=$t.closest("li").next("li").find(".tag-editor-tag");if(next_tag.length)next_tag.click().find("input").caret(0);else if($t.val())ed.click();else return;return false}}else if(e2.which==46&&(!$2.trim($t.val())||$t.caret()==$t.val().length)){var next_tag=$t.closest("li").next("li").find(".tag-editor-tag");if(next_tag.length)next_tag.click().find("input").caret(0);else if($t.val())ed.click();return false}else if(e2.which==13){ed.trigger("click",[$t.closest("li").next("li").find(".tag-editor-tag")]);if(o.maxTags&&ed.data("tags").length>=o.maxTags)ed.find("input").blur();return false}else if(e2.which==36&&!$t.caret())ed.find(".tag-editor-tag").first().click();else if(e2.which==35&&$t.caret()==$t.val().length)ed.find(".tag-editor-tag").last().click();else if(e2.which==27){$t.val($t.data("old_tag")?$t.data("old_tag"):"").blur();return false}});var tags=o.initialTags.length?o.initialTags:el2.val().split(o.dregex);for(var i2=0;i2<tags.length;i2++){if(o.maxTags&&i2>=o.maxTags)break;var tag=$2.trim(tags[i2].replace(/ +/," "));if(tag){if(o.forceLowercase)tag=tag.toLowerCase();tag_list.push(tag);ed.append('<li><div class="tag-editor-spacer"> '+o.delimiter[0]+'</div><div class="tag-editor-tag">'+escape(tag)+'</div><div class="tag-editor-delete"><i></i></div></li>')}}update_globals(true);if(o.sortable&&$2.fn.sortable)ed.sortable({distance:5,cancel:".tag-editor-spacer, input",helper:"clone",update:function(){update_globals()}})})};$2.fn.tagEditor.defaults={initialTags:[],maxTags:0,maxLength:50,delimiter:",;",placeholder:"",forceLowercase:true,removeDuplicates:true,clickDelete:false,animateDelete:175,sortable:true,autocomplete:null,onChange:function(){},beforeTagSave:function(){},beforeTagDelete:function(){}}})(jQuery);;/*!
|
|
480
|
+
* jQuery Form Plugin
|
|
481
|
+
* version: 4.3.0
|
|
482
|
+
* Requires jQuery v1.7.2 or later
|
|
483
|
+
* Project repository: https://github.com/jquery-form/form
|
|
484
|
+
|
|
485
|
+
* Copyright 2017 Kevin Morris
|
|
486
|
+
* Copyright 2006 M. Alsup
|
|
487
|
+
|
|
488
|
+
* Dual licensed under the LGPL-2.1+ or MIT licenses
|
|
489
|
+
* https://github.com/jquery-form/form#license
|
|
490
|
+
|
|
491
|
+
* This library is free software; you can redistribute it and/or
|
|
492
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
493
|
+
* License as published by the Free Software Foundation; either
|
|
494
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
495
|
+
* This library is distributed in the hope that it will be useful,
|
|
496
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
497
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
498
|
+
* Lesser General Public License for more details.
|
|
499
|
+
*/(function(factory18){if(typeof define==="function"&&define.amd){define(["jquery"],factory18)}else if(typeof module==="object"&&module.exports){module.exports=function(root,jQuery2){if(typeof jQuery2==="undefined"){if(typeof window!=="undefined"){jQuery2=require("jquery")}else{jQuery2=require("jquery")(root)}}factory18(jQuery2);return jQuery2}}else{factory18(jQuery)}})(function($2){"use strict";var rCRLF=/\r?\n/g;var feature={};feature.fileapi=$2('<input type="file">').get(0).files!==void 0;feature.formdata=typeof window.FormData!=="undefined";var hasProp=!!$2.fn.prop;$2.fn.attr2=function(){if(!hasProp){return this.attr.apply(this,arguments)}var val2=this.prop.apply(this,arguments);if(val2&&val2.jquery||typeof val2==="string"){return val2}return this.attr.apply(this,arguments)};$2.fn.ajaxSubmit=function(options,data2,dataType,onSuccess){if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this}var method,action,url,isMsie,iframeSrc,$form=this;if(typeof options==="function"){options={success:options}}else if(typeof options==="string"||options===false&&arguments.length>0){options={"url":options,"data":data2,"dataType":dataType};if(typeof onSuccess==="function"){options.success=onSuccess}}else if(typeof options==="undefined"){options={}}method=options.method||options.type||this.attr2("method");action=options.url||this.attr2("action");url=typeof action==="string"?$2.trim(action):"";url=url||window.location.href||"";if(url){url=(url.match(/^([^#]+)/)||[])[1]}isMsie=/(MSIE|Trident)/.test(navigator.userAgent||"");iframeSrc=isMsie&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank";options=$2.extend(true,{url,success:$2.ajaxSettings.success,type:method||$2.ajaxSettings.type,iframeSrc},options);var veto={};this.trigger("form-pre-serialize",[this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var traditional=options.traditional;if(typeof traditional==="undefined"){traditional=$2.ajaxSettings.traditional}var elements=[];var qx,a=this.formToArray(options.semantic,elements,options.filtering);if(options.data){var optionsData=$2.isFunction(options.data)?options.data(a):options.data;options.extraData=optionsData;qx=$2.param(optionsData,traditional)}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[a,this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var q=$2.param(a,traditional);if(qx){q=q?q+"&"+qx:qx}if(options.type.toUpperCase()==="GET"){options.url+=(options.url.indexOf("?")>=0?"&":"?")+q;options.data=null}else{options.data=q}var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm()})}if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden)})}if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data3,textStatus,jqXHR){var successArguments=arguments,fn2=options.replaceTarget?"replaceWith":"html";$2(options.target)[fn2](data3).each(function(){oldSuccess.apply(this,successArguments)})})}else if(options.success){if($2.isArray(options.success)){$2.merge(callbacks,options.success)}else{callbacks.push(options.success)}}options.success=function(data3,status,xhr){var context=options.context||this;for(var i2=0,max=callbacks.length;i2<max;i2++){callbacks[i2].apply(context,[data3,status,xhr||$form,$form])}};if(options.error){var oldError=options.error;options.error=function(xhr,status,error){var context=options.context||this;oldError.apply(context,[xhr,status,error,$form])}}if(options.complete){var oldComplete=options.complete;options.complete=function(xhr,status){var context=options.context||this;oldComplete.apply(context,[xhr,status,$form])}}var fileInputs=$2("input[type=file]:enabled",this).filter(function(){return $2(this).val()!==""});var hasFileInputs=fileInputs.length>0;var mp="multipart/form-data";var multipart=$form.attr("enctype")===mp||$form.attr("encoding")===mp;var fileAPI=feature.fileapi&&feature.formdata;log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;var jqxhr;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$2.get(options.closeKeepAlive,function(){jqxhr=fileUploadIframe(a)})}else{jqxhr=fileUploadIframe(a)}}else if((hasFileInputs||multipart)&&fileAPI){jqxhr=fileUploadXhr(a)}else{jqxhr=$2.ajax(options)}$form.removeData("jqxhr").data("jqxhr",jqxhr);for(var k=0;k<elements.length;k++){elements[k]=null}this.trigger("form-submit-notify",[this,options]);return this;function deepSerialize(extraData){var serialized=$2.param(extraData,options.traditional).split("&");var len=serialized.length;var result=[];var i2,part;for(i2=0;i2<len;i2++){serialized[i2]=serialized[i2].replace(/\+/g," ");part=serialized[i2].split("=");result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])])}return result}function fileUploadXhr(a2){var formdata=new FormData;for(var i2=0;i2<a2.length;i2++){formdata.append(a2[i2].name,a2[i2].value)}if(options.extraData){var serializedData=deepSerialize(options.extraData);for(i2=0;i2<serializedData.length;i2++){if(serializedData[i2]){formdata.append(serializedData[i2][0],serializedData[i2][1])}}}options.data=null;var s=$2.extend(true,{},$2.ajaxSettings,options,{contentType:false,processData:false,cache:false,type:method||"POST"});if(options.uploadProgress){s.xhr=function(){var xhr=$2.ajaxSettings.xhr();if(xhr.upload){xhr.upload.addEventListener("progress",function(event){var percent=0;var position=event.loaded||event.position;var total=event.total;if(event.lengthComputable){percent=Math.ceil(position/total*100)}options.uploadProgress(event,position,total,percent)},false)}return xhr}}s.data=null;var beforeSend=s.beforeSend;s.beforeSend=function(xhr,o){if(options.formData){o.data=options.formData}else{o.data=formdata}if(beforeSend){beforeSend.call(this,xhr,o)}};return $2.ajax(s)}function fileUploadIframe(a2){var form=$form[0],el2,i2,s,g,id2,$io,io,xhr,sub,n2,timedOut,timeoutHandle;var deferred=$2.Deferred();deferred.abort=function(status){xhr.abort(status)};if(a2){for(i2=0;i2<elements.length;i2++){el2=$2(elements[i2]);if(hasProp){el2.prop("disabled",false)}else{el2.removeAttr("disabled")}}}s=$2.extend(true,{},$2.ajaxSettings,options);s.context=s.context||s;id2="jqFormIO"+new Date().getTime();var ownerDocument=form.ownerDocument;var $body=$form.closest("body");if(s.iframeTarget){$io=$2(s.iframeTarget,ownerDocument);n2=$io.attr2("name");if(!n2){$io.attr2("name",id2)}else{id2=n2}}else{$io=$2('<iframe name="'+id2+'" src="'+s.iframeSrc+'" />',ownerDocument);$io.css({position:"absolute",top:"-1000px",left:"-1000px"})}io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e2=status==="timeout"?"timeout":"aborted";log("aborting upload... "+e2);this.aborted=1;try{if(io.contentWindow.document.execCommand){io.contentWindow.document.execCommand("Stop")}}catch(ignore){}$io.attr("src",s.iframeSrc);xhr.error=e2;if(s.error){s.error.call(s.context,xhr,e2,status)}if(g){$2.event.trigger("ajaxError",[xhr,s,e2])}if(s.complete){s.complete.call(s.context,xhr,e2)}}};g=s.global;if(g&&$2.active++===0){$2.event.trigger("ajaxStart")}if(g){$2.event.trigger("ajaxSend",[xhr,s])}if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$2.active--}deferred.reject();return deferred}if(xhr.aborted){deferred.reject();return deferred}sub=form.clk;if(sub){n2=sub.name;if(n2&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n2]=sub.value;if(sub.type==="image"){s.extraData[n2+".x"]=form.clk_x;s.extraData[n2+".y"]=form.clk_y}}}var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc3=null;try{if(frame.contentWindow){doc3=frame.contentWindow.document}}catch(err){log("cannot get iframe.contentWindow document: "+err)}if(doc3){return doc3}try{doc3=frame.contentDocument?frame.contentDocument:frame.document}catch(err){log("cannot get iframe.contentDocument: "+err);doc3=frame.document}return doc3}var csrf_token=$2("meta[name=csrf-token]").attr("content");var csrf_param=$2("meta[name=csrf-param]").attr("content");if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token}function doSubmit(){var t2=$form.attr2("target"),a3=$form.attr2("action"),mp2="multipart/form-data",et=$form.attr("enctype")||$form.attr("encoding")||mp2;form.setAttribute("target",id2);if(!method||/post/i.test(method)){form.setAttribute("method","POST")}if(a3!==s.url){form.setAttribute("action",s.url)}if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb2(CLIENT_TIMEOUT_ABORT)},s.timeout)}function checkState(){try{var state=getDoc(io).readyState;log("state = "+state);if(state&&state.toLowerCase()==="uninitialized"){setTimeout(checkState,50)}}catch(e2){log("Server abort: ",e2," (",e2.name,")");cb2(SERVER_ABORT);if(timeoutHandle){clearTimeout(timeoutHandle)}timeoutHandle=void 0}}var extraInputs=[];try{if(s.extraData){for(var n3 in s.extraData){if(s.extraData.hasOwnProperty(n3)){if($2.isPlainObject(s.extraData[n3])&&s.extraData[n3].hasOwnProperty("name")&&s.extraData[n3].hasOwnProperty("value")){extraInputs.push($2('<input type="hidden" name="'+s.extraData[n3].name+'">',ownerDocument).val(s.extraData[n3].value).appendTo(form)[0])}else{extraInputs.push($2('<input type="hidden" name="'+n3+'">',ownerDocument).val(s.extraData[n3]).appendTo(form)[0])}}}}if(!s.iframeTarget){$io.appendTo($body)}if(io.attachEvent){io.attachEvent("onload",cb2)}else{io.addEventListener("load",cb2,false)}setTimeout(checkState,15);try{form.submit()}catch(err){var submitFn=document.createElement("form").submit;submitFn.apply(form)}}finally{form.setAttribute("action",a3);form.setAttribute("enctype",et);if(t2){form.setAttribute("target",t2)}else{$form.removeAttr("target")}$2(extraInputs).remove()}}if(s.forceSync){doSubmit()}else{setTimeout(doSubmit,10)}var data3,doc2,domCheckCount=50,callbackProcessed;function cb2(e2){if(xhr.aborted||callbackProcessed){return}doc2=getDoc(io);if(!doc2){log("cannot access response document");e2=SERVER_ABORT}if(e2===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort("timeout");deferred.reject(xhr,"timeout");return}if(e2===SERVER_ABORT&&xhr){xhr.abort("server abort");deferred.reject(xhr,"error","server abort");return}if(!doc2||doc2.location.href===s.iframeSrc){if(!timedOut){return}}if(io.detachEvent){io.detachEvent("onload",cb2)}else{io.removeEventListener("load",cb2,false)}var status="success",errMsg;try{if(timedOut){throw"timeout"}var isXml=s.dataType==="xml"||doc2.XMLDocument||$2.isXMLDoc(doc2);log("isXml="+isXml);if(!isXml&&window.opera&&(doc2.body===null||!doc2.body.innerHTML)){if(--domCheckCount){log("requeing onLoad callback, DOM not available");setTimeout(cb2,250);return}}var docRoot=doc2.body?doc2.body:doc2.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc2.XMLDocument?doc2.XMLDocument:doc2;if(isXml){s.dataType="xml"}xhr.getResponseHeader=function(header){var headers={"content-type":s.dataType};return headers[header.toLowerCase()]};if(docRoot){xhr.status=Number(docRoot.getAttribute("status"))||xhr.status;xhr.statusText=docRoot.getAttribute("statusText")||xhr.statusText}var dt=(s.dataType||"").toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc2.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute("status"))||xhr.status;xhr.statusText=ta.getAttribute("statusText")||xhr.statusText}else if(scr){var pre=doc2.getElementsByTagName("pre")[0];var b=doc2.getElementsByTagName("body")[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText}else if(b){xhr.responseText=b.textContent?b.textContent:b.innerText}}}else if(dt==="xml"&&!xhr.responseXML&&xhr.responseText){xhr.responseXML=toXml(xhr.responseText)}try{data3=httpData(xhr,dt,s)}catch(err){status="parsererror";xhr.error=errMsg=err||status}}catch(err){log("error caught: ",err);status="error";xhr.error=errMsg=err||status}if(xhr.aborted){log("upload aborted");status=null}if(xhr.status){status=xhr.status>=200&&xhr.status<300||xhr.status===304?"success":"error"}if(status==="success"){if(s.success){s.success.call(s.context,data3,"success",xhr)}deferred.resolve(xhr.responseText,"success",xhr);if(g){$2.event.trigger("ajaxSuccess",[xhr,s])}}else if(status){if(typeof errMsg==="undefined"){errMsg=xhr.statusText}if(s.error){s.error.call(s.context,xhr,status,errMsg)}deferred.reject(xhr,"error",errMsg);if(g){$2.event.trigger("ajaxError",[xhr,s,errMsg])}}if(g){$2.event.trigger("ajaxComplete",[xhr,s])}if(g&&!--$2.active){$2.event.trigger("ajaxStop")}if(s.complete){s.complete.call(s.context,xhr,status)}callbackProcessed=true;if(s.timeout){clearTimeout(timeoutHandle)}setTimeout(function(){if(!s.iframeTarget){$io.remove()}else{$io.attr("src",s.iframeSrc)}xhr.responseXML=null},100)}var toXml=$2.parseXML||function(s2,doc3){if(window.ActiveXObject){doc3=new ActiveXObject("Microsoft.XMLDOM");doc3.async="false";doc3.loadXML(s2)}else{doc3=new DOMParser().parseFromString(s2,"text/xml")}return doc3&&doc3.documentElement&&doc3.documentElement.nodeName!=="parsererror"?doc3:null};var parseJSON=$2.parseJSON||function(s2){return window["eval"]("("+s2+")")};var httpData=function(xhr2,type2,s2){var ct=xhr2.getResponseHeader("content-type")||"",xml=(type2==="xml"||!type2)&&ct.indexOf("xml")>=0,data4=xml?xhr2.responseXML:xhr2.responseText;if(xml&&data4.documentElement.nodeName==="parsererror"){if($2.error){$2.error("parsererror")}}if(s2&&s2.dataFilter){data4=s2.dataFilter(data4,type2)}if(typeof data4==="string"){if((type2==="json"||!type2)&&ct.indexOf("json")>=0){data4=parseJSON(data4)}else if((type2==="script"||!type2)&&ct.indexOf("javascript")>=0){$2.globalEval(data4)}}return data4};return deferred}};$2.fn.ajaxForm=function(options,data2,dataType,onSuccess){if(typeof options==="string"||options===false&&arguments.length>0){options={"url":options,"data":data2,"dataType":dataType};if(typeof onSuccess==="function"){options.success=onSuccess}}options=options||{};options.delegation=options.delegation&&$2.isFunction($2.fn.on);if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$2.isReady&&o.s){log("DOM not ready, queuing ajaxForm");$2(function(){$2(o.s,o.c).ajaxForm(options)});return this}log("terminating; zero elements found by selector"+($2.isReady?"":" (DOM not ready)"));return this}if(options.delegation){$2(document).off("submit.form-plugin",this.selector,doAjaxSubmit).off("click.form-plugin",this.selector,captureSubmittingElement).on("submit.form-plugin",this.selector,options,doAjaxSubmit).on("click.form-plugin",this.selector,options,captureSubmittingElement);return this}if(options.beforeFormUnbind){options.beforeFormUnbind(this,options)}return this.ajaxFormUnbind().on("submit.form-plugin",options,doAjaxSubmit).on("click.form-plugin",options,captureSubmittingElement)};function doAjaxSubmit(e2){var options=e2.data;if(!e2.isDefaultPrevented()){e2.preventDefault();$2(e2.target).closest("form").ajaxSubmit(options)}}function captureSubmittingElement(e2){var target=e2.target;var $el=$2(target);if(!$el.is("[type=submit],[type=image]")){var t2=$el.closest("[type=submit]");if(t2.length===0){return}target=t2[0]}var form=target.form;form.clk=target;if(target.type==="image"){if(typeof e2.offsetX!=="undefined"){form.clk_x=e2.offsetX;form.clk_y=e2.offsetY}else if(typeof $2.fn.offset==="function"){var offset=$el.offset();form.clk_x=e2.pageX-offset.left;form.clk_y=e2.pageY-offset.top}else{form.clk_x=e2.pageX-target.offsetLeft;form.clk_y=e2.pageY-target.offsetTop}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null},100)}$2.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")};$2.fn.formToArray=function(semantic,elements,filtering){var a=[];if(this.length===0){return a}var form=this[0];var formId=this.attr("id");var els=semantic||typeof form.elements==="undefined"?form.getElementsByTagName("*"):form.elements;var els2;if(els){els=$2.makeArray(els)}if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){els2=$2(':input[form="'+formId+'"]').get();if(els2.length){els=(els||[]).concat(els2)}}if(!els||!els.length){return a}if($2.isFunction(filtering)){els=$2.map(els,filtering)}var i2,j,n2,v,el2,max,jmax;for(i2=0,max=els.length;i2<max;i2++){el2=els[i2];n2=el2.name;if(!n2||el2.disabled){continue}if(semantic&&form.clk&&el2.type==="image"){if(form.clk===el2){a.push({name:n2,value:$2(el2).val(),type:el2.type});a.push({name:n2+".x",value:form.clk_x},{name:n2+".y",value:form.clk_y})}continue}v=$2.fieldValue(el2,true);if(v&&v.constructor===Array){if(elements){elements.push(el2)}for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n2,value:v[j]})}}else if(feature.fileapi&&el2.type==="file"){if(elements){elements.push(el2)}var files=el2.files;if(files.length){for(j=0;j<files.length;j++){a.push({name:n2,value:files[j],type:el2.type})}}else{a.push({name:n2,value:"",type:el2.type})}}else if(v!==null&&typeof v!=="undefined"){if(elements){elements.push(el2)}a.push({name:n2,value:v,type:el2.type,required:el2.required})}}if(!semantic&&form.clk){var $input=$2(form.clk),input=$input[0];n2=input.name;if(n2&&!input.disabled&&input.type==="image"){a.push({name:n2,value:$input.val()});a.push({name:n2+".x",value:form.clk_x},{name:n2+".y",value:form.clk_y})}}return a};$2.fn.formSerialize=function(semantic){return $2.param(this.formToArray(semantic))};$2.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n2=this.name;if(!n2){return}var v=$2.fieldValue(this,successful);if(v&&v.constructor===Array){for(var i2=0,max=v.length;i2<max;i2++){a.push({name:n2,value:v[i2]})}}else if(v!==null&&typeof v!=="undefined"){a.push({name:this.name,value:v})}});return $2.param(a)};$2.fn.fieldValue=function(successful){for(var val2=[],i2=0,max=this.length;i2<max;i2++){var el2=this[i2];var v=$2.fieldValue(el2,successful);if(v===null||typeof v==="undefined"||v.constructor===Array&&!v.length){continue}if(v.constructor===Array){$2.merge(val2,v)}else{val2.push(v)}}return val2};$2.fieldValue=function(el2,successful){var n2=el2.name,t2=el2.type,tag=el2.tagName.toLowerCase();if(typeof successful==="undefined"){successful=true}if(successful&&(!n2||el2.disabled||t2==="reset"||t2==="button"||(t2==="checkbox"||t2==="radio")&&!el2.checked||(t2==="submit"||t2==="image")&&el2.form&&el2.form.clk!==el2||tag==="select"&&el2.selectedIndex===-1)){return null}if(tag==="select"){var index2=el2.selectedIndex;if(index2<0){return null}var a=[],ops=el2.options;var one=t2==="select-one";var max=one?index2+1:ops.length;for(var i2=one?index2:0;i2<max;i2++){var op=ops[i2];if(op.selected&&!op.disabled){var v=op.value;if(!v){v=op.attributes&&op.attributes.value&&!op.attributes.value.specified?op.text:op.value}if(one){return v}a.push(v)}}return a}return $2(el2).val().replace(rCRLF,"\r\n")};$2.fn.clearForm=function(includeHidden){return this.each(function(){$2("input,select,textarea",this).clearFields(includeHidden)})};$2.fn.clearFields=$2.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t2=this.type,tag=this.tagName.toLowerCase();if(re.test(t2)||tag==="textarea"){this.value=""}else if(t2==="checkbox"||t2==="radio"){this.checked=false}else if(tag==="select"){this.selectedIndex=-1}else if(t2==="file"){if(/MSIE/.test(navigator.userAgent)){$2(this).replaceWith($2(this).clone(true))}else{$2(this).val("")}}else if(includeHidden){if(includeHidden===true&&/hidden/.test(t2)||typeof includeHidden==="string"&&$2(this).is(includeHidden)){this.value=""}}})};$2.fn.resetForm=function(){return this.each(function(){var el2=$2(this);var tag=this.tagName.toLowerCase();switch(tag){case"input":this.checked=this.defaultChecked;case"textarea":this.value=this.defaultValue;return true;case"option":case"optgroup":var select=el2.parents("select");if(select.length&&select[0].multiple){if(tag==="option"){this.selected=this.defaultSelected}else{el2.find("option").resetForm()}}else{select.resetForm()}return true;case"select":el2.find("option").each(function(i2){this.selected=this.defaultSelected;if(this.defaultSelected&&!el2[0].multiple){el2[0].selectedIndex=i2;return false}});return true;case"label":var forEl=$2(el2.attr("for"));var list=el2.find("input,select,textarea");if(forEl[0]){list.unshift(forEl[0])}list.resetForm();return true;case"form":if(typeof this.reset==="function"||typeof this.reset==="object"&&!this.reset.nodeType){this.reset()}return true;default:el2.find("form,input,label,select,textarea").resetForm();return true}})};$2.fn.enable=function(b){if(typeof b==="undefined"){b=true}return this.each(function(){this.disabled=!b})};$2.fn.selected=function(select){if(typeof select==="undefined"){select=true}return this.each(function(){var t2=this.type;if(t2==="checkbox"||t2==="radio"){this.checked=select}else if(this.tagName.toLowerCase()==="option"){var $sel=$2(this).parent("select");if(select&&$sel[0]&&$sel[0].type==="select-one"){$sel.find("option").selected(false)}this.selected=select}})};$2.fn.ajaxSubmit.debug=false;function log(){if(!$2.fn.ajaxSubmit.debug){return}var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(msg)}else if(window.opera&&window.opera.postError){window.opera.postError(msg)}}});;/*!
|
|
500
|
+
* jQuery & Zepto Lazy - v1.7.10
|
|
501
|
+
* http://jquery.eisbehr.de/lazy/
|
|
502
|
+
*
|
|
503
|
+
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
|
504
|
+
*
|
|
505
|
+
* Dual licensed under the MIT and GPL-2.0 licenses:
|
|
506
|
+
* http://www.opensource.org/licenses/mit-license.php
|
|
507
|
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
|
508
|
+
*
|
|
509
|
+
* $("img.lazy").lazy();
|
|
510
|
+
*/;(function(window2,undefined2){"use strict";var $2=window2.jQuery||window2.Zepto,lazyInstanceId=0,windowLoaded=false;$2.fn.Lazy=$2.fn.lazy=function(settings2){return new LazyPlugin(this,settings2)};$2.Lazy=$2.lazy=function(names,elements,loader){if($2.isFunction(elements)){loader=elements;elements=[]}if(!$2.isFunction(loader)){return}names=$2.isArray(names)?names:[names];elements=$2.isArray(elements)?elements:[elements];var config=LazyPlugin.prototype.config,forced=config._f||(config._f={});for(var i2=0,l=names.length;i2<l;i2++){if(config[names[i2]]===undefined2||$2.isFunction(config[names[i2]])){config[names[i2]]=loader}}for(var c=0,a=elements.length;c<a;c++){forced[elements[c]]=names[0]}};function _executeLazy(instance,config,items,events,namespace){var _awaitingAfterLoad=0,_actualWidth=-1,_actualHeight=-1,_isRetinaDisplay=false,_afterLoad="afterLoad",_load="load",_error="error",_img="img",_src="src",_srcset="srcset",_sizes="sizes",_backgroundImage="background-image";function _initialize(){_isRetinaDisplay=window2.devicePixelRatio>1;items=_prepareItems(items);if(config.delay>=0){setTimeout(function(){_lazyLoadItems(true)},config.delay)}if(config.delay<0||config.combined){events.e=_throttle(config.throttle,function(event){if(event.type==="resize"){_actualWidth=_actualHeight=-1}_lazyLoadItems(event.all)});events.a=function(additionalItems){additionalItems=_prepareItems(additionalItems);items.push.apply(items,additionalItems)};events.g=function(){return items=$2(items).filter(function(){return!$2(this).data(config.loadedName)})};events.f=function(forcedItems){for(var i2=0;i2<forcedItems.length;i2++){var item=items.filter(function(){return this===forcedItems[i2]});if(item.length){_lazyLoadItems(false,item)}}};_lazyLoadItems();$2(config.appendScroll).on("scroll."+namespace+" resize."+namespace,events.e)}}function _prepareItems(items2){var defaultImage=config.defaultImage,placeholder=config.placeholder,imageBase=config.imageBase,srcsetAttribute=config.srcsetAttribute,loaderAttribute=config.loaderAttribute,forcedTags=config._f||{};items2=$2(items2).filter(function(){var element2=$2(this),tag2=_getElementTagName(this);return!element2.data(config.handledName)&&(element2.attr(config.attribute)||element2.attr(srcsetAttribute)||element2.attr(loaderAttribute)||forcedTags[tag2]!==undefined2)}).data("plugin_"+config.name,instance);for(var i2=0,l=items2.length;i2<l;i2++){var element=$2(items2[i2]),tag=_getElementTagName(items2[i2]),elementImageBase=element.attr(config.imageBaseAttribute)||imageBase;if(tag===_img&&elementImageBase&&element.attr(srcsetAttribute)){element.attr(srcsetAttribute,_getCorrectedSrcSet(element.attr(srcsetAttribute),elementImageBase))}if(forcedTags[tag]!==undefined2&&!element.attr(loaderAttribute)){element.attr(loaderAttribute,forcedTags[tag])}if(tag===_img&&defaultImage&&!element.attr(_src)){element.attr(_src,defaultImage)}else if(tag!==_img&&placeholder&&(!element.css(_backgroundImage)||element.css(_backgroundImage)==="none")){element.css(_backgroundImage,"url('"+placeholder+"')")}}return items2}function _lazyLoadItems(allItems,forced){if(!items.length){if(config.autoDestroy){instance.destroy()}return}var elements=forced||items,loadTriggered=false,imageBase=config.imageBase||"",srcsetAttribute=config.srcsetAttribute,handledName=config.handledName;for(var i2=0;i2<elements.length;i2++){if(allItems||forced||_isInLoadableArea(elements[i2])){var element=$2(elements[i2]),tag=_getElementTagName(elements[i2]),attribute=element.attr(config.attribute),elementImageBase=element.attr(config.imageBaseAttribute)||imageBase,customLoader=element.attr(config.loaderAttribute);if(!element.data(handledName)&&(!config.visibleOnly||element.is(":visible"))&&((attribute||element.attr(srcsetAttribute))&&(tag===_img&&(elementImageBase+attribute!==element.attr(_src)||element.attr(srcsetAttribute)!==element.attr(_srcset))||tag!==_img&&elementImageBase+attribute!==element.css(_backgroundImage))||customLoader)){loadTriggered=true;element.data(handledName,true);_handleItem(element,tag,elementImageBase,customLoader)}}}if(loadTriggered){items=$2(items).filter(function(){return!$2(this).data(handledName)})}}function _handleItem(element,tag,imageBase,customLoader){++_awaitingAfterLoad;var errorCallback=function(){_triggerCallback("onError",element);_reduceAwaiting();errorCallback=$2.noop};_triggerCallback("beforeLoad",element);var srcAttribute=config.attribute,srcsetAttribute=config.srcsetAttribute,sizesAttribute=config.sizesAttribute,retinaAttribute=config.retinaAttribute,removeAttribute=config.removeAttribute,loadedName=config.loadedName,elementRetina=element.attr(retinaAttribute);if(customLoader){var loadCallback=function(){if(removeAttribute){element.removeAttr(config.loaderAttribute)}element.data(loadedName,true);_triggerCallback(_afterLoad,element);setTimeout(_reduceAwaiting,1);loadCallback=$2.noop};element.off(_error).one(_error,errorCallback).one(_load,loadCallback);if(!_triggerCallback(customLoader,element,function(response){if(response){element.off(_load);loadCallback()}else{element.off(_error);errorCallback()}})){element.trigger(_error)}}else{var imageObj=$2(new Image);imageObj.one(_error,errorCallback).one(_load,function(){element.hide();if(tag===_img){element.attr(_sizes,imageObj.attr(_sizes)).attr(_srcset,imageObj.attr(_srcset)).attr(_src,imageObj.attr(_src))}else{element.css(_backgroundImage,"url('"+imageObj.attr(_src)+"')")}element[config.effect](config.effectTime);if(removeAttribute){element.removeAttr(srcAttribute+" "+srcsetAttribute+" "+retinaAttribute+" "+config.imageBaseAttribute);if(sizesAttribute!==_sizes){element.removeAttr(sizesAttribute)}}element.data(loadedName,true);_triggerCallback(_afterLoad,element);imageObj.remove();_reduceAwaiting()});var imageSrc=(_isRetinaDisplay&&elementRetina?elementRetina:element.attr(srcAttribute))||"";imageObj.attr(_sizes,element.attr(sizesAttribute)).attr(_srcset,element.attr(srcsetAttribute)).attr(_src,imageSrc?imageBase+imageSrc:null);imageObj.complete&&imageObj.trigger(_load)}}function _isInLoadableArea(element){var elementBound=element.getBoundingClientRect(),direction=config.scrollDirection,threshold=config.threshold,vertical=_getActualHeight()+threshold>elementBound.top&&-threshold<elementBound.bottom,horizontal=_getActualWidth()+threshold>elementBound.left&&-threshold<elementBound.right;if(direction==="vertical"){return vertical}else if(direction==="horizontal"){return horizontal}return vertical&&horizontal}function _getActualWidth(){return _actualWidth>=0?_actualWidth:_actualWidth=$2(window2).width()}function _getActualHeight(){return _actualHeight>=0?_actualHeight:_actualHeight=$2(window2).height()}function _getElementTagName(element){return element.tagName.toLowerCase()}function _getCorrectedSrcSet(srcset,imageBase){if(imageBase){var entries=srcset.split(",");srcset="";for(var i2=0,l=entries.length;i2<l;i2++){srcset+=imageBase+entries[i2].trim()+(i2!==l-1?",":"")}}return srcset}function _throttle(delay,callback){var timeout,lastExecute=0;return function(event,ignoreThrottle){var elapsed=+new Date-lastExecute;function run(){lastExecute=+new Date;callback.call(instance,event)}timeout&&clearTimeout(timeout);if(elapsed>delay||!config.enableThrottle||ignoreThrottle){run()}else{timeout=setTimeout(run,delay-elapsed)}}}function _reduceAwaiting(){--_awaitingAfterLoad;if(!items.length&&!_awaitingAfterLoad){_triggerCallback("onFinishedAll")}}function _triggerCallback(callback,element,args){if(callback=config[callback]){callback.apply(instance,[].slice.call(arguments,1));return true}return false}if(config.bind==="event"||windowLoaded){_initialize()}else{$2(window2).on(_load+"."+namespace,_initialize)}}function LazyPlugin(elements,settings2){var _instance=this,_config=$2.extend({},_instance.config,settings2),_events={},_namespace=_config.name+"-"+ ++lazyInstanceId;_instance.config=function(entryName,value){if(value===undefined2){return _config[entryName]}_config[entryName]=value;return _instance};_instance.addItems=function(items){_events.a&&_events.a($2.type(items)==="string"?$2(items):items);return _instance};_instance.getItems=function(){return _events.g?_events.g():{}};_instance.update=function(useThrottle){_events.e&&_events.e({},!useThrottle);return _instance};_instance.force=function(items){_events.f&&_events.f($2.type(items)==="string"?$2(items):items);return _instance};_instance.loadAll=function(){_events.e&&_events.e({all:true},true);return _instance};_instance.destroy=function(){$2(_config.appendScroll).off("."+_namespace,_events.e);$2(window2).off("."+_namespace);_events={};return undefined2};_executeLazy(_instance,_config,elements,_events,_namespace);return _config.chainable?elements:_instance}LazyPlugin.prototype.config={name:"lazy",chainable:true,autoDestroy:true,bind:"load",threshold:500,visibleOnly:false,appendScroll:window2,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:false,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:true,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:true,throttle:250,beforeLoad:undefined2,afterLoad:undefined2,onError:undefined2,onFinishedAll:undefined2};$2(window2).on("load",function(){windowLoaded=true})})(window);;!(function(t2){"use strict";var e2=null,r2=null,n2=null,i2=null,l=null,o=window,s="WebWorker",a=null,u=null,f=null,p=null,g=null,c=null,h=null;function _(t3){return function(e3){var r3=this._callbackStack[t3];return"function"==typeof e3&&r3.push(e3),this}}for(h in null!==(e2=(i2=i2||o)[l=l||s]||null)&&(r2=e2),c=Array.prototype.slice,n2=window.Worker,e2=function(){this._constructor.apply(this,arguments)},e2.prototype._$=null,e2.prototype._callbackStack=null,e2.prototype._lastError=null,e2.prototype._log=null,e2.prototype._nativeWorker=null,e2.prototype._state=null,e2.prototype._workerBlobUrl=null,e2.prototype._workerScript=null,e2.prototype._workerUrl=null,e2.prototype._constructor=function(e3){var r3=null,n3=null,i3=null;if(Object.defineProperty(this,"_$",{configurable:false,enumerable:true,value:t2(this),writable:false}),null===(e3=e3||null)&&this.throwError(g.INVALID_ARGUMENTS,null,true),"string"==typeof e3){let l2="";e3=t2.trim(e3);try{window.hasOwnProperty(e3)&&"string"==typeof window[e3]?(l2=window[e3],this._workerScript=l2):r3=t2(e3)}catch(t3){}null!==r3&&r3.length>0?(n3=r3.text(),this._workerScript=n3):""==l2&&(i3=e3)}this._workerUrl=i3,this._callbackStack={error:[],loading:[],loaded:[],starting:[],started:[],terminating:[],terminated:[]},this._assignEventHandlers(),this._state=a.INITIALIZED,this.trigger(f.INITIALIZED)},e2.prototype._initLog=function(){return this._log=[],this._log},e2.prototype.getUrl=function(){return this._workerUrl},e2.prototype.getBlobUrl=function(){return this._workerBlobUrl},e2.prototype.getLog=function(){return this._log||this._initLog()},e2.prototype.getNativeWorker=function(){return this._nativeWorker},e2.prototype.getState=function(){return this._state},e2.prototype.isLoading=function(){return this.getState()===a.LOADING},e2.prototype.isLoaded=function(){return this.getState()>=a.LOADED&&!this.isTerminated()},e2.prototype.isStarting=function(){return this.getState()===a.STARTING},e2.prototype.isStarted=function(){return this.getState()>=a.STARTED&&!this.isTerminated()},e2.prototype.isTerminating=function(){return this.getState()===a.TERMINATING},e2.prototype.isTerminated=function(){return this.getState()===a.TERMINATED},e2.prototype.load=function(){var r3,n3,i3=this;return i3.isLoading()||i3.isLoaded()||(i3.trigger(f.WORKER_LOADING),r3=i3.getUrl()||null,n3=function(){var t3,r4=null;r4=i3._workerScript,r4=e2._workerScriptWrapper.replace(/\{\{main-function\}\}/g,r4),t3=new window.Blob([r4],{type:"text/javascript"}),i3._workerBlobUrl=window.URL.createObjectURL(t3),i3._createWorker()},null===r3?n3():t2.ajax({async:true,url:r3,dataType:"text",crossDomain:true,success:function(t3){i3._workerScript=t3,n3()},error:function(){i3.throwError(g.WORKER_DID_NOT_LOAD,arguments)}})),i3},e2.prototype.log=function(t3){return(this._log||this._initLog()).push(t3),this},e2.prototype._createWorker=function(){return this._nativeWorker=new n2(this.getBlobUrl()),this._attachMessageParser(),this},e2.prototype._assignEventHandlers=function(){function t3(t4){return function(){var e3,r3,n3=this._callbackStack[t4];(e3=t4.toUpperCase())in a&&(this._state=a[e3]);for(;r3=n3.pop();)r3.apply(this,arguments)}}return this.on(f.ERROR,t3("error")),this.on(f.WORKER_LOADING,t3("loading")),this.on(f.WORKER_LOADED,t3("loaded")),this.on(f.WORKER_STARTING,t3("starting")),this.on(f.WORKER_STARTED,t3("started")),this.on(f.WORKER_TERMINATING,t3("terminating")),this.on(f.WORKER_TERMINATED,t3("terminated")),this},e2.prototype.error=_("error"),e2.prototype.loading=_("loading"),e2.prototype.loaded=_("loaded"),e2.prototype.starting=_("starting"),e2.prototype.started=_("started"),e2.prototype.terminating=_("terminating"),e2.prototype.terminated=_("terminated"),e2.prototype.start=function(){var t3;return this.isStarting()||this.isStarted()?this:(t3=c.call(arguments),this.isLoaded()?(this.trigger(f.WORKER_STARTING),this.sendMessage(u.START,t3),this):(this.on(f.WORKER_LOADED,(function(){this.start.apply(this,t3)})),this.load(),this))},e2.prototype.sendMessage=function(t3,e3){var r3=null,n3=null;return e3=e3||null,null===(t3=t3||null)||((n3={__isWebWorkerMsg:true}).action=t3,n3.args=e3,(r3=this.getNativeWorker())&&r3.postMessage(n3)),this},e2.prototype._attachMessageParser=function(){var e3=null;return(e3=t2(this.getNativeWorker())).on("message",t2.proxy((function(t3){var e4=(t3.originalEvent||t3).data,r3=null,n3=null;"object"==typeof e4&&"__isWebWorkerMsg"in e4&&e4.__isWebWorkerMsg&&(r3=e4.action,n3=e4.args,this[r3].apply(this,n3))}),this)),e3.on("error",t2.proxy(this.throwError,this)),this},e2.prototype.terminate=function(){return(this.getNativeWorker()||null)&&(this.trigger(f.WORKER_TERMINATING),this.sendMessage(u.TERMINATE,c.call(arguments))),this},e2.prototype.terminateNow=function(){var t3=null;return this.isTerminating()||this.trigger(f.WORKER_TERMINATING),(t3=this.getNativeWorker()||null)&&(t3.terminate(),this._nativeWorker=null,this.trigger(f.WORKER_TERMINATED)),this},e2.prototype.on=function(){var t3=this._$;return t3.on.apply(t3,arguments),this},e2.prototype.one=function(){var t3=this._$;return t3.one.apply(t3,arguments),this},e2.prototype.off=function(){var t3=this._$;return t3.off.apply(t3,arguments),this._assignEventHandlers(),this},e2.prototype.trigger=function(e3){var r3=false,n3=null,i3=null;return"object"==typeof e3&&(n3=e3.type||null),"string"==typeof e3&&(n3=e3||null,r3=true),null===n3?this:n3 in p?(r3&&(e3=new t2.Event(n3)),e3.worker=this,i3=[e3],arguments.length>1&&(i3=i3.concat(c.call(arguments,1))),this._triggerSelf.apply(this,i3),this):(r3&&(e3={type:n3,data:arguments[1]?arguments[1]:{}}),i3=[e3],this.sendMessage(u.TRIGGER_SELF,i3),this)},e2.prototype.triggerSelf=function(e3){var r3=null,n3=null;return null===(e3=e3||null)||("string"==typeof e3&&(r3=e3,e3=new t2.Event(r3)),e3.originalEvent=e3.originalEvent||e3,e3.worker=this,n3=[e3],arguments.length>1&&(n3=n3.concat(c.call(arguments,1))),this._triggerSelf.apply(this,n3)),this},e2.prototype._triggerSelf=function(){var t3=null;return(t3=this._$).trigger.apply(t3,arguments),this},e2.prototype.throwError=function(t3,r3,n3){var i3=null;if("object"==typeof(t3=t3||g.UNKNOWN)&&(i3=(t3=t3.originalEvent||t3).data||null),i3=void 0===r3?i3:r3,n3=n3||false,this._lastError=t3,e2._lastError=t3,"_triggerError"in this&&this._triggerError(t3,r3,n3),n3)throw new window.Error(t3);return this},e2.prototype._triggerError=function(e3,r3,n3){var i3=null;return(i3=new t2.Event(f.ERROR)).message=this.getLastError(),i3.errorData=r3,i3.throwsException=!!n3,this.trigger(i3),this},e2.prototype.getLastError=function(){return this._lastError},e2._lastError=null,a={INITIALIZED:0,LOADING:1,LOADED:2,STARTING:3,STARTED:4,TERMINATING:5,TERMINATED:6},e2.State=a,u={LOG:"log",START:"start",TERMINATE:"terminate",TERMINATE_NOW:"terminateNow",TRIGGER:"trigger",TRIGGER_SELF:"triggerSelf"},e2.Action=u,f={INITIALIZED:"initialized",ERROR:"error",WORKER_LOADING:"worker-loading",WORKER_LOADED:"worker-loaded",WORKER_STARTING:"worker-starting",WORKER_STARTED:"worker-started",WORKER_TERMINATING:"worker-terminating",WORKER_TERMINATED:"worker-terminated"},e2.Event=f,p={},e2.EventMap=p,f)f[h]="webworker:"+f[h],p[f[h]]=h;g={UNKNOWN:"An unknown error occured.",INVALID_ARGUMENTS:"Invalid arguments were supplied to this method.",WORKER_DID_NOT_LOAD:"Unable to load worker."},e2.Error=g,e2._workerScriptWrapper='var e=null,t=null,n=null,r={};e={{state-data}};t={{action-data}};n={{event-data}};self._callbackStack=null;self._listeners=r;self._isTerminating=false;self._state=null;self.State=e;self.Action=t;self.Event=n;self._assignEventHandlers=function(){function t(t){return function(){var n=self._callbackStack[t],r,i;r=t.toUpperCase();if(r in e){self._state=e[r]}while(i=n.pop()){i.apply(self,arguments)}}}self.on(n.WORKER_TERMINATING,t("terminating"));return self};self.getState=function(){return this._state};self.isInitialized=function(){var e=self.getState();return e!==null&&e>=0};self.isTerminating=function(){return self.getState()===e.TERMINATING};self._main=function(){var startArgs=arguments;{{main-function}};return self};self._init=function(){self._callbackStack={terminating:[]};self._assignEventHandlers();self._state=e.INITIALIZED;self.trigger(n.WORKER_LOADED);return self};self.start=function(){if(!self.isInitialized()){return self}self.triggerSelf(n.WORKER_STARTING);self._main.apply(self,arguments);self.triggerSelf(n.WORKER_STARTED);self.trigger(n.WORKER_STARTED);return self};self.log=function(e){self.sendMessage(t.LOG,[e]);return self};self.on=function(e,t){e+="";t=t||null;if(typeof t!=="function"){return self}if(!(e in r)){r[e]=[]}r[e].push(t);return self};self.one=function(e,t){var n=null;n=function(){t.apply(this,arguments);self.off(e,n);return};self.on(e,n);return};self.off=function(e,t){var n=null;e=e||null;t=t||null;if(e===null&&t===null){for(n in r){delete r[n]}self._assignEventHandlers();return self}self._removeListenerFromEventType(e,t);return self};self._removeListenerFromEventType=function(e,t){var n=r[e],i=0;t=t||null;if(t===null){r[e]=[];return self}for(;i<n.length;i++){if(n[i]===t){n.splice(i,1);i--}}return self};self.terminating=function(e){var t=self._callbackStack.terminating;if(typeof e==="function"){t.push(e)}return self};self.trigger=function(e,n){var r=null;e=e||null;if(e===null){return self}if(typeof e==="string"){r=e||null;e={type:r}}else if(typeof e==="object"){r=e.type||null;n=e.data}if(r===null){return self}e.data=n;self.sendMessage(t.TRIGGER_SELF,[e]);return self};self.triggerSelf=function(e,t){var n=null,i=null,s=null,o=null,u=0;e=e||null;if(e===null){return this}if(typeof e==="string"){n=e||null;e={type:e}}else if(typeof e==="object"){n=e.type||null;t=e.data}if(n===null){return this}e.data=t;i=r[n]||null;if(i===null){return this}s=i.length;for(u=0;u<s;u++){o=i[u];o.apply(this,[e]);if(s!==i.length){u--;s=i.length}}return this};self.sendMessage=function(e,t){var n=null;e=e||null;t=t||[];if(e===null){return self}n={__isWebWorkerMsg:true};n.action=e;n.args=t;self.postMessage(n);return self};self.terminate=function(e){e=!!e;if(!self.isTerminating()){self._setTerminatingStatus();self.triggerSelf(n.WORKER_TERMINATING);self.trigger(n.WORKER_TERMINATING)}self.sendMessage(t.TERMINATE_NOW,[]);if(e){self._nativeClose()}return self};self.terminateNow=function(){return self.terminate(true)};self._setTerminatingStatus=function(){self._state=e.TERMINATING;return self};self._nativeClose=self.close;self.close=self.terminate;self.addEventListener("message",function(e){var t=e.originalEvent||e,n=t.data,r=null,i=null;if(typeof n==="object"&&"__isWebWorkerMsg"in n&&n.__isWebWorkerMsg){r=n.action;i=n.args;self[r].apply(self,i)}},false);self._init()',e2._workerScriptWrapper=e2._workerScriptWrapper.replace(/\{\{state-data\}\}/g,JSON.stringify(a)).replace(/\{\{action-data\}\}/g,JSON.stringify(u)).replace(/\{\{event-data\}\}/g,JSON.stringify(f)),e2.getLastError=e2.prototype.getLastError,e2.noConflict=function(t3,n3){return t3=t3||null,n3=n3||null,o[s]===e2&&(delete o[s],r2&&(o[s]=r2)),t3&&n3&&(t3[n3]=e2),e2},i2[l]=e2})(jQuery);!(function(n2){"use strict";function d(n3,t3){var r3=(65535&n3)+(65535&t3);return(n3>>16)+(t3>>16)+(r3>>16)<<16|65535&r3}function f(n3,t3,r3,e3,o2,u2){return d((u2=d(d(t3,n3),d(e3,u2)))<<o2|u2>>>32-o2,r3)}function l(n3,t3,r3,e3,o2,u2,c2){return f(t3&r3|~t3&e3,n3,t3,o2,u2,c2)}function g(n3,t3,r3,e3,o2,u2,c2){return f(t3&e3|r3&~e3,n3,t3,o2,u2,c2)}function v(n3,t3,r3,e3,o2,u2,c2){return f(t3^r3^e3,n3,t3,o2,u2,c2)}function m(n3,t3,r3,e3,o2,u2,c2){return f(r3^(t3|~e3),n3,t3,o2,u2,c2)}function c(n3,t3){var r3,e3,o2,u2;n3[t3>>5]|=128<<t3%32,n3[14+(t3+64>>>9<<4)]=t3;for(var c2=1732584193,f2=-271733879,i3=-1732584194,a2=271733878,h=0;h<n3.length;h+=16)c2=l(r3=c2,e3=f2,o2=i3,u2=a2,n3[h],7,-680876936),a2=l(a2,c2,f2,i3,n3[h+1],12,-389564586),i3=l(i3,a2,c2,f2,n3[h+2],17,606105819),f2=l(f2,i3,a2,c2,n3[h+3],22,-1044525330),c2=l(c2,f2,i3,a2,n3[h+4],7,-176418897),a2=l(a2,c2,f2,i3,n3[h+5],12,1200080426),i3=l(i3,a2,c2,f2,n3[h+6],17,-1473231341),f2=l(f2,i3,a2,c2,n3[h+7],22,-45705983),c2=l(c2,f2,i3,a2,n3[h+8],7,1770035416),a2=l(a2,c2,f2,i3,n3[h+9],12,-1958414417),i3=l(i3,a2,c2,f2,n3[h+10],17,-42063),f2=l(f2,i3,a2,c2,n3[h+11],22,-1990404162),c2=l(c2,f2,i3,a2,n3[h+12],7,1804603682),a2=l(a2,c2,f2,i3,n3[h+13],12,-40341101),i3=l(i3,a2,c2,f2,n3[h+14],17,-1502002290),c2=g(c2,f2=l(f2,i3,a2,c2,n3[h+15],22,1236535329),i3,a2,n3[h+1],5,-165796510),a2=g(a2,c2,f2,i3,n3[h+6],9,-1069501632),i3=g(i3,a2,c2,f2,n3[h+11],14,643717713),f2=g(f2,i3,a2,c2,n3[h],20,-373897302),c2=g(c2,f2,i3,a2,n3[h+5],5,-701558691),a2=g(a2,c2,f2,i3,n3[h+10],9,38016083),i3=g(i3,a2,c2,f2,n3[h+15],14,-660478335),f2=g(f2,i3,a2,c2,n3[h+4],20,-405537848),c2=g(c2,f2,i3,a2,n3[h+9],5,568446438),a2=g(a2,c2,f2,i3,n3[h+14],9,-1019803690),i3=g(i3,a2,c2,f2,n3[h+3],14,-187363961),f2=g(f2,i3,a2,c2,n3[h+8],20,1163531501),c2=g(c2,f2,i3,a2,n3[h+13],5,-1444681467),a2=g(a2,c2,f2,i3,n3[h+2],9,-51403784),i3=g(i3,a2,c2,f2,n3[h+7],14,1735328473),c2=v(c2,f2=g(f2,i3,a2,c2,n3[h+12],20,-1926607734),i3,a2,n3[h+5],4,-378558),a2=v(a2,c2,f2,i3,n3[h+8],11,-2022574463),i3=v(i3,a2,c2,f2,n3[h+11],16,1839030562),f2=v(f2,i3,a2,c2,n3[h+14],23,-35309556),c2=v(c2,f2,i3,a2,n3[h+1],4,-1530992060),a2=v(a2,c2,f2,i3,n3[h+4],11,1272893353),i3=v(i3,a2,c2,f2,n3[h+7],16,-155497632),f2=v(f2,i3,a2,c2,n3[h+10],23,-1094730640),c2=v(c2,f2,i3,a2,n3[h+13],4,681279174),a2=v(a2,c2,f2,i3,n3[h],11,-358537222),i3=v(i3,a2,c2,f2,n3[h+3],16,-722521979),f2=v(f2,i3,a2,c2,n3[h+6],23,76029189),c2=v(c2,f2,i3,a2,n3[h+9],4,-640364487),a2=v(a2,c2,f2,i3,n3[h+12],11,-421815835),i3=v(i3,a2,c2,f2,n3[h+15],16,530742520),c2=m(c2,f2=v(f2,i3,a2,c2,n3[h+2],23,-995338651),i3,a2,n3[h],6,-198630844),a2=m(a2,c2,f2,i3,n3[h+7],10,1126891415),i3=m(i3,a2,c2,f2,n3[h+14],15,-1416354905),f2=m(f2,i3,a2,c2,n3[h+5],21,-57434055),c2=m(c2,f2,i3,a2,n3[h+12],6,1700485571),a2=m(a2,c2,f2,i3,n3[h+3],10,-1894986606),i3=m(i3,a2,c2,f2,n3[h+10],15,-1051523),f2=m(f2,i3,a2,c2,n3[h+1],21,-2054922799),c2=m(c2,f2,i3,a2,n3[h+8],6,1873313359),a2=m(a2,c2,f2,i3,n3[h+15],10,-30611744),i3=m(i3,a2,c2,f2,n3[h+6],15,-1560198380),f2=m(f2,i3,a2,c2,n3[h+13],21,1309151649),c2=m(c2,f2,i3,a2,n3[h+4],6,-145523070),a2=m(a2,c2,f2,i3,n3[h+11],10,-1120210379),i3=m(i3,a2,c2,f2,n3[h+2],15,718787259),f2=m(f2,i3,a2,c2,n3[h+9],21,-343485551),c2=d(c2,r3),f2=d(f2,e3),i3=d(i3,o2),a2=d(a2,u2);return[c2,f2,i3,a2]}function i2(n3){for(var t3="",r3=32*n3.length,e3=0;e3<r3;e3+=8)t3+=String.fromCharCode(n3[e3>>5]>>>e3%32&255);return t3}function a(n3){var t3=[];for(t3[(n3.length>>2)-1]=void 0,e3=0;e3<t3.length;e3+=1)t3[e3]=0;for(var r3=8*n3.length,e3=0;e3<r3;e3+=8)t3[e3>>5]|=(255&n3.charCodeAt(e3/8))<<e3%32;return t3}function e2(n3){for(var t3,r3="0123456789abcdef",e3="",o2=0;o2<n3.length;o2+=1)t3=n3.charCodeAt(o2),e3+=r3.charAt(t3>>>4&15)+r3.charAt(15&t3);return e3}function r2(n3){return unescape(encodeURIComponent(n3))}function o(n3){return i2(c(a(n3=r2(n3)),8*n3.length))}function u(n3,t3){return(function(n4,t4){var r3,e3=a(n4),o2=[],u2=[];for(o2[15]=u2[15]=void 0,16<e3.length&&(e3=c(e3,8*n4.length)),r3=0;r3<16;r3+=1)o2[r3]=909522486^e3[r3],u2[r3]=1549556828^e3[r3];return t4=c(o2.concat(a(t4)),512+8*t4.length),i2(c(u2.concat(t4),640))})(r2(n3),r2(t3))}function t2(n3,t3,r3){return t3?r3?u(t3,n3):e2(u(t3,n3)):r3?o(n3):e2(o(n3))}"function"==typeof define&&define.amd?define(function(){return t2}):"object"==typeof module&&module.exports?module.exports=t2:n2.md5=t2})(this);var _cssw=`let _w=self;var commentre=/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;function parseMe(t,e){e=e||{};var i=1,n=1;function s(t){var e=t.match(/\\n/g);e&&(i+=e.length);var s=t.lastIndexOf("\\n");n=~s?t.length-s:n+t.length}function r(){var t={line:i,column:n};return function(e){return e.position=new o(t),f(),e}}function o(t){this.start=t,this.end={line:i,column:n},this.source=e.source}o.prototype.content=t;var a=[];function p(s){var r=new Error(e.source+":"+i+":"+n+": "+s);if(r.reason=s,r.filename=e.source,r.line=i,r.column=n,r.source=t,!e.silent)throw r;a.push(r)}function m(){return h(/^{\\s*/)}function u(){return h(/^}/)}function c(){var e,i=[];for(f(),l(i);t.length&&"}"!=t.charAt(0)&&(e=A()||b());)!1!==e&&(i.push(e),l(i));return i}function h(e){var i=e.exec(t);if(i){var n=i[0];return s(n),t=t.slice(n.length),i}}function f(){h(/^\\s*/)}function l(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=r();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var i=2;""!=t.charAt(i)&&("*"!=t.charAt(i)||"/"!=t.charAt(i+1));)++i;if(i+=2,""===t.charAt(i-1))return p("End of comment missing");var o=t.slice(2,i-2);return n+=2,s(o),t=t.slice(i),n+=2,e({type:"comment",comment:o})}}function y(){var t=h(/^([^{]+)/);if(t)return trim(t[0]).replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g,"").replace(/"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'/g,(function(t){return t.replace(/,/g,"\u200C")})).split(/\\s*(?![^(]*\\)),\\s*/).map((function(t){return t.replace(/\\u200C/g,",")}))}function v(){var t=r(),e=h(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);if(e){if(e=trim(e[0]),!h(/^:\\s*/))return p("property missing ':'");var i=h(/^((?:'(?:\\\\'|.)*?'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};])+)/),n=t({type:"declaration",property:e.replace(commentre,""),value:i?trim(i[0]).replace(commentre,""):""});return h(/^[;\\s]*/),n}}function g(){var t,e=[];if(!m())return p("missing '{'");for(l(e);t=v();)!1!==t&&(e.push(t),l(e));return u()?e:p("missing '}'")}function I(){for(var t,e=[],i=r();t=h(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/);)e.push(t[1]),h(/^,\\s*/);if(e.length)return i({type:"keyframe",values:e,declarations:g()})}var C,V=j("import"),k=j("charset"),w=j("namespace");function j(t){var e=new RegExp("^@"+t+"\\\\s*([^;]+);");return function(){var i=r(),n=h(e);if(n){var s={type:t};return s[t]=n[1].trim(),i(s)}}}function A(){if("@"==t[0])return function(){var t=r();if(e=h(/^@([-\\w]+)?keyframes\\s*/)){var e,i=e[1];if(!(e=h(/^([-\\w]+)\\s*/)))return p("@keyframes missing name");var n,s=e[1];if(!m())return p("@keyframes missing '{'");for(var o=l();n=I();)o.push(n),o=o.concat(l());return u()?t({type:"keyframes",name:s,vendor:i,keyframes:o}):p("@keyframes missing '}'")}}()||function(){var t=r(),e=h(/^@media *([^{]+)/);if(e){var i=trim(e[1]);if(!m())return p("@media missing '{'");var n=l().concat(c());return u()?t({type:"media",media:i,rules:n}):p("@media missing '}'")}}()||function(){var t=r(),e=h(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);if(e)return t({type:"custom-media",name:trim(e[1]),media:trim(e[2])})}()||function(){var t=r(),e=h(/^@supports *([^{]+)/);if(e){var i=trim(e[1]);if(!m())return p("@supports missing '{'");var n=l().concat(c());return u()?t({type:"supports",supports:i,rules:n}):p("@supports missing '}'")}}()||V()||k()||w()||function(){var t=r(),e=h(/^@([-\\w]+)?document *([^{]+)/);if(e){var i=trim(e[1]),n=trim(e[2]);if(!m())return p("@document missing '{'");var s=l().concat(c());return u()?t({type:"document",document:n,vendor:i,rules:s}):p("@document missing '}'")}}()||function(){var t=r();if(h(/^@page */)){var e=y()||[];if(!m())return p("@page missing '{'");for(var i,n=l();i=v();)n.push(i),n=n.concat(l());return u()?t({type:"page",selectors:e,declarations:n}):p("@page missing '}'")}}()||function(){var t=r();if(h(/^@host\\s*/)){if(!m())return p("@host missing '{'");var e=l().concat(c());return u()?t({type:"host",rules:e}):p("@host missing '}'")}}()||function(){var t=r();if(h(/^@font-face\\s*/)){if(!m())return p("@font-face missing '{'");for(var e,i=l();e=v();)i.push(e),i=i.concat(l());return u()?t({type:"font-face",declarations:i}):p("@font-face missing '}'")}}()}function b(){var t=r(),e=y();return e?(l(),t({type:"rule",selectors:e,declarations:g()})):p("selector missing")}return addParent((C=c(),{type:"stylesheet",stylesheet:{source:e.source,rules:C,parsingErrors:a}}))}function trim(t){return t?t.replace(/^\\s+|\\s+$/g,""):""}function addParent(t,e){var i=t&&"string"==typeof t.type,n=i?t:e;for(var s in t){var r=t[s];Array.isArray(r)?r.forEach((function(t){addParent(t,n)})):r&&"object"==typeof r&&addParent(r,n)}return i&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:e||null}),t}class Compress{options={};indentation=null;constructor(t){this.options=t??{},this.indentation=t?.indent??null}}Compress.prototype.emit=function(t){return t},Compress.prototype.visit=function(t){return this[t.type](t)},Compress.prototype.mapVisit=function(t,e){var i="";e=e||"";for(var n=0,s=t.length;n<s;n++)i+=this.visit(t[n]),e&&n<s-1&&(i+=this.emit(e));return i},Compress.prototype.compile=function(t){return t.stylesheet.rules.map(this.visit,this).join("")},Compress.prototype.comment=function(t){return this.emit("",t.position)},Compress.prototype.import=function(t){return this.emit("@import "+t.import+";",t.position)},Compress.prototype.media=function(t){return this.emit("@media "+t.media,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},Compress.prototype.document=function(t){var e="@"+(t.vendor||"")+"document "+t.document;return this.emit(e,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},Compress.prototype.charset=function(t){return this.emit("@charset "+t.charset+";",t.position)},Compress.prototype.namespace=function(t){return this.emit("@namespace "+t.namespace+";",t.position)},Compress.prototype.supports=function(t){return this.emit("@supports "+t.supports,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},Compress.prototype.keyframes=function(t){return this.emit("@"+(t.vendor||"")+"keyframes "+t.name,t.position)+this.emit("{")+this.mapVisit(t.keyframes)+this.emit("}")},Compress.prototype.keyframe=function(t){var e=t.declarations;return this.emit(t.values.join(","),t.position)+this.emit("{")+this.mapVisit(e)+this.emit("}")},Compress.prototype.page=function(t){var e=t.selectors.length?t.selectors.join(", "):"";return this.emit("@page "+e,t.position)+this.emit("{")+this.mapVisit(t.declarations)+this.emit("}")},Compress.prototype["font-face"]=function(t){return this.emit("@font-face",t.position)+this.emit("{")+this.mapVisit(t.declarations)+this.emit("}")},Compress.prototype.host=function(t){return this.emit("@host",t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},Compress.prototype["custom-media"]=function(t){return this.emit("@custom-media "+t.name+" "+t.media+";",t.position)},Compress.prototype.rule=function(t){var e=t.declarations;return e.length?this.emit(t.selectors.join(","),t.position)+this.emit("{")+this.mapVisit(e)+this.emit("}"):""},Compress.prototype.declaration=function(t){return this.emit(t.property+":"+t.value,t.position)+this.emit(";")};class Identity{options={};indentation=null;constructor(t){this.options=t??{},this.indentation=t?.indent??null}}function stringifyMe(t,e){var i=(e=e||{}).compress?new Compress(e):new Identity(e);if(e.sourcemap){require("./source-map-support")(i);var n=i.compile(t);return i.applySourceMaps(),{code:n,map:"generator"===e.sourcemap?i.map:i.map.toJSON()}}return n=i.compile(t)}Identity.prototype.emit=function(t){return t},Identity.prototype.visit=function(t){return this[t.type](t)},Identity.prototype.mapVisit=function(t,e){var i="";e=e||"";for(var n=0,s=t.length;n<s;n++)i+=this.visit(t[n]),e&&n<s-1&&(i+=this.emit(e));return i},Identity.prototype.compile=function(t){return this.stylesheet(t)},Identity.prototype.stylesheet=function(t){return this.mapVisit(t.stylesheet.rules,"\\n\\n")},Identity.prototype.comment=function(t){return this.emit(this.indent()+"/*"+t.comment+"*/",t.position)},Identity.prototype.import=function(t){return this.emit("@import "+t.import+";",t.position)},Identity.prototype.media=function(t){return this.emit("@media "+t.media,t.position)+this.emit(" {\\n"+this.indent(1))+this.mapVisit(t.rules,"\\n\\n")+this.emit(this.indent(-1)+"\\n}")},Identity.prototype.document=function(t){var e="@"+(t.vendor||"")+"document "+t.document;return this.emit(e,t.position)+this.emit(" {\\n"+this.indent(1))+this.mapVisit(t.rules,"\\n\\n")+this.emit(this.indent(-1)+"\\n}")},Identity.prototype.charset=function(t){return this.emit("@charset "+t.charset+";",t.position)},Identity.prototype.namespace=function(t){return this.emit("@namespace "+t.namespace+";",t.position)},Identity.prototype.supports=function(t){return this.emit("@supports "+t.supports,t.position)+this.emit(" {\\n"+this.indent(1))+this.mapVisit(t.rules,"\\n\\n")+this.emit(this.indent(-1)+"\\n}")},Identity.prototype.keyframes=function(t){return this.emit("@"+(t.vendor||"")+"keyframes "+t.name,t.position)+this.emit(" {\\n"+this.indent(1))+this.mapVisit(t.keyframes,"\\n")+this.emit(this.indent(-1)+"}")},Identity.prototype.keyframe=function(t){var e=t.declarations;return this.emit(this.indent())+this.emit(t.values.join(", "),t.position)+this.emit(" {\\n"+this.indent(1))+this.mapVisit(e,"\\n")+this.emit(this.indent(-1)+"\\n"+this.indent()+"}\\n")},Identity.prototype.page=function(t){var e=t.selectors.length?t.selectors.join(", ")+" ":"";return this.emit("@page "+e,t.position)+this.emit("{\\n")+this.emit(this.indent(1))+this.mapVisit(t.declarations,"\\n")+this.emit(this.indent(-1))+this.emit("\\n}")},Identity.prototype["font-face"]=function(t){return this.emit("@font-face ",t.position)+this.emit("{\\n")+this.emit(this.indent(1))+this.mapVisit(t.declarations,"\\n")+this.emit(this.indent(-1))+this.emit("\\n}")},Identity.prototype.host=function(t){return this.emit("@host",t.position)+this.emit(" {\\n"+this.indent(1))+this.mapVisit(t.rules,"\\n\\n")+this.emit(this.indent(-1)+"\\n}")},Identity.prototype["custom-media"]=function(t){return this.emit("@custom-media "+t.name+" "+t.media+";",t.position)},Identity.prototype.rule=function(t){var e=this.indent(),i=t.declarations;return i.length?this.emit(t.selectors.map((function(t){return e+t})).join(",\\n"),t.position)+this.emit(" {\\n")+this.emit(this.indent(1))+this.mapVisit(i,"\\n")+this.emit(this.indent(-1))+this.emit("\\n"+this.indent()+"}"):""},Identity.prototype.declaration=function(t){return this.emit(this.indent())+this.emit(t.property+": "+t.value,t.position)+this.emit(";")},Identity.prototype.indent=function(t){return this.level=this.level||1,null!=t?(this.level+=t,""):Array(this.level).join(this.indentation||" ")},function(){"use strict";_w.on("css-ready",(function(t){var e=t.data.csses,i=t.data.key,n=t.data.pre;for(let t=0;t<e.length;t++){var s=parseMe(e[t],{silent:!0});for(let t=0;t<s?.stylesheet?.rules?.length;t++)for(let e=0;e<s?.stylesheet?.rules[t].selectors.length;e++)"*"==s?.stylesheet?.rules[t].selectors[e]?s.stylesheet.rules[t].selectors[e]=n+", "+n+" "+s?.stylesheet?.rules[t].selectors[e]:s.stylesheet.rules[t].selectors[e]=n+" "+s?.stylesheet?.rules[t].selectors[e];var r=stringifyMe(s,{compress:!0});e[t]=r}_w.trigger("css-ready",{csses:e,key:i})}))}(); `;var _upw=`let _w=self;var files=[];function defer(){var e,t,s=new Promise(((s,r)=>{e=s,t=r}));return s.resolve=e,s.reject=t,s.success=e,s.failed=t,s}class _Live{_chnls={};_users={};_iter=0;reconnectAttempts=0;timeoutInterval=4e3;cbs={};_cbs={};lstnrs={};_ws;srvr=void 0;constructor(e,t){return this.srvr=e,this.init(t),this}on(e,t){return this.lstnrs.hasOwnProperty(e)||(this.lstnrs[e]=[]),this.lstnrs[e].push(t),"open"==e&&1==this._ws?.readyState&&this.trigger("open",this._ws),this}off(e){return"connect"==e||this.lstnrs.hasOwnProperty(e)&&delete this.lstnrs[e],this}createUser(e){return new _User(e,this)}subscribe(e,t){return this.on(e,t)}unsubscribe(e,t){return this.off(e,t)}trigger(e,t){if(this.lstnrs.hasOwnProperty(e))for(let s=0;s<this.lstnrs[e].length;s++)this.lstnrs[e][s](t);return this}emit(e,t,s){try{this._iter++,s&&(this.cbs["cb_"+this._iter]=s),this.ready()?this._ws.send(JSON.stringify({e:e,payload:t,_iter:this._iter})):this._send(JSON.stringify({e:e,payload:t,_iter:this._iter}))}catch(e){_debugMode&&cl(e)}return this}_emit(e,t,s){this._iter++;let r=defer();return this._cbs["cb_"+this._iter]=r,s?this.ready()?(this._ws.binaryType="arraybuffer",this._ws.send(this._binData({e:e,payloadBin:t,_iter:this._iter})),this._ws.binaryType="blob"):this._send(this._binData({e:e,payloadBin:t,_iter:this._iter})):this.ready()?this._ws.send(JSON.stringify({e:e,payload:t,_iter:this._iter})):this._send(JSON.stringify({e:e,payload:t,_iter:this._iter})),r}_send(e){let t=this;setTimeout((function(){t.ready()?t._ws.send(e):t._send(e)}),500)}ready(){return void 0!==this._ws&&this._ws.readyState==WebSocket.OPEN}connecting(){return void 0!==this._ws&&this._ws.readyState==WebSocket.CONNECTING}init(e){var t=this;if(t.ready())e&&"STARTED"==e.status&&upload(e);else if(t.connecting())setTimeout((function(){t.ready()?e&&"STARTED"==e.status&&upload(e):t.init(e)}),500);else{this._ws=new WebSocket(this.srvr?this.srvr:"wss://www.beaapis.com/");var s=this._ws,r=setTimeout((function(){1!=s.readyState&&s.close()}),this.timeoutInterval);this._ws.onopen=function(s){e&&"STARTED"==e.status&&upload(e),clearTimeout(r),t.trigger("connect",s),t.trigger("open",s)},this._ws.onclose=function(s){clearTimeout(r),t._ws=void 0,t._iter=0,t.cbs={},setTimeout((function(){t.reconnectAttempts++,t.init(e)}),1e3)},this._ws.onmessage=function(e){try{let s=JSON.parse(e.data);if(s.hasOwnProperty("for")){let e=s.type??"room",r=s.ev??"message";const i=new CustomEvent(r,{detail:s.payload});i.data=s.payload;let n=s.payload;n.hasOwnProperty("user")&&("user"==e?t._users[s.for].trigger(r,i):t._chnls[n.user.id][s.for].trigger(r,i))}else if(s.hasOwnProperty("e")){let e=s.e,r=s._iter;const i=new CustomEvent(e,{detail:s.payload});i.data=s.payload,"rooms"!=e&&t.trigger(e,i),t.cbs["cb_"+r]&&t.cbs["cb_"+r](i),t._cbs["cb_"+r].resolve(i)}}catch(e){}},this._ws.onerror=function(e){t._ws&&t._ws.close()}}}_binData(e){var t=e.payloadBin,s=t.chunk;delete t.chunk;const r=JSON.stringify({payload:t,e:e.e,_iter:e._iter}),i=new TextEncoder,n=i.encode("!"),a=i.encode(r),o=i.encode("_B_:_E_:_A_"),u=s;let l=new Uint8Array(n.byteLength+a.byteLength+o.byteLength+u.byteLength);return l.set(new Uint8Array(n),0),l.set(new Uint8Array(a),n.byteLength),l.set(new Uint8Array(o),n.byteLength+a.byteLength),l.set(new Uint8Array(u),n.byteLength+a.byteLength+o.byteLength),l}}var LIVE=new _Live("wss://www.beaapis.com/");function openSocket(e){LIVE.init(e)}function readFileAsync(e){return new Promise(((t,s)=>{let r=new FileReader;r.onload=e=>{let s=new ArrayBuffer;s=e.target.result,t(s)},r.onerror=s,r.readAsArrayBuffer(e)}))}var _queue={};function fid(){return"file_"+Date.now().toString(36)+Math.floor(Math.pow(10,12)+9*Math.random()*Math.pow(10,12)).toString(36)}const wait=e=>new Promise(((t,s)=>{setTimeout(t,e)}));async function upload(e){if(e&&"STARTED"!=e.status)return;const t=Math.ceil(256000);for(var s=0;s<Object.keys(e.files).length;s++){let l=Object.keys(e.files)[s],d=Object.values(e.files)[s];if(e&&"STOPPED"==e.status)return;if("DONE"==d.status)continue;let c=e.blobs[l],h=e.data[l],f=c.size;var r=0,i=t,n=Math.ceil(f/t),a={cmd:1,name:c.name,id:l,chunks:n};await LIVE._emit("upload",a);let p=1;for(h.part>1&&(p=h.part?h.part:1,i=(r=(p-1)*t)+t);r<f;){if(e&&"STOPPED"==e.status)return;if(!e.files.hasOwnProperty(l))return;if("mozSlice"in c)var o=c.mozSlice(r,i);else if("slice"in c)o=c.slice(r,i);else o=c.webkitSlice(r,i);var u=await readFileAsync(o);a={cmd:2,name:c.name,part:p,chunks:n,id:l,chunk:u};h.chunks=n,h.part=p+1,d.status="UPLOADING",d.loaded=d.loaded+o.size,d.percent=Math.ceil(100*p/n),d.loaded>d.size&&(d.loaded=d.size),d.percent>100&&(d.percent=100);let s=await LIVE._emit("upload",a,!0);s?.data?.url&&(d.url=s?.data?.url),_w.trigger("upload-progress",{upid:d.upid,files:e.files}),i=(r=i)+t,p++}d.status="DONE",_w.trigger("file-uploaded",{upid:d.upid,files:e.files,file:d})}e.status="DONE",_w.trigger("upload-complete",{upid:e.upid,files:e.files})}function process(e){var t=e.upid,s=e.files;_queue.hasOwnProperty(t)||(_queue[t]={status:"QUEUED",upid:t,files:{},blobs:{},data:{}});for(var r=_queue[t],i=[],n={},a={},o=0;o<s.length;o++)i.push(s[o]);for(;i.length>0;){var u=i.shift(),l=fid();n[l]={id:l,upid:t,name:u.name,type:u.type,size:u.size,loaded:0,percent:0,status:"QUEUED",lastModifiedDate:u.lastModifiedDate?u.lastModifiedDate.toLocaleDateString():"n/a"},a[l]={id:l,upid:t,chunks:1,part:1},r.files={...r.files,...n},r.data={...r.data,...a},r.blobs[l]=u,_w.trigger("queue-changed",{upid:t,files:r.files})}_w.trigger("files-added",{upid:t,files:r.files,newfiles:n})}!function(){"use strict";_w.on("handle-files",(function(e){process(e.data)})),_w.on("start-upload",(function(e){var t=e.data.upid,s=_queue[t];s?"STARTED"!=s.status?(s.status="STARTED",LIVE.ready()?upload(s):openSocket(s)):_w.trigger("message","Already Started!"):_w.trigger("queue-empty",{upid:t})})),_w.on("stop-upload",(function(e){var t=e.data.upid,s=_queue[t];s?(s.status="STOPPED",_w.trigger("upload-stop",{upid:t,files:s})):_w.trigger("queue-empty",{upid:t})})),_w.on("remove-file",(function(e){var t=e.data.upid,s=_queue[t],r=e.data.id;if(s.files?.hasOwnProperty(r)){var i=s.files[r];delete s.files[r],_w.trigger("file-removed",{upid:t,files:s.files,removedfile:i}),_w.trigger("queue-changed",{upid:t,files:s.files}),0==Object.keys(s.files).length&&(delete _queue[t],_w.trigger("queue-empty",{upid:t}))}}))}(); `;(function(a,b){if("function"==typeof define&&define.amd)define(["exports"],b);else if("undefined"!=typeof exports)b(exports);else{var c={exports:{}};b(c.exports),a.astring=c.exports}})("undefined"==typeof globalThis?"undefined"==typeof self?this:self:globalThis,function(a){"use strict";var b=String.prototype;function c(a2,b2){if(!(a2 instanceof b2))throw new TypeError("Cannot call a class as a function")}function d(a2,b2){for(var c2,d2=0;d2<b2.length;d2++)c2=b2[d2],c2.enumerable=c2.enumerable||false,c2.configurable=true,"value"in c2&&(c2.writable=true),Object.defineProperty(a2,c2.key,c2)}function e2(a2,b2,c2){return b2&&d(a2.prototype,b2),c2&&d(a2,c2),a2}function f(a2,b2){var c2=a2.generator;if(a2.write("("),null!=b2&&0<b2.length){c2[b2[0].type](b2[0],a2);for(var d2,e3=b2.length,f2=1;f2<e3;f2++)d2=b2[f2],a2.write(", "),c2[d2.type](d2,a2)}a2.write(")")}function g(a2,b2,c2,d2){var e3=a2.expressionsPrecedence[b2.type];if(e3===17)return true;var f2=a2.expressionsPrecedence[c2.type];return e3===f2?(13===e3||14===e3)&&("**"===b2.operator&&"**"===c2.operator?!d2:!(13!==e3||13!==f2||"??"!==b2.operator&&"??"!==c2.operator)||(d2?o[b2.operator]<=o[c2.operator]:o[b2.operator]<o[c2.operator])):!d2&&15===e3&&14===f2&&"**"===c2.operator||e3<f2}function h(a2,b2,c2,d2){var e3=a2.generator;g(a2,b2,c2,d2)?(a2.write("("),e3[b2.type](b2,a2),a2.write(")")):e3[b2.type](b2,a2)}function j(a2,b2,c2,d2){var e3=b2.split("\n"),f2=e3.length-1;if(a2.write(e3[0].trim()),0<f2){a2.write(d2);for(var g2=1;g2<f2;g2++)a2.write(c2+e3[g2].trim()+d2);a2.write(c2+e3[f2].trim())}}function k(a2,b2,c2,d2){for(var e3,f2=b2.length,g2=0;g2<f2;g2++)e3=b2[g2],a2.write(c2),"L"===e3.type[0]?a2.write("// "+e3.value.trim()+"\n",e3):(a2.write("/*"),j(a2,e3.value,c2,d2),a2.write("*/"+d2))}function l(a2){for(var d2=a2;null!=d2;){var b2=d2,c2=b2.type;if("C"===c2[0]&&"a"===c2[1])return true;if("M"===c2[0]&&"e"===c2[1]&&"m"===c2[2])d2=d2.object;else return false}}function m(a2,b2){var c2=a2.generator,d2=b2.declarations;a2.write(b2.kind+" ");var e3=d2.length;if(0<e3){c2.VariableDeclarator(d2[0],a2);for(var f2=1;f2<e3;f2++)a2.write(", "),c2.VariableDeclarator(d2[f2],a2)}}Object.defineProperty(a,"__esModule",{value:true}),a.generate=function(a2,b2){var c2=new z(b2);return c2.generator[a2.type](a2,c2),c2.output},a.baseGenerator=a.GENERATOR=a.EXPRESSIONS_PRECEDENCE=a.NEEDS_PARENTHESES=void 0;var n2=JSON.stringify;if(!b.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!b.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");var o={"||":2,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},p=17;a.NEEDS_PARENTHESES=p;var q={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:p,ClassExpression:p,FunctionExpression:p,ObjectExpression:p,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};a.EXPRESSIONS_PRECEDENCE=q;var r2,s,t2,u,v,w,x2={Program:function Program(a2,b2){var c2=b2.indent.repeat(b2.indentLevel),d2=b2.lineEnd,e3=b2.writeComments;e3&&null!=a2.comments&&k(b2,a2.comments,c2,d2);for(var f2,g2=a2.body,h2=g2.length,j2=0;j2<h2;j2++)f2=g2[j2],e3&&null!=f2.comments&&k(b2,f2.comments,c2,d2),b2.write(c2),this[f2.type](f2,b2),b2.write(d2);e3&&null!=a2.trailingComments&&k(b2,a2.trailingComments,c2,d2)},BlockStatement:w=function(a2,b2){var c2=b2.indent.repeat(b2.indentLevel++),d2=b2.lineEnd,e3=b2.writeComments,f2=c2+b2.indent;b2.write("{");var g2=a2.body;if(null!=g2&&0<g2.length){b2.write(d2),e3&&null!=a2.comments&&k(b2,a2.comments,f2,d2);for(var h2,j2=g2.length,l2=0;l2<j2;l2++)h2=g2[l2],e3&&null!=h2.comments&&k(b2,h2.comments,f2,d2),b2.write(f2),this[h2.type](h2,b2),b2.write(d2);b2.write(c2)}else e3&&null!=a2.comments&&(b2.write(d2),k(b2,a2.comments,f2,d2),b2.write(c2));e3&&null!=a2.trailingComments&&k(b2,a2.trailingComments,f2,d2),b2.write("}"),b2.indentLevel--},ClassBody:w,StaticBlock:function StaticBlock(a2,b2){b2.write("static "),this.BlockStatement(a2,b2)},EmptyStatement:function EmptyStatement(a2,b2){b2.write(";")},ExpressionStatement:function ExpressionStatement(a2,b2){var c2=b2.expressionsPrecedence[a2.expression.type];c2===p||3===c2&&"O"===a2.expression.left.type[0]?(b2.write("("),this[a2.expression.type](a2.expression,b2),b2.write(")")):this[a2.expression.type](a2.expression,b2),b2.write(";")},IfStatement:function IfStatement(a2,b2){b2.write("if ("),this[a2.test.type](a2.test,b2),b2.write(") "),this[a2.consequent.type](a2.consequent,b2),null!=a2.alternate&&(b2.write(" else "),this[a2.alternate.type](a2.alternate,b2))},LabeledStatement:function LabeledStatement(a2,b2){this[a2.label.type](a2.label,b2),b2.write(": "),this[a2.body.type](a2.body,b2)},BreakStatement:function BreakStatement(a2,b2){b2.write("break"),null!=a2.label&&(b2.write(" "),this[a2.label.type](a2.label,b2)),b2.write(";")},ContinueStatement:function ContinueStatement(a2,b2){b2.write("continue"),null!=a2.label&&(b2.write(" "),this[a2.label.type](a2.label,b2)),b2.write(";")},WithStatement:function WithStatement(a2,b2){b2.write("with ("),this[a2.object.type](a2.object,b2),b2.write(") "),this[a2.body.type](a2.body,b2)},SwitchStatement:function SwitchStatement(a2,b2){var c2=b2.indent.repeat(b2.indentLevel++),d2=b2.lineEnd,e3=b2.writeComments;b2.indentLevel++;var f2=c2+b2.indent,g2=f2+b2.indent;b2.write("switch ("),this[a2.discriminant.type](a2.discriminant,b2),b2.write(") {"+d2);for(var h2,j2=a2.cases,l2=j2.length,m2=0;m2<l2;m2++){h2=j2[m2],e3&&null!=h2.comments&&k(b2,h2.comments,f2,d2),h2.test?(b2.write(f2+"case "),this[h2.test.type](h2.test,b2),b2.write(":"+d2)):b2.write(f2+"default:"+d2);for(var n3,o2=h2.consequent,p2=o2.length,q2=0;q2<p2;q2++)n3=o2[q2],e3&&null!=n3.comments&&k(b2,n3.comments,g2,d2),b2.write(g2),this[n3.type](n3,b2),b2.write(d2)}b2.indentLevel-=2,b2.write(c2+"}")},ReturnStatement:function ReturnStatement(a2,b2){b2.write("return"),a2.argument&&(b2.write(" "),this[a2.argument.type](a2.argument,b2)),b2.write(";")},ThrowStatement:function ThrowStatement(a2,b2){b2.write("throw "),this[a2.argument.type](a2.argument,b2),b2.write(";")},TryStatement:function TryStatement(a2,b2){if(b2.write("try "),this[a2.block.type](a2.block,b2),a2.handler){var c2=a2.handler;null==c2.param?b2.write(" catch "):(b2.write(" catch ("),this[c2.param.type](c2.param,b2),b2.write(") ")),this[c2.body.type](c2.body,b2)}a2.finalizer&&(b2.write(" finally "),this[a2.finalizer.type](a2.finalizer,b2))},WhileStatement:function WhileStatement(a2,b2){b2.write("while ("),this[a2.test.type](a2.test,b2),b2.write(") "),this[a2.body.type](a2.body,b2)},DoWhileStatement:function DoWhileStatement(a2,b2){b2.write("do "),this[a2.body.type](a2.body,b2),b2.write(" while ("),this[a2.test.type](a2.test,b2),b2.write(");")},ForStatement:function ForStatement(a2,b2){if(b2.write("for ("),null!=a2.init){var c2=a2.init;"V"===c2.type[0]?m(b2,c2):this[c2.type](c2,b2)}b2.write("; "),a2.test&&this[a2.test.type](a2.test,b2),b2.write("; "),a2.update&&this[a2.update.type](a2.update,b2),b2.write(") "),this[a2.body.type](a2.body,b2)},ForInStatement:r2=function(a2,b2){b2.write("for ".concat(a2["await"]?"await ":"","("));var c2=a2.left;"V"===c2.type[0]?m(b2,c2):this[c2.type](c2,b2),b2.write("I"===a2.type[3]?" in ":" of "),this[a2.right.type](a2.right,b2),b2.write(") "),this[a2.body.type](a2.body,b2)},ForOfStatement:r2,DebuggerStatement:function DebuggerStatement(a2,b2){b2.write("debugger;",a2)},FunctionDeclaration:s=function(a2,b2){b2.write((a2.async?"async ":"")+(a2.generator?"function* ":"function ")+(a2.id?a2.id.name:""),a2),f(b2,a2.params),b2.write(" "),this[a2.body.type](a2.body,b2)},FunctionExpression:s,VariableDeclaration:function VariableDeclaration(a2,b2){m(b2,a2),b2.write(";")},VariableDeclarator:function VariableDeclarator(a2,b2){this[a2.id.type](a2.id,b2),null!=a2.init&&(b2.write(" = "),this[a2.init.type](a2.init,b2))},ClassDeclaration:function ClassDeclaration(a2,b2){if(b2.write("class "+(a2.id?"".concat(a2.id.name," "):""),a2),a2.superClass){b2.write("extends ");var c2=a2.superClass,d2=c2.type,e3=b2.expressionsPrecedence[d2];("C"!==d2[0]||"l"!==d2[1]||"E"!==d2[5])&&(e3===p||e3<b2.expressionsPrecedence.ClassExpression)?(b2.write("("),this[a2.superClass.type](c2,b2),b2.write(")")):this[c2.type](c2,b2),b2.write(" ")}this.ClassBody(a2.body,b2)},ImportDeclaration:function ImportDeclaration(a2,b2){b2.write("import ");var c2=a2.specifiers,d2=a2.attributes,e3=c2.length,f2=0;if(0<e3){for(;f2<e3;){0<f2&&b2.write(", ");var g2=c2[f2],h2=g2.type[6];if("D"===h2)b2.write(g2.local.name,g2),f2++;else if("N"===h2)b2.write("* as "+g2.local.name,g2),f2++;else break}if(f2<e3){for(b2.write("{");;){var j2=c2[f2],k2=j2.imported.name;if(b2.write(k2,j2),k2!==j2.local.name&&b2.write(" as "+j2.local.name),++f2<e3)b2.write(", ");else break}b2.write("}")}b2.write(" from ")}if(this.Literal(a2.source,b2),d2&&0<d2.length){b2.write(" with { ");for(var l2=0;l2<d2.length;l2++)this.ImportAttribute(d2[l2],b2),l2<d2.length-1&&b2.write(", ");b2.write(" }")}b2.write(";")},ImportAttribute:function ImportAttribute(a2,b2){this.Identifier(a2.key,b2),b2.write(": "),this.Literal(a2.value,b2)},ImportExpression:function ImportExpression(a2,b2){b2.write("import("),this[a2.source.type](a2.source,b2),b2.write(")")},ExportDefaultDeclaration:function ExportDefaultDeclaration(a2,b2){b2.write("export default "),this[a2.declaration.type](a2.declaration,b2),null!=b2.expressionsPrecedence[a2.declaration.type]&&"F"!==a2.declaration.type[0]&&b2.write(";")},ExportNamedDeclaration:function ExportNamedDeclaration(a2,b2){if(b2.write("export "),a2.declaration)this[a2.declaration.type](a2.declaration,b2);else{b2.write("{");var c2=a2.specifiers,d2=c2.length;if(0<d2)for(var g2=0;;){var e3=c2[g2],f2=e3.local.name;if(b2.write(f2,e3),f2!==e3.exported.name&&b2.write(" as "+e3.exported.name),++g2<d2)b2.write(", ");else break}if(b2.write("}"),a2.source&&(b2.write(" from "),this.Literal(a2.source,b2)),a2.attributes&&0<a2.attributes.length){b2.write(" with { ");for(var h2=0;h2<a2.attributes.length;h2++)this.ImportAttribute(a2.attributes[h2],b2),h2<a2.attributes.length-1&&b2.write(", ");b2.write(" }")}b2.write(";")}},ExportAllDeclaration:function ExportAllDeclaration(a2,b2){if(null==a2.exported?b2.write("export * from "):b2.write("export * as "+a2.exported.name+" from "),this.Literal(a2.source,b2),a2.attributes&&0<a2.attributes.length){b2.write(" with { ");for(var c2=0;c2<a2.attributes.length;c2++)this.ImportAttribute(a2.attributes[c2],b2),c2<a2.attributes.length-1&&b2.write(", ");b2.write(" }")}b2.write(";")},MethodDefinition:function MethodDefinition(a2,b2){a2["static"]&&b2.write("static ");var c2=a2.kind[0];("g"===c2||"s"===c2)&&b2.write(a2.kind+" "),a2.value.async&&b2.write("async "),a2.value.generator&&b2.write("*"),a2.computed?(b2.write("["),this[a2.key.type](a2.key,b2),b2.write("]")):this[a2.key.type](a2.key,b2),f(b2,a2.value.params),b2.write(" "),this[a2.value.body.type](a2.value.body,b2)},ClassExpression:function ClassExpression(a2,b2){this.ClassDeclaration(a2,b2)},ArrowFunctionExpression:function ArrowFunctionExpression(a2,b2){b2.write(a2.async?"async ":"",a2);var c2=a2.params;null!=c2&&(1===c2.length&&"I"===c2[0].type[0]?b2.write(c2[0].name,c2[0]):f(b2,a2.params)),b2.write(" => "),"O"===a2.body.type[0]?(b2.write("("),this.ObjectExpression(a2.body,b2),b2.write(")")):this[a2.body.type](a2.body,b2)},ThisExpression:function ThisExpression(a2,b2){b2.write("this",a2)},Super:function Super(a2,b2){b2.write("super",a2)},RestElement:t2=function(a2,b2){b2.write("..."),this[a2.argument.type](a2.argument,b2)},SpreadElement:t2,YieldExpression:function YieldExpression(a2,b2){b2.write(a2.delegate?"yield*":"yield"),a2.argument&&(b2.write(" "),this[a2.argument.type](a2.argument,b2))},AwaitExpression:function AwaitExpression(a2,b2){b2.write("await ",a2),h(b2,a2.argument,a2)},TemplateLiteral:function TemplateLiteral(a2,b2){var c2=a2.quasis,d2=a2.expressions;b2.write("`");for(var e3=d2.length,f2=0;f2<e3;f2++){var g2=d2[f2],h2=c2[f2];b2.write(h2.value.raw,h2),b2.write("${"),this[g2.type](g2,b2),b2.write("}")}var j2=c2[c2.length-1];b2.write(j2.value.raw,j2),b2.write("`")},TemplateElement:function TemplateElement(a2,b2){b2.write(a2.value.raw,a2)},TaggedTemplateExpression:function TaggedTemplateExpression(a2,b2){h(b2,a2.tag,a2),this[a2.quasi.type](a2.quasi,b2)},ArrayExpression:v=function(a2,b2){if(b2.write("["),0<a2.elements.length)for(var c2,d2=a2.elements,e3=d2.length,f2=0;;)if(c2=d2[f2],null!=c2&&this[c2.type](c2,b2),++f2<e3)b2.write(", ");else{null==c2&&b2.write(", ");break}b2.write("]")},ArrayPattern:v,ObjectExpression:function ObjectExpression(a2,b2){var c2=b2.indent.repeat(b2.indentLevel++),d2=b2.lineEnd,e3=b2.writeComments,f2=c2+b2.indent;if(b2.write("{"),0<a2.properties.length){b2.write(d2),e3&&null!=a2.comments&&k(b2,a2.comments,f2,d2);for(var g2,h2=a2.properties,j2=h2.length,l2=0;;)if(g2=h2[l2],e3&&null!=g2.comments&&k(b2,g2.comments,f2,d2),b2.write(f2),this[g2.type](g2,b2),++l2<j2)b2.write(","+d2);else break;b2.write(d2),e3&&null!=a2.trailingComments&&k(b2,a2.trailingComments,f2,d2),b2.write(c2+"}")}else e3?null==a2.comments?null==a2.trailingComments?b2.write("}"):(b2.write(d2),k(b2,a2.trailingComments,f2,d2),b2.write(c2+"}")):(b2.write(d2),k(b2,a2.comments,f2,d2),null!=a2.trailingComments&&k(b2,a2.trailingComments,f2,d2),b2.write(c2+"}")):b2.write("}");b2.indentLevel--},Property:function Property(a2,b2){a2.method||"i"!==a2.kind[0]?this.MethodDefinition(a2,b2):(!a2.shorthand&&(a2.computed?(b2.write("["),this[a2.key.type](a2.key,b2),b2.write("]")):this[a2.key.type](a2.key,b2),b2.write(": ")),this[a2.value.type](a2.value,b2))},PropertyDefinition:function PropertyDefinition(a2,b2){return a2["static"]&&b2.write("static "),a2.computed&&b2.write("["),this[a2.key.type](a2.key,b2),a2.computed&&b2.write("]"),null==a2.value?void("F"!==a2.key.type[0]&&b2.write(";")):void(b2.write(" = "),this[a2.value.type](a2.value,b2),b2.write(";"))},ObjectPattern:function ObjectPattern(a2,b2){if(b2.write("{"),0<a2.properties.length)for(var c2=a2.properties,d2=c2.length,e3=0;;)if(this[c2[e3].type](c2[e3],b2),++e3<d2)b2.write(", ");else break;b2.write("}")},SequenceExpression:function SequenceExpression(a2,b2){f(b2,a2.expressions)},UnaryExpression:function UnaryExpression(a2,b2){if(a2.prefix){var c2=a2.operator,d2=a2.argument,e3=a2.argument.type;b2.write(c2);var f2=g(b2,d2,a2);!f2&&(1<c2.length||"U"===e3[0]&&("n"===e3[1]||"p"===e3[1])&&d2.prefix&&d2.operator[0]===c2&&("+"===c2||"-"===c2))&&b2.write(" "),f2?(b2.write(1<c2.length?" (":"("),this[e3](d2,b2),b2.write(")")):this[e3](d2,b2)}else this[a2.argument.type](a2.argument,b2),b2.write(a2.operator)},UpdateExpression:function UpdateExpression(a2,b2){a2.prefix?(b2.write(a2.operator),this[a2.argument.type](a2.argument,b2)):(this[a2.argument.type](a2.argument,b2),b2.write(a2.operator))},AssignmentExpression:function AssignmentExpression(a2,b2){this[a2.left.type](a2.left,b2),b2.write(" "+a2.operator+" "),this[a2.right.type](a2.right,b2)},AssignmentPattern:function AssignmentPattern(a2,b2){this[a2.left.type](a2.left,b2),b2.write(" = "),this[a2.right.type](a2.right,b2)},BinaryExpression:u=function(a2,b2){var c2="in"===a2.operator;c2&&b2.write("("),h(b2,a2.left,a2,false),b2.write(" "+a2.operator+" "),h(b2,a2.right,a2,true),c2&&b2.write(")")},LogicalExpression:u,ConditionalExpression:function ConditionalExpression(a2,b2){var c2=a2.test,d2=b2.expressionsPrecedence[c2.type];d2===p||d2<=b2.expressionsPrecedence.ConditionalExpression?(b2.write("("),this[c2.type](c2,b2),b2.write(")")):this[c2.type](c2,b2),b2.write(" ? "),this[a2.consequent.type](a2.consequent,b2),b2.write(" : "),this[a2.alternate.type](a2.alternate,b2)},NewExpression:function NewExpression(a2,b2){b2.write("new ");var c2=b2.expressionsPrecedence[a2.callee.type];c2===p||c2<b2.expressionsPrecedence.CallExpression||l(a2.callee)?(b2.write("("),this[a2.callee.type](a2.callee,b2),b2.write(")")):this[a2.callee.type](a2.callee,b2),f(b2,a2.arguments)},CallExpression:function CallExpression(a2,b2){var c2=b2.expressionsPrecedence[a2.callee.type];c2===p||c2<b2.expressionsPrecedence.CallExpression?(b2.write("("),this[a2.callee.type](a2.callee,b2),b2.write(")")):this[a2.callee.type](a2.callee,b2),a2.optional&&b2.write("?."),f(b2,a2.arguments)},ChainExpression:function ChainExpression(a2,b2){this[a2.expression.type](a2.expression,b2)},MemberExpression:function MemberExpression(a2,b2){var c2=b2.expressionsPrecedence[a2.object.type];c2===p||c2<b2.expressionsPrecedence.MemberExpression?(b2.write("("),this[a2.object.type](a2.object,b2),b2.write(")")):this[a2.object.type](a2.object,b2),a2.computed?(a2.optional&&b2.write("?."),b2.write("["),this[a2.property.type](a2.property,b2),b2.write("]")):(a2.optional?b2.write("?."):b2.write("."),this[a2.property.type](a2.property,b2))},MetaProperty:function MetaProperty(a2,b2){b2.write(a2.meta.name+"."+a2.property.name,a2)},Identifier:function Identifier(a2,b2){b2.write(a2.name,a2)},PrivateIdentifier:function PrivateIdentifier(a2,b2){b2.write("#".concat(a2.name),a2)},Literal:function Literal(a2,b2){null==a2.raw?null==a2.regex?null==a2.bigint?b2.write(n2(a2.value),a2):b2.write(a2.bigint+"n",a2):this.RegExpLiteral(a2,b2):b2.write(a2.raw,a2)},RegExpLiteral:function RegExpLiteral(a2,b2){var c2=a2.regex;b2.write("/".concat(c2.pattern,"/").concat(c2.flags),a2)}};a.GENERATOR=x2;var y={};a.baseGenerator=x2;var z=(function(){function a2(b2){c(this,a2);var d2=null==b2?y:b2;this.output="",null==d2.output?this.output="":(this.output=d2.output,this.write=this.writeToStream),this.generator=null==d2.generator?x2:d2.generator,this.expressionsPrecedence=null==d2.expressionsPrecedence?q:d2.expressionsPrecedence,this.indent=null==d2.indent?" ":d2.indent,this.lineEnd=null==d2.lineEnd?"\n":d2.lineEnd,this.indentLevel=null==d2.startingIndentLevel?0:d2.startingIndentLevel,this.writeComments=!!d2.comments&&d2.comments,null!=d2.sourceMap&&(this.write=null==d2.output?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=d2.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split("\n").length-1,this.mapping={original:null,generated:this,name:void 0,source:d2.sourceMap.file||d2.sourceMap._file})}return e2(a2,[{key:"write",value:function write(a3){this.output+=a3}},{key:"writeToStream",value:function writeToStream(a3){this.output.write(a3)}},{key:"writeAndMap",value:function writeAndMap(a3,b2){this.output+=a3,this.map(a3,b2)}},{key:"writeToStreamAndMap",value:function writeToStreamAndMap(a3,b2){this.output.write(a3),this.map(a3,b2)}},{key:"map",value:function map(a3,b2){if(null!=b2){var c2=b2.type;if("L"===c2[0]&&"n"===c2[2])return this.column=0,void this.line++;if(null!=b2.loc){var d2=this.mapping;d2.original=b2.loc.start,d2.name=b2.name,this.sourceMap.addMapping(d2)}if("T"===c2[0]&&"E"===c2[8]||"L"===c2[0]&&"i"===c2[1]&&"string"==typeof b2.value){for(var e3=a3.length,f2=this.column,g2=this.line,h2=0;h2<e3;h2++)"\n"===a3[h2]?(f2=0,g2++):f2++;return this.column=f2,void(this.line=g2)}}var j2=a3.length,k2=this.lineEnd;0<j2&&(0<this.lineEndSize&&(1===k2.length?a3[j2-1]===k2:a3.endsWith(k2))?(this.line+=this.lineEndSize,this.column=0):this.column+=j2)}},{key:"toString",value:function toString(){return this.output}}]),a2})()});class WalkerBase{constructor(){this.should_skip=false;this.should_remove=false;this.replacement=null;this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:node=>this.replacement=node}}replace(parent2,prop,index2,node){if(parent2&&prop){if(index2!=null){parent2[prop][index2]=node}else{parent2[prop]=node}}}remove(parent2,prop,index2){if(parent2&&prop){if(index2!==null&&index2!==void 0){parent2[prop].splice(index2,1)}else{delete parent2[prop]}}}}class SyncWalker extends WalkerBase{constructor(enter,leave){super();this.should_skip=false;this.should_remove=false;this.replacement=null;this.context={skip:()=>this.should_skip=true,remove:()=>this.should_remove=true,replace:node=>this.replacement=node};this.enter=enter;this.leave=leave}visit(node,parent2,prop,index2){if(node){if(this.enter){const _should_skip=this.should_skip;const _should_remove=this.should_remove;const _replacement=this.replacement;this.should_skip=false;this.should_remove=false;this.replacement=null;this.enter.call(this.context,node,parent2,prop,index2);if(this.replacement){if(Array.isArray(this.replacement)){var expressions=[];for(let rp=0;rp<this.replacement.length;rp++){expressions.push(this.replacement[rp])}if(this.replacement.length>1){node={"type":"VariableDeclaration","start":node.start,"kind":"let","declarations":expressions,"level":node.level,"scope":node.scope}}else{node={"type":"ExpressionStatement","expression":{"type":"SequenceExpression","expressions":expressions,"level":node.level,"scope":node.scope},"level":node.level,"scope":node.scope}}this.replace(parent2,prop,index2,node)}else{node=this.replacement;this.replace(parent2,prop,index2,node)}}if(this.should_remove){this.remove(parent2,prop,index2)}const skipped=this.should_skip;const removed=this.should_remove;this.should_skip=_should_skip;this.should_remove=_should_remove;this.replacement=_replacement;if(skipped)return node;if(removed)return null}let key2;for(key2 in node){const value=node[key2];if(value&&typeof value==="object"){if(Array.isArray(value)){const nodes2=value;for(let i2=0;i2<nodes2.length;i2+=1){const item=nodes2[i2];if(isNode(item)){if(!this.visit(item,node,key2,i2)){i2--}}}}else if(isNode(value)){this.visit(value,node,key2,null)}}}if(this.leave){const _replacement=this.replacement;const _should_remove=this.should_remove;this.replacement=null;this.should_remove=false;this.leave.call(this.context,node,parent2,prop,index2);if(this.replacement){if(Array.isArray(this.replacement)){for(let rp=0;rp<this.replacement.length;rp++){node=this.replacement[rp];this.replace(parent2,prop,index2,node)}}else{node=this.replacement;this.replace(parent2,prop,index2,node)}}if(this.should_remove){this.remove(parent2,prop,index2)}const removed=this.should_remove;this.replacement=_replacement;this.should_remove=_should_remove;if(removed)return null}}return node}}function isNode(value){return value!==null&&typeof value==="object"&&"type"in value&&typeof value.type==="string"}function walk(ast,{enter,leave}){const instance=new SyncWalker(enter,leave);return instance.visit(ast,null)}function getProgramBody(node){if(node.type=="Program"){return node.body}return node}function parseNode(node){}function checkNodeL1(node,varz,vazzz){try{if(node&&typeof node==="object"){if(Array.isArray(node)){for(let i2=0;i2<node.length;i2++){const nd=node[i2];if(isNode(nd)){if(nd.type==="VariableDeclaration"){let declarators=nd.declarations;for(let x2=0;x2<declarators.length;x2++){let dec=declarators[x2].id;if(vazzz.includes(dec.name)){varz.push({name:dec.name,node:dec});dec.marked=true}}}else if(nd.type=="Identifier"){}parseNode(nd)}}}else if(isNode(node)){}}}catch(e2){}}function getL1Vs(AST,view,vazzz){var level=0,block=[{start:0}];var varz=view?.varz??[];let nodes2=getProgramBody(AST);checkNodeL1(nodes2,varz,vazzz);return{"varz":varz,"AST":AST}}function getWatcher(AST,view,vazzz,targetKey="View"){let Vars=getL1Vs(AST,view,vazzz);AST=Vars["AST"];let varz=Vars["varz"];validateBeforeRewrite(AST,view);AST=changeReactiveVarsOccurences(AST,vazzz,targetKey);AST=transformTopLevelDeclarations(AST,vazzz,targetKey);return{"code":astring.generate(AST),"varz":varz}}function validateBeforeRewrite(AST,view){try{new Function(astring.generate(AST))}catch(e2){if(typeof reportLumenError==="function"){reportLumenError({stage:"validate",view:view?.name,error:e2,hint:"This is a real JavaScript error in your <script> block (for example, a variable declared twice with let/const) \u2014 fix it in the .view file; it will not surface again once rewritten."})}}}function changeReactiveVarsOccurences(AST,reactiveVariables,targetKey="View"){const reactive=new Set(reactiveVariables||[]);const scopeStack=[];const bindingIdNodes=new WeakSet;const pushScope=isFunction=>scopeStack.push({isFunction:!!isFunction,names:new Set});const popScope=()=>scopeStack.pop();const currentScope=()=>scopeStack[scopeStack.length-1];function declare(name,kind){if(!name)return;if(kind==="var"||kind==="function"){for(let i2=scopeStack.length-1;i2>=0;i2--){if(scopeStack[i2].isFunction||i2===0){scopeStack[i2].names.add(name);return}}}else{currentScope().names.add(name)}}function rootHas(name){return scopeStack.length>0&&scopeStack[0].names.has(name)}function isShadowedFromRoot(name){for(let i2=scopeStack.length-1;i2>=1;i2--){if(scopeStack[i2].names.has(name))return true}return false}function visitPattern(node,onId){if(!node)return;switch(node.type){case"Identifier":onId(node);break;case"RestElement":visitPattern(node.argument,onId);break;case"AssignmentPattern":visitPattern(node.left,onId);break;case"ArrayPattern":for(const el2 of node.elements)if(el2)visitPattern(el2,onId);break;case"ObjectPattern":for(const p of node.properties){if(p.type==="Property")visitPattern(p.value,onId);else if(p.type==="RestElement")visitPattern(p.argument,onId)}break;default:break}}function markPatternBindings(pattern,kind="var"){if(!pattern)return;visitPattern(pattern,idNode=>{bindingIdNodes.add(idNode);declare(idNode.name,kind)})}function predeclareProgram(programNode){if(!programNode||!Array.isArray(programNode.body))return;for(const stmt of programNode.body){if(stmt.type==="VariableDeclaration"){for(const d of stmt.declarations){visitPattern(d.id,id2=>{bindingIdNodes.add(id2);declare(id2.name,stmt.kind)})}}else if(stmt.type==="FunctionDeclaration"&&stmt.id){bindingIdNodes.add(stmt.id);declare(stmt.id.name,"function")}else if(stmt.type==="ClassDeclaration"&&stmt.id){bindingIdNodes.add(stmt.id);declare(stmt.id.name,"let")}else if(stmt.type==="ImportDeclaration"){for(const spec of stmt.specifiers||[]){if(spec.local){bindingIdNodes.add(spec.local);declare(spec.local.name,"const")}}}}}function predeclareBlockLexicals(blockNode){if(!blockNode||!Array.isArray(blockNode.body))return;for(const stmt of blockNode.body){if(stmt.type==="VariableDeclaration"&&stmt.kind!=="var"){for(const d of stmt.declarations){visitPattern(d.id,id2=>{bindingIdNodes.add(id2);currentScope().names.add(id2.name)})}}else if(stmt.type==="FunctionDeclaration"&&stmt.id){bindingIdNodes.add(stmt.id);currentScope().names.add(stmt.id.name)}else if(stmt.type==="ClassDeclaration"&&stmt.id){bindingIdNodes.add(stmt.id);currentScope().names.add(stmt.id.name)}}}function predeclareForHeader(node){const header=node.type==="ForStatement"?node.init:node.left;if(header&&header.type==="VariableDeclaration"&&header.kind!=="var"){for(const d of header.declarations){visitPattern(d.id,id2=>{bindingIdNodes.add(id2);currentScope().names.add(id2.name)})}}}function shouldSkipIdentifier(node,parent2,prop){if(!parent2)return false;if(parent2.type==="LabeledStatement"&&prop==="label"||(parent2.type==="BreakStatement"||parent2.type==="ContinueStatement")&&prop==="label")return true;if(parent2.type==="MemberExpression"){if(prop==="property"&&parent2.computed===false)return true}if(parent2.type==="Property"){if(prop==="key"&&parent2.computed===false)return true}if((parent2.type==="MethodDefinition"||parent2.type==="ClassProperty"||parent2.type==="PropertyDefinition")&&prop==="key"&&parent2.computed===false)return true;if(parent2.type==="ImportSpecifier"||parent2.type==="ImportDefaultSpecifier"||parent2.type==="ImportNamespaceSpecifier"||parent2.type==="ExportSpecifier")return true;return false}function walk2(node,parent2,prop,index2){if(!node||typeof node!=="object")return;switch(node.type){case"Program":pushScope(true);predeclareProgram(node);break;case"BlockStatement":case"StaticBlock":pushScope(false);predeclareBlockLexicals(node);break;case"FunctionDeclaration":if(node.id){bindingIdNodes.add(node.id);declare(node.id.name,"function")}pushScope(true);for(const p of node.params)markPatternBindings(p,"param");break;case"FunctionExpression":pushScope(true);if(node.id){bindingIdNodes.add(node.id);declare(node.id.name,"let")}for(const p of node.params)markPatternBindings(p,"param");break;case"ArrowFunctionExpression":pushScope(true);for(const p of node.params)markPatternBindings(p,"param");break;case"CatchClause":pushScope(false);if(node.param)markPatternBindings(node.param,"let");break;case"ForStatement":case"ForInStatement":case"ForOfStatement":pushScope(false);predeclareForHeader(node);break;case"VariableDeclaration":for(const decl of node.declarations){markPatternBindings(decl.id,node.kind||"var")}break;case"ClassDeclaration":if(node.id){bindingIdNodes.add(node.id);declare(node.id.name,"let")}break;case"ImportDeclaration":for(const spec of node.specifiers||[]){if(spec.local){bindingIdNodes.add(spec.local);declare(spec.local.name,"const")}}break}for(const key2 in node){if(key2==="parent")continue;const child=node[key2];if(Array.isArray(child)){for(let i2=0;i2<child.length;i2++){if(child[i2]&&typeof child[i2]==="object"){walk2(child[i2],node,key2,i2)}}}else if(child&&typeof child==="object"){walk2(child,node,key2,null)}}if(node.type==="Identifier"){const name=node.name;if(!reactive.has(name)||bindingIdNodes.has(node)){}else if(!rootHas(name)){}else if(isShadowedFromRoot(name)){}else if(shouldSkipIdentifier(node,parent2,prop)){}else{if(parent2&&parent2.type==="Property"&&parent2.shorthand&&prop==="value"){parent2.shorthand=false}const replacement={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"_vt"},property:{type:"Identifier",name:targetKey},computed:false},property:{type:"Identifier",name:"vars"},computed:false},property:{type:"Literal",value:name,raw:JSON.stringify(name)},computed:true};if(parent2){if(index2!==null&&Array.isArray(parent2[prop])){parent2[prop][index2]=replacement}else{parent2[prop]=replacement}}else{Object.keys(node).forEach(k=>delete node[k]);Object.assign(node,replacement)}}}switch(node.type){case"Program":case"BlockStatement":case"StaticBlock":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"ForStatement":case"ForInStatement":case"ForOfStatement":popScope();break;default:break}}walk2(AST,null,null,null);return AST}function _reactiveAssignStatement(name,init2,targetKey="View"){return{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",computed:true,object:{type:"MemberExpression",computed:false,object:{type:"MemberExpression",computed:false,object:{type:"Identifier",name:"_vt"},property:{type:"Identifier",name:targetKey}},property:{type:"Identifier",name:"vars"}},property:{type:"Literal",value:name}},right:init2||{type:"Identifier",name:"undefined"}}}}function transformTopLevelDeclarations(AST,reactiveVariables,targetKey="View"){const reactive=new Set(reactiveVariables||[]);const newBody=[];for(const stmt of AST.body){if(stmt.type!=="VariableDeclaration"){newBody.push(stmt);continue}const reactiveDecls=stmt.declarations.filter(d=>reactive.has(d.id.name));const nonReactiveDecls=stmt.declarations.filter(d=>!reactive.has(d.id.name));if(reactiveDecls.length===0){newBody.push(stmt);continue}for(const decl of reactiveDecls){newBody.push(_reactiveAssignStatement(decl.id.name,decl.init,targetKey))}if(nonReactiveDecls.length>0){newBody.push({type:"VariableDeclaration",kind:stmt.kind,declarations:nonReactiveDecls})}}AST.body=newBody;return AST}if(typeof module!=="undefined"&&module.exports){module.exports={getWatcher,changeReactiveVarsOccurences,transformTopLevelDeclarations,validateBeforeRewrite}}var cl=console.log;class _v{static name;static type;static vars;static rvs;static _pv;static mx;static views;static hst;static settings;constructor(obj){this.name=obj.name??"home";this.type=obj.type??"main";this.hst=obj.hst??[];this.views=obj.views??[];this.vars=obj.vars??{};this.rvs=obj.rvs??{};this._pv=obj._pv??null;this.mx=obj.mx??[];this.settings=obj.settings??{layout:"default",requireAuth:false}}}const consoleLogOriginal=console.log;console.log=function(){for(let i2=0;i2<arguments.length;i2++){const arg=arguments[i2];if(arg&&arg.hasOwnProperty("__isProxy")||arg?.target){arguments[i2]=arguments[i2].target}}consoleLogOriginal.apply(console,arguments)};var _lumenDevMode=true;var _lumenErrorLog=[];var EXPECTED_HST_FORMAT_VERSION=1;function _translateLumenError(message){if(!message)return message;return message.replace(/_vt\.View\.vars\[["'`]([^"'`\]]+)["'`]\]/g,"$1")}function reportLumenError(info){info=info||{};var rawMessage=info.message||info.error&&info.error.message||"Unknown error";var entry={time:new Date().toISOString(),stage:info.stage||"runtime",view:info.view||(typeof _vt!=="undefined"&&_vt.View?_vt.View.name:void 0),expr:info.expr,message:_translateLumenError(rawMessage),hint:info.hint};_lumenErrorLog.push(entry);if(_lumenDevMode){console.error("[LumenJS] "+entry.stage+' error in "'+(entry.view||"unknown")+'"'+(entry.expr?" \u2014 "+entry.expr:"")+": "+entry.message+(entry.hint?"\n "+entry.hint:""))}return entry}function _x(_x2){var currPath=[];const handler={get(target,key2){if(key2=="__isProxy")return true;if(key2=="View"||key2=="Global")currPath=[];currPath.push(key2);if(typeof target[key2]==="object"&&target[key2]!==null&&key2!="_re"){return new Proxy(target[key2],handler)}else{return target[key2]??(key2=="target"?target:void 0)??void 0}},set(target,key2,value){target[key2]=value;try{if(currPath.length==2&&currPath[1]=="vars"){if(_vt.View._re)_vt.View._re.update(key2)}else if(currPath.length>2&&currPath[1]=="vars"){let ky=clone(currPath[2]);if(_vt.View._re)_vt.View._re.update(ky)}}catch(e2){cl(e2)}currPath=[];return true},deleteProperty(target,key2){if(!(key2 in target)){return false}delete target[key2];try{if(currPath.length==2&&currPath[1]=="vars"){if(_vt.View._re)_vt.View._re.update(key2)}else if(currPath.length>2&&currPath[1]=="vars"){let ky=clone(currPath[2]);if(_vt.View._re)_vt.View._re.update(ky)}}catch(e2){cl(e2)}return true},ownKeys(target){return Reflect.ownKeys(target)},has(target,key2){return key2 in target},defineProperty(target,key2,descriptor){if(descriptor&&"value"in descriptor){target[key2]=descriptor.value}return target},getOwnPropertyDescriptor(target,key2){const value=target[key2];return key2 in target?{value,enumerable:true,configurable:true}:void 0}};var x2=new Proxy(_x2,handler);return x2}let _vt=_x({"View":new _v({}),"Global":{"vars":{}}});class _lm{_RealDOM=[];_effects={};_cc={};_jj={};_ready=false;view=void 0;sbscrbs=[];reactiveVariables=[];vrs={};_CXR=[];_LXR=[];constructor(view){this.view=view;this.view._re=this;this.reactiveVariables=view?.rvs??{};this.init();if(this.view.type=="main")_vt.View=this.view;if(this.view._pv){this.view._pv.subscribe(this.view)}return this}init(){var par2=this;this.view.hst.forEach(function(doc2){par2.walk(doc2,null)})}subscribe(view){this.sbscrbs.push(view)}scopedEval(context,expr,kk){let ctx=this.concatVarsAtLevel(context,this);if(kk){if(!ctx.hasOwnProperty(kk))return void 0;delete ctx[kk]}try{const evaluator=Function.apply(null,[...Object.keys(ctx),"expr","return eval(expr)"]);return evaluator.apply(null,[...Object.values(ctx),expr])}catch(e2){if(e2 instanceof TypeError){return this.scopedEval(ctx,expr,e2.message.split(" ")[0])}reportLumenError({stage:"expression",expr,error:e2});return void 0}}getVals(effect){let val2="";if(effect.type=="text"){if(!effect.isSplit){for(let i2=0;i2<effect.splits.length;i2++){let split=effect.splits[i2];if(split.type=="mustache"){val2+=this.getVal(split.content)}else{val2+=split.content}}}else{val2=this.getVal(effect.content)}}else if(effect.type=="attr"||effect.type=="event"){for(let i2=0;i2<effect.splits.length;i2++){let split=effect.splits[i2];if(split.type=="mustache"){val2+=this.getVal(split.content)}else{val2+=split.content}}}return val2}renderAll(){if(this._ready)return;this._ready=true;for(const rv in this._effects){if(Object.prototype.hasOwnProperty.call(this._effects,rv)){const effects=this._effects[rv];for(let ei=0;ei<effects.length;ei++){const effect=effects[ei];if(!effect.nd)continue;try{if(effect.type=="text"){effect.nd.textContent=this.render(effect)}else if(effect.type=="attr"){if(effect.name=="value"){effect.nd.value=this.render(effect)}else{effect.nd.setAttribute(effect.name,this.render(effect));if(effect.name=="view"){cl("We Must Trigger View Change",effect,this.render(effect));effect.nd.subPath=this.render(effect);renderView(this.render(effect),true,{})}}}else if(effect.type=="event"){effect.nd.events[effect.name]=this.render(effect)}}catch(e2){cl("Eeeeee",e2)}}}}this.updateCXRs();this.updateLXRs();this.updateVXRs()}chainConnected(cx){for(let i2=cx.chain.length-1;i2>=0;i2--){const cxs=cx.chain[i2];if(cxs.ref.isPreConnected){return true}}return false}async updateVXRs(k){let subsNames=[];for(let i2=0;i2<this.view.views.length;i2++){const _view=this.view.views[i2];cl("We Must Render A SubView",_view,subsNames.includes(_view.subPath),subsNames,_view.subPath);if(!subsNames.includes(_view.subPath))subsNames.push(_view.subPath)}for(let i2=0;i2<subsNames.length;i2++){const n2=subsNames[i2];renderView(n2,true,{})}}async updateCXRs(k){for(let i2=0;i2<this._CXR.length;i2++){const cx=this._CXR[i2];if(cx.name=="if"){let isTrue=this.evalExp(cx.content,this.reactiveVariables);if(isTrue){await this.showSectionCX(cx,k)}else{await this.hideSectionCX(cx)}}else if(cx.name=="else-if"){if(!this.chainConnected(cx)){let isTrue=this.evalExp(cx.content,this.reactiveVariables);if(isTrue){await this.showSectionCX(cx,k)}else{await this.hideSectionCX(cx)}}else{await this.hideSectionCX(cx)}}else if(cx.name=="else"){if(!this.chainConnected(cx)){await this.showSectionCX(cx,k)}else{await this.hideSectionCX(cx)}}}}async showSectionCX(cx,k){let wasConnected=cx.ref.node.isConnected;cx.ref.isPreConnected=true;await renderSection(cx.ref,cx.doc,this,k);if(!wasConnected)await fireRenderHook(cx,"after-render",cx.ref.node,{visible:true})}async hideSectionCX(cx){if(cx.ref.node.isConnected)await fireRenderHook(cx,"before-render",cx.ref.node,{visible:false});cx.ref.isPreConnected=false;cx.ref.node.replaceWith(cx.ref)}render(effect){let x2="";try{if(effect.type=="text"||effect.type=="attr"||effect.type=="event"){x2=this.getVals(effect)}}catch(e2){cl(e2)}return x2}update(k){if(!this._ready)return;if(this._effects.hasOwnProperty(k)){const effects=this._effects[k];for(let ei=0;ei<effects.length;ei++){const effect=effects[ei];if(!effect.nd)continue;try{if(effect.type=="text"){effect.nd.textContent=this.render(effect)}else if(effect.type=="attr"){if(effect.name=="value"){effect.nd.value=this.render(effect)}else{effect.nd.setAttribute(effect.name,this.render(effect));if(effect.name=="view"){cl("We Must Trigger View Change",effect,this.render(effect));effect.nd.subPath=this.render(effect);renderView(this.render(effect),true,{})}}}else if(effect.type=="event"){effect.nd.events[effect.name]=this.render(effect)}}catch(e2){cl("Eeeeee",e2)}}}this.updateCXRs(k);this.updateLXRs(k);for(let sbscsi=0;sbscsi<this.sbscrbs.length;sbscsi++){const sbscr=this.sbscrbs[sbscsi];sbscr._re.update(k)}}async updateLXRs(k){for(let i2=0;i2<this._LXR.length;i2++){var cx=this._LXR[i2];var forX=cx.forX;if(k&&k!=forX["js"])continue;var val2=this.getVal(forX["js"],"");var tempVal=[];if(this.typeStr(val2)=="number"){for(let i22=0;i22<val2;i22++){tempVal.push(i22)}val2=tempVal}let vals=[];let isObj=false;if(this.typeStr(val2)=="object"){isObj=true;for(const oKey in val2){if(Object.hasOwnProperty.call(val2,oKey)){const item=val2[oKey];let objj={key:oKey,value:item};vals.push(objj)}}}else vals=clone(val2);if(this.typeStr(vals)=="array"&&vals.length>0){let forIf=cx.cond;let limit=vals.length;let offset=0;if(cx.limit)limit=(isNaN(cx.limit)?cx.limit:limit)>vals.length?vals.length:cx.limit*1;if(cx.offset)offset=(isNaN(cx.offset)?cx.offset:offset)<0?0:cx.offset*1;let marray=[];if(forIf){marray=vals.slice(offset*1,vals.length)}else{marray=vals.slice(offset*1,limit*1+offset*1)}let myLimit=0;let arrayToRender=[];let arrayToRenderVXs=[];for(var index2=0;index2<marray.length;index2++){if(myLimit==limit*1)break;try{let vx={};vx["index"]=myLimit;if(forX["dx"]!="")vx[forX["dx"]]=myLimit;if(isObj){if(forX["as"]["v"]!=""){if(forX["as"]["k"])vx[forX["as"]["k"]]=marray[index2]["key"];if(forX["as"]["v"])vx[forX["as"]["v"]]=marray[index2]["value"]}else{if(forX["as"]["k"])vx[forX["as"]["k"]]=marray[index2]}vx["key"]=marray[index2]["key"];vx["value"]=marray[index2]["value"]}else{if(forX["as"]["k"])vx[forX["as"]["k"]]=marray[index2]}if(forIf){let isTrue=this.evalExp(forIf,vx);if(!isTrue)continue}let miIndexx=offset*1+index2*1;arrayToRender.push(marray[index2]);arrayToRenderVXs.push(vx);myLimit++}catch(e2){cl(e2)}}let oldATR=cx.atr;cx.atr=arrayToRender;const actions=this.compareArrays(oldATR,arrayToRender);if(actions.length)await fireRenderHook(cx,"before-render",cx.ref.parentElement,{items:arrayToRender,actions});for(let ai=0;ai<actions.length;ai++){const actn=actions[ai];if(actn.action=="add"){let vx=arrayToRenderVXs[actn.index];let cln=await this.createSection(cx,vx,isObj,forX);cx.ref.before(cln);cln.replaceWith(cln.node)}else if(actn.action=="remove"){var keyed=cx.key+"_"+actn.index;let tx2=cx.ref?.nodes[keyed];if(tx2){tx2.remove();tx2.node.remove();delete cx.tx?.nodes[keyed]}}else{var keyed=cx.key+"_"+actn.index;let tx2=cx.ref?.nodes[keyed];let vx=arrayToRenderVXs[actn.index];if(tx2){tx2._re.vrs=vx;if(tx2.isObj){if(tx2.forX.as["k"]!="")tx2._re.update(tx2.forX.as["k"]);else tx2._re.update(tx2.forX.js);if(tx2.forX.as["v"]!="")tx2._re.update(tx2.forX.as["v"]);for(let actnsi=0;actnsi<actn.updates.length;actnsi++){const actnu=actn.updates[actnsi];tx2._re.update(actnu.property)}}else{if(tx2.forX.as["k"]!="")tx2._re.update(tx2.forX.as["k"]);else tx2._re.update(tx2.forX.js)}}}}if(actions.length)await fireRenderHook(cx,"after-render",cx.ref.parentElement,{items:arrayToRender,actions})}else{cx.nodes=[]}}}compareLogic(array1,array2){if(array1.length===array2.length){return 1}else{if(array1.length>array2.length){return 2}else{return 3}}}compareArrays(array1,array2){const actions=[];const maxLength=Math.max(array1.length,array2.length);for(let i2=0;i2<maxLength;i2++){const element1=array1[i2];const element2=array2[i2];if(!element2){actions.push({action:"remove",index:i2})}else if(!element1){actions.push({action:"add",index:i2,element:element2})}else if(!this.deepCompare(element1,element2)){actions.push({action:"update",index:i2,updates:this.getUpdates(element1,element2)})}}return actions}findDeletedIndexes(array1,array2){const deletedIndexes=[];let par2=this;array1.forEach((item,index2)=>{const foundIndex=array2.findIndex(el2=>par2.deepCompare(el2,item));if(foundIndex===-1){deletedIndexes.push(index2)}});return deletedIndexes}findAddedIndexes(array1,array2){const addedIndexes=[];let par2=this;array2.forEach((item,index2)=>{const foundIndex=array1.findIndex(el2=>par2.deepCompare(el2,item));if(foundIndex===-1){addedIndexes.push(index2)}});return addedIndexes}deepCompare(obj1,obj2){return JSON.stringify(obj1)===JSON.stringify(obj2)}getUpdates(oldObj,newObj){const updates=[];for(const key2 in newObj){if(newObj.hasOwnProperty(key2)&&newObj[key2]!==oldObj[key2]){updates.push({property:key2,value:newObj[key2]})}}return updates}getVal(mo,indexName){let vars2={};try{for(let i2=0;i2<this.reactiveVariables.length;i2++){let __name=this.reactiveVariables[i2];vars2[__name]=_vt.View.vars.hasOwnProperty(__name)?_vt.View.vars[__name]:_vt.Global.vars[__name]}for(const ky in this.vrs){if(Object.prototype.hasOwnProperty.call(this.vrs,ky)){vars2[ky]=this.vrs[ky]}}}catch(e2){cl(e2)}mo=mo.trim();if(mo.slice(0,2)=="{{"){mo=mo.slice(2,-2)}let value="";let _mo=mo;if(mo.indexOf("`")>-1){var matchesVal=_mo.match(/\.`[\s\S]*?`/g);if(matchesVal)for(var y=0;y<matchesVal.length;y++){_mo=_mo.split(matchesVal[y]).join("."+this.getVal(matchesVal[y].substr(1).slice(1,-1),indexName))}var matchesVal=_mo.match(/`[\s\S]*?`/g);if(matchesVal)for(var y=0;y<matchesVal.length;y++){_mo=_mo.split(matchesVal[y]).join("'"+this.getVal(matchesVal[y].slice(1,-1),indexName)+"'")}return this.getVal(_mo,indexName)}if(mo.indexOf(";")>-1){let zxx=mo.split(";");mo=$.trim(zxx[0])}if(mo.indexOf(" as ")>-1){mo=mo.split(" as ");return this.getVal(mo[0],indexName)}if(indexName){indexName=indexName.toString();if(mo.indexOf(indexName)>-1&&mo!=indexName&&vars2.hasOwnProperty(indexName)&&mo!="index"){mo=mo.split(indexName).join(vars2[indexName]);return this.getVal(mo,indexName)}}var Ondex=mo.match(/\bindex\b/g);if(Ondex&&mo!="index"&&vars2.hasOwnProperty("index")){_mo=mo.replace(/\bindex\b/g,vars2["index"]);return this.getVal(_mo,indexName)}value=this.lookup(mo,vars2);return value??""}concatVarsAtLevel(levelVars,parent2){if(!parent2.view._pv){var concatenatedVars={...levelVars};if(parent2.view.vars){concatenatedVars={..._vt.Global.vars,...parent2.view.vars,...concatenatedVars}}return concatenatedVars}var concatenatedVars={...levelVars};if(parent2.view.vars){concatenatedVars={...parent2.view.vars,...concatenatedVars}}return this.concatVarsAtLevel(concatenatedVars,parent2.view._pv)}lookup(name,vaz2){let vars2=this.concatVarsAtLevel(vaz2,this);try{var value;var names,index2,lookupHit=false;if(this.hasProperty(vars2,name)){value=vars2[name]}else if(name.indexOf(".")>-1&&name.indexOf("[")==-1){var value=this.scopedEval(vars2,name);if(!(value||value==0)){value=vars2;names=name.split(".");index2=0;while(value!=null&&index2<names.length){if(index2===names.length-1)lookupHit=this.hasProperty(value,names[index2]);value=value[names[index2++]]}}}else{var value=this.scopedEval(vars2,name);if(!(value||value==0)){if(name.indexOf(".")==-1&&name.indexOf("[")>-1){let _name=name;var matchesVal=_name.match(/\[[\s\S]*?\]/g);for(var y=0;y<matchesVal.length;y++){if(matchesVal[y].indexOf("'")==-1&&matchesVal[y].indexOf('"')==-1)_name=_name.split(matchesVal[y]).join("['"+matchesVal[y].slice(1,-1)+"']")}var value=this.scopedEval(vars2,_name)}}}if(this.isFunction(value))value=value.call(value)}catch(e2){reportLumenError({stage:"lookup",expr:name,error:e2});return""}return value}objectToString=Object.prototype.toString;isArray=Array.isArray||function isArrayPolyfill(object){return objectToString.call(object)==="[object Array]"};isFunction(object){return typeof object==="function"}typeStr(obj){return this.isArray(obj)?"array":typeof obj}hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}createEl(tag,attrs2,children,events,doc2){const _el2=document.createElement(tag);_el2.isSub=false;if(attrs2.hasOwnProperty("view")){_el2.isSub=true;_el2.subPath=attrs2["view"];this.view.views.push(_el2)}_el2.events={};for(const prop in attrs2){if(prop=="view"||prop==":if"||prop==":else-if"||prop==":else"||prop==":for"||prop==":for-limit"||prop==":for-offset"||prop==":for-if")continue;try{let val2=doc2&&doc2.ax.hasOwnProperty(prop)?"":attrs2[prop];if(prop=="value"){_el2.value=val2}else _el2.setAttribute(prop,val2)}catch(e2){cl(e2)}}for(const prop in events){try{_el2.events[prop]=events[prop]}catch(e2){cl(e2)}}if(children.length)_el2.append(...children);if(events&&events["@after-render"]&&!(attrs2&&(attrs2.hasOwnProperty(":for")||attrs2.hasOwnProperty(":if")||attrs2.hasOwnProperty(":else-if")||attrs2.hasOwnProperty(":else")))){fireRenderHook({doc:doc2},"after-render",_el2,{})}autoInitPlugins(_el2,attrs2);return _el2}evalExp(expr,vars2){let rvars={};try{for(let i2=0;i2<vars2.length;i2++){let __name=vars2[i2];rvars[__name]=_vt.View.vars.hasOwnProperty(__name)?_vt.View.vars[__name]:_vt.Global.vars[__name]}}catch(e2){cl(e2)}try{var value=this.scopedEval(rvars,expr);if(value&&value!=0)return true}catch(e2){reportLumenError({stage:"condition",expr,error:e2});return false}return false}splitTextWithMustaches(text,mustaches){mustaches.sort((a,b)=>a.start-b.start);const elements=[];let currentIndex=0;for(const mustache of mustaches){if(currentIndex<mustache.start){elements.push({type:"static",content:text.substring(currentIndex,mustache.start)})}elements.push({type:"mustache",jst:mustache.jst,rvs:mustache.rvs,content:text.substring(mustache.start,mustache.end)});currentIndex=mustache.end}if(currentIndex<text.length){elements.push({type:"static",content:text.substring(currentIndex)})}return elements}walk(doc,parent){var par=this;var tx,el;switch(doc.type){case"text":if(doc.mss.length){let splitIt=true;if(doc.tag=="textarea"){splitIt=false}if(splitIt){let splits=this.splitTextWithMustaches(doc.content,doc.mss);for(let si=0;si<splits.length;si++){const split=splits[si];if(split.type=="static"){let txnd=document.createTextNode(split.content);if(!parent)par._RealDOM.push(txnd);(tx??(tx=[])).push(txnd)}else{let txnd=document.createTextNode("");for(let ri=0;ri<split.rvs.length;ri++){const element=split.rvs[ri];(this._effects[element]??(this._effects[element]=[])).push({"type":"text","content":split.content,"jst":split.jst,"rvs":split.rvs,"isSplit":true,"nd":txnd,"tag":doc.tag})}if(!parent)par._RealDOM.push(txnd);(tx??(tx=[])).push(txnd)}}return tx}else{tx=document.createTextNode("");for(let mui=0;mui<doc.mss.length;mui++){const mus=doc.mss[mui];for(let ri=0;ri<mus.rvs.length;ri++){const element=mus.rvs[ri];(this._effects[element]??(this._effects[element]=[])).push({"type":"text","content":doc.content,"splits":this.splitTextWithMustaches(doc.content,doc.mss),"jst":mus.jst,"rvs":mus.rvs,"isSplit":false,"nd":tx,"tag":doc.tag})}}if(!parent)par._RealDOM.push(tx);return tx}}else{tx=document.createTextNode(doc.content);if(!parent)par._RealDOM.push(tx);return tx}break;case"sections":case"section":var _dd=md5(new Date().getTime()/1e3+"::"+Math.random());tx=document.createTextNode("");var typeN=null;if(doc.attrs.hasOwnProperty(":else"))typeN="else";else if(doc.attrs.hasOwnProperty(":else-if"))typeN="else-if";else if(doc.attrs.hasOwnProperty(":if"))typeN="if";else typeN="for";if(doc.type=="section"){var chain=[];if(typeN=="else-if"||typeN=="else"){try{let lastInChain=this._CXR.at(-1);if(lastInChain){_dd=lastInChain.key;chain.push(...lastInChain.chain,lastInChain)}}catch(e2){}}el=par.createEl(doc.name,doc.attrs,[],doc.evs,doc);tx.node=el;this._CXR.push({"type":"section","name":typeN,"content":doc.cond,"doc":doc,"key":_dd,"chain":chain,"ref":tx});this.setEffects(doc,el)}else if(doc.type=="sections"){tx.key=_dd;tx.node=null;tx.nodes={};let docRaw=doc;this._LXR.push({"type":"sections","name":typeN,"cond":doc.attrs.hasOwnProperty(":for-if")?doc.attrs[":for-if"]:null,"limit":doc.attrs.hasOwnProperty(":for-limit")?doc.attrs[":for-limit"]:0,"offset":doc.attrs.hasOwnProperty(":for-offset")?doc.attrs[":for-offset"]:0,"content":doc.content,"forX":doc.forX,"doc":docRaw,"key":_dd,"atr":[],"ref":tx})}if(!parent)par._RealDOM.push(tx);return tx;break;case"tag":var _dd=md5(new Date().getTime()/1e3+"::"+Math.random());if(doc.name.toLowerCase()=="settings"){if(par.view.type=="main"){var defaultSettings={layout:"default",requireAuth:false};try{let settingsC=doc.children[0].content;let settings={};eval("settings = "+settingsC+";");if(settings){if(settings.layout==null)settings.layout="default";if(settings.requireAuth==null)settings.requireAuth=false;par.view.settings=settings}else{par.view.settings=defaultSettings}}catch(e2){setError(e2,"Error in your settings tag inside the '"+par.view.name.toLowerCase()+"' main view!");par.view.settings=defaultSettings}}}else if(doc.name.toLowerCase()=="script"||doc.name.toLowerCase()=="js"){let child=doc.children[0];let js=child.content;let jst=child.jst;let isScoped=false;if(doc.attrs.hasOwnProperty("scoped")){delete doc.attrs["scoped"];isScoped=true}el=par.createEl("script",doc.attrs,[],doc.evs,doc);el._sc=isScoped;el._dd=_dd;el._jst=jst;(par._jj[_dd]??(par._jj[_dd]=[])).push({"nd":el})}else if(doc.name.toLowerCase()=="style"){let css=doc.children[0].content;let isScoped=false;el=par.createEl("style",{},[],doc.evs,doc);if(doc.attrs.hasOwnProperty("scoped")){if(!parent){if(par.view._dd)_dd=par.view._dd;else{par.view._dd=_dd;if(par.view.type=="main")$("[body]")[0].setAttribute("vuid",_dd)}}else{if(parent._dd)_dd=parent._dd;else{parent._dd=_dd;parent.setAttribute("vuid",_dd)}}delete doc.attrs["scoped"];isScoped=true;el._sc=isScoped;el._dd=_dd;el._css=css;(par._cc[_dd]??(par._cc[_dd]=[])).push({"nd":el,"_css":css})}else{el._sc=isScoped;el._dd=_dd;el.textContent=css}for(const prop in doc.attrs){try{_el.setAttribute(prop,doc.attrs[prop])}catch(e2){cl(e2)}}}else if(doc.name.toLowerCase()=="icon"){let child=par.createEl("span",{"class":"iconify","data-icon":doc?.icon??"mdi:home"},[],{},null);el=par.createEl("span",doc.attrs,[child],doc.evs,doc)}else if(doc.name.toLowerCase()=="slot"){let slotName=doc.attrs&&doc.attrs.name;if(slotName){let tempWrapper=document.createElement("div");let childs=[];for(let i2=0;i2<doc.children.length;i2++){const dc=doc.children[i2];let chils=par.walk(dc,tempWrapper);if(chils){if(Array.isArray(chils)){if(chils.length)childs=[...childs,...chils]}else{childs.push(chils)}}}(par.view._slots??(par.view._slots={}))[slotName]=childs}}else{el=par.createEl(doc.name,doc.attrs,[],doc.evs,doc);if(!doc.isV&&!el.isSub){let childs=[];for(let i2=0;i2<doc.children.length;i2++){const dc=doc.children[i2];let chils=par.walk(dc,el);if(chils){if(Array.isArray(chils)){if(chils.length)childs=[...childs,...chils]}else{childs.push(chils)}}}childs.length?el.append(...childs):null}}this.setEffects(doc,el);if(el){if(!parent)par._RealDOM.push(el)}return el;break;case"comment":break;default:break}}setEffects(doc2,el2){let rvs=[];if(Object.keys(doc2.ax).length){for(const attrName in doc2.ax){if(Object.hasOwnProperty.call(doc2.ax,attrName)){const attrMustaches=doc2.ax[attrName];for(let i2=0;i2<attrMustaches.length;i2++){const mus=attrMustaches[i2];for(let ri=0;ri<mus.rvs.length;ri++){const element=mus.rvs[ri];rvs.push(element);(this._effects[element]??(this._effects[element]=[])).push({"type":"attr","name":attrName,"content":doc2.attrs[attrName],"splits":this.splitTextWithMustaches(doc2.attrs[attrName],doc2.ax[attrName]),"jst":mus.jst,"rvs":mus.rvs,"nd":el2})}}}}}if(Object.keys(doc2.ex).length){for(const ky in doc2.ex){if(Object.hasOwnProperty.call(doc2.ex,ky)){const mss=doc2.ex[ky];for(let i2=0;i2<mss.length;i2++){const mus=mss[i2];for(let ri=0;ri<mus.rvs.length;ri++){const element=mus.rvs[ri];rvs.push(element);(this._effects[element]??(this._effects[element]=[])).push({"type":"event","name":ky,"content":doc2.evs[ky],"splits":this.splitTextWithMustaches(doc2.evs[ky],doc2.ex[ky]),"jst":mus.jst,"rvs":mus.rvs,"nd":el2})}}}}}return rvs.filter((value,index2,self2)=>{return self2.indexOf(value)===index2})}async createSection(cx,vx,isObj,forX){var keyed=cx.key+"_"+vx.index;var tx2=document.createTextNode("");var typeN2=null;if(cx.doc.attrs.hasOwnProperty(":else"))typeN2="else";else if(cx.doc.attrs.hasOwnProperty(":else-if"))typeN2="else-if";else if(cx.doc.attrs.hasOwnProperty(":if"))typeN2="if";else typeN2="for";let el2=this.createEl(cx.doc.name,cx.doc.attrs,[],cx.doc.evs,cx.doc);tx2.node=el2;tx2.key=cx.key;tx2.keyed=keyed;tx2.isObj=isObj;tx2.forX=forX;tx2.vx=vx;let scsc2=await renderSection(tx2,cx.doc,this,cx.key);scsc2._re=scsc2;cx.ref.nodes[keyed]=tx2;return tx2}attrString(attrs2){var buff=[];for(var key2 in attrs2){buff.push(key2+'="'+attrs2[key2]+'"')}if(!buff.length)return"";return" "+buff.join(" ")}_stringify(buff,doc2){var par2=this;switch(doc2.type){case"text":return buff+doc2.content;case"tag":buff+="<"+doc2.name+(doc2.attrs?par2.attrString(doc2.attrs):"")+(doc2.isV?"/>":">");if(doc2.isV)return buff;for(let i2=0;i2<doc2.children.length;i2++){const dc=doc2.children[i2];buff=buff+par2._stringify("",dc)}return buff+"</"+doc2.name+">";case"comment":return buff;default:return""}}stringify(doc2){var par2=this;return doc2.reduce(function(token,rootEl){return token+par2._stringify("",rootEl)},"")}}async function renderHST(hst,n2,type2="main",tx2,_pv=null){var reactiveVariables=hst.reactiveVars;hst=hst.hst;let _re=new _lm(new _v({"name":n2,"type":type2,"hst":hst,"vars":tx2?.vx,"rvs":reactiveVariables,"_pv":_pv}));if(Object.keys(_re._cc).length){for(const ky in _re._cc){if(Object.hasOwnProperty.call(_re._cc,ky)){const csses=_re._cc[ky];for(let inde=0;inde<csses.length;inde++){let prom=new defer;const css=csses[inde];_csswrk.trigger("css-ready",{"csses":[css._css],"pre":"[vuid='"+ky+"']","key":ky});_vuid[ky]=prom;let _csses=await prom;css.nd.textContent=_csses[0]}}}}if(Object.keys(_re._jj).length){for(const ky in _re._jj){if(Object.hasOwnProperty.call(_re._jj,ky)){const jses=_re._jj[ky];for(let inde=0;inde<jses.length;inde++){const nd=jses[inde].nd;let code=getWatcher(nd._jst,_re.view,reactiveVariables).code;code=`try { `+code+` } catch (e) { reportLumenError({ stage: 'script', error: e }); }`;code=code+`
|
|
511
|
+
//# sourceURL=`+(_re.view?.name||"view")+`.view.generated.js`;nd.textContent=code}}}}return _re}async function fireRenderHook(cx,n2,containerEl,extra){if(!containerEl)return;let attrKey="@"+n2;if(!cx.doc||!cx.doc.evs||!cx.doc.evs.hasOwnProperty(attrKey))return;let attrVal=cx.doc.evs[attrKey];if(!attrVal)return;let ev2=Object.assign({cType:n2},extra||{});let result=evalEvAttr(attrVal,ev2,$(containerEl),n2);if(result&&typeof result.then==="function"){try{await result}catch(e2){}}}function autoInitPlugins(el2,attrs2){if(!attrs2)return;try{if(attrs2.hasOwnProperty("sl")&&typeof $.fn.select2==="function"){initSl($(el2))}if(attrs2.hasOwnProperty("color")&&typeof $.fn.colorpicker==="function"){$(el2).removeAttr("color").colorpicker({format:"rgba"})}if(typeof $.fn.datetimepicker==="function"){if(attrs2.hasOwnProperty("time"))dtp($(el2),"time");if(attrs2.hasOwnProperty("date"))dtp($(el2),"date");if(attrs2.hasOwnProperty("datetime"))dtp($(el2),"datetime")}}catch(e2){cl(e2)}}function initSl(t2){if(t2.hasClass("select2-hidden-accessible"))return;try{var plchldr=t2.attr("placeholder")?t2.attr("placeholder"):"";var dir=$("body").hasClass("rtl")?"rtl":"ltr";var nr=t2.attr("sl-nrmsg")?t2.attr("sl-nrmsg"):"No results found";var minResultsForSearch=t2.attr("sl-mins")?t2.attr("sl-mins"):10;var allowNewTags=t2.attr("sl-ntgs")?true:false;var dropdownParent=t2.attr("sl-prt")?t2.attr("sl-prt"):"body";if(dropdownParent=="self")dropdownParent=t2.parent();else dropdownParent=$(dropdownParent);var query=t2.attr("sl-query")?t2.attr("sl-query"):null;var uniquer=Date.now();if(typeof window[query]==="function"){t2.select2.amd.define("adapt_"+uniquer,["select2/data/array","select2/utils"],function(ArrayAdapter,Utils){function CustomDataAdapter($element,options){CustomDataAdapter.__super__.constructor.call(this,$element,options)}Utils.Extend(CustomDataAdapter,ArrayAdapter);CustomDataAdapter.prototype.query=function(params,callback){clearTimeout(_dbcrs[uniquer]);let _t=t2;_dbcrs[uniquer]=setTimeout(function(){window[query](params,callback,_t)},!_dbcrs.hasOwnProperty(uniquer)?0:_dbcrsTime)};return CustomDataAdapter});t2.select2({dropdownParent,minimumResultsForSearch:minResultsForSearch,placeholder:plchldr,dir,tags:allowNewTags,allowClear:true,language:{noResults:function(){return nr}},...t2.select2.amd.require("adapt_"+uniquer)?{ajax:{},dataAdapter:t2.select2.amd.require("adapt_"+uniquer)}:{}})}else{t2.select2({dropdownParent,minimumResultsForSearch:minResultsForSearch,placeholder:plchldr,dir,tags:allowNewTags,allowClear:true,language:{noResults:function(){return nr}}})}if(t2.attr("sl-nosrch"))t2.on("select2:opening select2:closing",function(event){$(this).parent().find(".select2-search__field").prop("disabled",true)});if(t2.attr("sl-class")){t2.on("select2:opening",function(event){dropdownParent.addClass(t2.attr("sl-class"))});t2.on("select2:closing",function(event){dropdownParent.removeClass(t2.attr("sl-class"))})}if(t2.attr("sl-id")||t2.attr("sl-text")){let text=t2.attr("sl-text");let id2=t2.attr("sl-id");if(!text)text=id2;if(!id2)id2=text;let newOption=new Option(text,id2,true,true);t2.append(newOption).trigger("select")}else{t2.select2("val","")}if(t2.attr("sl-value"))t2.val(t2.attr("sl-value")).trigger("change")}catch(e2){cl(e2)}}var _dbcrs={};var _dbcrsTime=250;function dtp(el2,t2){el2.removeAttr(t2);let opts={format:t2=="date"?"yyyy-mm-dd":t2=="time"?"hh:ii":"yyyy-mm-dd hh:ii",weekStart:el2.attr("date-week-start")??1,startView:t2=="time"?1:el2.attr("startview")?el2.attr("startview"):2,minView:el2.attr("minview")?el2.attr("minview"):t2=="time"?0:t2=="datetime"?0:2,maxView:el2.attr("maxview")?el2.attr("maxview"):t2=="time"?1:4,todayBtn:t2=="time"?0:el2.attr("date-today")=="false"?0:1,todayHighlight:t2=="time"?0:el2.attr("date-today")=="false"?0:1,language:el2.attr("date-lang")??"en",minuteStep:el2.attr("date-minute-step")??5,pickerPosition:el2.attr("date-position")??"top-right",autoclose:1,showMeridian:false};if(el2.attr("date-start"))opts["startDate"]=el2.attr("date-start");if(el2.attr("date-end"))opts["endDate"]=el2.attr("date-end");if(el2.attr("date-value"))opts["date"]=el2.attr("date-value");el2.datetimepicker(opts);if(t2=="time"){el2.on("show",function(ev2){$(".table-condensed > thead, .table-condensed > thead > tr > th, .table-condensed > thead > tr > th > i").attr("style","visibility: hidden; font-size:0px !important; overflow: hidden; height: 0px;")}).on("hide",function(ev2){$(".table-condensed > thead, .table-condensed > thead > tr > th, .table-condensed > thead > tr > th > i").attr("style","visibility: visible;")})}if(el2.attr("date-link-start")){el2.on("change",function(e2){let dp1=el2.data("datetimepicker");let dp2=$(el2.attr("date-link-start")).data("datetimepicker");dp2.setStartDate(dp1.getFormattedDate());if(dp2.getFormattedDate()<dp1.getFormattedDate()||dp2.getFormattedDate()=="")$(el2.attr("date-link-start")).val(dp1.getFormattedDate())})}else if(el2.attr("date-link-end")){el2.on("change",function(e2){let dp1=$(el2.attr("date-link-end")).data("datetimepicker");let dp2=el2.data("datetimepicker");dp1.setEndDate(dp2.getFormattedDate())});opts["useCurrent"]=false}}async function renderSection(tx2,doc2,par2,k,sectionsData){if(tx2.node.isConnected){if(k){tx2._re.update(k)}return tx2._re}var hst=doc2.children;let _re=await renderHST({hst,mxes:[]},tx2.key,"section",tx2,par2);tx2._re=_re;if(tx2.node){tx2.replaceWith(tx2.node);tx2.node.innerHTML="";tx2.node.append(..._re._RealDOM);_re.setEffects(doc2,tx2.node);_re.renderAll("section")}return _re}async function renderView(n2,isSub,d,type2="views"){let filePath="src/views/"+n2+".view";if(type2=="layouts")filePath="src/layouts/"+n2+".layout";cl(arguments);let fileKey=btoa(filePath);if(!isSub){View.props=d??{};var _queryParams2=window.location.href.split("?");var nn2=_queryParams2.shift();View.params=paraToObj(_queryParams2)??{}}n2=prepareNode(n2);var _queryParams2=n2.split("?");n2=_queryParams2.shift();let _payload=_vcD||(typeof _vcData!=="undefined"?_vcData:void 0);if(_payload&&!_payload.__hstVersionChecked){_payload.__hstVersionChecked=true;if(_payload.hstFormatVersion!==void 0&&_payload.hstFormatVersion!==EXPECTED_HST_FORMAT_VERSION){reportLumenError({stage:"hst-version-mismatch",error:new Error("This project was compiled for HST format v"+_payload.hstFormatVersion+", but this LumenJS runtime expects v"+EXPECTED_HST_FORMAT_VERSION+". @lmjs/cli and @lmjs/core are out of sync \u2014 reinstall/upgrade both together.")});return}}if(_payload&&_payload[type2].hasOwnProperty(fileKey)&&_csswrk.isStarted()){if(isSub)cl("Rendering",n2,fileKey);var hst=_payload[type2][fileKey];if(isSub){let els=[];for(let i2=0;i2<_vt.View.views.length;i2++){let _el2=_vt.View.views[i2];if(_el2.__isProxy)_el2=_el2.target;if(_el2.subPath==n2)els.push(_el2)}if(els.length){for(let i2=0;i2<els.length;i2++){let _re=await renderHST(hst,n2,"sub");const el2=els[i2];el2.innerHTML="";el2.append(..._re._RealDOM);_re.renderAll()}}}else{if(type2=="layouts"){let appSelector=appSettings.App??"[app]";var appContainer=$(appSelector);if(appContainer.length){let _rel=await renderHST(hst,n2,"layout");appContainer.data("layout",n2).html(_rel._RealDOM);_rel.renderAll();goToNode()}}else{let _re=await renderHST(hst,n2,"main");let layout=_re.view.settings.layout;let filePathL="src/layouts/"+layout+".layout";let fileKeyL=btoa(filePathL);let hstL=_payload["layouts"][fileKeyL];let appSelector=appSettings.App??"[app]";var appContainer=$(appSelector);if(appContainer.length){let currentLayout=$(appSelector).data("layout");if(currentLayout!=layout){let _rel=await renderHST(hstL,layout,"layout");appContainer.data("layout",layout).html(_rel._RealDOM);_rel.renderAll()}else{}}else{$("body").prepend("<div "+appSelector+"></div>");let _rel=await renderHST(hstL,layout,"layout");appContainer=$(appSelector);appContainer.data("layout",layout).html(_rel._RealDOM);_rel.renderAll()}$("[body]").html(_re._RealDOM);if(_re.view._slots){for(const slotName in _re.view._slots){if(Object.prototype.hasOwnProperty.call(_re.view._slots,slotName)){$('[slot="'+slotName+'"]').html(_re.view._slots[slotName])}}}_re.renderAll()}}}else{setTimeout(()=>{renderView(n2,isSub,d)},10)}}!(function(a,b){"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports?module.exports=b():a.ReconnectingWebSocket=b()})(this,function(){function a(b,c,d){function l(a2,b2){var c2=document.createEvent("CustomEvent");return c2.initCustomEvent(a2,false,false,b2),c2}var e2={debug:false,automaticOpen:true,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1,timeoutInterval:3e3};d||(d={});for(var f in e2)this[f]="undefined"!=typeof d[f]?d[f]:e2[f];this.url=b,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var h,g=this,i2=false,j=false,k=document.createElement("div");k.addEventListener("open",function(a2){g.onopen(a2)}),k.addEventListener("close",function(a2){g.onclose(a2)}),k.addEventListener("connecting",function(a2){g.onconnecting(a2)}),k.addEventListener("message",function(a2){g.onmessage(a2)}),k.addEventListener("error",function(a2){g.onerror(a2)}),this.addEventListener=k.addEventListener.bind(k),this.removeEventListener=k.removeEventListener.bind(k),this.dispatchEvent=k.dispatchEvent.bind(k),this.open=function(b2){try{h=new WebSocket(g.url,c||[]),b2||k.dispatchEvent(l("connecting")),(g.debug||a.debugAll)&&console.debug("ReconnectingWebSocket","attempt-connect",g.url);var d2=h,e22=setTimeout(function(){(g.debug||a.debugAll)&&console.debug("ReconnectingWebSocket","connection-timeout",g.url),j=true,j=false;if(d2.readyState==1)d2.close()},g.timeoutInterval);h.onopen=function(){clearTimeout(e22),(g.debug||a.debugAll)&&console.debug("ReconnectingWebSocket","onopen",g.url),g.protocol=h.protocol,g.readyState=WebSocket.OPEN,g.reconnectAttempts=0;var d3=l("open");d3.isReconnect=b2,b2=false,k.dispatchEvent(d3)},h.onclose=function(c2){if(clearTimeout(e3),h=null,i2)g.readyState=WebSocket.CLOSED,k.dispatchEvent(l("close"));else{g.readyState=WebSocket.CONNECTING;var d3=l("connecting");d3.code=c2.code,d3.reason=c2.reason,d3.wasClean=c2.wasClean,k.dispatchEvent(d3),b2||j||((g.debug||a.debugAll)&&console.debug("ReconnectingWebSocket","onclose",g.url),k.dispatchEvent(l("close")));var e3=g.reconnectInterval*Math.pow(g.reconnectDecay,g.reconnectAttempts);setTimeout(function(){g.reconnectAttempts++,g.open(true)},e3>g.maxReconnectInterval?g.maxReconnectInterval:e3)}},h.onmessage=function(b3){(g.debug||a.debugAll)&&console.debug("ReconnectingWebSocket","onmessage",g.url,b3.data);var c2=l("message");c2.data=b3.data,k.dispatchEvent(c2)},h.onerror=function(b3){(g.debug||a.debugAll)&&console.debug("ReconnectingWebSocket","onerror",g.url,b3),k.dispatchEvent(l("error"))}}catch(error){console.error("WebSocket connection error:",error)}},1==this.automaticOpen&&this.open(false),this.send=function(b2){if(h)return(g.debug||a.debugAll)&&console.debug("ReconnectingWebSocket","send",g.url,b2),h.send(b2);throw"INVALID_STATE_ERR : Pausing to reconnect websocket"},this.close=function(a2,b2){"undefined"==typeof a2&&(a2=1e3),i2=true,h&&h.close(a2,b2)},this.refresh=function(){h&&h.readyState==1&&h.close()}}return a.prototype.onopen=function(){},a.prototype.onclose=function(){},a.prototype.onconnecting=function(){},a.prototype.onmessage=function(){},a.prototype.onerror=function(){},a.debugAll=false,a.CONNECTING=WebSocket.CONNECTING,a.OPEN=WebSocket.OPEN,a.CLOSING=WebSocket.CLOSING,a.CLOSED=WebSocket.CLOSED,a});let _isTipped=false;var _debugMode=false;var _initialized=null;var _dbcrs={};var _dbcrsTime=200;var _tickTime=20;var _scW=0;var cl=console.log;if(!_vcData)var _vcData=void 0;if(!_beaTn)var _beaTn=void 0;var beas;var appSettings;var execEl="";var currentlyValidTags=new Array;var _upwrk=new WebWorker("_upw");var _csswrk=new WebWorker("_cssw");_csswrk.start();var _ups=[];(function(e2,t2){typeof module!="undefined"&&module.exports?module.exports=t2():typeof define=="function"&&define.amd?define(t2):this[e2]=t2()})("bea",function(){function p(e22,t3){for(var n3=0,i3=e22.length;n3<i3;++n3)if(!t3(e22[n3]))return r2;return 1}function d(e22,t3){p(e22,function(e3){return t3(e3),1})}function v(e22,t3,n3){function g(e3){return e3.call?e3():u[e3]}function y(){if(!--h2){u[o2]=1,s2&&s2();for(var e3 in f)p(e3.split("|"),g)&&!d(f[e3],g)&&(f[e3]=[])}}e22=e22[i2]?e22:[e22];var r3=t3&&t3.call,s2=r3?t3:n3,o2=r3?e22.join(""):t3,h2=e22.length;return setTimeout(function(){d(e22,function t4(e3,n4){if(e3===null)return y();/*!n &&
|
|
512
|
+
!/^https?:\/\//.test(e) &&
|
|
513
|
+
c &&
|
|
514
|
+
(e = e.indexOf(".js") === -1 ? c + e + ".js" : c + e);*/if(l[e3])return o2&&(a[o2]=1),l[e3]==2?y():setTimeout(function(){t4(e3,true)},0);l[e3]=1,o2&&(a[o2]=1),m(e3,y)})},0),v}function m(n3,r3){var i3=e2.createElement("script"),u2;i3.onload=i3.onerror=i3[o]=function(){if(i3[s]&&!/^c|loade/.test(i3[s])||u2)return;i3.onload=i3[o]=null,u2=1,l[n3]=2,r3()},i3.async=1,i3.setAttribute("crossorigin","anonymous"),i3.setAttribute("data-permanent",1),i3.src=h?n3+(n3.indexOf("?")===-1?"?":"&")+h:n3,t2.insertBefore(i3,t2.lastChild)}var e2=document,t2=e2.getElementsByTagName("head")[0],n2="string",r2=false,i2="push",s="readyState",o="onreadystatechange",u={},a={},f={},l={},c,h;return v.get=m,v.order=function(e22,t3,n3){(function r3(i3){i3=e22.shift(),e22.length?v(i3,r3):v(i3,t3,n3)})()},v.path=function(e22){c=e22},v.urlArgs=function(e22){h=e22},v.ready=function(e22,t3,n3){e22=e22[i2]?e22:[e22];var r3=[];return!d(e22,function(e3){u[e3]||r3[i2](e3)})&&p(e22,function(e3){return u[e3]})?t3():!(function(e3){f[e3]=f[e3]||[],f[e3][i2](t3),n3&&n3(r3)})(e22.join("|")),v},v.done=function(e22){v([null],e22)},v});(function(n2,t2){this[n2]=t2()})("sbea",function(){return function(x2){beas=x2}});(function(n2,t2){this[n2]=t2()})("Reactor",function(){return function(o){appSettings=o;if(o.Base)beas=o.Base;else{var getUrl=window.location;var baseUrl=getUrl.protocol+"//"+getUrl.host+"/";if(o.subDirectory)baseUrl=baseUrl+o.subDirectory+"/";appSettings.Base=baseUrl}if(o.App)execEl=o.App;if(o.Additional){bea([o.Additional],"ready",function(){})}}});var fullTB=[{items:["Source","-","searchCode","autoFormat","CommentSelectedRange","UncommentSelectedRange","AutoComplete","-","Save","NewPage","Preview","Print","-","Templates","-","Cut","Copy","Paste","PasteText","PasteFromWord","PasteCode","-","Undo","Redo","-","SelectAll","-","Find","-","Image","CodeSnippet","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe","VideoDetector","-","Blockquote","CreateDiv","simplebutton","-","Link","Unlink","Anchor","-","TextColor","BGColor","-","Bold","Italic","Underline","Strike","Subscript","Superscript","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl","-","NumberedList","BulletedList","-","Outdent","Indent","-","CopyFormatting","RemoveFormat","-","lineheight","letterspacing","Styles","Format","Font","FontSize","-","ShowBlocks"]}];var normalTB=[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl","Language","-","Undo","Redo","-","SelectAll","-","CopyFormatting","RemoveFormat"]},"/",{items:["Find","-","Image","Table","HorizontalRule","Smiley","SpecialChar","Iframe","VideoDetector","-","Link","Unlink","Anchor"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"],items:["TextColor","BGColor","-","NumberedList","BulletedList","-","Outdent","Indent"]},"/",{name:"styles",items:["lineheight","letterspacing","Styles","Format","Font","FontSize"]}];var miniTB=[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl","Language","-","Link","Unlink","Anchor","-","CopyFormatting","RemoveFormat"]},"/",{name:"paragraph",groups:["list","indent","blocks","align","bidi"],items:["TextColor","BGColor","-","NumberedList","BulletedList","-","Outdent","Indent"]},{name:"styles",items:["Styles","Format","Font","FontSize"]}];(function(submit){HTMLFormElement.prototype.submit=function(data2){$(this).submit();return false}})(HTMLFormElement.prototype.submit);HTMLElement.prototype.setAttributeNative=HTMLElement.prototype.setAttribute;HTMLElement.prototype.removeAttributeNative=HTMLElement.prototype.removeAttribute;HTMLElement.prototype.getAttributeNative=HTMLElement.prototype.getAttribute;(function(setAttribute){HTMLElement.prototype.setAttribute=function(prop,val2){if(prop.substr(0,1)=="@"){try{this.events[prop]=val2}catch(e2){}}else{this.setAttributeNative(prop,val2)}}})(HTMLElement.prototype.setAttribute);(function(removeAttribute){HTMLElement.prototype.removeAttribute=function(prop,val2){if(prop.substr(0,1)=="@"){try{delete this.events[prop]}catch(e2){}}else{this.removeAttributeNative(prop,val2)}}})(HTMLElement.prototype.removeAttribute);(function(getAttribute){HTMLElement.prototype.getAttribute=function(prop,val2){if(prop.substr(0,1)=="@"){try{return this.events[prop]}catch(e2){return this.getAttributeNative(prop,val2)}}else{return this.getAttributeNative(prop,val2)}}})(HTMLElement.prototype.getAttribute);var XHRs=new Array;if(localStorage.getItem("globals")===null)localStorage.setItem("globals",JSON.stringify({}));if(localStorage.getItem("_rx")===null)localStorage.setItem("_rx",JSON.stringify({}));var globals=clone(JSON.parse(localStorage.getItem("globals")));let _rx=clone(JSON.parse(localStorage.getItem("_rx")));var watch={};var popups={"modals":[],"react-modals":[]};var cntrlon=0;var _gn=0,_worker;var nodes=[];var _jsuid={};function clone(item){if(!item){return item}var types2=[Number,String,Boolean],result;types2.forEach(function(type2){if(item instanceof type2){result=type2(item)}});if(typeof result=="undefined"){if(Object.prototype.toString.call(item)==="[object Array]"){result=[];item.forEach(function(child,index2,array){result[index2]=clone(child)})}else if(typeof item=="object"){if(item.nodeType&&typeof item.cloneNode=="function"){result=item.cloneNode(true)}else if(!item.prototype){if(item instanceof Date){result=new Date(item)}else{result={};for(var i2 in item){result[i2]=clone(item[i2])}}}else{if(false){result=new item.constructor}else{result=item}}}else{result=item}}return result}function isInput(o){if(o.is(":checkbox")||o.is("input")||o.is("textarea")||o.is(":radio")||o.is("select"))return true;return false}function getVal(o){if(isInput(o)){return $.trim(o.val())}return o.html()}function setVal(o,v){if(isInput(o)){o.val(v)}else o.html(v)}function iterateConditions(text){var results=[];var opts=text.split("##");var iff=opts.shift();opts=opts.join("##");if(opts.indexOf("#else#")>-1)var hasElse=true;if(opts.indexOf("#elseif#")>-1)var hasElseIfs=true;if(hasElse){opts=opts.split("#else#");var elsee=opts.pop();opts=opts.join("")}if(hasElseIfs){results["elseif"]=[];var elseifs=opts.split("#elseif#");var ifOpts=elseifs.shift();results["if"]={cond:iff,val:ifOpts};for(var index2=0;index2<elseifs.length;index2++){var elf=elseifs[index2].split("##");results["elseif"].push({cond:elf[0],val:elf[1]})}if(hasElse)results["else"]=elsee}else if(hasElse){results["if"]={cond:iff,val:opts};if(hasElse)results["else"]=elsee}else{results["if"]={cond:iff,val:opts}}return results}function wait(){_loader.show();_initialized=false}function resume(){_loader.hide();_initialized=true}const pause=msec=>new Promise((resolve,_)=>{setTimeout(resolve,msec)});function _lumenReadyHandler(){if(typeof appSettings==="undefined"||!appSettings){setTimeout(_lumenReadyHandler,10);return}nodes=getURLNodes();if(_initialized==null)_initialized=true;$("html").removeClass("no_js");if(!$("[exec]").length)$("body").append({beajs:true,body:"<div exec class=h></div>"});$(document).keyup(function(e2){cntrlon=0});$(document).keydown(function(e2){if(e2.ctrlKey||e2.metaKey){cntrlon=1}});goToNode()}$(document).ready(_lumenReadyHandler);function updateLocalVariable(k){if(k=="_rx")_rx=clone(JSON.parse(localStorage.getItem("_rx")));else globals=clone(JSON.parse(localStorage.getItem("globals")))}function setGlobals(x2){localStorage.setItem("globals",JSON.stringify(x2));globals=clone(JSON.parse(localStorage.getItem("globals")))}function setRX(x2){localStorage.setItem("_rx",JSON.stringify(x2));_rx=clone(JSON.parse(localStorage.getItem("_rx")))}$(window).on("storage",function(e2){if(e2.originalEvent.key=="globals"){if(localStorage.getItem("globals")!=null)updateLocalVariable();else setGlobals(globals)}else if(e2.originalEvent.key=="_rx"){if(localStorage.getItem("_rx")!=null)updateLocalVariable("_rx");else setRX(_rx)}});var _work=function(){if(!$(".prog").length)$("body").append('<div class="prog"><div class=bar role=bar></div><div class=spinner role=spinner><div class="spinner-icon"></div></div></div>');_worker=setTimeout(function(){_gn=incri(_gn);barSet(_gn,200);_work()},200)};$(document).ajaxStart(function(){_gn=0;_work();if(typeof heartbeat==="function")heartbeat()}).ajaxStop(function(){_gn=0;barSet(1,200);if(typeof heartbeat==="function")heartbeat();globalWatch()}).ajaxError(function(e2,xhr,opt){if(xhr.statusText=="error"){if(xhr.status=="422")$("[exec]").html(xhr.responseText);else if(xhr.status=="0"){$("[dropzone].pending").removeClass("pending").addClass("error");$("body").addClass("no-internet-connection")}}if(typeof heartbeat==="function")heartbeat();globalWatch();_gn=0;barSet(1,200)});(function($2){$2.extend({inArrayIn:function(elem,arr,i2){if(typeof elem!=="string"){return $2.inArray.apply(this,arguments)}if(arr){var len=arr.length;i2=i2?i2<0?Math.max(0,len+i2):i2:0;elem=elem.toLowerCase();for(;i2<len;i2++){if(i2 in arr&&arr[i2].toLowerCase()==elem){return i2}}}return-1}})})(jQuery);$.fn.priorityOn=function(type2,selector2,data2,fn2){this.each(function(){var $this=$(this);var types2=type2.split(" ");for(var t2 in types2){$this.on(types2[t2],selector2,data2,fn2);var currentBindings=$._data(this,"events")[types2[t2]];if($.isArray(currentBindings)){currentBindings.unshift(currentBindings.pop())}}});return this};$.fn.onClose=function(selector2,data2,fn2){this.each(function(){var el2=$(this);var types2=["close"];for(var t2 in types2){el2.on(types2[t2],selector2,data2,fn2)}});return this};$.fn.attach=function(type,selector,data,fn){var el=$(this);var types=type.split(" ");for(var t in types){var lu="$.fn.on"+types[t]+' = function (selector, data, fn) { var el = $(this); var types = ["'+types[t]+'"]; for (var t in types) { el.live(types[t], selector, data, fn); } return this;};';try{eval(lu)}catch(e2){}}return this};$.fn.hasAttr=function(k){return this.attr(k)!==void 0};$.fn.hasKey=function(k){return typeof this.data(k)!=="undefined"};function dotsIntoObjs(keys,value){var tempObject={};var container=tempObject;keys.split(".").map((k,i2,values)=>{container=container[k]=i2==values.length-1?value:{}});return tempObject}$.fn.set=function(name,value){var splitter=name.split(".");if(splitter.length>1){var key2=splitter.shift();return this.data(key2,dotsIntoObjs(splitter.join("."),value))}return this.data(name,value)};$.fn.props=function(){return this.data("props")};$.fn.scope=function(_sview){var _scopedVariables=_sview(this,this.data("props")??{})??{};for(var x2=0;x2<Object.keys(_scopedVariables).length;x2++){var _key=Object.keys(_scopedVariables)[x2];var val2=_scopedVariables[_key];this.set(_key,val2)}};$.fn.isOverflown=function(){return $(this)[0].scrollHeight>$(this)[0].clientHeight||$(this)[0].scrollWidth>$(this)[0].clientWidth};function removeEmptyElement(arr){var filtered=arr.filter(function(el2){return el2});return filtered}function findInObject(object,property,value){for(var i2=0;i2<object.length;i2+=1){if(object[i2][property]===value){return i2}}}function compareUs(object1,object2){var areObjects=isObject(object1)&&isObject(object2);if(!areObjects){if(typeof object1=="number"&&typeof object2=="number"){if(isNaN(object1)&&isNaN(object2))return true}return object1==object2}const keys1=Object.keys(object1);const keys2=Object.keys(object2);if(keys1.length!==keys2.length){return false}for(const key2 of keys1){const val1=object1[key2];const val2=object2[key2];const areObjects2=isObject(val1)&&isObject(val2);if(areObjects2&&!compareUs(val1,val2)||!areObjects2&&val1!==val2){return false}}return true}function deepCompare(object1,object2,path=""){const areObjects=isObject(object1)&&isObject(object2);if(!areObjects){if(typeof object1==="number"&&typeof object2==="number"){if(isNaN(object1)&&isNaN(object2)){return true}}if(object1!==object2){return false}return true}const keys1=Object.keys(object1);const keys2=Object.keys(object2);if(keys1.length!==keys2.length){return false}for(const key2 of keys1){const newPath=path?`${path}.${key2}`:key2;const val1=object1[key2];const val2=object2[key2];const areNestedObjects=isObject(val1)&&isObject(val2);if(!deepCompare(val1,val2,newPath)){return false}}return true}function isObject(object){return object!=null&&typeof object==="object"}(function(old){$.fn.attr=function(){if(arguments.length===0){if(this.length===0){return null}var obj={};$.each(this[0].attributes,function(){if(this.specified){obj[this.name]=this.value}});return obj}return old.apply(this,arguments)}})($.fn.attr);function st(b){if(!isNaN(b))$("html,body").stop().animate({scrollTop:b+"px"},{duration:400});else $("html,body").stop().animate({scrollTop:$(b).offset().top+"px"},{duration:400})}function pushURL(url,d){if(url||url==""){if(history&&history.pushState){history.pushState({},"",appSettings.Base+"/"+url.replace(new RegExp("^[/]+"),""));goToNode(d)}else{parent.location.href=url}}else{alert(url)}}function formatBytes(bytes,decimals){if(bytes==0)return"0 Bytes";var k=1024,dm=decimals<=0?0:decimals||2,sizes=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i2=Math.floor(Math.log(bytes)/Math.log(k));return parseFloat((bytes/Math.pow(k,i2)).toFixed(dm))+" "+sizes[i2]}function passwordContainsSymbol(value){var containsSymbol=false,symbols=`-!\xA7$%&/()=?.:,~;'#+*-/\\|{}[]_<>"`.split("");$.each(symbols,function(index2,symbol){if(value.indexOf(symbol)>-1){containsSymbol=true;return false}});return containsSymbol}function passwordStrength(pass){var s=0,n2;if(pass.length>5)s+=10;if(/[a-z]/.test(pass))s+=1;if(/[A-Z]/.test(pass))s+=1;if(/[0-9]/.test(pass))s+=1;if(passwordContainsSymbol(pass))s+=1;if(s==14)n2="very-strong";else if(s==13)n2="strong";else if(s==12)n2="medium";else if(s==11)n2="weak";else n2="";if(/\s/g.test(pass))n2="has-spaces";return n2}function passwordValid(pass){var n2=passwordStrength(pass);if(n2=="strong"||n2=="very-strong")return true;return false}function incri(n2){var amount;if(n2>1){return .994}else{if(n2>=0&&n2<.2){amount=.1}else if(n2>=.2&&n2<.5){amount=.04}else if(n2>=.5&&n2<.8){amount=.02}else if(n2>=.8&&n2<.99){amount=.005}else{amount=5e-4}n2=n2+amount;if(n2<.08)n2=.08;else if(n2>.994)n2=.994;return n2}}function barSet(n2,speed){clearTimeout(_worker);if(n2<.08)n2=.08;else if(n2>1)n2=1;var bar=$('.bar[role="bar"]');bar.css({transition:"all "+speed+"ms linear","-webkit-transition":"all "+speed+"ms linear","-moz-transition":"all "+speed+"ms linear","-o-transition":"all "+speed+"ms linear"});if($("body").hasClass("rtl"))bar.css({"margin-right":-100+n2*100+"%"});else bar.css({"margin-left":-100+n2*100+"%"});if(n2==1){_worker=setTimeout(function(){$(".prog").animate({opacity:0},{duration:speed,complete:function(){$(".prog").remove()}})},speed)}}function getFormData(form){var unindexed_array=form.serializeArray();var indexed_array={};$.map(unindexed_array,function(n2,i2){if(n2["name"].includes("[]")){var key2=n2["name"].split("[]")[0];if(!indexed_array.hasOwnProperty(key2))indexed_array[key2]=[];indexed_array[key2].push(n2["value"])}else{indexed_array[n2["name"]]=n2["value"]}});return indexed_array}$(window).on("popstate",function(){if(history&&history.pushState)goToNode()});var getLocation=function(href){var l=document.createElement("a");l.href=href;return l};function getURLNodes(){appSettings.Base=appSettings.Base.replace(new RegExp("[/]+$"),"");var base=getLocation(appSettings.Base);if(base.origin!=window.location.origin){appSettings.Base=window.location.origin+base.pathname;var base=getLocation(appSettings.Base)}var _nodes=base.pathname!="/"?window.location.pathname.split(base.pathname).join("").replace(new RegExp("^[/]+"),"").split("/"):location.href.split(appSettings.Base).join("").replace(new RegExp("^[/]+"),"").split("?")[0].split("/");if(!_nodes[0])_nodes[0]=appSettings.defaultView??"home";return _nodes}var prevNodes=[];function goToNode(d){if(_initialized){prevNodes=clone(nodes);nodes=getURLNodes();renderView(nodes[0],null,d)}else{setTimeout(function(){goToNode(d)},100)}}var View={};function setError(e2,t2){if(!e2){console.warn(t2);return}console.warn(t2,e2.message)}function renderTpl(el2,n2,vars2){if(!el2.length)return;if(el2.data("_status")=="error")return;if(!el2.hasKey("_re")){if(el2.data("_status")=="pending"){getTpl(n2,el2,vars2)}setTimeout(function(){renderTpl(el2,n2,vars2)},_tickTime)}}function prepareNode(n2,rep){var _arr2=n2.split("/");if(_arr2.length>1){for(var i2=_arr2.length-1;i2>=_arr2.length-1;i2--)_arr2[i2]=_arr2[i2];n2=_arr2.join("/")}else n2=n2;return rep?n2.replace(new RegExp("^[/]+"),""):n2}var _esps={};var _Views={};function setAppFuncs(){let initFunc=appSettings.init&&typeof appSettings.init==="function"?appSettings.init:typeof init==="function"?init:null;if(typeof initFunc==="function")initFunc()}function getView(n2,el2,d){let filePath="src/views/"+n2+".view";let fileKey=btoa(filePath);if($("body").hasKey("view_"+fileKey)){renderView(n2,el2,d,true)}else{if(_vcData&&_vcData["views"].hasOwnProperty(fileKey)){$("body").data("view_"+fileKey,_vcData["views"][fileKey]);renderView(n2,el2,d,true);return}if(Nuke&&Nuke._ws&&Nuke._ws.readyState){Nuke.emit("getview",fileKey,function(e2){var r2=e2.data;$("body").data("view_"+fileKey,r2);renderView(n2,el2,d,true)})}else{setTimeout(()=>{getView(n2,el2,d)},_tickTime)}}}function fileToDataURL(file){var reader=new FileReader;return new Promise(function(resolve,reject){reader.onload=function(event){resolve(event.target.result)};reader.readAsDataURL(file)})}function readFilesAsDataURL(files){return Promise.all(files.map(fileToDataURL))}function defer(){var res,rej;var promise=new Promise((resolve,reject)=>{res=resolve;rej=reject});promise.resolve=res;promise.reject=rej;promise.success=res;promise.failed=rej;return promise}function getTpl(n2,el2,vaz2){let filePath="src/tpls/"+n2+".tpl";let fileKey=btoa(filePath);if(el2.data("_status")!="pending")return;el2.data("_status","getting");if($("body").hasKey("tpl_"+fileKey)){let r2=$("body").data("tpl_"+fileKey);el2.html(r2);if(!setRe(el2,vaz2))setError(null,"Error in rendering template "+n2)}else{if(_vcData&&_vcData["tpls"].hasOwnProperty(fileKey)){$("body").data("tpl_"+fileKey,_vcData["tpls"][fileKey]);el2.html(_vcData["tpls"][fileKey]);if(!setRe(el2,vaz2))setError(null,"Error in rendering template "+n2);return}if(Nuke&&Nuke._ws&&Nuke._ws.readyState){Nuke.emit("gettpl",fileKey,function(e2){var r2=e2.data;$("body").data("tpl_"+fileKey,r2);el2.html(r2);if(!setRe(el2,vaz2))setError(null,"Error in rendering template "+n2)})}else{setTimeout(()=>{getTpl(n2,el2,vaz2)},_tickTime)}}}function setRe(_el,vaz){try{if(!_el.hasKey("_vars")){if(_debugMode)cl("The Data Arrived",vaz);let data={};let vars=vaz.split(",");vars=vars.map(s=>s.trim());let binds=[];let dataNamesValues=[];var _subView=_el.closest("[view]");for(let x=0;x<vars.length;x++){if(vars[x]!=""){try{let varName=vars[x];let varValue=vars[x];let NameAs=null;if(varName.indexOf(" as ")!==-1){varName=varName.split(" as ");varValue=varName[0];varName=varName[1];NameAs=vars[x]}let val="";if(_subView.length){val=_subView.hasKey(varValue)?_subView.data(varValue):eval(varValue)}else val=eval(varValue);dataNamesValues.push({Name:varName,NameAs,Value:val})}catch(e2){let varName2=vars[x];let varValue2=vars[x];let NameAs2=null;if(varName2.indexOf(" as ")!==-1){varName2=varName2.split(" as ");varValue2=varName2[0];varName2=varName2[1];NameAs2=vars[x]}dataNamesValues.push({Name:varName2,NameAs:NameAs2,Value:void 0});setError(e2,"Error in bind variables for "+vars[x])}}}for(let x2=0;x2<dataNamesValues.length;x2++){let dn=dataNamesValues[x2];binds.push({dataName:dn["Name"],dataNameAs:dn["NameAs"],dataValue:clone(dn["Value"])});data[dn["Name"]]=dn["Value"]}if(_debugMode)cl(["The Data Set",data,binds]);if(appSettings.beforetick&&typeof appSettings.beforetick==="function")appSettings.beforetick();_el.data("_vars",binds).data("_re",new RenderEngine(_el,data));globalWatch()}_el.data("_status","complete");return true}catch(e2){_el.data("_status","error");return false}return false}function parseFromString(html){return doc=new DOMParser().parseFromString(html,"text/html")}var _binds={};let _oldGlobals=clone(globals);let _oldRX=clone(_rx);let _watch=clone($("body").data("_watch"));$("body").data("_watch",{old:{},list:[]});function reloads(){$("[crslf].flickity-enabled.reload-on-bind").each(function(){var el2=$(this);el2.flickity("destroy");var opts=el2.attr("crslf-opts");if(!opts)opts={};else opts=JSON.parse(opts);el2.flickity(opts);var flkty=el2.data("flickity");flkty.on("dragStart",()=>flkty.slider.childNodes.forEach(slide=>slide.style.pointerEvents="none"));flkty.on("dragEnd",()=>flkty.slider.childNodes.forEach(slide=>slide.style.pointerEvents="all"))});$("[crsl].crsl-initialized").each(function(){$(this).crsl("refresh")});let tickFunc=appSettings.tick&&typeof appSettings.tick==="function"?appSettings.tick:typeof tick==="function"?tick:null;if(typeof tickFunc==="function")tickFunc();scsc.reset();dgsc.reset();applyTriggers();setTimeout(()=>{scsc.reset();dgsc.reset();applyTriggers()},_tickTime*2)}function renderViewsTpls(){$("[view]").each(function(i){var el=$(this);if(el.data("_status")!="pending"&&el.data("_status")!="error"&&el.data("_status")!="getting"&&el.data("_status")!="complete"){var modal=el.closest("popup");var n=el.attr("view");var _props=el.attr(":props")??null;var _binds=el.attr(":props-bind")??null;el.data("_status","pending");let nn=n;var _arr=nn.split("/");if(_arr.length>1){for(var i=_arr.length-1;i>=_arr.length-1;i--){_arr[i]=_arr[i].toLowerCase()}nn=_arr.join("/")}else{nn=nn.toLowerCase()}var _queryParams=nn.split("?");nn=_queryParams.shift();if(el.attr(":data")){let vaz=el.attr(":data");let data={};let vars=vaz.split(",");let dataNamesValues=[];let binds=[];vars=vars.map(s=>s.trim());for(let x=0;x<vars.length;x++){if(vars[x]!=""){try{let varName=vars[x];let varValue=vars[x];let NameAs=null;if(varName.indexOf(" as ")!==-1){varName=varName.split(" as ");varValue=varName[0];varName=varName[1];NameAs=vars[x]}let val="";val=eval(varValue);dataNamesValues.push({Name:varName,NameAs,Value:val})}catch(e2){cl(e2);let varName2=vars[x];let varValue2=vars[x];let NameAs2=null;if(varName2.indexOf(" as ")!==-1){varName2=varName2.split(" as ");varValue2=varName2[0];varName2=varName2[1];NameAs2=vars[x]}dataNamesValues.push({Name:varName2,NameAs:NameAs2,Value:void 0});setError(e2,"Error in bind variables for "+vars[x])}}}for(let x2=0;x2<dataNamesValues.length;x2++){let dn=dataNamesValues[x2];binds.push({dataName:dn["Name"],dataNameAs:dn["NameAs"],dataValue:clone(dn["Value"])});data[dn["Name"]]=dn["Value"]}el.data("props",data)}else{var _d=paraToObj(getBind(_binds,_props));el.data("params",paraToObj(_queryParams));if(modal.length)_d["modal"]=modal.data("props");el.data("props",_d)}if(n==""||!n||n.split("/").slice(-1)==""){el.data("_status","error")}else{renderView(n,el,_d)}}})}function renderPlugins(){$("[crslf]:not(.flickity-enabled,[comp],[tpl],[view]),[crslf][comp]:not(.flickity-enabled),[crslf][tpl]:not(.flickity-enabled),[crslf][view]:not(.flickity-enabled)").each(function(){var el2=$(this);if(el2.hasAttr("[tpl]")||el2.hasAttr("[comp]")||el2.hasAttr("[view]")){if(el2.data("_status")!="complete")return}var opts=el2.attr("crslf-opts");if(!opts)opts={};else opts=JSON.parse(opts);el2.flickity(opts);var flkty=el2.data("flickity");flkty.on("dragStart",()=>flkty.slider.childNodes.forEach(slide=>slide.style.pointerEvents="none"));flkty.on("dragEnd",()=>flkty.slider.childNodes.forEach(slide=>slide.style.pointerEvents="all"));setTimeout(function(){globalWatch()},600)});$("[crsl]:not(.crsl-initialized,[comp],[tpl],[view]),[crsl][comp]:not(.crsl-initialized),[crsl][tpl]:not(.crsl-initialized),[crsl][view]:not(.crsl-initialized)").each(function(){var el2=$(this);if(el2.hasAttr("[tpl]")||el2.hasAttr("[comp]")||el2.hasAttr("[view]")){if(el2.data("_status")!="complete")return}el2.crsl();el2.on("setPosition beforeChange",function(event,slick,currentSlide,nextSlide){$(window).trigger("scroll.scsc");$(window).trigger("resize")})});$("[up]:not([upid])").each(function(){var u=_ups.length;var t2=$(this);var mxf=t2.attr("data-mxf")?t2.attr("data-mxf"):10;if(!t2.hasAttr("upid")){var sl="up_"+u;t2.attr("upid",sl);t2.prepend(`<input `+(mxf>1?"multiple":"")+` type="file" files style="display:none;" />`);_ups.push(t2)}});$("form:not(.binded,[norm])").each(function(){var el2=$(this);var reset=false;if(el2.hasAttr("reset"))reset=true;var actn=el2.attr("action")??"";var local=false;el2.addClass("binded");if(actn==""){actn=getURLNodes().join("/");local=true}else local=isPathLocal(actn);if(el2.hasAttr("o-sub")){el2.ajaxForm({beforeSubmit:function(formData,f,options){let formDataMapped={};let formDataMappedAdditionals={};formDataMapped=Object.assign({},...formData.map(x2=>{if(x2.type=="file"){if(!formDataMappedAdditionals.hasOwnProperty(x2.name))formDataMappedAdditionals[x2.name]=[];formDataMappedAdditionals[x2.name].push(x2["value"]);return void 0}if(x2["name"].includes("[]")){var key2=x2["name"].split("[]").join("");if(!formDataMappedAdditionals.hasOwnProperty(key2))formDataMappedAdditionals[key2]=[];formDataMappedAdditionals[key2].push(x2["value"]);return void 0}return{[x2.name]:x2.value}}));formDataMapped={...formDataMapped,...formDataMappedAdditionals};if(f.hasAttr("b-sub")){var bfs=f.attr("b-sub");if(typeof window[bfs]==="function"){checkFormInputs(f);if(window[bfs](f,formDataMapped)===false)return false}}if(!checkFormInputs(f))return false;if(f.hasAttr("o-sub")){var ofs=f.attr("o-sub");if(typeof window[ofs]==="function"){window[ofs](f,formDataMapped)}}return false},clearForm:reset,resetForm:reset,success:function(responseText,statusText,xhr,f){},timeout:3e5,error:function(xhr,textStatus,errorThrown){}})}else{if(local){el2.ajaxForm({beforeSubmit:function(formData,f,options){if(!checkFormInputs(f))return false;let formDataMapped={};let formDataMappedAdditionals={};formDataMapped=Object.assign({},...formData.map(x2=>{if(x2.type=="file"){if(!formDataMappedAdditionals.hasOwnProperty(x2.name))formDataMappedAdditionals[x2.name]=[];formDataMappedAdditionals[x2.name].push(x2["value"]);return void 0}if(x2["name"].includes("[]")){var key2=x2["name"].split("[]").join("");if(!formDataMappedAdditionals.hasOwnProperty(key2))formDataMappedAdditionals[key2]=[];formDataMappedAdditionals[key2].push(x2["value"]);return void 0}return{[x2.name]:x2.value}}));formDataMapped={...formDataMapped,...formDataMappedAdditionals};try{if(f.hasAttr("b-sub")){var bfs=f.attr("b-sub");if(typeof window[bfs]==="function"){if(window[bfs](f,formDataMapped)===false)return false}}var actn2=f.attr("action")??"";if(actn2==""){actn2=getURLNodes().join("/")}if(validateInputs(f)){var d=getFormData(f);if(f.attr("method")?.toLowerCase()=="get"){actn2=addOrChangeParameters(actn2,d)}pushURL(actn2,d)}}catch(e2){cl(e2)}return false},clearForm:reset,resetForm:reset,success:function(responseText,statusText,xhr,f){},timeout:3e5,error:function(xhr,textStatus,errorThrown){}})}}});$("[editor]").each(function(i2){var editor=$(this);editor.removeAttr("editor");var TB=normalTB;if(editor.is("[mini]"))TB=miniTB;else if(editor.is("[full]"))TB=fullTB;if(CKEDITOR!==void 0){CKEDITOR.replace(this,{uiColor:"#ffffff",language:$("html").attr("lang"),allowedContent:true,enterMode:CKEDITOR.ENTER_BR,toolbar:TB,on:{instanceReady:function(evt){var itemTemplate='<li class="l" data-id="{id}"><div><strong class="item-title">{name}</strong></div><div><i>{description}</i></div></li>',outputTemplate="<span class=hash>{linked}</span> ";var autocomplete=new CKEDITOR.plugins.autocomplete(evt.editor,{textTestCallback:function(range){if(!range.collapsed){return null}return CKEDITOR.plugins.textMatch.match(range,function(text,offset){var left=text.slice(0,offset);var matchHash=left.match(/#\d*$/);var matchAt=left.match(/(@)[A-Za-z]+(?!\.)(?!.*\.$)(?!.*?\.\.)[a-zA-Z0-9.]+[A-Za-z0-9]{6,30}$/);if((!matchHash||matchHash=="#")&&(!matchAt||matchAt=="@")){return null}var match=matchHash;if(!match)match=matchAt;return{start:match.index,end:offset}})},dataCallback:function(matchInfo,callback){var query=matchInfo.query;if(myR["[ck]"])myR["[ck]"].abort();clearTimeout(debounceTimeout["[ck]"]);debounceTimeout["[ck]"]=setTimeout(function(){myR["[ck]"]=$.post(beas+"a/hashes/get",{id:query},function(result){if(result){result=$.parseJSON(result);var suggestions=result.filter(function(item){return String(item.name).indexOf(query.substring(1))==0});callback(suggestions)}})},500)},itemTemplate,outputTemplate,throttle:100});autocomplete.getHtmlToInsert=function(item){return this.outputTemplate.output(item)}},change:function(ev2){if($.trim(ev2.editor.getData()).length==0)editor.closest(".fields").addClass("is-empty").removeClass("is-not-empty");else editor.closest(".fields").removeClass("is-empty error").addClass("is-not-empty");editor.val(ev2.editor.getData()).trigger("change")},focus:function(ev2){editor.closest(".fields").addClass("focused");if($.trim(ev2.editor.getData()).length==0)editor.closest(".fields").addClass("is-empty").removeClass("is-not-empty");else editor.closest(".fields").removeClass("is-empty error").addClass("is-not-empty")},blur:function(ev2){editor.closest(".fields").removeClass("focused");if($.trim(ev2.editor.getData()).length==0)editor.closest(".fields").addClass("is-empty").removeClass("is-not-empty");else editor.closest(".fields").removeClass("is-empty error").addClass("is-not-empty")}}})}});$(".cke_autocomplete_panel").each(function(){if($(this).html()=="")$(this).remove()});$("[tags]:not(.tag-editor-hidden-src)").each(function(){var t2=$(this);var u=currentlyValidTags.length;t2.attr("data-u",u);var del=t2.attr("dl")?t2.attr("dl"):", ";var maxTags=t2.attr("mt")?t2.attr("mt"):50;var maxLength=t2.attr("ml")?t2.attr("ml"):100;var plchldr=t2.attr("placeholder")?t2.attr("placeholder"):"";var tagslower=t2.attr("tags-lower")?true:false;var autocomplete=t2.attr("acs")?{delay:250,autoFocus:true,position:{collision:"flip"},source:function(request,response){$.post(beas+"a"+t2.attr("acs"),request,response)},minLength:1,select:function(event,ui){if(ui.item==null){t2.val("")}},change:function(event,ui){if(ui.item==null){t2.val("")}}}:null;t2.tagEditor({autocomplete,delimiter:del,removeDuplicates:true,forceLowercase:tagslower,placeholder:plchldr,animateDelete:50,maxLength,maxTags,onChange:function(field,editor,tags){field.trigger("change")},beforeTagSave:function(field,editor,tags,tag,val2){if(!t2.attr("sts")){if($.inArrayIn(val2,tags)!==-1){return false}}else{if($.inArray(tag,currentlyValidTags[u][tags])==-1){return false}}if(t2.attr("tags-before")){var bfs=t2.attr("tags-before");if(typeof window[bfs]==="function"){if(window[bfs](t2,field,editor,tags,tag,val2)===false)return false}}}});currentlyValidTags.push(t2)});$("[slct]:not(.select2-hidden-accessible)").each(function(){var t2=$(this);var plchldr=t2.attr("placeholder")?t2.attr("placeholder"):"";var dropdownParent=t2.attr("prnt")?t2.attr("prnt"):"body";var tpl=t2.attr("slct-tpl")?t2.attr("slct-tpl"):null;var dir=t2.attr("slct-dir")?t2.attr("slct-dir"):"ltr";var minResultsForSearch=t2.attr("mins")?t2.attr("mins"):"";if(dropdownParent=="self")dropdownParent=t2.parent();else dropdownParent=$(dropdownParent);var allowNewTags=t2.attr("ntgs")?true:false;var ax=t2.attr("axs")?{url:t2.attr("axs"),dataType:"json",delay:250}:null;t2.select2({dropdownParent,placeholder:plchldr,dir,allowClear:false,tags:allowNewTags,ajax:ax,minimumResultsForSearch:minResultsForSearch,templateSelection:function(data2,container){if(data2.newTag){if(allowNewTags&&t2.attr("ntgs")!="true"){var tag=data2.text;var id2=data2.id;$.post(beas+"a"+t2.attr("ntgs"),{tag},function(r2){if(r2=="true"){var newOption=new Option(tag,id2,true,true);t2.append(newOption).trigger("change")}else{alert("Error adding tag! Please Try again.");t2.val(null).trigger("change")}});return data2.text}else{return data2.text}}else{return data2.text}},templateResult:function(state){if(tpl){if(typeof window[tpl]==="function")return window[tpl](state)}if(state.newTag){if(allowNewTags&&t2.attr("ntgs")!="true"){var new_state=$("<span>+ Add <b>"+state.text+"</b></span>");return new_state}return state.text}else return state.text},tokenSeparators:[","],createTag:function(params){var term=$.trim(params.term);if(term===""){return null}return{id:term,text:term,newTag:true}},insertTag:function(data2,tag){data2.push(tag)}});if(t2.attr("nosearch"))t2.on("select2:opening select2:closing",function(event){var searchfield=$(this).parent().find(".select2-search__field");searchfield.prop("disabled",true)})});$("[sl]:not(.select2-hidden-accessible)").each(function(){var t2=$(this);try{var plchldr=t2.attr("placeholder")?t2.attr("placeholder"):"";var dir=$("body").hasClass("rtl")?"rtl":"ltr";var nr=t2.attr("sl-nrmsg")?t2.attr("sl-nrmsg"):"No results found";var minResultsForSearch=t2.attr("sl-mins")?t2.attr("sl-mins"):10;var allowNewTags=t2.attr("sl-ntgs")?true:false;var dropdownParent=t2.attr("sl-prt")?t2.attr("sl-prt"):"body";if(dropdownParent=="self")dropdownParent=t2.parent();else dropdownParent=$(dropdownParent);var query=t2.attr("sl-query")?t2.attr("sl-query"):null;var uniquer=Date.now();if(typeof window[query]==="function"){let dbcrID="dbcr_"+(Object.keys(_dbcrs).length+1);t2.select2.amd.define("adapt_"+uniquer,["select2/data/array","select2/utils"],function(ArrayAdapter,Utils){function CustomDataAdapter($element,options){CustomDataAdapter.__super__.constructor.call(this,$element,options)}Utils.Extend(CustomDataAdapter,ArrayAdapter);CustomDataAdapter.prototype.query=function(params,callback){clearTimeout(_dbcrs[dbcrID]);let _t=t2;_dbcrs[dbcrID]=setTimeout(function(){window[query](params,callback,_t)},!_dbcrs.hasOwnProperty(dbcrID)?0:_dbcrsTime)};return CustomDataAdapter});t2.select2({dropdownParent,minimumResultsForSearch:minResultsForSearch,placeholder:plchldr,dir,tags:allowNewTags,allowClear:false,language:{noResults:function(){return nr}},...t2.select2.amd.require("adapt_"+uniquer)?{ajax:{},dataAdapter:t2.select2.amd.require("adapt_"+uniquer)}:{}})}else{t2.select2({dropdownParent,minimumResultsForSearch:minResultsForSearch,placeholder:plchldr,dir,tags:allowNewTags,allowClear:false,language:{noResults:function(){return nr}}})}if(t2.attr("sl-nosrch"))t2.on("select2:opening select2:closing",function(event){var searchfield=$(this).parent().find(".select2-search__field");searchfield.prop("disabled",true)});if(t2.attr("sl-class")){t2.on("select2:opening",function(event){dropdownParent.addClass(t2.attr("sl-class"))});t2.on("select2:closing",function(event){dropdownParent.removeClass(t2.attr("sl-class"))})}}catch(e2){cl(e2)}});$("[pinnable]:not(.pinnable)").each(function(){var t2=$(this);var offsetU=t2.attr("pinnable-offset-up")??100;var offsetD=t2.attr("pinnable-offset-down")??50;var options={offset:0,offset:{up:offsetU,down:offsetD},tolerance:0,tolerance:{up:5,down:0},classes:{initial:"pinnable",pinned:"pinnable--pinned",unpinned:"pinnable--unpinned",top:"pinnable--top",notTop:"pinnable--not-top",bottom:"pinnable--bottom",notBottom:"pinnable--not-bottom",frozen:"pinnable--frozen",pinned:"pinnable--pinned"},onPin:function(){},onUnpin:function(){},onTop:function(){},onNotTop:function(){},onBottom:function(){},onNotBottom:function(){}};var pinnable=new Headroom(t2[0],options);pinnable.init()});$("[sort]").each(function(e2){let t2=$(this);if(t2.hasClass("ui-sortable"))return;let opts={delay:50,placeholder:"g_rows_helper",scrollSpeed:40,opacity:1};opts=avc(t2,"sort-axis",opts);opts=avc(t2,"sort-handle",opts);opts=avc(t2,"sort-cancel",opts);opts=avc(t2,"sort-cursor",opts,"grabbing");opts=avc(t2,"sort-helper",opts,"clone");if(opts.hasOwnProperty("helper")&&opts["helper"]!="clone"){if(typeof window[opts["helper"]]==="function")opts["helper"]=window[opts["helper"]]}opts=avc(t2,"sort-placeholder",opts);opts=avc(t2,"sort-opacity",opts);opts=avc(t2,"sort-items",opts);opts=avc(t2,"sort-tolerance",opts,"pointer");opts=avc(t2,"sort-revert",opts,false);opts=avc(t2,"sort-forcePlaceholderSize",opts);opts=avc(t2,"sort-containment",opts,"parent");opts=avc(t2,"sort-connectWith",opts);if(opts.hasOwnProperty("forceplaceholdersize")){opts["forcePlaceholderSize"]=opts["forceplaceholdersize"];delete opts["forceplaceholdersize"]}t2.sortable(opts)});$("[drag]").each(function(e2){let t2=$(this);let opts={};opts=avc(t2,"drag-connectToSortable",opts);opts=avc(t2,"drag-scroll",opts,true);opts=avc(t2,"drag-revert",opts,true);opts=avc(t2,"drag-helper",opts,"clone");opts=avc(t2,"drag-containment",opts,false);opts=avc(t2,"drag-cursor",opts,"auto");opts=avc(t2,"drag-appendTo",opts,"parent");opts=avc(t2,"drag-disabled",opts,false);if(opts.disabled=="false")delete opts.disabled;if(opts.hasOwnProperty("appendto")){opts.appendTo=opts["appendto"];delete opts["appendto"]}if(opts.hasOwnProperty("helper")&&opts["helper"]!="clone"){if(typeof window[opts["helper"]]==="function")opts["helper"]=window[opts["helper"]]}if(opts.hasOwnProperty("connecttosortable")){opts["connectToSortable"]=opts["connecttosortable"];delete opts["connecttosortable"]}t2.draggable(opts)});$("[drop]").each(function(e2){let t2=$(this);let opts={};opts=avc(t2,"drop-accept",opts);opts=avc(t2,"drop-greedy",opts);opts=avc(t2,"drop-hoverClass",opts);opts=avc(t2,"drop-disabled",opts,false);if(opts.disabled=="false")delete opts.disabled;if(opts.hasOwnProperty("hoverclass")){opts.hoverClass=opts["hoverclass"];delete opts["hoverclass"]}t2.droppable(opts)});$("body").on("touchstart mouseover",function(e2){let isTippedOe=true;if($(e2.target).closest(".oe").length){let oe=$(e2.target).closest(".oe");if((oe.find("[tip]").length||oe.hasAttr("tip"))&&oe.isOverflown()&&$(window).width()>480){isTippedOe=true}else isTippedOe=false}if($(e2.target).closest("[tip]").length&&isTippedOe){var target=$(e2.target).closest("[tip]");var tip=`<tip class="pa ${target.attr("tip-class")}"><div class="pa [[P]]"><span>[[T]]</span></div></tip>`;if(target.find("droplet").length==0){var t2=target.attr("tip");var p=target.attr("tip-pos");if(!p)p="";$("tip").remove();$("body").append(tip.replace("[[T]]",t2).replace("[[P]]",p));_isTipped=true;let _tipSc=target;while(true){if(_isScrollable(_tipSc)||_tipSc[0]==$("body")[0])break;_tipSc=_tipSc.parent()}var self2=target;_setPos(self2,p,_tipSc);_setPos(self2,p,_tipSc);target.data("_tipSc",_tipSc);_tipSc.unbind("scroll.kuku").bind("scroll.kuku",function(){_setPos(self2,p,_tipSc)})}else{$("tip").remove();_isTipped=false}}else{$("body").unbind("scroll.kuku");$("tip").remove();_isTipped=false}});$("[numeric]").each(function(){$(this).removeAttr("numeric").numeric()});$("[pattern]").each(function(){$(this).data("pattern",$(this).attr("pattern")).removeAttr("pattern")});$("[integer]:not([pve])").each(function(){$(this).removeAttr("integer").numeric({decimal:false})});$("[integer][pve]").each(function(){$(this).removeAttr("integer").numeric({decimal:false,negative:false})});$("[decimal]:not([pve])").each(function(){var places=-1;if($(this).is("[dp0]"))places=0;else if($(this).is("[dp1]"))places=1;else if($(this).is("[dp2]"))places=2;else if($(this).is("[dp3]"))places=3;else if($(this).is("[dp4]"))places=4;if(places>=0)$(this).removeAttr("decimal").numeric({decimalPlaces:places,decimal:places==0?false:"."});else $(this).removeAttr("decimal").numeric({})});$("[decimal][pve]").each(function(){var places=-1;if($(this).is("[dp0]"))places=0;else if($(this).is("[dp1]"))places=1;else if($(this).is("[dp2]"))places=2;else if($(this).is("[dp3]"))places=3;else if($(this).is("[dp4]"))places=4;if(places>=0)$(this).removeAttr("decimal").numeric({negative:false,decimalPlaces:places,decimal:places==0?false:"."});else $(this).removeAttr("decimal").numeric({negative:false})});$("[time]").each(function(){dtp($(this),"time")});$("[date]").each(function(){dtp($(this),"date")});$("[datetime]").each(function(){dtp($(this),"datetime")});$("[color]").each(function(){$(this).removeAttr("color").colorpicker({format:"rgba"})})}function dtp(el2,t2){el2.removeAttr(t2);let opts={format:t2=="date"?"yyyy-mm-dd":t2=="time"?"hh:ii":"yyyy-mm-dd hh:ii",weekStart:el2.attr("date-week-start")??1,startView:t2=="time"?1:2,minView:el2.attr("minview")?el2.attr("minview"):t2=="time"?0:t2=="datetime"?0:2,maxView:el2.attr("maxview")?el2.attr("maxview"):t2=="time"?1:4,todayBtn:t2=="time"?0:el2.attr("date-today")=="false"?0:1,todayHighlight:t2=="time"?0:el2.attr("date-today")=="false"?0:1,language:el2.attr("date-lang")??"en",minuteStep:el2.attr("date-minute-step")??5,pickerPosition:"top-right",autoclose:1,showMeridian:false};if(el2.attr("date-start"))opts["startDate"]=el2.attr("date-start");if(el2.attr("date-end"))opts["endDate"]=el2.attr("date-end");if(el2.attr("date-value"))opts["date"]=el2.attr("date-value");el2.datetimepicker(opts);if(t2=="time"){el2.on("show",function(ev2){$(".table-condensed > thead, .table-condensed > thead > tr > th, .table-condensed > thead > tr > th > i").attr("style","visibility: hidden; font-size:0px !Important; overflow: hidden; height: 0px;")}).on("hide",function(ev2){$(".table-condensed > thead, .table-condensed > thead > tr > th, .table-condensed > thead > tr > th > i").attr("style","visibility: visible;")})}if(el2.attr("date-link-start")){el2.on("change",function(e2){let dp1=el2.data("datetimepicker");let dp2=$(el2.attr("date-link-start")).data("datetimepicker");dp2.setStartDate(dp1.getFormattedDate());if(dp2.getFormattedDate()<dp1.getFormattedDate()||dp2.getFormattedDate()=="")$(el2.attr("date-link-start")).val(dp1.getFormattedDate())})}else if(el2.attr("date-link-end")){el2.on("change",function(e2){let dp1=$(el2.attr("date-link-end")).data("datetimepicker");let dp2=el2.data("datetimepicker");dp1.setEndDate(dp2.getFormattedDate())});opts["useCurrent"]=false}}function avc(t2,n2,o,d=null){if(t2.attr(n2.toLowerCase()))o[n2.toLowerCase().split("sort-").join("").split("drop-").join("").split("drag-").join("")]=t2.attr(n2.toLowerCase());else if(d!=null)o[n2.toLowerCase().split("sort-").join("").split("drop-").join("").split("drag-").join("")]=d;return o}function applyTriggers(){$("[click]").each(function(){$(this).trigger("click").removeAttr("click")});$("[focus]").each(function(){$(this).trigger("focus").removeAttr("focus")});let _Ns=[];for(let x2=9;x2>=0;x2--){let _els=$("[n"+x2+"]");_els.each(function(){let _el2=$(this);let _d2={};for(let y=9;y>=0;y--){if(_el2.hasAttr("n"+y)){_d2["n"+y]=_el2.attr("n"+y).split(",")}}_el2.data("_Ns",_d2);_Ns.push(_el2)})}for(let i2=0;i2<_Ns.length;i2++){const _n=_Ns[i2];let _act=[];let attrs2=_n.data("_Ns");for(const nK in attrs2){if(Object.hasOwnProperty.call(attrs2,nK)){const nV=attrs2[nK];let index2=nK.slice(1);if(nV.indexOf(nodes[index2])!=-1){_act.push(true)}else{_act.push(false);break}}}setTimeout(()=>{if(_act.indexOf(false)!=-1)_n.removeClass("active");else _n.addClass("active")})}if(typeof viewLoaded==="function"&&!_viewLoaded){_viewLoaded=true;viewLoaded()}$("[\\@scroll],[\\@scroll-start],[\\@scroll-end],[\\@scroll-left],[\\@scroll-right],[\\@scroll-top],[\\@scroll-bottom]").unbind("scroll touchmove scrollstart scrollend").on("scroll touchmove scrollstart scrollend",function(ev2){let el2=$(this);if(ev2.type=="scrollend"){var newScrollLeft=el2.scrollLeft(),newScrollTop=el2.scrollTop(),width=el2.width(),scrollWidth=el2.get(0).scrollWidth,scrollHeight=el2.get(0).scrollHeight;var hasScX=el2.prop("scrollWidth")>el2.width();var hasScY=el2.prop("scrollHeight")>el2.height();if(newScrollLeft==0){processEv(ev2,el2,"scroll-left")}else if(Math.round(scrollWidth-newScrollLeft-width-(hasScY?-_scW:0))==0){processEv(ev2,el2,"scroll-right")}if(newScrollTop==0){processEv(ev2,el2,"scroll-top")}else if(newScrollTop+el2.innerHeight()>=scrollHeight-(hasScX?-_scW:0)){processEv(ev2,el2,"scroll-bottom")}}processEv(ev2,el2,ev2.type.length==6?"scroll":ev2.type.split("scroll").join("scroll-"))})}_viewLoaded=false;function globalWatch(){if(!_initialized)return;return;$("[beajs=1]").remove();$('script[type="beajs"]').each(function(){var html=$(this).html();$(this).remove();var myScript=document.createElement("script");myScript.setAttribute("beajs","1");myScript.textContent=html;document.body.appendChild(myScript)});let bindsCount=0;let prom=defer();$("[bind]:not(.binded)").each(function(){bindsCount++;let _el2=$(this);_el2.addClass("binded");if(!setRe(_el2,_el2.attr("bind")))setError(null,"Error in binding for the element that has these in its bind attribute "+_el2.attr("bind"))});prom.then(function(val2){renderViewsTpls();renderPlugins();loadPics();reloads();let tickFunc2=appSettings.tick&&typeof appSettings.tick==="function"?appSettings.tick:typeof tick==="function"?tick:null;if(typeof tickFunc2==="function")tickFunc2()}).catch(reason=>{renderViewsTpls();renderPlugins();loadPics();reloads();let tickFunc2=appSettings.tick&&typeof appSettings.tick==="function"?appSettings.tick:typeof tick==="function"?tick:null;if(typeof tickFunc2==="function")tickFunc2()});if(bindsCount==0){prom.resolve()}reloads();let tickFunc=appSettings.tick&&typeof appSettings.tick==="function"?appSettings.tick:typeof tick==="function"?tick:null;if(typeof tickFunc==="function")tickFunc()}function loadPics(){$("[lazy]").each(function(){let _el2=$(this);_el2.lazy({effect:"show",bind:"event",threshold:200,visibleOnly:false,beforeLoad:function(element){_el2.removeAttr("lazy")},afterLoad:function(element){},onError:function(element){cl("error loading "+_el2.attr("data-src"))},onFinishedAll:function(){}})})}function paraToObj(para){if(para=="")return JSON.parse("{}");return JSON.parse('{"'+decodeURI(para).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}')}function getBind(b,d){d=d?d.split("&"):new Array;if(b){var binder=b.split(",");for(var x2=0;x2<binder.length;x2++){var finder=binder[x2].split(" as ");if(finder[0].indexOf(" attr ")!==-1){var findz=finder[0].split(" attr ");d.push(finder[1]+"="+$.trim($(findz[0]).attr(findz[1])))}else if(finder[0].indexOf(" find ")!==-1){var findz=finder[0].split(" find ");var val2=getVal($(findz[0]).find(findz[1]));d.push(finder[1]+"="+$.trim(val2))}else if(finder[0].indexOf(" from ")!==-1){var findz=finder[0].split(" from ");if(findz[1].toLowerCase()=="ls"){d.push(finder[1]+"="+localStorage.getItem(findz[0]))}else{d.push(finder[1]+"="+findz[0])}}else d.push(finder[1]+"="+getVal($(finder[0])))}}d=d.join("&");return d}function isPathLocal(path){var local=false;var l=getLocation(path);var l2=getLocation(appSettings.Base);var url="home";local=l.hostname==l2.hostname;return local}function checkFormInputs(f,inp,classesOnly){var inputs=inp?[inp]:f.find("[\\:required]:not([disabled])");for(var i2=0;i2<inputs.length;i2++){let el2=$(inputs[i2]);let pat=el2.data("pattern");let req=el2.hasAttr(":required");let lbl=el2.closest("label");let fs=el2.closest("fieldset");let max=el2.attr("max");let max_num=el2.attr("max-num");let min_num=el2.attr("min-num");let v=el2.val();var or=el2.attr("or");if(or!=""){var or=f.find("[name='"+or+"']")}var into;let allCls="is-not-checked is-checked is-valid is-not-empty is-empty is-invalid error success not-4-chars not-on-pattern";el2.removeClass(allCls);el2.parent().removeClass(allCls);if(lbl.length)lbl.removeClass(allCls);if(fs.length)fs.removeClass(allCls);if(el2.is(":checkbox")||el2.is(":radio")){var isCheck="is-not-checked"+(req?" is-invalid":"");if(el2.is(":checked")){isCheck="is-checked"+(req?" is-valid":"")}else{if(or.length){if(or.is(":checked")){isCheck="is-checked"+(req?" is-valid":"")}}}if(el2.is(":radio")){f.find("[name='"+el2.attr("Name")+"']:radio").not(el2[0]).each(function(){let _el2=$(this);let _req=_el2.hasAttr(":required");var _isCheck="is-not-checked"+(_req?" is-invalid":"");var _or=_el2.attr("or");let _lbl=_el2.closest("label");_el2.removeClass(allCls);_el2.parent().removeClass(allCls);if(_lbl.length)_lbl.removeClass(allCls);if(_or!=""){var _or=f.find("[name='"+_or+"']")}if(_el2.is(":checked")){_isCheck="is-checked"+(_req?" is-valid":"")}else{if(_or.length){if(_or.is(":checked")){_isCheck="is-checked"+(_req?" is-valid":"")}}}if(_el2.parent().prop("nodeName")!="FORM")_el2.parent().addClass(_isCheck);if(_lbl.length)_lbl.addClass(_isCheck);_el2.addClass(_isCheck)})}if(el2.parent().prop("nodeName")!="FORM")el2.parent().addClass(isCheck);if(lbl.length)lbl.addClass(isCheck);el2.addClass(isCheck)}else{var isV="is-empty"+(req?" is-invalid":"");if(el2.is("[username]")){if(v.length&&v.length<4){isV="not-4-chars is-not-empty"+(req?" is-invalid":"")}else{let vld=true;var k=v.match(/[a-z]+(?!\.)(?!.*\.$)(?!.*?\_\_)[a-z0-9_]+[a-z0-9]/);if(!k){vld=false}else{if(k.input!=k[0]){vld=false}}if(vld)isV="is-not-empty"+(req?" is-valid":"");else isV="not-on-pattern is-not-empty"+(req?" is-invalid":"")}}else if(el2.is("[password]")){if(!passwordValid(v)){isV="is-not-empty"+(req?" is-invalid":"")}else{isV="is-not-empty"+(req?" is-valid":"")}}else if(el2.is("[rpassword]")){if($.trim(v)!=$.trim(f.find("[password]").val())){isV="is-not-empty"+(req?" is-invalid":"")}else{isV="is-not-empty"+(req?" is-valid":"")}}else{if($.trim(v).length!=0){if(max!=""&&!isNaN(max)){if($.trim(v).length>max){el2.val($.trim($.trim(v).substr(0,max)))}}if(min_num!=""&&!isNaN(min_num)){if(!isNaN($.trim(v))){if(parseFloat($.trim(v))<parseFloat(min_num))el2.val($.trim(min_num))}else{el2.val(min_num)}}if(max_num!=""&&!isNaN(max_num)){if(!isNaN($.trim(v))){if(parseFloat($.trim(v))>parseFloat(max_num))el2.val($.trim(max_num))}else{if(min_num!=""&&!isNaN(min_num))el2.val($.trim(min_num));else el2.val("0")}}isV="is-not-empty";if(pat!=""){pat=new RegExp(pat);if(pat.test($.trim(v))){isV+=req?" is-valid":""}else{isV+=req?" is-invalid":"";el2.val("")}}else isV+=req?" is-valid":""}else{if(or.length){if($.trim(or.val()).length!=0){isV="is-not-empty"+(req?" is-valid":"")}}}}if(el2.parent().prop("nodeName")!="FORM")el2.parent().addClass(isV);if(lbl.length)lbl.addClass(isV);el2.addClass(isV)}var isRadioChecked=false;if(el2.is(":radio")){if(el2.hasClass("is-invalid")){f.find("[name='"+el2.attr("Name")+"']:radio").not(el2[0]).each(function(){if($(this).hasClass("is-valid")){isRadioChecked=true}})}else{isRadioChecked=true}}if(el2.hasClass("is-invalid")||el2.is(":radio")&&!isRadioChecked){if(el2.hasAttr("data-into")){let intoTxt=el2.data("into");if(lbl.length)into=lbl.find(intoTxt);if(!into){if(fs.length)into=fs.find(intoTxt)}if(!into)into=$(intoTxt);if(into.length){if(el2.is("[password]")){if($.trim(v).length==0)into.text(el2.attr("data-empty"));else if(el2.hasAttr("data-wpm"))into.text(el2.attr("data-wpm"));let rpass=f.find("[rpassword]");if(rpass.length){if($.trim(rpass.val()).length!=0)checkFormInputs(f,rpass,true)}}else if(el2.is("[rpassword]")){if($.trim(v).length==0)into.text(el2.attr("data-empty"));else if(el2.hasAttr("data-pnm"))into.text(el2.attr("data-pnm"))}else if(el2.is("[username]")){let txt=el2.hasAttr("data-empty")?el2.attr("data-empty"):el2.attr("placeholder");if($.trim(v).length==0)into.text(txt);else{if(el2.hasClass("not-4-chars")){if(el2.hasAttr("data-4-chars"))txt=el2.attr("data-4-chars")}else if(el2.hasClass("not-on-pattern")){if(el2.hasAttr("data-chars-not-allowed"))txt=el2.attr("data-chars-not-allowed")}into.text(txt)}}else if(el2.hasAttr("data-empty")){into.text(el2.attr("data-empty"))}else{if(el2.is(":checkbox")||el2.is(":radio")){into.text(el2.attr("placeholder"))}else{into.text(el2.attr("placeholder"))}}}}if(!classesOnly){if(el2.is(":radio")){if(!isRadioChecked){if(fs.length)fs.addClass(isCheck);el2.focus();return false}}else{if(fs.length)fs.addClass(isV);el2.focus();return false}}else{if(el2.is(":radio")){if(!isRadioChecked){if(fs.length)fs.addClass(isCheck)}}else{if(fs.length)fs.addClass(isV)}}}else if(el2.hasClass("is-valid")){if(el2.hasAttr("data-into")){let intoTxt=el2.data("into");if(lbl.length)into=lbl.find(intoTxt);if(fs.length)into=fs.find(intoTxt);if(!into)into=$(intoTxt);if(into.length){into.text("")}}}}return true}function validateInputs(f){if(f.hasAttr("ax-before")){var bfs=f.attr("ax-before");if(typeof window[bfs]==="function"){if(window[bfs](f)===false)return false}}var inps=[];f.find("input.required,select.required,textarea.required").each(function(){inps.push($(this).attr("name"))});for(var i2=0;i2<inps.length;i2++){var inp=f.find("input[name='"+inps[i2]+"']");var sel=f.find('select[name="'+inps[i2]+'"]');var txt=f.find('textarea[name="'+inps[i2]+'"]');var e2=inp;if(!e2.length)e2=sel;if(!e2.length)e2=txt;var or=e2.attr("or");if(or!=""){var inp2=f.find("input[name='"+or+"']");var sel2=f.find('select[name="'+or+'"]');var txt2=f.find('textarea[name="'+or+'"]');var or=inp2;if(!or.length)or=sel2;if(!or.length)or=txt2}if(e2.is(":checkbox")||e2.is(":radio")){if(!e2.is(":checked")){if(or.length){if(!or.is(":checked")){alert(e2.attr("placeholder")+" or "+or.attr("placeholder"));e2.addClass("error");e2.focus();return false}}else{alert(e2.attr("placeholder"));e2.addClass("error");e2.focus();return false}}}else{if($.trim(e2.val()).length==0){if(or.length){if($.trim(or.val()).length==0){alert(e2.attr("placeholder")+" or "+or.attr("placeholder"));e2.addClass("error");e2.focus();return false}}else{alert(e2.attr("placeholder"));e2.addClass("error");e2.focus();return false}}if(e2.is("[password]")){if(!passwordValid(e2.val())){alert(e2.attr("data-wpm"));e2.addClass("error");e2.focus();return false}}if(e2.is("[rpassword]")){if($.trim(e2.val())!=$.trim(e2.closest("form").find("[password]").val())){e2.addClass("error");alert(e2.attr("data-pnm"));e2.focus();return false}e2.removeClass("error");$(".passStrength").remove()}}}return true}let _cookies={getItem:function(sKey){if(!sKey){return null}return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(sKey,sValue,vEnd,sPath,sDomain,bSecure){if(!sKey||/^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)){return false}var sExpires="";if(vEnd){switch(vEnd.constructor){case Number:sExpires=vEnd===Infinity?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+vEnd;break;case String:sExpires="; expires="+vEnd;break;case Date:sExpires="; expires="+vEnd.toUTCString();break}}if(!sPath)sPath="/";document.cookie=encodeURIComponent(sKey)+"="+encodeURIComponent(sValue)+sExpires+(sDomain?"; domain="+sDomain:"")+(sPath?"; path="+sPath:"")+(bSecure?"; secure":"");return true},removeItem:function(sKey,sPath,sDomain){if(!this.hasItem(sKey)){return false}document.cookie=encodeURIComponent(sKey)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(sDomain?"; domain="+sDomain:"")+(sPath?"; path="+sPath:"");return true},hasItem:function(sKey){if(!sKey){return false}return new RegExp("(?:^|;\\s*)"+encodeURIComponent(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){var aKeys=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/);for(var nLen=aKeys.length,nIdx=0;nIdx<nLen;nIdx++){aKeys[nIdx]=decodeURIComponent(aKeys[nIdx])}return aKeys}};var cookies=new Proxy(_cookies,{get(target,key2){return target[key2]??target.getItem(key2)??void 0},set(target,key2,value){if(key2 in target){return false}return target.setItem(key2,value)},deleteProperty(target,key2){if(!(key2 in target)){return false}return target.removeItem(key2)},ownKeys(target){return target.keys()},has(target,key2){return key2 in target||target.hasItem(key2)},defineProperty(target,key2,descriptor){if(descriptor&&"value"in descriptor){target.setItem(key2,descriptor.value)}return target},getOwnPropertyDescriptor(target,key2){const value=target.getItem(key2);return value?{value,enumerable:true,configurable:true}:void 0}});function getCookie(n2){return cookies[n2]}function setCookie(n2,v,d,p,e2){var now=new Date;var time=now.getTime();if(!e2)e2=time+24*60*60*1e3*365;else e2=time+e2;if(!d)d=window.location.hostname;if(!p)p="/";now.setTime(e2);return cookies.setItem(n2,v,now.toGMTString(),p,d,true)}function getComData(c,fromHTML){if(fromHTML){try{var el2=$("<div></div>");el2.html(c.html());var k={};var mtitle=$("modal-title",el2).html();if(!mtitle)mtitle="";var mbody=$("modal-body",el2).html();if(!mbody)mbody="";var mdesc=$("modal-description",el2).html();if(!mdesc)mdesc="";var mfoot=$("modal-footer",el2).html();if(!mfoot)mfoot="";k.Title=mtitle;k.Body=mbody;k.Description=mdesc;k.Footer=mfoot;c=k;return c}catch(e2){return false}return false}try{c=c.contents().filter(function(){return this.nodeType===8}).get(0);if(c.nodeValue=="")return false;try{c=JSON.parse(c.nodeValue)}catch(e2){try{c=JSON.parse(atob(c.nodeValue))}catch(e22){try{var el2=$("<div></div>");el2.html(c.nodeValue);var k={};var mtitle=$("modal-title",el2).html();if(!mtitle)mtitle="";var mbody=$("modal-body",el2).html();if(!mbody)mbody="";var mdesc=$("modal-description",el2).html();if(!mdesc)mdesc="";var mfoot=$("modal-footer",el2).html();if(!mfoot)mfoot="";k.Title=mtitle;k.Body=mbody;k.Description=mdesc;k.Footer=mfoot;c=k}catch(e3){return false}}}return c}catch(e2){return false}}function addOrChangeParameters(url,params){let splitParams={};let splitPath=/(.*)[?](.*)/.exec(url);if(splitPath&&splitPath[2])splitPath[2].split("&").forEach(k=>{let d=k.split("=");splitParams[d[0]]=d[1]});let newParams=Object.assign(splitParams,params);let finalParams=Object.keys(newParams).map(a=>a+"="+newParams[a]).join("&");return splitPath?splitPath[1]+"?"+finalParams:url+"?"+finalParams}class BEA{Cart=null;Products=null;Authorize=null;Pay=null;localCache=true;_prom=null;proms=[];l="En";fields={Section:"Section,Title,Text",Product:"Name,Price,Quantity"};constructor(options){if(options===void 0)options={};if(!Object.keys(options).length==0){if(options.hasOwnProperty("fields")){for(var i2 in options["fields"]){this.fields[i2]=options["fields"][i2]}}if(options.hasOwnProperty("localisation"))this.l=options.localisation;if(options.hasOwnProperty("locale")&&options.locale===true){this.getLocale()}if(options.hasOwnProperty("sections")&&options.sections===true){this.getSections()}if(options.hasOwnProperty("localCache")&&options.localCache===false){this.localCache=false}}this.Cart=new Cart(this);this.Products=new Products(this);this.Authorize=new Authorize(this);this.Pay=new Pay(this);this._prom=Promise.all(this.proms)}request(className,data2,async,type2,a){var prom=defer();var x2;API.req(className,data2,null,type2,a??0).then(r2=>{if(async){prom.resolve(r2)}else{x2=r2.results}});if(async)return prom;return x2}getSections(){var sec=new Section(this);this.proms.push(sec._prom);return sec.get()}getLocale(){var loc=new Locale(this);this.proms.push(loc._prom);return loc.get()}order(){let prom=defer();var ids="";var productsInfo;var user;var orderData={User:"",productItems:[],Amount:0};user=this.Authorize.me();orderData.User=user.objectId;$.each(this.Cart.cartData,function(key2,value){ids=ids+value.P+","});this.Products.get({fields:"Name,Price,Quantity",media:"images",crops:"ax200,ax600,ax700,200x200,ax300"},{ids},true).then(res=>{let productsInfo2=res.results;var productsDB=Object.assign({},...productsInfo2.map(x2=>({[x2.objectId]:x2})));$.each(this.Cart.cartData,function(key2,value){orderData.productItems.push({Qty:value.Q,Product:value.P,productData:JSON.stringify(productsDB[value.P]),Price:productsDB[value.P].Price});orderData.Amount+=value.Q*productsDB[value.P].Price});this.request("/Order",{User:orderData.User,Amount:orderData.Amount},true,"POST").then(res2=>{let orderId=res2.results;for(var i2=0;i2<orderData.productItems.length;i2++){orderData.productItems[i2]["Order"]=orderId[0].objectId;this.request("/orderItems ",orderData.productItems[i2],true,"POST")}prom.resolve(orderId)})});return prom}sendEmail(data2){let prom=defer();this.request("/_Emails/send",data2,true,"POST").then(res=>{prom.resolve(r)})}batch(data2){return this.request("/batch",data2,true,"POST")}query(className,data2){return this.request(className,data2,true,"GET")}get(className,data2,options=true){return this.request(className,data2,options,"GET")}post(className,data2,options=true){return this.request(className,data2,options,"POST")}put(className,data2,options=true){return this.request(className,data2,options,"PUT")}delete(className,options=true){return this.request(className,"",options,"DELETE")}}class Pay{tsdk=null;object={};constructor(tsdk){this.tsdk=tsdk;let self2=this;$(window).unbind("message").on("message",function(e2){let dd=$("#gosell-gateway")[0].contentWindow;if(e2.originalEvent.source===dd&&e2.originalEvent.data=="close"){$(".gosell-gateway").remove();self2.onClose()}})}create(data2){let prom=defer();API.post("https://pay.bea.com.lb/create",data2,{},666).then(d=>{this.object=d;cl(d);this.process(this.object.transaction.url.replace("mode=page","mode=popup"));prom.resolve(this.object.id)}).catch(err=>{cl(err)});return prom}process(link){var d=`
|
|
515
|
+
<div class="gosell-gateway" reactive>
|
|
516
|
+
<div style="position: fixed;left: 0;right: 0;top: 0;bottom: 0;z-index: 9999;background-color: rgb(0,0,0,0.2);">
|
|
517
|
+
<iframe id="gosell-gateway"
|
|
518
|
+
src="${link}" width="100%"
|
|
519
|
+
height="100%"
|
|
520
|
+
style="display: block; position: absolute; inset: 0px; margin: auto; border: 0px; z-index: 2147483647;"></iframe>
|
|
521
|
+
</div>
|
|
522
|
+
</div>
|
|
523
|
+
`;$("body").append(d)}retrieve(id2){let prom=defer();this.tsdk.request("https://pay.bea.com.lb/?tap_id="+id2,{},true,"GET").then(d=>{prom.resolve(d)}).catch(err=>{cl(err)});return prom}onClose(){}}class Section{tsdk=null;_prom=defer();constructor(tsdk){this.tsdk=tsdk}get(){var d={fields:this.tsdk.fields.Section,limit:-1,locale:this.tsdk.l,media:"images",crops:"ax200,ax600,ax700,200x200,ax300"};this.tsdk.request("/Sections",d,true,"GET").then(r2=>{cl("HEiii",r2);if(r2.results){globals["sections"]=Object.assign({},...r2.results.map(x2=>({[x2?.Section]:x2})))}else cl("Sections",r2);this._prom.resolve(r2)});return globals["sections"]}}class Locale{tsdk=null;_prom=defer();constructor(tsdk){this.tsdk=tsdk}get(){var d={fields:"Key,"+this.tsdk.l,limit:-1};this.tsdk.request("/_Locale",d,true,"GET").then(r2=>{if(r2.results){globals["locale"]=Object.assign({},...r2.results.map(x2=>({[x2?.Key]:x2})))}else cl("_Locale",r2);this._prom.resolve(r2)});return globals["locale"]}}class Products{tsdk=null;constructor(tsdk){this.tsdk=tsdk}get(data2,options,async=true){var d=data2;if(options.hasOwnProperty("limit")){d["limit"]=options.limit}if(options.hasOwnProperty("key")){if(!d.hasOwnProperty("where"))d["where"]={};d.where["Name"]={startswith:options.key}}if(options.hasOwnProperty("ids")){if(!d.hasOwnProperty("where"))d["where"]={};d.where["objectId"]={in:[...new Set(options.ids.split(","))]}}if(options.hasOwnProperty("page")){d["limit"]=options.limits??"15";d["offset"]=(options.page-1)*d["limit"]}return this.tsdk.request("/Products",d,async,"GET")}}class Cart{tsdk=null;cartData={};constructor(tsdk){this.tsdk=tsdk;try{if(getCookie("_cd")!=void 0){try{this.cartData=JSON.parse(getCookie("_cd"))}catch(e2){}}}catch(e2){this.cartData=JSON.parse("{}")}}add(id2,v,q){var key2=btoa(id2+"::"+v);if(this.cartData.hasOwnProperty(key2)){this.cartData[key2].Q+=q}else{this.cartData[key2]={P:id2,Q:q,V:v}}setCookie("_cd",JSON.stringify(this.cartData))}set(id2,v,q){var key2=btoa(id2+"::"+v);if(this.cartData.hasOwnProperty(key2)){this.cartData[key2].Q=q}else{this.cartData[key2]={P:id2,Q:q,V:v}}setCookie("_cd",JSON.stringify(this.cartData))}remove(id2){delete this.cartData[id2];setCookie("_cd",JSON.stringify(this.cartData))}empty(){this.cartData={};setCookie("_cd",JSON.stringify(this.cartData))}getCart(){return this.cartData}getProductCart(d){var ids="";$.each(this.cartData,function(key2,value){ids=ids+value.P+","});var req=this.tsdk.Products.get(d,{ids});return req}}class Authorize{tsdk=null;constructor(tsdk){this.tsdk=tsdk}login(data2,options=true){var prom=defer();this.tsdk.request("/Users",data2,options,"GET").then(res=>{let req=res.results;globals["UserInfo"]=req[0];let x2=window.btoa(JSON.stringify(globals.UserInfo));setCookie("U_USER",x2);prom.resolve(res)});return prom}register(data2,options=true){var prom=defer();this.tsdk.request("/Users",data2,options,"POST").then(res=>{let req=res.results;data2["objectId"]=req[0].objectId;globals["UserInfo"]=data2;let x2=window.btoa(JSON.stringify(globals.UserInfo));setCookie("U_USER",x2);prom.resolve(res)});return prom}me(){var cookie=void 0;try{var cookie=JSON.parse(window.atob(getCookie("U_USER")))}catch(e2){}return cookie}isLoggedIn(){var result=false;if(getCookie("U_USER")!=void 0)result=true;return result}}function generate(){let length=10;const characters="abcdefghijklmnopqrstuvwxyz1234567890";let result="";const charactersLength=characters.length;for(let i2=0;i2<length;i2++){result+=characters.charAt(Math.floor(Math.random()*charactersLength))}return result}function getScrollBarWidth(){var $outer=$("<div>").css({visibility:"hidden",width:100,overflow:"scroll"}).appendTo("body"),widthWithScroll=$("<div>").css({width:"100%"}).appendTo($outer).outerWidth();$outer.remove();return(100-widthWithScroll)*2}_scW=getScrollBarWidth();function daysBetween(date_1,date_2){let difference=date_1.getTime()-date_2.getTime();let TotalDays=Math.ceil(difference/(1e3*3600*24));return TotalDays<0?TotalDays*-1:TotalDays}function notify(ti,tx2,i2,ty,al,rtl){var notify2=`<div class="notify {{Type}} nw sh20 h `+(rtl?"rtl":"")+`">
|
|
524
|
+
<div class="ov10 ra dash round3x bgb20 p2"></div>
|
|
525
|
+
<div class="ov ra icon"><span class="cc mdi fs24 mdi-{{Icon}}"></span></div>
|
|
526
|
+
<div class="ov la pointer" close-notify><span class="cc mdi fs18 mdi-close"></span></div>
|
|
527
|
+
{{Title}}
|
|
528
|
+
{{Text}}
|
|
529
|
+
</div>`;if(!al)al="topCenter";if(!ty)ty="";if(!$("[notify]").length)$("body").append("<div notify class='"+al+"'></div>");else $("[notify]").attr("class","").addClass(al);$("[notify]").prepend(notify2.split("{{Title}}").join(ti!=""?"<h5>"+ti+"</h5>":"").split("{{Icon}}").join(i2).split("{{Text}}").join(tx2).split("{{Type}}").join(ty).split("{{Type}}").join(ti).split("{{Type}}").join(ti));$(".notify").fadeIn();setTimeout(function(){$("[close-notify]:last").click()},5e3)}function _isScrollable(el2){let o1=el2.css("overflow-y")=="scroll"||el2.css("overflow-y")=="auto"&&el2[0].scrollHeight>el2.height()+15;let o2=el2.css("overflow-x")=="scroll"||el2.css("overflow-x")=="auto"&&el2[0].scrollWidth>el2.width()+15;return o1||o2}function _setPos(self2,p,el2){var left=self2.offset().left;var top=self2.offset().top;if(p==""||p=="bottom"){left+=self2.innerWidth()/2;top+=self2.innerHeight()}else if(p=="left"){top+=self2.innerHeight()/2}else if(p=="top"){left+=self2.innerWidth()/2}else{left+=self2.innerWidth();top+=self2.innerHeight()/2}$("tip").css({left,top,right:"unset",bottom:"unset"});if(top+15<el2.offset().top||top>el2.offset().top+el2.height()+10||left+15<el2.offset().left||left>el2.offset().left+el2.width()+10)$("tip").hide();else $("tip").show()}String.prototype.rtrim=function(s){if(s==void 0)s="\\s";try{return this.replace(new RegExp("["+s+"]+$"),"")}catch{return this.replace(new RegExp("[\\"+s+"]+$"),"")}};String.prototype.ltrim=function(s){if(s==void 0)s="\\s";try{return this.replace(new RegExp("^["+s+"]+"),"")}catch{return this.replace(new RegExp("^[\\"+s+"]+"),"")}};if(typeof _beaTn==="undefined"||!_beaTn){if(typeof XMLHttpRequest==="function"){try{var _idxXhr=new XMLHttpRequest;_idxXhr.open("GET","/index.js",false);_idxXhr.send(null);if(_idxXhr.status>=200&&_idxXhr.status<300){(0,eval)(_idxXhr.responseText)}else{console.log("Failed to load index.js: HTTP "+_idxXhr.status)}}catch(e2){console.log("Failed to load index.js: ",e2)}}}class AbstractWebSocket{constructor(url,connectionTimeout=5e3){this.url=url;this.socket=null;this.reconnectInterval=3e3;this.reconnectTimeout=null;this.connectionTimeout=connectionTimeout;this.connectionTimeoutId=null;this.connected=false;this.messageQueue=[]}connect(){this.socket=new WebSocket(this.url);this.connectionTimeoutId=setTimeout(()=>{this.handleConnectionTimeout()},this.connectionTimeout);this.socket.onopen=()=>{clearTimeout(this.connectionTimeoutId);this.connected=true;this.onOpen();this.processMessageQueue()};this.socket.onmessage=event=>{this.onMessage(event.data)};this.socket.onclose=event=>{clearTimeout(this.connectionTimeoutId);this.connected=false;this.onClose(event.code);this.reconnect()};this.socket.onerror=error=>{clearTimeout(this.connectionTimeoutId);this.onError(error)}}send(message){cl("Sending ",message);if(this.connected){this.socket.send(message)}else{this.messageQueue.push(message);console.error("WebSocket is not open. Unable to send message.")}}processMessageQueue(){while(this.messageQueue.length>0){const message=this.messageQueue.shift();cl("Sending From Queue ",message);this.socket.send(message)}}handleConnectionTimeout(){this.socket.close()}disconnect(){if(this.socket){this.socket.close()}clearTimeout(this.reconnectTimeout)}onOpen(){}onMessage(message){}onClose(code){}onError(error){}reconnect(){clearTimeout(this.reconnectTimeout);this.reconnectTimeout=setTimeout(()=>{this.connect()},this.reconnectInterval)}}class MyWebSocket extends AbstractWebSocket{constructor(url){super(url)}onOpen(){super.onOpen()}onMessage(message){super.onMessage(message)}onClose(code){super.onClose(code)}onError(error){super.onError(error)}}class Nuclear{_iter=0;reconnectAttempts=0;timeoutInterval=4e3;cbs={};_cbs={};lstnrs={};_ws;srvr=void 0;constructor(srvr){this.srvr=srvr;this.init();return this}on(e2,cb2){if(!this.lstnrs.hasOwnProperty(e2))this.lstnrs[e2]=[];this.lstnrs[e2].push(cb2);if(e2=="open"&&this._ws?.readyState==1){this.trigger("open",this._ws)}return this}off(e2){if(e2=="connect")return this;if(this.lstnrs.hasOwnProperty(e2))delete this.lstnrs[e2];return this}subscribe(e2,cb2){return this.on(e2,cb2)}unsubscribe(e2,cb2){return this.off(e2,cb2)}trigger(n2,e2){if(this.lstnrs.hasOwnProperty(n2)){for(let x2=0;x2<this.lstnrs[n2].length;x2++){this.lstnrs[n2][x2](e2)}}return this}emit(e2,data2,cb2){try{this._iter++;if(cb2)this.cbs["cb_"+this._iter]=cb2;if(this.ready()){this._ws.send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}else{this._send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}}catch(error){if(_debugMode)cl(error)}return this}_emit(e2,data2){this._iter++;let prom=defer();this._cbs["cb_"+this._iter]=prom;if(this.ready()){this._ws.send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}else{this._send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}return prom}_send(m){let _s=this;setTimeout(function(){if(_s.ready())_s._ws.send(m);else _s._send(m)},500)}ready(){return this._ws!==void 0&&this._ws.readyState==WebSocket.OPEN}connecting(){return this._ws!==void 0&&this._ws.readyState==WebSocket.CONNECTING}init(){var _s=this;this._ws=new ReconnectingWebSocket(this.srvr?this.srvr:"wss://www.beaapis.com/");this._ws.addEventListener("error",event=>{return false});this._ws.onopen=function(e2){_s.trigger("connect",e2);_s.trigger("open",e2)};this._ws.onclose=function(e2){_s._iter=0;_s.cbs={};_gn=0;barSet(1,200);_s.reconnectAttempts++};this._ws.onmessage=function(e2){try{let data2=JSON.parse(e2.data);if(data2.hasOwnProperty("e")){let event=data2["e"];let iter=data2["_iter"];const customEvent=new CustomEvent(event,{detail:data2["payload"]});customEvent.data=data2["payload"];if(event!="rooms")_s.trigger(event,customEvent);if(_s.cbs["cb_"+iter])_s.cbs["cb_"+iter](customEvent);if(_s._cbs["cb_"+iter])_s._cbs["cb_"+iter].resolve(customEvent)}}catch(e22){if(_debugMode)cl(e22)}};this._ws.onerror=function(e2){_gn=0;barSet(1,200)}}}class _Ticker{id="";tick=1e3;duration=1e4;data={};status="created";user=void 0;channel=void 0;_cbs={};constructor(obj,channel,user){this.id=obj.id;this.tick=obj?.tick??1e3;this.duration=obj?.duration??1e4;this.data=obj?.data??{};this.user=user;this.channel=channel;this.user.id=this.user.id;this.init();return this}init(opts,lstnrs){let t2=this.tick;let d=this.duration;let data2=this.data;if(opts){if(opts.hasOwnProperty("tick"))t2=opts.tick;if(opts.hasOwnProperty("duration"))d=opts.duration;if(opts.hasOwnProperty("data"))data2=opts.data}this.user.nuke.emit("subscribe",{type:"ticker",ticker:this.id,channel:this.channel.id,user:this.user.id,data:{tick:t2,duration:d,data:data2}});if(!this.user.nuke._tickers.hasOwnProperty(this.channel.id))this.user.nuke._tickers[this.channel.id]={};this.user.nuke._tickers[this.channel.id][this.id]=this;if(!lstnrs){var self2=this;this.on("create.class",function(e2){self2.status="created"});this.on("start.class",function(e2){self2.status="started"});this.on("tick.class",function(e2){self2.status="started"});this.on("pause.class",function(e2){self2.status="paused"});this.on("finish.class",function(e2){self2.status="finished"})}}start(){if(this.status=="started"){setError(null,`This ticker is already started`);return this}if(this.status=="finished"){setError(null,`This ticker is finished`);return this}this.user.nuke.emit("ticker",{ticker:this.id,channel:this.channel.id,user:this.user.id,ev:"start"})}pause(){if(this.status=="paused"){setError(null,`This ticker is already paused`);return this}if(this.status!="started"){setError(null,`This ticker is not started yet!`);return this}this.user.nuke.emit("ticker",{ticker:this.id,channel:this.channel.id,user:this.user.id,ev:"pause"})}restart(opts){if(this.status!="finished"){setError(null,`This ticker is not finished yet!`);return this}this.init(opts,true)}delete(){this.user.nuke.emit("unsubscribe",{type:"ticker",ticker:this.id,channel:this.channel.id,user:this.user.id,ev:"delete"})}extend(t2){this.user.nuke.emit("ticker",{ticker:this.id,channel:this.channel.id,user:this.user.id,ev:"extend",data:{time:t2}})}on(e2,cb2){let myRef2=document.createElement("live");myRef2.dataset["cb"]=cb2;document.body.append(myRef2);if(this._cbs.hasOwnProperty(e2)){this._cbs[e2].push(cb2)}else this._cbs[e2]=[cb2];return this}off(e2){if(this._cbs.hasOwnProperty(e2))delete this._cbs[e2];return this}trigger(e2,customEvent){if(this._cbs.hasOwnProperty(e2)){for(let i2=0;i2<this._cbs[e2].length;i2++){const cb2=this._cbs[e2][i2];cb2(customEvent)}}return this}}class _Channel{id="/";user=void 0;type="room";_cbs={};constructor(id2,type2,user){this.id=id2;this.type=type2;this.user=user;this.user.id=this.user.id??"Guest";return this}trigger(e2,customEvent){if(this._cbs.hasOwnProperty(e2)){for(let i2=0;i2<this._cbs[e2].length;i2++){const cb2=this._cbs[e2][i2];cb2(customEvent)}}return this}join(){this.user.nuke.emit("subscribe",{type:this.type,channel:this.id,user:this.user.id});if(!this.user.nuke._chnls.hasOwnProperty(this.user.id))this.user.nuke._chnls[this.user.id]={};this.user.nuke._chnls[this.user.id][this.id]=this}leave(){this.user.nuke.emit("unsubscribe",{type:this.type,channel:this.id,user:this.user.id,ev:"leave"});if(this.user.nuke._chnls.hasOwnProperty(this.user.id)){delete this.user.nuke._chnls[this.user.id][this.id]}}broadcast(ev2,options){this.user.nuke.emit("broadcast",{type:"room",channel:this.id,user:this.user.id,ev:ev2,includeMe:options?.includeMe??true,data:options?.data??{}})}off(e2){if(e2=="connect")return this;if(this._cbs.hasOwnProperty(e2))delete this._cbs[e2];return this}on(e2,cb2){let myRef2=document.createElement("live");myRef2.dataset["cb"]=cb2;document.body.append(myRef2);if(this._cbs.hasOwnProperty(e2)){this._cbs[e2].push(cb2)}else this._cbs[e2]=[cb2];return this}createTicker(obj){if(!this.user.nuke._tickers.hasOwnProperty(this.id)){this.user.nuke._tickers[this.id]={}}let t2=new _Ticker(obj,this,this.user);return t2}getTicker(id2){this.user.nuke.emit("get",{type:"ticker",channel:this.id,user:this.user.id,ticker:id2})}}class _User{id="";nuke=void 0;_cbs={};constructor(id2,nuke){this.id=id2;this.nuke=nuke;this.init();return this}init(){this.nuke.emit("subscribe",{type:"user",channel:this.id,user:this.id});if(!this.nuke._users.hasOwnProperty("/"+this.id))this.nuke._users["/"+this.id]=this}on(e2,cb2){if(this.nuke._users["/"+this.id]._cbs.hasOwnProperty(e2)){this.nuke._users["/"+this.id]._cbs[e2].push(cb2)}else this.nuke._users["/"+this.id]._cbs[e2]=[cb2];return this}off(e2){if(this._cbs.hasOwnProperty(e2))delete this._cbs[e2];return this}broadcast(ev2,options){this.nuke.emit("broadcast",{type:"user",channel:this.id,user:this.id,ev:ev2,includeMe:options?.includeMe??true,data:options?.data??{}})}trigger(e2,customEvent){if(this._cbs.hasOwnProperty(e2)){for(let i2=0;i2<this._cbs[e2].length;i2++){const cb2=this._cbs[e2][i2];cb2(customEvent)}}return this}_broadcastToAll(IDs,e2,d,t2){this.nuke.emit("broadcast",{type:t2=="u"?"user":"room",user:this.id,ev:e2,includeMe:d["includeMe"]??true,data:d["data"],...t2=="u"?{users:IDs.join(",")}:{channels:IDs.join(",")}})}broadcastToUsers(uIDs,e2,d){this._broadcastToAll(uIDs,e2,d,"u")}broadcastToChannels(cIDs,e2,d){this._broadcastToAll(cIDs,e2,d,"c")}unsubscribe(c){if(this.nuke._chnls.hasOwnProperty(this.id)){if(this.nuke._chnls[this.id].hasOwnProperty(c))this.nuke._chnls[this.id][c].leave()}}subscribe(e2,cb2){if(!this.nuke._chnls.hasOwnProperty(this.id)){this.nuke._chnls[this.id]={}}let channel=new _Channel(e2,"room",this);channel.join();return channel}destroy(){this._cbs={};if(this.nuke._chnls.hasOwnProperty(this.id)){let chnls=this.nuke._chnls[this.id];for(const chnl in chnls){this.unsubscribe(chnl)}}}}class _Live{_chnls={};_users={};_tickers={};_iter=0;reconnectAttempts=0;timeoutInterval=4e3;cbs={};_cbs={};lstnrs={};_ws;srvr=void 0;constructor(srvr){this.srvr=srvr;this.init();return this}on(e2,cb2){if(!this.lstnrs.hasOwnProperty(e2))this.lstnrs[e2]=[];this.lstnrs[e2].push(cb2);if(e2=="open"&&this._ws?.readyState==1){this.trigger("open",this._ws)}return this}off(e2){if(e2=="connect")return this;if(this.lstnrs.hasOwnProperty(e2))delete this.lstnrs[e2];return this}createUser(id2){let user=new _User(id2,this);return user}subscribe(e2,cb2){return this.on(e2,cb2)}unsubscribe(e2,cb2){return this.off(e2,cb2)}trigger(n2,e2){if(this.lstnrs.hasOwnProperty(n2)){for(let x2=0;x2<this.lstnrs[n2].length;x2++){this.lstnrs[n2][x2](e2)}}return this}emit(e2,data2,cb2){try{this._iter++;if(cb2)this.cbs["cb_"+this._iter]=cb2;if(this.ready()){this._ws.send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}else{this._send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}}catch(error){if(_debugMode)cl(error)}return this}_emit(e2,data2){this._iter++;let prom=defer();this._cbs["cb_"+this._iter]=prom;if(this.ready()){this._ws.send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}else{this._send(JSON.stringify({e:e2,payload:data2,_iter:this._iter}))}return prom}_send(m){let _s=this;setTimeout(function(){if(_s.ready())_s._ws.send(m);else _s._send(m)},500)}ready(){return this._ws!==void 0&&this._ws.readyState==WebSocket.OPEN}connecting(){return this._ws!==void 0&&this._ws.readyState==WebSocket.CONNECTING}init(){var _s=this;if(_s.ready()||_s.connecting()){return}this._ws=new ReconnectingWebSocket(this.srvr?this.srvr:"wss://www.beaapis.com/");this._ws.addEventListener("error",event=>{});this._ws.onopen=function(e2){_s.trigger("connect",e2);_s.trigger("open",e2)};this._ws.onclose=function(e2){_s._iter=0;_s.cbs={};_gn=0;barSet(1,200);_s.reconnectAttempts++};this._ws.onmessage=function(e2){try{let data2=JSON.parse(e2.data);if(data2.hasOwnProperty("for")){let t2=data2["type"]??"room";let ev2=data2["ev"]??"message";const customEvent=new CustomEvent(ev2,{detail:data2["payload"]});customEvent.data=data2["payload"];let payload=data2["payload"];if(payload.hasOwnProperty("user")){if(t2=="user"){_s._users[data2["for"]].trigger(ev2,customEvent)}else if(t2=="room")_s._chnls[payload.user.id][data2["for"]].trigger(ev2,customEvent);else if(t2=="ticker"){_s._tickers[data2["for"]][payload?.ticker?.id].trigger(ev2,customEvent);_s._tickers[data2["for"]][payload?.ticker?.id].trigger(ev2+".class",customEvent)}}}else if(data2.hasOwnProperty("e")){let event=data2["e"];let iter=data2["_iter"];const customEvent=new CustomEvent(event,{detail:data2["payload"]});customEvent.data=data2["payload"];if(event!="rooms")_s.trigger(event,customEvent);if(_s.cbs["cb_"+iter])_s.cbs["cb_"+iter](customEvent);if(_s._cbs["cb_"+iter])_s._cbs["cb_"+iter].resolve(customEvent)}}catch(e22){if(_debugMode)cl(e22)}};this._ws.onerror=function(e2){_gn=0;barSet(1,200)}}}let LIVE;let Nuke;LIVE=new _Live("wss://www.beaapis.com/");Nuke=new Nuclear(_beaTn?void 0:(window.location.protocol==="https:"?"wss://":"ws://")+window.location.hostname+(window.location.port?":"+window.location.port:""));let _ovcD,_vcD;function syncViewFiles(){Nuke.emit("getfiles",{},function(e2){var _files=e2.data;let views=_files["views"];let layouts=_files["layouts"];_vcD=_files;if(!_ovcD)_ovcD=clone(_vcD);else{for(var key2 in views){if(_ovcD["views"].hasOwnProperty(key2)){if(!deepCompare(clone(_ovcD["views"][key2]),clone(views[key2]))){cl("Changed the view "+atob(key2));let n2=atob(key2).split("src/views/").join("").split(".view").join("");let nodes2=getURLNodes();_ovcD["views"][key2]=views[key2];cl("view",n2,atob(key2));if(nodes2[0]==n2){renderView(nodes2[0],null,View.props??{})}else{renderView(n2,true,{})}}}}for(var key2 in layouts){if(_ovcD["layouts"].hasOwnProperty(key2)){if(!deepCompare(clone(_ovcD["layouts"][key2]),clone(layouts[key2]))){cl("Changed the layout "+atob(key2));let n2=atob(key2).split("src/layouts/").join("").split(".layout").join("");let nodes2=getURLNodes();_ovcD["layouts"][key2]=layouts[key2];cl("layout",n2,atob(key2));renderView(n2,false,{},"layouts")}}}}})}Nuke.on("connect",function(){if(_beaTn){Nuke.emit("get_uniquer",{beajsToken:_beaTn,uniquer:globals.uniquer},function(e2){let d=e2.data;let data2=d.uniquer;globals.uniquer=data2})}else{syncViewFiles()}});Nuke.on("files-changed",function(){if(!_beaTn)syncViewFiles()});var API={get:function(u,d,h,a,opts){return this.req(u,d,h,"GET",a,opts)},put:function(u,d,h,a,opts){return this.req(u,d,h,"PUT",a,opts)},post:function(u,d,h,a,opts){return this.req(u,d,h,"POST",a,opts)},delete:function(u,d,h,a,opts){return this.req(u,d,h,"DELETE",a,opts)},patch:function(u,d,h,a,opts){return this.req(u,d,h,"PATCH",a,opts)},req:function(u,d,h,m,a,opts,_prom){if(!opts)opts={full:false,progress:true};let prog=opts.hasOwnProperty("progress")?opts.progress:true;let full=opts.hasOwnProperty("full")?opts.full:false;let prom=_prom?_prom:defer();try{return prom}finally{if(Nuke&&Nuke._ws&&Nuke._ws.readyState==1&&(_beaTn?globals.uniquer>0:true)){if(prog){_gn=0;_work()}Nuke.emit("request",{body:{method:m,path:u,api:a??0,headers:h,full},uniquer:globals.uniquer??0,data:d},function(e2){if(prog){_gn=0;barSet(1,200)}var r2=e2.data;prom.resolve(r2)})}else{if(_beaTn&&_beaTn!=""){$.ajax({"url":"https://www.beaapis.com/req",headers:{},type:"POST",dataType:"json",data:{body:{method:m,path:u,api:a??0,headers:h,full},uniquer:globals.uniquer??0,_beaTn,data:d},cache:false,success:function(r2,s){prom.resolve(r2)},error:function(){prom.reject("error")}})}else{setTimeout(()=>{this.req(u,d,h,m,a,opts,prom)},_tickTime)}}}}};var _navT=0;var _nav=false;var _pbc;var _vuid={};$("body").on("click touch tap",function(e2){if(!_pbc)_pbc=new AudioContext;if(_pbc.state=="suspended"){_pbc.resume().then(()=>{})}});$("body").on("click touch",".navTgl",function(e2){_nav=false;clearTimeout(_navT);if($("nav").hasClass("nav-opened")){$("nav").removeClass("nav-opened");$("body").removeClass("nav-opened")}else{$("nav").addClass("nav-opened");$("body").addClass("nav-opened");_navT=setTimeout(function(){_nav=true},20)}e2.stopPropagation()});$(document).keydown(function(e2){var keyCode=e2.keyCode||e2.which;if(keyCode==27){e2.preventDefault();e2.stopPropagation();if($("[loader]").length){if(_loader.options.Dismissible)_loader.hide()}else if(_nav){$("nav").removeClass("nav-opened");$("body").removeClass("nav-opened");_nav=false}else{if($("popup").length&&$("droplet").length){$("droplet").removeClass("is-visible").each(function(){var p=$(this);setTimeout(function(){p.remove()},150)})}else if($("popup").length){$("[close-modal]:last").click()}else{$("body").css({overflow:"visible"});$("droplet").removeClass("is-visible").each(function(){var p=$(this);setTimeout(function(){p.remove()},150)})}}}});_csswrk.on("css-ready",function(e2){let data2=e2.originalEvent.data;_vuid[data2.key].resolve(data2.csses)});_upwrk.on("message",function(e2){let data2=e2.originalEvent.data});_upwrk.on("files-added",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"files-added",data2.files,data2.newfiles)});_upwrk.on("queue-changed",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"queue-changed",data2.files)});_upwrk.on("file-removed",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"file-removed",data2.files,data2.removedfile)});_upwrk.on("upload-start",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"upload-start",data2.files)});_upwrk.on("file-uploaded",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"file-uploaded",data2.files,data2.file)});_upwrk.on("upload-progress",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"upload-progress",data2.files)});_upwrk.on("upload-complete",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"upload-complete",data2.files)});_upwrk.on("upload-stop",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"upload-stop",data2.files)});_upwrk.on("queue-empty",function(e2){let data2=e2.originalEvent.data;processEv(e2,$('[upid="'+data2.upid+'"]'),"queue-empty")});$.fn.extend({startUpload:function(){if(this.hasAttr("up")){_upwrk.trigger("start-upload",{"upid":this.attr("upid")})}return this},stopUpload:function(){if(this.hasAttr("up")){_upwrk.trigger("stop-upload",{"upid":this.attr("upid")})}return this},removeFile:function(id2){if(this.hasAttr("up")){_upwrk.trigger("remove-file",{"upid":this.attr("upid"),"id":id2})}return this}});$("body").on("FilesAdded","[up]",function(e2,files){let t2=$(this);var size=t2.attr("data-mxs")?t2.attr("data-mxs"):"10mb";_upwrk.trigger("handle-files",{"upid":t2.attr("upid"),"files":files});processEv(e2,t2,"browse-files",files)});$("body").on("dragover","[up] [drpzn]",function(e2){e2.stopPropagation();e2.preventDefault();let t2=$(this).closest("[up]");$(this).addClass("dragover");e2.originalEvent.dataTransfer.dropEffect="copy";return false});$("body").on("dragleave","[up] [drpzn]",function(e2){e2.stopPropagation();e2.preventDefault();$(this).removeClass("dragover")});$("body").on("drop","[up] [drpzn]",function(e2){e2.stopPropagation();e2.preventDefault();var files=e2.originalEvent.dataTransfer?.files||e2.target?.files;let t2=$(this).closest("[up]");$(this).removeClass("dragover");t2.trigger("FilesAdded",[files]);return false});$("body").on("click","[up] [browse]",function(e2){e2.stopPropagation();e2.preventDefault();let t2=$(this).closest("[up]");t2.find("[files]").click()});$("body").on("change","[up] [files]",function(e2){e2.stopPropagation();e2.preventDefault();var files=e2.originalEvent.dataTransfer?.files||e2.target?.files;let t2=$(this).closest("[up]");t2.trigger("FilesAdded",[files])});$("body").on("click touch","[ctc]",function(ev){var el=$(this);var ctc=el.attr("ctc");var selector=el;if(ctc.indexOf("el.")!==-1){selector=eval(ctc)}else if(ctc!="")selector=$(ctc);if(!navigator.clipboard){var temp=$("<textarea class='pf' style='left: -40%;' />");$("body").append(temp);temp.val(selector.text()).select();document.execCommand("copy");temp.remove()}else{navigator.clipboard.writeText(selector.text()).then(function(){},function(err){var temp2=$("<textarea class='pf' style='left: -40%;' />");$("body").append(temp2);temp2.val(selector.text()).select();document.execCommand("copy");temp2.remove()})}if(el.hasAttr("stop"))ev.stopPropagation()});$("body").on("click touch","[scroll-left]",function(ev2){var _el2=$(this);var _wrap=_el2.closest("[wrapper]");if(_wrap.length){var _p=_wrap.find("div").first();_p.stop().animate({scrollLeft:_p.scrollLeft()-100},{duration:200,easing:"easeOutCirc",complete:function(){}})}});$("body").on("click touch","[scroll-right]",function(ev2){var _el2=$(this);var _wrap=_el2.closest("[wrapper]");if(_wrap.length){var _p=_wrap.find("div").first();_p.stop().animate({scrollLeft:_p.scrollLeft()+100},{duration:200,easing:"easeOutCirc",complete:function(){}})}});$("body").on("click touch","[scroll-top]",function(ev2){var _el2=$(this);var _wrap=_el2.closest("[wrapper]");if(_wrap.length){var _p=_wrap.find("div").first();_p.stop().animate({scrollTop:_p.scrollTop()-100},{duration:200,easing:"easeOutCirc",complete:function(){}})}});$("body").on("click touch","[scroll-bottom]",function(ev2){var _el2=$(this);var _wrap=_el2.closest("[wrapper]");if(_wrap.length){var _p=_wrap.find("div").first();_p.stop().animate({scrollTop:_p.scrollTop()+100},{duration:200,easing:"easeOutCirc",complete:function(){}})}});function bs(t2){$("body").css({overflow:t2?"visible":"hidden"})}$("body").on("open-modal","[modal]",function(ev2){var el2=$(this);var n2=popups.modals.length;var _view=el2.attr("modal");bs();var va=el2.attr("modal-align")??"center middle";var padding=el2.attr("modal-spacing")??"p10";var ov=el2.attr("modal-ov")??"bgb20";va=va.split(" ");if(va.length==2){va={h:["left","center","right"].indexOf(va[0])>=0?va[0]:"center",v:["top","center","middle","bottom"].indexOf(va[1])>=0?va[1]:"middle"}}else{va={h:"center",v:"middle"};setError(null,"Modal align should be modal-align='vertical horizontal'.")}if(!el2.hasAttr("data-modal")){var selector2="modals_"+n2;var popup='<popup class="ov pf [c] z10000"><pop-o class="ov pf [ov]"></pop-o><tbl_nm fixed class="hv100"><cl class="[va] [ta] [p]"><pop-c><pop-x close-modal data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="cc c">×</span></pop-x><pop-h><pop-t>[t]</pop-t><pop-d>[d]</pop-d></pop-h><pop-b>[b]</pop-b><pop-f>[f]</pop-f></pop-c></cl></tbl_nm></popup>';var verticalAlign=va["v"]=="center"||va["v"]=="middle"?"vm":va["v"]=="top"?"vt":"vb";var textAlign=va["h"]=="center"?"c":va["h"]=="left"?"l":"r";popup=popup.split("[va]").join(verticalAlign).split("[p]").join(padding).split("[ta]").join(textAlign).split("[ov]").join(ov);let attrsData={t:el2.attr("modal-title")??"New Modal",d:el2.attr("modal-description")??"",c:el2.attr("modal-class")??""};if(_view!=""){popup=popup.split("[t]").join(attrsData.t);popup=popup.split("[d]").join(attrsData.d);popup=popup.split("[b]").join('<div for-modal="'+selector2+`" view='`+_view+"'></div>");popup=popup.split("[f]").join("")}else{var c=getComData(el2);if(!c){if(el2.find("modal").length>0){var modalData=el2.find("modal:first");var c=getComData(modalData,true)}}if(c){if(c.Title)popup=popup.split("[t]").join(c.Title??attrsData.t);popup=popup.split("[d]").join(c.Description??attrsData.d);popup=popup.split("[b]").join(c.Body??"");popup=popup.split("[f]").join(c.Footer??"")}else{popup=popup.split("[t]").join(attrsData.t);popup=popup.split("[d]").join(attrsData.d);popup=popup.split("[b]").join("");popup=popup.split("[f]").join("")}}popup=popup.split("[c]").join(attrsData.c);var newModal=$(popup);newModal.attr("id",selector2).appendTo("body");let modal2=$("#"+selector2);el2.trigger("modal-open",[modal2]);modal2.data("props",el2.data("props"));modal2.addClass("modal-open").delay(10).queue(function(next){$(this).addClass("in");next()});$(this).attr("data-modal",selector2);popups["modals"].push(newModal.get(0));globalWatch()}if(el2.hasAttr("stop"))ev2.stopPropagation()});$("body").on("click touch","[modal]",function(ev2){let modalTriggered=false;var obj={};$.each($(this)[0].attributes,function(){if(this.value.toLowerCase()=="openmodal"){modalTriggered=true;return}obj[this.name]=this.value});if(!modalTriggered){$(this).trigger("open-modal")}});$("body").on("modal-close","[\\@modal-close]",function(ev,modal,cb){let el=$(this),_v=el.attr("@modal-close");let props=modal.data("props");let _fn=_v.split("(")[0];try{if(typeof window[_v]==="function")cb(window[_fn](ev,el,modal,props));else{let _eva=eval(_v);cb(_eva)}}catch(e2){cb()}});$("body").on("modal-open","[\\@modal-open]",function(ev,modal){let el=$(this),_v=el.attr("@modal-open");let _fn=_v.split("(")[0];try{if(typeof window[_v]==="function"){var _data=window[_fn](ev,el,modal);modal.data("props",_data)}else{let _eva=eval(_v);modal.data("props",_eva)}}catch(e2){}});function evalEvAttr(_v,ev,el,n,arg1,arg2,arg3){let _fn=_v.split("(")[0];try{if(typeof window[_v]==="function"){ev["cType"]=n;var _data=arg3?window[_fn](ev,el,arg1,arg2,arg3):arg2?window[_fn](ev,el,arg1,arg2):arg1?window[_fn](ev,el,arg1):window[_fn](ev,el);return _data}else{let _eva=eval(_v);return _eva}}catch(e2){return false}}function processEv(ev2,el2,n2,arg12,arg22,arg32){if(el2.attr("stop"))ev2.stopPropagation();if(n2=="focusin")n2="focus";else if(n2=="focusout")n2="blur";if(!el2.hasAttr("@"+n2))return;if(el2.hasAttr("@before-"+n2)){if(!evalEvAttr(el2.attr("@before-"+n2),ev2,el2,n2,arg12,arg22,arg32))return}let _v2=el2.attr("@"+n2);if(_v2.toLowerCase()=="openmodal"){el2.trigger("open-modal");return}evalEvAttr(_v2,ev2,el2,n2,arg12,arg22,arg32)}$("body").on("click touch","[ci]",function(ev2){var el2=$(this);var f=el2.closest("form");var inputs=$("");if(el2.attr("ci")!=""){let ci=el2.attr("ci").split(",");for(let index2=0;index2<ci.length;index2++){const selector2=ci[index2];inputs=inputs.add(f.find(selector2))}}else{inputs=f.find($("input[\\:required],select[\\:required],textarea[\\:required]"))}f.removeClass("validation-error");for(var i2=0;i2<inputs.length;i2++){if(!checkFormInputs(f,inputs[i2])){f.addClass("validation-error");break}}});$("body").on("doubletap","[\\@dblclick]",function(ev2){processEv(ev2,$(this),"dblclick")});$("body").on("doubletap","[\\@dbltap]",function(ev2){processEv(ev2,$(this),"dbltap")});$("body").on("singletap","[\\@singleclick]",function(ev2){processEv(ev2,$(this),"singleclick")});$("body").on("singletap","[\\@singletap]",function(ev2){processEv(ev2,$(this),"singletap")});$("body").on("taphold","[\\@taphold]",function(ev2){processEv(ev2,$(this),"taphold")});$("body").on("taphold","[\\@clickhold]",function(ev2){processEv(ev2,$(this),"clickhold")});$("body").on("click touch","[\\@click]",function(ev2){processEv(ev2,$(this),"click")});$("body").on("tap","[\\@tap]",function(ev2){processEv(ev2,$(this),"click touch")});$("body").on("tap2","[\\@click2]",function(ev2){processEv(ev2,$(this),"click2")});$("body").on("tap2","[\\@tap2]",function(ev2){processEv(ev2,$(this),"tap2")});$("body").on("tap2hold","[\\@click2hold]",function(ev2){processEv(ev2,$(this),"click2hold")});$("body").on("tap2hold","[\\@tap2hold]",function(ev2){processEv(ev2,$(this),"tap2hold")});$("body").on("orientationchange","[\\@orientationchange]",function(ev2){processEv(ev2,$(this),"orientationchange")});$("body").on("swipe swipeleft swipedown swipeend swipeup swiperight","[\\@swipe],[\\@swipe-down],[\\@swipe-up],[\\@swipe-left],[\\@swipe-right],[\\@swipe-end]",function(ev2){let _v2=ev2.type.length==5?"swipe":ev2.type.split("swipe").join("swipe-");processEv(ev2,$(this),_v2)});$("body").on("mouseover","[\\@mouse-over]",function(ev2){processEv(ev2,$(this),"mouse-over")});$("body").on("mousedown touchstart","[\\@mouse-down]",function(ev2){processEv(ev2,$(this),"mouse-down")});$("body").on("tapstart","[\\@tap-start]",function(ev2){processEv(ev2,$(this),"tap-start")});$("body").on("tapend","[\\@tap-end]",function(ev2){processEv(ev2,$(this),"tap-end")});$("body").on("tapmove","[\\@tap-move]",function(ev2){processEv(ev2,$(this),"tap-move")});$("body").on("mouseup touchend","[\\@mouse-up]",function(ev2){processEv(ev2,$(this),"mouse-up")});$("body").on("mouseout","[\\@mouse-out]",function(ev2){processEv(ev2,$(this),"mouse-out")});$("body").on("mouseenter touchmove","[\\:hover]",function(ev2){let _s=$(this).attr(":hover");$(this).attr("style",($(this).hasAttr("style")?$(this).attr("style").rtrim(";")+";":"")+_s)});$("body").on("mouseleave touchend","[\\:hover]",function(ev2){let _s=$(this).attr(":hover");$(this).attr("style",$(this).attr("style").split(_s).join(""))});$("body").on("mouseenter","[\\@mouse-enter]",function(ev2){processEv(ev2,$(this),"mouse-enter")});$("body").on("mouseleave","[\\@mouse-leave]",function(ev2){processEv(ev2,$(this),"mouse-leave")});$("body").on("mousemove","[\\@mouse-move]",function(ev2){processEv(ev2,$(this),"mouse-move")});$("body").on("touchmove","[\\@mouse-move]",function(ev2){processEv(ev2,$(this),"mouse-move")});$("body").on("sort","[\\@sort]",function(ev2,ui){processEv(ev2,$(this),"sort",ui)});$("body").on("sortupdate","[\\@sort-update]",function(ev2,ui){processEv(ev2,$(this),"sort-update",ui)});$("body").on("sortchange","[\\@sort-change]",function(ev2,ui){processEv(ev2,$(this),"sort-change",ui)});$("body").on("sortstart","[\\@sort-start]",function(ev2,ui){processEv(ev2,$(this),"sort-start",ui)});$("body").on("sortstop","[\\@sort-stop]",function(ev2,ui){processEv(ev2,$(this),"sort-stop",ui)});$("body").on("sortbeforestop","[\\@sort-before-stop]",function(ev2,ui){processEv(ev2,$(this),"sort-before-stop",ui)});$("body").on("drag","[\\@drag]",function(ev2,ui){processEv(ev2,$(this),"drag",ui)});$("body").on("dragstart","[\\@drag-start]",function(ev2,ui){processEv(ev2,$(this),"drag-start",ui)});$("body").on("dragstop","[\\@drag-stop]",function(ev2,ui){processEv(ev2,$(this),"drag-stop",ui)});$("body").on("drop","[\\@drop]",function(ev2,ui){processEv(ev2,$(this),"drop",ui)});$("body").on("clear","[sl]",function(ev2,ui){let t2=$(this);t2.empty().change();try{let opts=t2.data("select2")?.options?.options;opts.data=null;t2.select2(opts)}catch(e2){cl(e2)}});$("body").on("change blur focus keyup keydown input","[\\@input],[\\@change],[\\@blur],[\\@focus],[\\@keyup],[\\@keydown]",function(ev2){processEv(ev2,$(this),ev2.type)});$("body").on("click touch","[close-modal]",function(ev){var el=$(this);var modal=el.closest("popup");var id=modal.attr("id");var element_to_remove=$("#"+id).get(0);var index=$.inArray(element_to_remove,popups.modals);var modalOwner=$("[modal][data-modal="+id+"]");if(el.attr("stop"))ev.stopPropagation();ev.preventDefault();if(modalOwner.hasAttr("@modal-beforeclose")){cl("kuku");try{let _bv=modalOwner.attr("@modal-beforeclose");let _fn=_bv.split("(")[0];if(typeof window[_bv]==="function"){cl("sasha");if(window[_fn](ev,el,modalOwner)==false)return;else{cl("llll");let _eva=eval(_bv);if(_eva==false)return;cl("khaaawwwww")}}}catch(e2){cl("haha");cl(e2)}}if(modalOwner.hasAttr("@modal-close")){modalOwner.trigger("modal-close",[modal,function(res){if(res===false)return;$(".select2-container:not(.select2),.colorpicker.colorpicker-visible").remove();if(index>-1){$("[modal][data-modal="+id+"]").removeAttr("data-modal");modal.removeClass("in").delay(150).queue(function(next){$(this).remove();if(popups.modals.length==0)bs(true);next()});popups.modals.splice(index,1)}}])}else{$(".select2-container:not(.select2),.colorpicker.colorpicker-visible").remove();if(index>-1){$("[modal][data-modal="+id+"]").removeAttr("data-modal");modal.removeClass("in").delay(150).queue(function(next){$(this).remove();if(popups.modals.length==0)bs(true);next()});popups.modals.splice(index,1)}}});$("body").on("change keyup","[password]",function(e2){let el2=$(this);let lbl=el2.closest("label");let f=el2.closest("form");var v=$.trim($(this).val());let allCls="has-spaces weak strong very-strong medium";let cls=passwordStrength(v);el2.removeClass(allCls).addClass(cls);if(f.length)f.removeClass(allCls).addClass(cls);if(lbl.length)lbl.removeClass(allCls).addClass(cls);if(!$(this).next().hasClass("passStrength"))$(this).after("<span class='passStrength'></span>");$(this).parent().find(".passStrength").removeClass(allCls).addClass(cls)});$("body").on("change keyup","[username]",function(e2){var keyCode=e2.keyCode||e2.which;if(keyCode!=9&&keyCode!=16&&keyCode!=27&&keyCode!=93&&keyCode!=91&&keyCode!=17&&keyCode!=18){var el2=$(this);let f=el2.closest("form");checkFormInputs(f,el2,true)}});$("body").on("focus","input:not(.select2-search__field,.mobinit),textarea,select",function(ev2){var el2=$(this);var f=el2.closest("form");let lbl=el2.closest("label");if(f.length)f.addClass("focused");if(lbl.length)lbl.addClass("focused");el2.parent().addClass("focused");el2.addClass("focused")});$("body").on("blur","input:not(.select2-search__field,.mobinit),textarea,select",function(ev2){var el2=$(this);var f=el2.closest("form");if(f.length)f.removeClass("focused");el2.parent().removeClass("focused");el2.removeClass("focused")});$("body").on("change keyup","input:not(.select2-search__field,.mobinit),textarea,select",function(ev2){var el2=$(this);let f=el2.closest("form");checkFormInputs(f,el2,true)});var _lookups=0;var _debs={};var _proms={};$("body").on("change keyup","[\\:lookup]",function(e2){var keyCode=e2.keyCode||e2.which;if(keyCode!=9&&keyCode!=16&&keyCode!=27&&keyCode!=93&&keyCode!=91&&keyCode!=17&&keyCode!=18){var el2=$(this);if(!el2.attr("data-i")){el2.attr("data-i",_lookups);_lookups++}var key2="lu_"+el2.attr("data-i");clearTimeout(_debs[key2]);var v=$(this).val();var callback=el2.attr(":lookup-callback");if(!_proms.hasOwnProperty(key2)){_proms[key2]=defer();_proms[key2].then(function(val2){el2.addClass("finished").removeClass("pending")}).catch(reason=>{el2.addClass("pending").removeClass("finished")})}else{}el2.addClass("pending").removeClass("finished");_debs[key2]=setTimeout(function(){_proms[key2].reject();_proms[key2]=defer();_proms[key2].then(function(val2){el2.addClass("finished").removeClass("pending")}).catch(reason=>{el2.addClass("pending").removeClass("finished")});window[callback](v,_proms[key2])},200)}});$("body").on("click touch","a,area",function(e2){var el2=$(this);var link=el2.attr("href");if(link==""||$(this).closest(".cke").length==1||$(this).closest(".chosen-container").length==1||$(this).attr("target")=="_blank"||$(this).attr("target")=="_new"||$(this).hasClass("norm")||$(this).closest(".gm-style").length==1){}else{var local=false;var l=getLocation(link);var l2=getLocation(appSettings.Base);var url="home";local=l.hostname==l2.hostname;var url=l.pathname.split(l2.pathname);if(l.pathname=="/"||l.pathname=="/home"){url="home"}else{url=url.join("/")}if(local&&!cntrlon){e2.preventDefault();if(el2.hasAttr("stop"))e2.stopPropagation();pushURL(url+(l.search!=""?l.search:""))}else{}}});$("body").on("click touch","[h],[s]",function(e){var el=$(this);if(el.hasAttr("confirm")){if(!confirm(el.attr("confirm")))return false}if(el.hasAttr("econfirm"))eval(el.attr("econfirm"));var attrs=el.attr();var hI=Object.keys(attrs).indexOf("h");var sI=Object.keys(attrs).indexOf("s");if(sI<hI){$(el.attr("s")).show();$(el.attr("h")).hide()}else{$(el.attr("h")).hide();$(el.attr("s")).show()}if(el.hasAttr("stop"))e.stopPropagation()});$("body").on("click touch","[e]",function(e){var el=$(this);if(el.hasAttr("confirm")){if(!confirm(el.attr("confirm")))return false}if(el.hasAttr("econfirm"))eval(el.attr("econfirm"));if($($(this).attr("e")).is("input"))$($(this).attr("e")).val("");else $($(this).attr("e")).empty()});$("body").on("click touch","[f]",function(e2){var el2=$(this);$(el2.attr("f")).trigger("focus");if(el2.hasAttr("stop"))e2.stopPropagation()});$("body").on("click touch","[tgl]",function(e){var el=$(this);if(el.hasAttr("confirm")){if(!confirm(el.attr("confirm")))return false}if(el.hasAttr("econfirm"))eval(el.attr("econfirm"));el.toggleClass(el.attr("tgl"));el.toggleClass("toggled");if(el.hasAttr("stop"))e.stopPropagation()});$("body").on("click touch","[t]",function(e){var el=$(this);var tcn=el.attr("tcn")?el.attr("tcn"):"active";if(el.hasAttr("confirm")){if(!confirm(el.attr("confirm")))return false}if(el.hasAttr("econfirm"))eval(el.attr("econfirm"));$(el.attr("t")).toggleClass(tcn);el.toggleClass("toggled");if(el.hasAttr("stop"))e.stopPropagation()});$("body").on("click touch","[actv]",function(e2){let el2=$(this);if(el2.attr("actv")!="")$(el2.attr("actv")).removeClass("active");el2.addClass("active");if(el2.attr("stop"))e2.stopPropagation()});$("body").on("click touch","[actvt]",function(e2){let el2=$(this);if(el2.attr("actvt")!="")$(el2.attr("actvt")).removeClass("active");if(el2.hasClass("active"))el2.removeClass("active");else el2.addClass("active");if(el2.attr("stop"))e2.stopPropagation()});$("body").on("click touch","[close-notify]",function(e2){var tis=$(this).parent();tis.fadeOut(function(){tis.remove()});if($(this).attr("stop"))e2.stopPropagation()});let _keyInt;$("body").on("change blur focus keyup keydown input","[icons_search]",function(ev2){var key2=$.trim($(this).val());var outlet=$($(this).attr("icons_outlet"));var count_outlet=$($(this).attr("icons_count_outlet"));clearTimeout(_keyInt);if(key2==""||key2.length<=2){count_outlet.hide();outlet.html("")}else{_keyInt=setTimeout(function(){fetch("https://api.iconify.design/search?query="+key2+"&limit=250",{method:"GET"}).then(function(response){return response.json()}).then(function(r2){count_outlet.show();let icons=r2.icons;outlet.html("");count_outlet.html((r2.total>250?r2.total+"+":r2.total)+" icons found..");for(let i2=0;i2<icons.length;i2++){outlet.append(`
|
|
530
|
+
<li class="w20 md_w25 m_w33 m_m_w50 c icoLi" data-class="`+icons[i2]+`"><div><span class="iconify fs24 mb5 lh40 g_nm" style="height: 40px;" data-icon="`+icons[i2]+`" ></span><span class="name-class">`+icons[i2]+`</span></div></li>
|
|
531
|
+
`)}})},400)}});$("body").on("click touch","[alert]",function(e2){notify($(this).attr("alert-t"),$(this).attr("alert"),$(this).attr("alert-icon")?$(this).attr("alert-icon"):"alert-circle",$(this).attr("alert-type")?$(this).attr("alert-type"):"alert")});$("body").on("click touch","[rcl],[acl]",function(e){var el=$(this);if(el.hasAttr("confirm")){if(!confirm(el.attr("confirm")))return false}if(el.hasAttr("econfirm"))eval(el.attr("econfirm"));if(el.hasAttr("acl")&&el.hasAttr("rcl")){var attrs=el.attr();var rclcn=el.attr("rclcn")?el.attr("rclcn"):"active";var aclcn=el.attr("aclcn")?el.attr("aclcn"):"active";var rCl=Object.keys(attrs).indexOf("rcl");var aCl=Object.keys(attrs).indexOf("acl");if(aCl<rCl){$(el.attr("acl")).addClass(aclcn);el.addClass("added").removeClass("removed");if(el.hasAttr("stop"))e.stopPropagation();$(el.attr("rcl")).removeClass(rclcn);el.addClass("removed").removeClass("added");if(el.hasAttr("stop"))e.stopPropagation()}else{$(el.attr("rcl")).removeClass(rclcn);el.addClass("removed").removeClass("added");if(el.hasAttr("stop"))e.stopPropagation();$(el.attr("acl")).addClass(aclcn);el.addClass("added").removeClass("removed");if(el.hasAttr("stop"))e.stopPropagation()}}else{if(el.hasAttr("rcl")){var rclcn=el.attr("rclcn")?el.attr("rclcn"):"active";$(el.attr("rcl")).removeClass(rclcn);el.addClass("removed").removeClass("added");if(el.hasAttr("stop"))e.stopPropagation()}else{var aclcn=el.attr("aclcn")?el.attr("aclcn"):"active";$(el.attr("acl")).addClass(aclcn);el.addClass("added").removeClass("removed");if(el.hasAttr("stop"))e.stopPropagation()}}});$("body").on("click touch","[st]",function(e2){st($(this).attr("st"))});class Loader{options={Dismissible:true,Class:"loader",Message:"Please Wait..."};constructor(options){for(var k in options){this.options[k]=options[k]}}dismiss(){if(this.options.Dismissible){this.hide()}}init(){let l=`
|
|
532
|
+
<div loader class="${this.options.Class}">
|
|
533
|
+
<div class="ov pf" @click="_loader.dismiss()"></div>
|
|
534
|
+
<div class="wrapper cc sh20">
|
|
535
|
+
<div class="animation"></div>
|
|
536
|
+
<div class="text">${this.options.Message}</div>
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
`;$("body").append(l);if(this.options.hasOwnProperty("Progress")){var min=this.options.Progress;var max=100;if(this.options.hasOwnProperty("MaxProgress"))max=this.options.MaxProgress;$("."+this.options.Class+"[loader] .wrapper").append($('<div class="prog">'+min+"/"+max+"</div>"))}}show(){if($("."+this.options.Class+"[loader]").length)return;this.init();$("body").css("overflow","hidden")}hide(){$("."+this.options.Class+"[loader]").unbind("click");$("."+this.options.Class+"[loader]").remove();$("body").css("overflow","auto")}update(options){for(var k in options){this.options[k]=options[k]}if(options.hasOwnProperty("Message")){$("."+this.options.Class+"[loader] .wrapper .text").html(options.Message)}if(options.hasOwnProperty("Progress")){var max=100;if(options.hasOwnProperty("MaxProgress"))max=this.options.MaxProgress;if(!$("."+this.options.Class+"[loader] .wrapper .prog").length)$("."+this.options.Class+"[loader] .wrapper").append($('<div class="prog">'+options.Progress+"/"+max+"</div>"));else $("."+this.options.Class+"[loader] .wrapper .prog").html(options.Progress+"/"+max)}}}var _loader=new Loader;
|