text: function SS_TreeNavi(e){this.el=$(e),this.closeMark='<i class="material-icons">&#xE145;</i>',this.openMark='<i class="material-icons">&#xE15B;</i>'}function SS_SortableForm(e,t){this.opts=t||{},this.el=$(e),this.limit=this.opts.limit||0,this.head=this.el.find("thead"),this.body=this.el.find("tbody"),this.head.find("tr").prepend('<th class="sortable-handle-head"></th>'),this.body.find("tr").prepend('<td class="sortable-handle"></td>'),this.head.find("tr").append('<th class="sortable-buttons-head"></th>'),this.body.find("tr").append('<td class="sortable-buttons"><button class="btn action-insert" type="button"><i class="material-icons md-13">&#xE145;</i></button> <button class="btn action-remove" type="button"><i class="material-icons md-13">&#xE15B;</i></button></td>'),this.base=this.body.find("tr[data-base]").last().clone(),this.el.find("tbody").sortable({handle:".sortable-handle"});var n=this;this.body.find("tr").each(function(e,t){n.setEvent($(t))}),this.onInsert=this.opts.onInsert||!1}function SS_TextZoom(){}function SS_CascadeMenu(){}function Webmail_Address_Autocomplete(){}function Service_Quota(e){this.el=$(e),this.reloadButton=this.el.find(".reload-quota")}function Cms_ReadableSetting(e){this.el=$(e)}var DateFormatter;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(_,e){function s(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function t(e,n,i){if(pe.isFunction(n))return pe.grep(e,function(e,t){return!!n.call(e,t,e)!==i});if(n.nodeType)return pe.grep(e,function(e){return e===n!==i});if("string"==typeof n){if(_e.test(n))return pe.filter(n,e,i);n=pe.filter(n,e)}return pe.grep(e,function(e){return-1<pe.inArray(e,n)!==i})}function n(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){var n={};return pe.each(e.match(Ee)||[],function(e,t){n[t]=!0}),n}function r(){ie.addEventListener?(ie.removeEventListener("DOMContentLoaded",o),_.removeEventListener("load",o)):(ie.detachEvent("onreadystatechange",o),_.detachEvent("onload",o))}function o(){(ie.addEventListener||"load"===_.event.type||"complete"===ie.readyState)&&(r(),pe.ready())}function l(e,t,n){if(n===undefined&&1===e.nodeType){var i="data-"+t.replace(Oe,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Le.test(n)?pe.parseJSON(n):n)}catch(r){}pe.data(e,t,n)}else n=undefined}return n}function c(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function i(e,t,n,i){if(Pe(e)){var r,o,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,c=s?e[a]:e[a]&&a;if(c&&l[c]&&(i||l[c].data)||n!==undefined||"string"!=typeof t)return c||(c=s?e[a]=ne.pop()||pe.guid++:a),l[c]||(l[c]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[c]=pe.extend(l[c],t):l[c].data=pe.extend(l[c].data,t)),o=l[c],i||(o.data||(o.data={}),o=o.data),n!==undefined&&(o[pe.camelCase(t)]=n),"string"==typeof t?null==(r=o[t])&&(r=o[pe.camelCase(t)]):r=o,r}}function a(e,t,n){if(Pe(e)){var i,r,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){r=(t=pe.isArray(t)?t.concat(pe.map(t,pe.camelCase)):t in i?[t]:(t=pe.camelCase(t))in i?[t]:t.split(" ")).length;for(;r--;)delete i[t[r]];if(n?!c(i):!pe.isEmptyObject(i))return}(n||(delete a[s].data,c(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=undefined)}}}function d(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return pe.css(e,t,"")},l=s(),c=n&&n[3]||(pe.cssNumber[t]?"":"px"),u=(pe.cssNumber[t]||"px"!==c&&+l)&&We.exec(pe.css(e,t));if(u&&u[3]!==c)for(c=c||u[3],n=n||[],u=+l||1;u/=o=o||".5",pe.style(e,t,u+c),o!==(o=s()/l)&&1!==o&&--a;);return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function g(e){var t=Ge.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function v(e,t){var n,i,r=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):undefined;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||pe.nodeName(i,t)?o.push(i):pe.merge(o,v(i,t));return t===undefined||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function y(e,t){for(var n,i=0;null!=(n=e[i]);i++)pe._data(n,"globalEval",!t||pe._data(t[i],"globalEval"))}function b(e){Re.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t,n,i,r){for(var o,a,s,l,c,u,d,h=e.length,p=g(t),f=[],m=0;m<h;m++)if((a=e[m])||0===a)if("object"===pe.type(a))pe.merge(f,a.nodeType?[a]:a);else if(Ve.test(a)){for(l=l||p.appendChild(t.createElement("div")),c=(qe.exec(a)||["",""])[1].toLowerCase(),d=Xe[c]||Xe._default,l.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)l=l.lastChild;if(!de.leadingWhitespace&&Ye.test(a)&&f.push(t.createTextNode(Ye.exec(a)[0])),!de.tbody)for(o=(a="table"!==c||Je.test(a)?"<table>"!==d[1]||Je.test(a)?0:l:l.firstChild)&&a.childNodes.length;o--;)pe.nodeName(u=a.childNodes[o],"tbody")&&!u.childNodes.length&&a.removeChild(u);for(pe.merge(f,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=p.lastChild}else f.push(t.createTextNode(a));for(l&&p.removeChild(l),de.appendChecked||pe.grep(v(f,"input"),b),m=0;a=f[m++];)if(i&&-1<pe.inArray(a,i))r&&r.push(a);else if(s=pe.contains(a.ownerDocument,a),l=v(p.appendChild(a),"script"),s&&y(l),n)for(o=0;a=l[o++];)Ue.test(a.type||"")&&n.push(a);return l=null,p}function h(){return!0}function p(){return!1}function f(){try{return ie.activeElement}catch(e){}}function x(e,t,n,i,r,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(i=i||n,n=undefined),t)x(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=undefined):null==r&&("string"==typeof n?(r=i,i=undefined):(r=i,i=n,n=undefined)),!1===r)r=p;else if(!r)return e;return 1===o&&(a=r,(r=function(e){return pe().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,r,i,n)})}function w(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function k(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function C(e){var t=st.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function S(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,i,r,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(i=0,r=s[n].length;i<r;i++)pe.event.add(t,n,s[n][i]);a.data&&(a.data=pe.extend({},a.data))}}function $(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){for(i in(r=pe._data(t)).events)pe.removeEvent(t,i,r.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(k(t).text=e.text,C(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Re.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function T(n,i,r,o){i=oe.apply([],i);var e,t,a,s,l,c,u=0,d=n.length,h=d-1,p=i[0],f=pe.isFunction(p);if(f||1<d&&"string"==typeof p&&!de.checkClone&&at.test(p))return n.each(function(e){var t=n.eq(e);f&&(i[0]=p.call(this,e,t.html())),T(t,i,r,o)});if(d&&(e=(c=m(i,n[0].ownerDocument,!1,n,o)).firstChild,1===c.childNodes.length&&(c=e),e||o)){for(a=(s=pe.map(v(c,"script"),k)).length;u<d;u++)t=c,u!==h&&(t=pe.clone(t,!0,!0),a&&pe.merge(s,v(t,"script"))),r.call(n[u],t,u);if(a)for(l=s[s.length-1].ownerDocument,pe.map(s,C),u=0;u<a;u++)t=s[u],Ue.test(t.type||"")&&!pe._data(t,"globalEval")&&pe.contains(l,t)&&(t.src?pe._evalUrl&&pe._evalUrl(t.src):pe.globalEval((t.text||t.textContent||t.innerHTML||"").replace(lt,"")));c=e=null}return n}function M(e,t,n){for(var i,r=t?pe.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||pe.cleanData(v(i)),i.parentNode&&(n&&pe.contains(i.ownerDocument,i)&&y(v(i,"script")),i.parentNode.removeChild(i));return e}function D(e,t){var n=pe(t.createElement(e)).appendTo(t.body),i=pe.css(n[0],"display");return n.detach(),i}function E(e){var t=ie,n=dt[e];return n||("none"!==(n=D(e,t))&&n||((t=((ut=(ut||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentWindow||ut[0].contentDocument).document).write(),t.close(),n=D(e,t),ut.detach()),dt[e]=n),n}function I(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function P(e){if(e in $t)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=St.length;n--;)if((e=St[n]+t)in $t)return e}function L(e,t){for(var n,i,r,o=[],a=0,s=e.length;a<s;a++)(i=e[a]).style&&(o[a]=pe._data(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&ze(i)&&(o[a]=pe._data(i,"olddisplay",E(i.nodeName)))):(r=ze(i),(n&&"none"!==n||!r)&&pe._data(i,"olddisplay",r?n:pe.css(i,"display"))));for(a=0;a<s;a++)(i=e[a]).style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function O(e,t,n){var i=kt.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function F(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=pe.css(e,n+He[o],!0,r)),i?("content"===n&&(a-=pe.css(e,"padding"+He[o],!0,r)),"margin"!==n&&(a-=pe.css(e,"border"+He[o]+"Width",!0,r))):(a+=pe.css(e,"padding"+He[o],!0,r),"padding"!==n&&(a+=pe.css(e,"border"+He[o]+"Width",!0,r)));return a}function j(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=gt(e),a=de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,o);if(r<=0||null==r){if(((r=vt(e,t,o))<0||null==r)&&(r=e.style[t]),pt.test(r))return r;i=a&&(de.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+F(e,t,n||(a?"border":"content"),i,o)+"px"}function A(e,t,n,i,r){return new A.prototype.init(e,t,n,i,r)}function N(){return _.setTimeout(function(){Tt=undefined}),Tt=pe.now()}function W(e,t){var n,i={height:e},r=0;for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=He[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function H(e,t,n){for(var i,r=(R.tweeners[t]||[]).concat(R.tweeners["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,t,e))return i}function z(t,e,n){var i,r,o,a,s,l,c,u=this,d={},h=t.style,p=t.nodeType&&ze(t),f=pe._data(t,"fxshow");for(i in n.queue||(null==(s=pe._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,pe.queue(t,"fx").length||s.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],"inline"===("none"===(c=pe.css(t,"display"))?pe._data(t,"olddisplay")||E(t.nodeName):c)&&"none"===pe.css(t,"float")&&(de.inlineBlockNeedsLayout&&"inline"!==E(t.nodeName)?h.zoom=1:h.display="inline-block")),n.overflow&&(h.overflow="hidden",de.shrinkWrapBlocks()||u.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),e)if(r=e[i],Ot.exec(r)){if(delete e[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!f||f[i]===undefined)continue;p=!0}d[i]=f&&f[i]||pe.style(t,i)}else c=undefined;if(pe.isEmptyObject(d))"inline"===("none"===c?E(t.nodeName):c)&&(h.display=c);else for(i in f?"hidden"in f&&(p=f.hidden):f=pe._data(t,"fxshow",{}),o&&(f.hidden=!p),p?pe(t).show():u.done(function(){pe(t).hide()}),u.done(function(){var e;for(e in pe._removeData(t,"fxshow"),d)pe.style(t,e,d[e])}),d)a=H(p?f[i]:0,i,u),i in f||(f[i]=a.start,p&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}function B(e,t){var n,i,r,o,a;for(n in e)if(r=t[i=pe.camelCase(n)],o=e[n],pe.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(a=pe.cssHooks[i])&&"expand"in a)for(n in o=a.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}function R(o,e,t){var n,a,i=0,r=R.prefilters.length,s=pe.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var e=Tt||N(),t=Math.max(0,c.startTime+c.duration-e),n=1-(t/c.duration||0),i=0,r=c.tweens.length;i<r;i++)c.tweens[i].run(n);return s.notifyWith(o,[c,n,t]),n<1&&r?t:(s.resolveWith(o,[c]),!1)},c=s.promise({elem:o,props:pe.extend({},e),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},t),originalProperties:e,originalOptions:t,startTime:Tt||N(),duration:t.duration,tweens:[],createTween:function(e,t){var n=pe.Tween(o,c.opts,e,t,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var t=0,n=e?c.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)c.tweens[t].run(1);return e?(s.notifyWith(o,[c,1,0]),s.resolveWith(o,[c,e])):s.rejectWith(o,[c,e]),this}}),u=c.props;for(B(u,c.opts.specialEasing);i<r;i++)if(n=R.prefilters[i].call(c,o,u,c.opts))return pe.isFunction(n.stop)&&(pe._queueHooks(c.elem,c.opts.queue).stop=pe.proxy(n.stop,n)),n;return pe.map(u,H,c),pe.isFunction(c.opts.start)&&c.opts.start.call(o,c),pe.fx.timer(pe.extend(l,{elem:o,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function q(e){return pe.attr(e,"class")||""}function U(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,i=0,r=e.toLowerCase().match(Ee)||[];if(pe.isFunction(t))for(;n=r[i++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Y(t,r,o,a){function s(e){var i;return l[e]=!0,pe.each(t[e]||[],function(e,t){var n=t(r,o,a);return"string"!=typeof n||c||l[n]?c?!(i=n):void 0:(r.dataTypes.unshift(n),s(n),!1)}),i}var l={},c=t===an;return s(r.dataTypes[0])||!l["*"]&&s("*")}function G(e,t){var n,i,r=pe.ajaxSettings.flatOptions||{};for(i in t)t[i]!==undefined&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&pe.extend(!0,e,n),e}function X(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}i||(i=a)}o=o||i}if(o)return o!==l[0]&&l.unshift(o),n[o]}function V(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=c[l+" "+o]||c["* "+o]))for(r in c)if((s=r.split(" "))[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[r]:!0!==c[r]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function J(e){return e.style&&e.style.display||pe.css(e,"display")}function K(e){if(!pe.contains(e.ownerDocument||ie,e))return!0;for(;e&&1===e.nodeType;){if("none"===J(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function Q(n,e,i,r){var t;if(pe.isArray(e))pe.each(e,function(e,t){i||dn.test(n)?r(n,t):Q(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,i,r)});else if(i||"object"!==pe.type(e))r(n,e);else for(t in e)Q(n+"["+t+"]",e[t],i,r)}function Z(){try{return new _.XMLHttpRequest}catch(e){}}function ee(){try{return new _.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function te(e){return pe.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var ne=[],ie=_.document,re=ne.slice,oe=ne.concat,ae=ne.push,se=ne.indexOf,le={},ce=le.toString,ue=le.hasOwnProperty,de={},he="1.12.4",pe=function(e,t){return new pe.fn.init(e,t)},fe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,me=/^-ms-/,ge=/-([\da-z])/gi,ve=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:he,constructor:pe,selector:"",length:0,toArray:function(){return re.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:re.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(n){return this.pushStack(pe.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:ne.sort,splice:ne.splice},pe.extend=pe.fn.extend=function(e){var t,n,i,r,o,a,s=e||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[l]||{},l++),"object"==typeof s||pe.isFunction(s)||(s={}),l===c&&(s=this,l--);l<c;l++)if(null!=(o=arguments[l]))for(r in o)t=s[r],s!==(i=o[r])&&(u&&i&&(pe.isPlainObject(i)||(n=pe.isArray(i)))?(n?(n=!1,a=t&&pe.isArray(t)?t:[]):a=t&&pe.isPlainObject(t)?t:{},s[r]=pe.extend(u,a,i)):i!==undefined&&(s[r]=i));return s},pe.extend({expando:"jQuery"+(he+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&0<=t-parseFloat(t)+1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ue.call(e,"constructor")&&!ue.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!de.ownFirst)for(t in e)return ue.call(e,t);for(t in e);return t===undefined||ue.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(e){e&&pe.trim(e)&&(_.execScript||function(e){_.eval.call(_,e)})(e)},camelCase:function(e){return e.replace(me,"ms-").replace(ge,ve)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(s(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(fe,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(s(Object(e))?pe.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inArray:function(e,t,n){var i;if(t){if(se)return se.call(t,e,n);for(i=t.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;)e[r++]=t[i++];if(n!=n)for(;t[i]!==undefined;)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,a=!n;r<o;r++)!t(e[r],r)!==a&&i.push(e[r]);return i},map:function(e,t,n){var i,r,o=0,a=[];if(s(e))for(i=e.length;o<i;o++)null!=(r=t(e[o],o,n))&&a.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&a.push(r);return oe.apply([],a)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(r=e[t],t=e,e=r),pe.isFunction(e)?(n=re.call(arguments,2),(i=function(){return e.apply(t||this,n.concat(re.call(arguments)))}).guid=e.guid=e.guid||pe.guid++,i):undefined},now:function(){return+new Date},support:de}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=ne[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var ye=function(n){function x(e,t,n,i){var r,o,a,s,l,c,u,d,h=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:H)!==P&&I(t),t=t||P,O)){if(11!==p&&(c=ve.exec(e)))if(r=c[1]){if(9===p){if(!(a=t.getElementById(r)))return n;if(a.id===r)return n.push(a),n}else if(h&&(a=h.getElementById(r))&&N(t,a)&&a.id===r)return n.push(a),n}else{if(c[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((r=c[3])&&v.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(r)),n}if(v.qsa&&!U[e+" "]&&(!F||!F.test(e))){if(1!==p)h=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(be,"\\$&"):t.setAttribute("id",s=W),o=(u=S(e)).length,l=he.test(s)?"#"+s:"[id='"+s+"']";o--;)u[o]=l+" "+g(u[o]);d=u.join(","),h=ye.test(e)&&m(t.parentNode)||t}if(d)try{return Q.apply(n,h.querySelectorAll(d)),n}catch(f){}finally{s===W&&t.removeAttribute("id")}}}return T(e.replace(se,"$1"),t,n,i)}function e(){function n(e,t){return i.push(e+" ")>k.cacheLength&&delete n[i.shift()],n[e+" "]=t}var i=[];return n}function l(e){return e[W]=!0,e}function r(e){var t=P.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function t(e,t){for(var n=e.split("|"),i=n.length;i--;)k.attrHandle[n[i]]=t}function c(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function i(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function o(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function a(a){return l(function(o){return o=+o,l(function(e,t){for(var n,i=a([],e.length,o),r=i.length;r--;)e[n=i[r]]&&(e[n]=!(t[n]=e[n]))})})}function m(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function s(){}function g(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function d(s,e,t){var l=e.dir,c=t&&"parentNode"===l,u=B++;return e.first?function(e,t,n){for(;e=e[l];)if(1===e.nodeType||c)return s(e,t,n)}:function(e,t,n){var i,r,o,a=[z,u];if(n){for(;e=e[l];)if((1===e.nodeType||c)&&s(e,t,n))return!0}else for(;e=e[l];)if(1===e.nodeType||c){if((i=(r=(o=e[W]||(e[W]={}))[e.uniqueID]||(o[e.uniqueID]={}))[l])&&i[0]===z&&i[1]===u)return a[2]=i[2];if((r[l]=a)[2]=s(e,t,n))return!0}}}function h(r){return 1<r.length?function(e,t,n){for(var i=r.length;i--;)if(!r[i](e,t,n))return!1;return!0}:r[0]}function y(e,t,n){for(var i=0,r=t.length;i<r;i++)x(e,t[i],n);return n}function w(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,i,r)||(a.push(o),c&&t.push(s)));return a}function b(p,f,m,g,v,e){return g&&!g[W]&&(g=b(g)),v&&!v[W]&&(v=b(v,e)),l(function(e,t,n,i){var r,o,a,s=[],l=[],c=t.length,u=e||y(f||"*",n.nodeType?[n]:n,[]),d=!p||!e&&f?u:w(u,s,p,n,i),h=m?v||(e?p:c||g)?[]:t:d;if(m&&m(d,h,n,i),g)for(r=w(h,l),g(r,[],n,i),o=r.length;o--;)(a=r[o])&&(h[l[o]]=!(d[l[o]]=a));if(e){if(v||p){if(v){for(r=[],o=h.length;o--;)(a=h[o])&&r.push(d[o]=a);v(null,h=[],r,i)}for(o=h.length;o--;)(a=h[o])&&-1<(r=v?ee(e,a):s[o])&&(e[r]=!(t[r]=a))}}else h=w(h===t?h.splice(c,h.length):h),v?v(null,t,h,i):Q.apply(t,h)})}function p(e){for(var r,t,n,i=e.length,o=k.relative[e[0].type],a=o||k.relative[" "],s=o?1:0,l=d(function(e){return e===r},a,!0),c=d(function(e){return-1<ee(r,e)},a,!0),u=[function(e,t,n){var i=!o&&(n||t!==M)||((r=t).nodeType?l(e,t,n):c(e,t,n));return r=null,i}];s<i;s++)if(t=k.relative[e[s].type])u=[d(h(u),t)];else{if((t=k.filter[e[s].type].apply(null,e[s].matches))[W]){for(n=++s;n<i&&!k.relative[e[n].type];n++);return b(1<s&&h(u),1<s&&g(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),t,s<n&&p(e.slice(s,n)),n<i&&p(e=e.slice(n)),n<i&&g(e))}u.push(t)}return h(u)}function u(g,v){var y=0<v.length,b=0<g.length,e=function(e,t,n,i,r){var o,a,s,l=0,c="0",u=e&&[],d=[],h=M,p=e||b&&k.find.TAG("*",r),f=z+=null==h?1:Math.random()||.1,m=p.length;for(r&&(M=t===P||t||r);c!==m&&null!=(o=p[c]);c++){if(b&&o){for(a=0,t||o.ownerDocument===P||(I(o),n=!O);s=g[a++];)if(s(o,t||P,n)){i.push(o);break}r&&(z=f)}y&&((o=!s&&o)&&l--,e&&u.push(o))}if(l+=c,y&&c!==l){for(a=0;s=v[a++];)s(u,d,t,n);if(e){if(0<l)for(;c--;)u[c]||d[c]||(d[c]=J.call(i));d=w(d)}Q.apply(i,d),r&&!e&&0<d.length&&1<l+v.length&&x.uniqueSort(i)}return r&&(z=f,M=h),u};return y?l(e):e}var f,v,k,_,C,S,$,T,M,D,E,I,P,L,O,F,j,A,N,W="sizzle"+1*new Date,H=n.document,z=0,B=0,R=e(),q=e(),U=e(),Y=function(e,t){return e===t&&(E=!0),0},G=1<<31,X={}.hasOwnProperty,V=[],J=V.pop,K=V.push,Q=V.push,Z=V.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",oe=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),he=new RegExp("^"+ie+"$"),pe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},ke=function(){I()};try{Q.apply(V=Z.call(H.childNodes),H.childNodes),V[H.childNodes.length].nodeType}catch(_e){Q={apply:V.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}for(f in v=x.support={},C=x.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},I=x.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:H;return i!==P&&9===i.nodeType&&i.documentElement&&(L=(P=i).documentElement,O=!C(P),(n=P.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ke,!1):n.attachEvent&&n.attachEvent("onunload",ke)),v.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),v.getElementsByTagName=r(function(e){return e.appendChild(P.createComment("")),!e.getElementsByTagName("*").length}),v.getElementsByClassName=ge.test(P.getElementsByClassName),v.getById=r(function(e){return L.appendChild(e).id=W,!P.getElementsByName||!P.getElementsByName(W).length}),v.getById?(k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&O){var n=t.getElementById(e);return n?[n]:[]}},k.filter.ID=function(e){var t=e.replace(xe,we);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var n=e.replace(xe,we);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}}),k.find.TAG=v.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):v.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},k.find.CLASS=v.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&O)return t.getElementsByClassName(e)},j=[],F=[],(v.qsa=ge.test(P.querySelectorAll))&&(r(function(e){L.appendChild(e).innerHTML="<a id='"+W+"'></a><select id='"+W+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+W+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+W+"+*").length||F.push(".#.+[+~]")}),r(function(e){var t=P.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(v.matchesSelector=ge.test(A=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&r(function(e){v.disconnectedMatch=A.call(e,"div"),A.call(e,"[s!='']:x"),j.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),j=j.length&&new RegExp(j.join("|")),t=ge.test(L.compareDocumentPosition),N=t||ge.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=t?function(e,t){if(e===t)return E=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===P||e.ownerDocument===H&&N(H,e)?-1:t===P||t.ownerDocument===H&&N(H,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return E=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!r||!o)return e===P?-1:t===P?1:r?-1:o?1:D?ee(D,e)-ee(D,t):0;if(r===o)return c(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?c(a[i],s[i]):a[i]===H?-1:s[i]===H?1:0}),P},x.matches=function(e,t){return x(e,null,null,t)},x.matchesSelector=function(e,t){if((e.ownerDocument||e)!==P&&I(e),t=t.replace(ue,"='$1']"),v.matchesSelector&&O&&!U[t+" "]&&(!j||!j.test(t))&&(!F||!F.test(t)))try{var n=A.call(e,t);if(n||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(_e){}return 0<x(t,P,null,[e]).length},x.contains=function(e,t){return(e.ownerDocument||e)!==P&&I(e),N(e,t)},x.attr=function(e,t){(e.ownerDocument||e)!==P&&I(e);var n=k.attrHandle[t.toLowerCase()],i=n&&X.call(k.attrHandle,t.toLowerCase())?n(e,t,!O):undefined;return i!==undefined?i:v.attributes||!O?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},x.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},x.uniqueSort=function(e){var t,n=[],i=0,r=0;if(E=!v.detectDuplicates,D=!v.sortStable&&e.slice(0),e.sort(Y),E){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return D=null,e},_=x.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=_(t);return n},(k=x.selectors={cacheLength:50,createPseudo:l,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,we),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||x.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&x.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=R[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&R(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(e){var t=x.attr(e,n);return null==t?"!="===i:!i||(t+="","="===i?t===r:"!="===i?t!==r:"^="===i?r&&0===t.indexOf(r):"*="===i?r&&-1<t.indexOf(r):"$="===i?r&&t.slice(-r.length)===r:"~="===i?-1<(" "+t.replace(ae," ")+" ").indexOf(r):"|="===i&&(t===r||t.slice(0,r.length+1)===r+"-"))}},CHILD:function(f,e,t,m,g){var v="nth"!==f.slice(0,3),
  y="last"!==f.slice(-4),b="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var i,r,o,a,s,l,c=v!==y?"nextSibling":"previousSibling",u=e.parentNode,d=b&&e.nodeName.toLowerCase(),h=!n&&!b,p=!1;if(u){if(v){for(;c;){for(a=e;a=a[c];)if(b?a.nodeName.toLowerCase()===d:1===a.nodeType)return!1;l=c="only"===f&&!l&&"nextSibling"}return!0}if(l=[y?u.firstChild:u.lastChild],y&&h){for(p=(s=(i=(r=(o=(a=u)[W]||(a[W]={}))[a.uniqueID]||(o[a.uniqueID]={}))[f]||[])[0]===z&&i[1])&&i[2],a=s&&u.childNodes[s];a=++s&&a&&a[c]||(p=s=0)||l.pop();)if(1===a.nodeType&&++p&&a===e){r[f]=[z,s,p];break}}else if(h&&(p=s=(i=(r=(o=(a=e)[W]||(a[W]={}))[a.uniqueID]||(o[a.uniqueID]={}))[f]||[])[0]===z&&i[1]),!1===p)for(;(a=++s&&a&&a[c]||(p=s=0)||l.pop())&&((b?a.nodeName.toLowerCase()!==d:1!==a.nodeType)||!++p||(h&&((r=(o=a[W]||(a[W]={}))[a.uniqueID]||(o[a.uniqueID]={}))[f]=[z,p]),a!==e)););return(p-=g)===m||p%m==0&&0<=p/m}}},PSEUDO:function(e,o){var t,a=k.pseudos[e]||k.setFilters[e.toLowerCase()]||x.error("unsupported pseudo: "+e);return a[W]?a(o):1<a.length?(t=[e,e,"",o],k.setFilters.hasOwnProperty(e.toLowerCase())?l(function(e,t){for(var n,i=a(e,o),r=i.length;r--;)e[n=ee(e,i[r])]=!(t[n]=i[r])}):function(e){return a(e,0,t)}):a}},pseudos:{not:l(function(e){var i=[],r=[],s=$(e.replace(se,"$1"));return s[W]?l(function(e,t,n,i){for(var r,o=s(e,null,i,[]),a=e.length;a--;)(r=o[a])&&(e[a]=!(t[a]=r))}):function(e,t,n){return i[0]=e,s(i,null,n,r),i[0]=null,!r.pop()}}),has:l(function(t){return function(e){return 0<x(t,e).length}}),contains:l(function(t){return t=t.replace(xe,we),function(e){return-1<(e.textContent||e.innerText||_(e)).indexOf(t)}}),lang:l(function(n){return he.test(n||"")||x.error("unsupported lang: "+n),n=n.replace(xe,we).toLowerCase(),function(e){var t;do{if(t=O?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===L},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:a(function(){return[0]}),last:a(function(e,t){return[t-1]}),eq:a(function(e,t,n){return[n<0?n+t:n]}),even:a(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:a(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:a(function(e,t,n){for(var i=n<0?n+t:n;0<=--i;)e.push(i);return e}),gt:a(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=k.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[f]=i(f);for(f in{submit:!0,reset:!0})k.pseudos[f]=o(f);return s.prototype=k.filters=k.pseudos,k.setFilters=new s,S=x.tokenize=function(e,t){var n,i,r,o,a,s,l,c=q[e+" "];if(c)return t?0:c.slice(0);for(a=e,s=[],l=k.preFilter;a;){for(o in n&&!(i=le.exec(a))||(i&&(a=a.slice(i[0].length)||a),s.push(r=[])),n=!1,(i=ce.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(se," ")}),a=a.slice(n.length)),k.filter)!(i=pe[o].exec(a))||l[o]&&!(i=l[o](i))||(n=i.shift(),r.push({value:n,type:o,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?x.error(e):q(e,s).slice(0)},$=x.compile=function(e,t){var n,i=[],r=[],o=U[e+" "];if(!o){for(t||(t=S(e)),n=t.length;n--;)(o=p(t[n]))[W]?i.push(o):r.push(o);(o=U(e,u(r,i))).selector=e}return o},T=x.select=function(e,t,n,i){var r,o,a,s,l,c="function"==typeof e&&e,u=!i&&S(e=c.selector||e);if(n=n||[],1===u.length){if(2<(o=u[0]=u[0].slice(0)).length&&"ID"===(a=o[0]).type&&v.getById&&9===t.nodeType&&O&&k.relative[o[1].type]){if(!(t=(k.find.ID(a.matches[0].replace(xe,we),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=pe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!k.relative[s=a.type]);)if((l=k.find[s])&&(i=l(a.matches[0].replace(xe,we),ye.test(o[0].type)&&m(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&g(o)))return Q.apply(n,i),n;break}}return(c||$(e,u))(i,t,!O,n,!t||ye.test(e)&&m(t.parentNode)||t),n},v.sortStable=W.split("").sort(Y).join("")===W,v.detectDuplicates=!!E,I(),v.sortDetached=r(function(e){return 1&e.compareDocumentPosition(P.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||t("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),v.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||t("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||t(te,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),x}(_);pe.find=ye,pe.expr=ye.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ye.uniqueSort,pe.text=ye.getText,pe.isXMLDoc=ye.isXML,pe.contains=ye.contains;var be=function(e,t,n){for(var i=[],r=n!==undefined;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&pe(e).is(n))break;i.push(e)}return i},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,ke=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,_e=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?pe.find.matchesSelector(i,e)?[i]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t<r;t++)if(pe.contains(i[t],this))return!0}));for(t=0;t<r;t++)pe.find(e,i[t],n);return(n=this.pushStack(1<r?pe.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(t(this,e||[],!1))},not:function(e){return this.pushStack(t(this,e||[],!0))},is:function(e){return!!t(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ce,Se=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(pe.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Ce,"string"==typeof e){if(!(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Se.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ie,!0)),ke.test(i[1])&&pe.isPlainObject(t))for(i in t)pe.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}if((r=ie.getElementById(i[2]))&&r.parentNode){if(r.id!==i[2])return Ce.find(e);this.length=1,this[0]=r}return this.context=ie,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))}).prototype=pe.fn,Ce=pe(ie);var $e=/^(?:parents|prev(?:Until|All))/,Te={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),i=n.length;return this.filter(function(){for(t=0;t<i;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=we.test(e)||"string"!=typeof e?pe(e,t||this.context):0;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return be(e,"parentNode")},parentsUntil:function(e,t,n){return be(e,"parentNode",n)},next:function(e){return n(e,"nextSibling")},prev:function(e){return n(e,"previousSibling")},nextAll:function(e){return be(e,"nextSibling")},prevAll:function(e){return be(e,"previousSibling")},nextUntil:function(e,t,n){return be(e,"nextSibling",n)},prevUntil:function(e,t,n){return be(e,"previousSibling",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(i,r){pe.fn[i]=function(e,t){var n=pe.map(this,r,e);return"Until"!==i.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=pe.filter(t,n)),1<this.length&&(Te[i]||(n=pe.uniqueSort(n)),$e.test(i)&&(n=n.reverse())),this.pushStack(n)}});var Me,De,Ee=/\S+/g;for(De in pe.Callbacks=function(i){i="string"==typeof i?u(i):pe.extend({},i);var r,e,t,n,o=[],a=[],s=-1,l=function(){for(n=i.once,t=r=!0;a.length;s=-1)for(e=a.shift();++s<o.length;)!1===o[s].apply(e[0],e[1])&&i.stopOnFalse&&(s=o.length,e=!1);i.memory||(e=!1),r=!1,n&&(o=e?[]:"")},c={add:function(){return o&&(e&&!r&&(s=o.length-1,a.push(e)),function n(e){pe.each(e,function(e,t){pe.isFunction(t)?i.unique&&c.has(t)||o.push(t):t&&t.length&&"string"!==pe.type(t)&&n(t)})}(arguments),e&&!r&&l()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;-1<(n=pe.inArray(t,o,n));)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?-1<pe.inArray(e,o):0<o.length},empty:function(){return o&&(o=[]),this},disable:function(){return n=a=[],o=e="",this},disabled:function(){return!o},lock:function(){return n=!0,e||c.disable(),this},locked:function(){return!!n},fireWith:function(e,t){return n||(t=[e,(t=t||[]).slice?t.slice():t],a.push(t),r||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!t}};return c},pe.extend({Deferred:function(e){var o=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],r="pending",a={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var r=arguments;return pe.Deferred(function(i){pe.each(o,function(e,t){var n=pe.isFunction(r[e])&&r[e];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[t[0]+"With"](this===a?i.promise():this,n?[e]:arguments)})}),r=null}).promise()},promise:function(e){return null!=e?pe.extend(e,a):a}},s={};return a.pipe=a.then,pe.each(o,function(e,t){var n=t[2],i=t[3];a[t[1]]=n.add,i&&n.add(function(){r=i},o[1^e][2].disable,o[2][2].lock),s[t[0]]=function(){return s[t[0]+"With"](this===s?a:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var r,t,n,i=0,o=re.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,l=1===s?e:pe.Deferred(),c=function(t,n,i){return function(e){n[t]=this,i[t]=1<arguments.length?re.call(arguments):e,i===r?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(1<a)for(r=new Array(a),t=new Array(a),n=new Array(a);i<a;i++)o[i]&&pe.isFunction(o[i].promise)?o[i].promise().progress(c(i,t,r)).done(c(i,n,o)).fail(l.reject):--s;return s||l.resolveWith(n,o),l.promise()}}),pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(!0===e?--pe.readyWait:pe.isReady)||(pe.isReady=!0)!==e&&0<--pe.readyWait||(Me.resolveWith(ie,[pe]),pe.fn.triggerHandler&&(pe(ie).triggerHandler("ready"),pe(ie).off("ready")))}}),pe.ready.promise=function(t){if(!Me)if(Me=pe.Deferred(),"complete"===ie.readyState||"loading"!==ie.readyState&&!ie.documentElement.doScroll)_.setTimeout(pe.ready);else if(ie.addEventListener)ie.addEventListener("DOMContentLoaded",o),_.addEventListener("load",o);else{ie.attachEvent("onreadystatechange",o),_.attachEvent("onload",o);var n=!1;try{n=null==_.frameElement&&ie.documentElement}catch(i){}n&&n.doScroll&&function e(){if(!pe.isReady){try{n.doScroll("left")}catch(i){return _.setTimeout(e,50)}r(),pe.ready()}}()}return Me.promise(t)},pe.ready.promise(),pe(de))break;de.ownFirst="0"===De,de.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,i;(n=ie.getElementsByTagName("body")[0])&&n.style&&(t=ie.createElement("div"),(i=ie.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",de.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=ie.createElement("div");de.deleteExpando=!0;try{delete e.test}catch(t){de.deleteExpando=!1}e=null}();var Ie,Pe=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)},Le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Oe=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando])&&!c(e)},data:function(e,t,n){return i(e,t,n)},removeData:function(e,t){return a(e,t)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return a(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(e===undefined){if(this.length&&(r=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(i=a[n].name).indexOf("data-")&&l(o,i=pe.camelCase(i.slice(5)),r[i]);pe._data(o,"parsedAttrs",!0)}return r}return"object"==typeof e?this.each(function(){pe.data(this,e)}):1<arguments.length?this.each(function(){pe.data(this,e,t)}):o?l(o,e,pe.data(o,e)):undefined},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=pe._data(e,t),n&&(!i||pe.isArray(n)?i=pe._data(e,t,pe.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),i=n.length,r=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?pe.queue(this[0],t):n===undefined?this:this.each(function(){var e=pe.queue(this,t,n);pe._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&pe.dequeue(this,t)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=pe.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=undefined),e=e||"fx";a--;)(n=pe._data(o[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}}),de.shrinkWrapBlocks=function(){return null!=Ie?Ie:(Ie=!1,(t=ie.getElementsByTagName("body")[0])&&t.style?(e=ie.createElement("div"),(n=ie.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",t.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(ie.createElement("div")).style.width="5px",Ie=3!==e.offsetWidth),t.removeChild(n),Ie):void 0);var e,t,n};var Fe,je,Ae,Ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,We=new RegExp("^(?:([+-])=|)("+Ne+")([a-z%]*)$","i"),He=["Top","Right","Bottom","Left"],ze=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},Be=function(e,t,n,i,r,o,a){var s=0,l=e.length,c=null==n;if("object"===pe.type(n))for(s in r=!0,n)Be(e,t,s,n[s],!0,o,a);else if(i!==undefined&&(r=!0,pe.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(pe(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:c?t.call(e):l?t(e[0],n):o},Re=/^(?:checkbox|radio)$/i,qe=/<([\w:-]+)/,Ue=/^$|\/(?:java|ecma)script/i,Ye=/^\s+/,Ge="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";Fe=ie.createElement("div"),je=ie.createDocumentFragment(),Ae=ie.createElement("input"),Fe.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",de.leadingWhitespace=3===Fe.firstChild.nodeType,de.tbody=!Fe.getElementsByTagName("tbody").length,de.htmlSerialize=!!Fe.getElementsByTagName("link").length,de.html5Clone="<:nav></:nav>"!==ie.createElement("nav").cloneNode(!0).outerHTML,Ae.type="checkbox",Ae.checked=!0,je.appendChild(Ae),de.appendChecked=Ae.checked,Fe.innerHTML="<textarea>x</textarea>",de.noCloneChecked=!!Fe.cloneNode(!0).lastChild.defaultValue,je.appendChild(Fe),(Ae=ie.createElement("input")).setAttribute("type","radio"),Ae.setAttribute("checked","checked"),Ae.setAttribute("name","t"),Fe.appendChild(Ae),de.checkClone=Fe.cloneNode(!0).cloneNode(!0).lastChild.checked,de.noCloneEvent=!!Fe.addEventListener,Fe[pe.expando]=1,de.attributes=!Fe.getAttribute(pe.expando);var Xe={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:de.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ve=/<|&#?\w+;/,Je=/<tbody/i;!function(){var e,t,n=ie.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})t="on"+e,(de[e]=t in _)||(n.setAttribute(t,"t"),de[e]=!1===n.attributes[t].expando);n=null}();var Ke=/^(?:input|select|textarea)$/i,Qe=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^(?:focusinfocus|focusoutblur)$/,tt=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,c,u,d,h,p,f,m,g=pe._data(e);if(g){for(n.handler&&(n=(l=n).handler,r=l.selector),n.guid||(n.guid=pe.guid++),(a=g.events)||(a=g.events={}),(u=g.handle)||((u=g.handle=function(e){return void 0===pe||e&&pe.event.triggered===e.type?undefined:pe.event.dispatch.apply(u.elem,arguments)}).elem=e),s=(t=(t||"").match(Ee)||[""]).length;s--;)p=m=(o=tt.exec(t[s])||[])[1],f=(o[2]||"").split(".").sort(),p&&(c=pe.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,c=pe.event.special[p]||{},d=pe.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&pe.expr.match.needsContext.test(r),namespace:f.join(".")},l),(h=a[p])||((h=a[p]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,i,f,u)||(e.addEventListener?e.addEventListener(p,u,!1):e.attachEvent&&e.attachEvent("on"+p,u))),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,d):h.push(d),pe.event.global[p]=!0);e=null}},remove:function(e,t,n,i,r){var o,a,s,l,c,u,d,h,p,f,m,g=pe.hasData(e)&&pe._data(e);if(g&&(u=g.events)){for(c=(t=(t||"").match(Ee)||[""]).length;c--;)if(p=m=(s=tt.exec(t[c])||[])[1],f=(s[2]||"").split(".").sort(),p){for(d=pe.event.special[p]||{},h=u[p=(i?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=h.length;o--;)a=h[o],!r&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(h.splice(o,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(e,a));l&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||pe.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)pe.event.remove(e,p+t[c],n,i,!0);pe.isEmptyObject(u)&&(delete g.handle,pe._removeData(e,"events"))}},trigger:function(e,t,n,i){var r,o,a,s,l,c,u,d=[n||ie],h=ue.call(e,"type")?e.type:e,p=ue.call(e,"namespace")?e.namespace.split("."):[];if(a=c=n=n||ie,3!==n.nodeType&&8!==n.nodeType&&!et.test(h+pe.event.triggered)&&(-1<h.indexOf(".")&&(h=(p=h.split(".")).shift(),p.sort()),o=h.indexOf(":")<0&&"on"+h,(e=e[pe.expando]?e:new pe.Event(h,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=n),t=null==t?[e]:pe.makeArray(t,[e]),l=pe.event.special[h]||{},i||!l.trigger||!1!==l.trigger.apply(n,t))){if(!i&&!l.noBubble&&!pe.isWindow(n)){for(s=l.delegateType||h,et.test(s+h)||(a=a.parentNode);a;a=a.parentNode)d.push(a),c=a;c===(n.ownerDocument||ie)&&d.push(c.defaultView||c.parentWindow||_)}for(u=0;(a=d[u++])&&!e.isPropagationStopped();)e.type=1<u?s:l.bindType||h,(r=(pe._data(a,"events")||{})[e.type]&&pe._data(a,"handle"))&&r.apply(a,t),(r=o&&a[o])&&r.apply&&Pe(a)&&(e.result=r.apply(a,t),!1===e.result&&e.preventDefault());if(e.type=h,!i&&!e.isDefaultPrevented()&&(!l._default||!1===l._default.apply(d.pop(),t))&&Pe(n)&&o&&n[h]&&!pe.isWindow(n)){(c=n[o])&&(n[o]=null),pe.event.triggered=h;try{n[h]()}catch(f){}pe.event.triggered=undefined,c&&(n[o]=c)}return e.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,i,r,o,a=[],s=re.call(arguments),l=(pe._data(this,"events")||{})[e.type]||[],c=pe.event.special[e.type]||{};if((s[0]=e).delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=pe.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,(i=((pe.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s))!==undefined&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],n=0;n<s;n++)i[r=(o=t[n]).selector+" "]===undefined&&(i[r]=o.needsContext?-1<pe(r,this).index(l):pe.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[pe.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Ze.test(r)?this.mouseHooks:Qe.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new pe.Event(o),t=i.length;t--;)e[n=i[t]]=o[n];return e.target||(e.target=o.srcElement||ie),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=(i=e.target.ownerDocument||ie).documentElement,n=i.body,e.pageX=t.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||o===undefined||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==f()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===f()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var i=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(i,null,t),i.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=ie.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var i="on"+t;e.detachEvent&&("undefined"==typeof e[i]&&(e[i]=null),e.detachEvent(i,n))},pe.Event=function(e,t){if(!(this instanceof pe.Event))return new pe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===undefined&&!1===e.returnValue?h:p):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),this[pe.expando]=!0},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=h,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=h,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=h,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,o){pe.event.special[e]={delegateType:o,bindType:o,handle:function(e){var t,n=this,i=e.relatedTarget,r=e.handleObj;return i&&(i===n||pe.contains(n,i))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=o),t}}}),de.submit||(pe.event.special.submit={setup:function(){if(pe.nodeName(this,"form"))return!1;pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):undefined;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){if(pe.nodeName(this,"form"))return!1;pe.event.remove(this,"._submit")}}),de.change||(pe.event.special.change={setup:function(){if(Ke.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1;pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ke.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return pe.event.remove(this,"._change"),!Ke.test(this.nodeName)}}),de.focusin||pe.each({focus:"focusin",blur:"focusout"},function(n,i){var r=function(e){pe.event.simulate(i,e.target,pe.event.fix(e))};pe.event.special[i]={setup:function(){var e=this.ownerDocument||this,t=pe._data(e,i);t||e.addEventListener(n,r,!0),pe._data(e,i,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=pe._data(e,i)-1;t?pe._data(e,i,t):(e.removeEventListener(n,r,!0),pe._removeData(e,i))}}}),pe.fn.extend({on:function(e,t,n,i){return x(this,e,t,n,i)},one:function(e,t,n,i){return x(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,pe(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=undefined),!1===n&&(n=p),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return pe.event.trigger(e,t,n,!0)}});var nt=/ jQuery\d+="(?:null|\d+)"/g,it=new RegExp("<(?:"+Ge+")[\\s/>]","i"),rt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ot=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^true\/(.*)/,lt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ct=g(ie).appendChild(ie.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(rt,"<$1></$2>")},clone:function(e,t,n){var i,r,o,a,s,l=pe.contains(e.ownerDocument,e);if(de.html5Clone||pe.isXMLDoc(e)||!it.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ct.innerHTML=e.outerHTML,ct.removeChild(o=ct.firstChild)),!(de.noCloneEvent&&de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(i=v(o),s=v(e),a=0;null!=(r=s[a]);++a)i[a]&&$(r,i[a]);if(t)if(n)for(s=s||v(e),i=i||v(o),a=0;null!=(r=s[a]);a++)S(r,i[a]);else S(e,o);return 0<(i=v(o,"script")).length&&y(i,!l&&v(e,"script")),i=s=r=null,o},cleanData:function(e,t){for(var n,i,r,o,a=0,s=pe.expando,l=pe.cache,c=de.attributes,u=pe.event.special;null!=(n=e[a]);a++)if((t||Pe(n))&&(o=(r=n[s])&&l[r])){if(o.events)for(i in o.events)u[i]?pe.event.remove(n,i):pe.removeEvent(n,i,o.handle);l[r]&&(delete l[r],c||"undefined"==typeof n.removeAttribute?n[s]=undefined:n.removeAttribute(s),ne.push(r))}}}),pe.fn.extend({domManip:T,detach:function(e){return M(this,e,!0)},remove:function(e){return M(this,e)},text:function(e){return Be(this,function(e){return e===undefined?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ie).createTextNode(e))},null,e,arguments.length)},append:function(){return T(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||w(this,e).appendChild(e)})},prepend:function(){return T(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=w(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return T(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return T(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(v(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Be(this,function(e){var t=this[0]||{},n=0,i=this.length;if(e===undefined)return 1===t.nodeType?t.innerHTML.replace(nt,""):undefined;if("string"==typeof e&&!ot.test(e)&&(de.htmlSerialize||!it.test(e))&&(de.leadingWhitespace||!Ye.test(e))&&!Xe[(qe.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(pe.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return T(this,arguments,function(e){var t=this.parentNode;pe.inArray(this,n)<0&&(pe.cleanData(v(this)),t&&t.replaceChild(e,this))},n)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){pe.fn[e]=function(e){for(var t,n=0,i=[],r=pe(e),o=r.length-1;n<=o;n++)t=n===o?this:this.clone(!0),pe(r[n])[a](t),ae.apply(i,t.get())
  ;return this.pushStack(i)}});var ut,dt={HTML:"block",BODY:"block"},ht=/^margin/,pt=new RegExp("^("+Ne+")(?!px)[a-z%]+$","i"),ft=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in r=n.apply(e,i||[]),t)e.style[o]=a[o];return r},mt=ie.documentElement;!function(){function e(){var e,t,n=ie.documentElement;n.appendChild(c),u.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i=o=l=!1,r=s=!0,_.getComputedStyle&&(t=_.getComputedStyle(u),i="1%"!==(t||{}).top,l="2px"===(t||{}).marginLeft,o="4px"===(t||{width:"4px"}).width,u.style.marginRight="50%",r="4px"===(t||{marginRight:"4px"}).marginRight,(e=u.appendChild(ie.createElement("div"))).style.cssText=u.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",u.style.width="1px",s=!parseFloat((_.getComputedStyle(e)||{}).marginRight),u.removeChild(e)),u.style.display="none",(a=0===u.getClientRects().length)&&(u.style.display="",u.innerHTML="<table><tr><td></td><td>t</td></tr></table>",u.childNodes[0].style.borderCollapse="separate",(e=u.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(a=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",a=0===e[0].offsetHeight)),n.removeChild(c)}var i,r,o,a,s,l,c=ie.createElement("div"),u=ie.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",de.opacity="0.5"===u.style.opacity,de.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",de.clearCloneStyle="content-box"===u.style.backgroundClip,(c=ie.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",c.appendChild(u),de.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,pe.extend(de,{reliableHiddenOffsets:function(){return null==i&&e(),a},boxSizingReliable:function(){return null==i&&e(),o},pixelMarginRight:function(){return null==i&&e(),r},pixelPosition:function(){return null==i&&e(),i},reliableMarginRight:function(){return null==i&&e(),s},reliableMarginLeft:function(){return null==i&&e(),l}}))}();var gt,vt,yt=/^(top|right|bottom|left)$/;_.getComputedStyle?(gt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=_),t.getComputedStyle(e)},vt=function(e,t,n){var i,r,o,a,s=e.style;return""!==(a=(n=n||gt(e))?n.getPropertyValue(t)||n[t]:undefined)&&a!==undefined||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!de.pixelMarginRight()&&pt.test(a)&&ht.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o),a===undefined?a:a+""}):mt.currentStyle&&(gt=function(e){return e.currentStyle},vt=function(e,t,n){var i,r,o,a,s=e.style;return null==(a=(n=n||gt(e))?n[t]:undefined)&&s&&s[t]&&(a=s[t]),pt.test(a)&&!yt.test(t)&&(i=s.left,(o=(r=e.runtimeStyle)&&r.left)&&(r.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,o&&(r.left=o)),a===undefined?a:a+""||"auto"});var bt=/alpha\([^)]*\)/i,xt=/opacity\s*=\s*([^)]*)/i,wt=/^(none|table(?!-c[ea]).+)/,kt=new RegExp("^("+Ne+")(.*)$","i"),_t={position:"absolute",visibility:"hidden",display:"block"},Ct={letterSpacing:"0",fontWeight:"400"},St=["Webkit","O","Moz","ms"],$t=ie.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":de.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=pe.camelCase(t),l=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=P(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],n===undefined)return a&&"get"in a&&(r=a.get(e,!1,i))!==undefined?r:l[t];if("string"===(o=typeof n)&&(r=We.exec(n))&&r[1]&&(n=d(e,t,r),o="number"),null!=n&&n==n&&("number"===o&&(n+=r&&r[3]||(pe.cssNumber[s]?"":"px")),de.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&(n=a.set(e,n,i))===undefined)))try{l[t]=n}catch(c){}}},css:function(e,t,n,i){var r,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=P(s)||s),(a=pe.cssHooks[t]||pe.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),o===undefined&&(o=vt(e,t,i)),"normal"===o&&t in Ct&&(o=Ct[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),pe.each(["height","width"],function(e,r){pe.cssHooks[r]={get:function(e,t,n){if(t)return wt.test(pe.css(e,"display"))&&0===e.offsetWidth?ft(e,_t,function(){return j(e,r,n)}):j(e,r,n)},set:function(e,t,n){var i=n&&gt(e);return O(e,t,n?F(e,r,n,de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),de.opacity||(pe.cssHooks.opacity={get:function(e,t){return xt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||n.filter||"";((n.zoom=1)<=t||""===t)&&""===pe.trim(o.replace(bt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=bt.test(o)?o.replace(bt,r):o+" "+r)}}),pe.cssHooks.marginRight=I(de.reliableMarginRight,function(e,t){if(t)return ft(e,{display:"inline-block"},vt,[e,"marginRight"])}),pe.cssHooks.marginLeft=I(de.reliableMarginLeft,function(e,t){if(t)return(parseFloat(vt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ft(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(r,o){pe.cssHooks[r+o]={expand:function(e){for(var t=0,n={},i="string"==typeof e?e.split(" "):[e];t<4;t++)n[r+He[t]+o]=i[t]||i[t-2]||i[0];return n}},ht.test(r)||(pe.cssHooks[r+o].set=O)}),pe.fn.extend({css:function(e,t){return Be(this,function(e,t,n){var i,r,o={},a=0;if(pe.isArray(t)){for(i=gt(e),r=t.length;a<r;a++)o[t[a]]=pe.css(e,t[a],!1,i);return o}return n!==undefined?pe.style(e,t,n):pe.css(e,t)},e,t,1<arguments.length)},show:function(){return L(this,!0)},hide:function(){return L(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ze(this)?pe(this).show():pe(this).hide()})}}),(pe.Tween=A).prototype={constructor:A,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=A.propHooks[this.prop];return e&&e.get?e.get(this):A.propHooks._default.get(this)},run:function(e){var t,n=A.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):A.propHooks._default.set(this),this}},A.prototype.init.prototype=A.prototype,A.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},A.propHooks.scrollTop=A.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=A.prototype.init,pe.fx.step={};var Tt,Mt,Dt,Et,It,Pt,Lt,Ot=/^(?:toggle|show|hide)$/,Ft=/queueHooks$/;pe.Animation=pe.extend(R,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,We.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(Ee);for(var n,i=0,r=e.length;i<r;i++)n=e[i],R.tweeners[n]=R.tweeners[n]||[],R.tweeners[n].unshift(t)},prefilters:[z],prefilter:function(e,t){t?R.prefilters.unshift(e):R.prefilters.push(e)}}),pe.speed=function(e,t,n){var i=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return i.duration=pe.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in pe.fx.speeds?pe.fx.speeds[i.duration]:pe.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){pe.isFunction(i.old)&&i.old.call(this),i.queue&&pe.dequeue(this,i.queue)},i},pe.fn.extend({fadeTo:function(e,t,n,i){return this.filter(ze).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(t,e,n,i){var r=pe.isEmptyObject(t),o=pe.speed(e,n,i),a=function(){var e=R(this,pe.extend({},t),o);(r||pe._data(this,"finish"))&&e.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(r,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof r&&(o=e,e=r,r=undefined),e&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var e=!0,t=null!=r&&r+"queueHooks",n=pe.timers,i=pe._data(this);if(t)i[t]&&i[t].stop&&a(i[t]);else for(t in i)i[t]&&i[t].stop&&Ft.test(t)&&a(i[t]);for(t=n.length;t--;)n[t].elem!==this||null!=r&&n[t].queue!==r||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||pe.dequeue(this,r)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=pe._data(this),n=t[a+"queue"],i=t[a+"queueHooks"],r=pe.timers,o=n?n.length:0;for(t.finish=!0,pe.queue(this,a,[]),i&&i.stop&&i.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===a&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),pe.each(["toggle","show","hide"],function(e,i){var r=pe.fn[i];pe.fn[i]=function(e,t,n){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(W(i,!0),e,t,n)}}),pe.each({slideDown:W("show"),slideUp:W("hide"),slideToggle:W("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,i){pe.fn[e]=function(e,t,n){return this.animate(i,e,t,n)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(Tt=pe.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),Tt=undefined},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){Mt||(Mt=_.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){_.clearInterval(Mt),Mt=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(i,e){return i=pe.fx&&pe.fx.speeds[i]||i,e=e||"fx",this.queue(e,function(e,t){var n=_.setTimeout(e,i);t.stop=function(){_.clearTimeout(n)}})},Et=ie.createElement("input"),It=ie.createElement("div"),Pt=ie.createElement("select"),Lt=Pt.appendChild(ie.createElement("option")),(It=ie.createElement("div")).setAttribute("className","t"),It.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",Dt=It.getElementsByTagName("a")[0],Et.setAttribute("type","checkbox"),It.appendChild(Et),(Dt=It.getElementsByTagName("a")[0]).style.cssText="top:1px",de.getSetAttribute="t"!==It.className,de.style=/top/.test(Dt.getAttribute("style")),de.hrefNormalized="/a"===Dt.getAttribute("href"),de.checkOn=!!Et.value,de.optSelected=Lt.selected,de.enctype=!!ie.createElement("form").enctype,Pt.disabled=!0,de.optDisabled=!Lt.disabled,(Et=ie.createElement("input")).setAttribute("value",""),de.input=""===Et.getAttribute("value"),Et.value="t",Et.setAttribute("type","radio"),de.radioValue="t"===Et.value;var jt=/\r/g,At=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(n){var i,e,r,t=this[0];return arguments.length?(r=pe.isFunction(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=r?n.call(this,e,pe(this).val()):n)?t="":"number"==typeof t?t+="":pe.isArray(t)&&(t=pe.map(t,function(e){return null==e?"":e+""})),(i=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&i.set(this,t,"value")!==undefined||(this.value=t))})):t?(i=pe.valHooks[t.type]||pe.valHooks[t.nodeName.toLowerCase()])&&"get"in i&&(e=i.get(t,"value"))!==undefined?e:"string"==typeof(e=t.value)?e.replace(jt,""):null==e?"":e:void 0}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(At," ")}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||r<0,a=o?null:[],s=o?r+1:i.length,l=r<0?s:o?r:0;l<s;l++)if(((n=i[l]).selected||l===r)&&(de.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=pe.makeArray(t),a=r.length;a--;)if(i=r[a],-1<pe.inArray(pe.valHooks.option.get(i),o))try{i.selected=n=!0}catch(s){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),r}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=-1<pe.inArray(pe(e).val(),t)}},de.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Nt,Wt,Ht=pe.expr.attrHandle,zt=/^(?:checked|selected)$/i,Bt=de.getSetAttribute,Rt=de.input;pe.fn.extend({attr:function(e,t){return Be(this,pe.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),r=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Wt:Nt)),n!==undefined?null===n?void pe.removeAttr(e,t):r&&"set"in r&&(i=r.set(e,n,t))!==undefined?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=pe.find.attr(e,t))?undefined:i)},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(Ee);if(o&&1===e.nodeType)for(;n=o[r++];)i=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Rt&&Bt||!zt.test(n)?e[i]=!1:e[pe.camelCase("default-"+n)]=e[i]=!1:pe.attr(e,n,""),e.removeAttribute(Bt?n:i)}}),Wt={set:function(e,t,n){return!1===t?pe.removeAttr(e,n):Rt&&Bt||!zt.test(n)?e.setAttribute(!Bt&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var o=Ht[t]||pe.find.attr;Rt&&Bt||!zt.test(t)?Ht[t]=function(e,t,n){var i,r;return n||(r=Ht[t],Ht[t]=i,i=null!=o(e,t,n)?t.toLowerCase():null,Ht[t]=r),i}:Ht[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Rt&&Bt||(pe.attrHooks.value={set:function(e,t,n){if(!pe.nodeName(e,"input"))return Nt&&Nt.set(e,t,n);e.defaultValue=t}}),Bt||(Nt={set:function(e,t,n){var i=e.getAttributeNode(n);if(i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n))return t}},Ht.id=Ht.name=Ht.coords=function(e,t,n){var i;if(!n)return(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Nt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Nt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,n){pe.attrHooks[n]={set:function(e,t){if(""===t)return e.setAttribute(n,"auto"),t}}})),de.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||undefined},set:function(e,t){return e.style.cssText=t+""}});var qt=/^(?:input|select|textarea|button|object)$/i,Ut=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Be(this,pe.prop,e,t,1<arguments.length)},removeProp:function(t){return t=pe.propFix[t]||t,this.each(function(){try{this[t]=undefined,delete this[t]}catch(e){}})}}),pe.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,r=pe.propHooks[t]),n!==undefined?r&&"set"in r&&(i=r.set(e,n,t))!==undefined?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):qt.test(e.nodeName)||Ut.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),de.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),de.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),de.enctype||(pe.propFix.enctype="encoding");var Yt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(t){var e,n,i,r,o,a,s,l=0;if(pe.isFunction(t))return this.each(function(e){pe(this).addClass(t.call(this,e,q(this)))});if("string"==typeof t&&t)for(e=t.match(Ee)||[];n=this[l++];)if(r=q(n),i=1===n.nodeType&&(" "+r+" ").replace(Yt," ")){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(s=pe.trim(i))&&pe.attr(n,"class",s)}return this},removeClass:function(t){var e,n,i,r,o,a,s,l=0;if(pe.isFunction(t))return this.each(function(e){pe(this).removeClass(t.call(this,e,q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Ee)||[];n=this[l++];)if(r=q(n),i=1===n.nodeType&&(" "+r+" ").replace(Yt," ")){for(a=0;o=e[a++];)for(;-1<i.indexOf(" "+o+" ");)i=i.replace(" "+o+" "," ");r!==(s=pe.trim(i))&&pe.attr(n,"class",s)}return this},toggleClass:function(r,t){var o=typeof r;return"boolean"==typeof t&&"string"===o?t?this.addClass(r):this.removeClass(r):pe.isFunction(r)?this.each(function(e){pe(this).toggleClass(r.call(this,e,q(this),t),t)}):this.each(function(){var e,t,n,i;if("string"===o)for(t=0,n=pe(this),i=r.match(Ee)||[];e=i[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else r!==undefined&&"boolean"!==o||((e=q(this))&&pe._data(this,"__className__",e),pe.attr(this,"class",e||!1===r?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+q(n)+" ").replace(Yt," ").indexOf(t))return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,n){pe.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Gt=_.location,Xt=pe.now(),Vt=/\?/,Jt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(e){if(_.JSON&&_.JSON.parse)return _.JSON.parse(e+"");var r,o=null,t=pe.trim(e+"");return t&&!pe.trim(t.replace(Jt,function(e,t,n,i){return r&&t&&(o=0),0===o?e:(r=n||t,o+=!i-!n,"")}))?Function("return "+t)():pe.error("Invalid JSON: "+e)},pe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{_.DOMParser?t=(new _.DOMParser).parseFromString(e,"text/xml"):((t=new _.ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e))}catch(n){t=undefined}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+e),t};var Kt=/#.*$/,Qt=/([?&])_=[^&]*/,Zt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,en=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,tn=/^(?:GET|HEAD)$/,nn=/^\/\//,rn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,on={},an={},sn="*/".concat("*"),ln=Gt.href,cn=rn.exec(ln.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ln,type:"GET",isLocal:en.test(cn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,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":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?G(G(e,pe.ajaxSettings),t):G(pe.ajaxSettings,e)},ajaxPrefilter:U(on),ajaxTransport:U(an),ajax:function(e,t){function n(e,t,n,i){var r,o,a,s,l,c=t;2!==w&&(w=2,h&&_.clearTimeout(h),f=undefined,d=i||"",k.readyState=0<e?4:0,r=200<=e&&e<300||304===e,n&&(s=X(m,k,n)),s=V(m,s,k,r),r?(m.ifModified&&((l=k.getResponseHeader("Last-Modified"))&&(pe.lastModified[u]=l),(l=k.getResponseHeader("etag"))&&(pe.etag[u]=l)),204===e||"HEAD"===m.type?c="nocontent":304===e?c="notmodified":(c=s.state,o=s.data,r=!(a=s.error))):(a=c,!e&&c||(c="error",e<0&&(e=0))),k.status=e,k.statusText=(t||c)+"",r?y.resolveWith(g,[o,c,k]):y.rejectWith(g,[k,c,a]),k.statusCode(x),x=undefined,p&&v.trigger(r?"ajaxSuccess":"ajaxError",[k,m,r?o:a]),b.fireWith(g,[k,c]),p&&(v.trigger("ajaxComplete",[k,m]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=undefined),t=t||{};var i,r,u,d,h,p,f,o,m=pe.ajaxSetup({},t),g=m.context||m,v=m.context&&(g.nodeType||g.jquery)?pe(g):pe.event,y=pe.Deferred(),b=pe.Callbacks("once memory"),x=m.statusCode||{},a={},s={},w=0,l="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!o)for(o={};t=Zt.exec(d);)o[t[1].toLowerCase()]=t[2];t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?d:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=s[n]=s[n]||e,a[e]=t),this},overrideMimeType:function(e){return w||(m.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)x[t]=[x[t],e[t]];else k.always(e[k.status]);return this},abort:function(e){var t=e||l;return f&&f.abort(t),n(0,t),this}};if(y.promise(k).complete=b.add,k.success=k.done,k.error=k.fail,m.url=((e||m.url||ln)+"").replace(Kt,"").replace(nn,cn[1]+"//"),m.type=t.method||t.type||m.method||m.type,m.dataTypes=pe.trim(m.dataType||"*").toLowerCase().match(Ee)||[""],null==m.crossDomain&&(i=rn.exec(m.url.toLowerCase()),m.crossDomain=!(!i||i[1]===cn[1]&&i[2]===cn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(cn[3]||("http:"===cn[1]?"80":"443")))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=pe.param(m.data,m.traditional)),Y(on,m,t,k),2===w)return k;for(r in(p=pe.event&&m.global)&&0==pe.active++&&pe.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!tn.test(m.type),u=m.url,m.hasContent||(m.data&&(u=m.url+=(Vt.test(u)?"&":"?")+m.data,delete m.data),!1===m.cache&&(m.url=Qt.test(u)?u.replace(Qt,"$1_="+Xt++):u+(Vt.test(u)?"&":"?")+"_="+Xt++)),m.ifModified&&(pe.lastModified[u]&&k.setRequestHeader("If-Modified-Since",pe.lastModified[u]),pe.etag[u]&&k.setRequestHeader("If-None-Match",pe.etag[u])),(m.data&&m.hasContent&&!1!==m.contentType||t.contentType)&&k.setRequestHeader("Content-Type",m.contentType),k.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+sn+"; q=0.01":""):m.accepts["*"]),m.headers)k.setRequestHeader(r,m.headers[r]);if(m.beforeSend&&(!1===m.beforeSend.call(g,k,m)||2===w))return k.abort();for(r in l="abort",{success:1,error:1,complete:1})k[r](m[r]);if(f=Y(an,m,t,k)){if(k.readyState=1,p&&v.trigger("ajaxSend",[k,m]),2===w)return k;m.async&&0<m.timeout&&(h=_.setTimeout(function(){k.abort("timeout")},m.timeout));try{w=1,f.send(a,n)}catch(c){if(!(w<2))throw c;n(-1,c)}}else n(-1,"No Transport");return k},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,undefined,t,"script")}}),pe.each(["get","post"],function(e,r){pe[r]=function(e,t,n,i){return pe.isFunction(t)&&(i=i||n,n=t,t=undefined),pe.ajax(pe.extend({url:e,type:r,dataType:i,data:t,success:n},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(t){if(pe.isFunction(t))return this.each(function(e){pe(this).wrapAll(t.call(this,e))});if(this[0]){var e=pe(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(n){return pe.isFunction(n)?this.each(function(e){pe(this).wrapInner(n.call(this,e))}):this.each(function(){var e=pe(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=pe.isFunction(t);return this.each(function(e){pe(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return de.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var un=/%20/g,dn=/\[\]$/,hn=/\r?\n/g,pn=/^(?:submit|button|image|reset|file)$/i,fn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,i=[],r=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){r(this.name,this.value)});else for(n in e)Q(n,e[n],t,r);return i.join("&").replace(un,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&fn.test(this.nodeName)&&!pn.test(e)&&(this.checked||!Re.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(hn,"\r\n")}}):{name:t.name,value:n.replace(hn,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=_.ActiveXObject!==undefined?function(){return this.isLocal?ee():8<ie.documentMode?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var mn=0,gn={},vn=pe.ajaxSettings.xhr();_.attachEvent&&_.attachEvent("onunload",function(){for(var e in gn)gn[e](undefined,!0)}),de.cors=!!vn&&"withCredentials"in vn,(vn=de.ajax=!!vn)&&pe.ajaxTransport(function(c){var u;if(!c.crossDomain||de.cors)return{send:function(e,a){var t,s=c.xhr(),l=++mn;if(s.open(c.type,c.url,c.async,c.username,c.password),c.xhrFields)for(t in c.xhrFields)s[t]=c.xhrFields[t];for(t in c.mimeType&&s.overrideMimeType&&s.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)e[t]!==undefined&&s.setRequestHeader(t,e[t]+"");s.send(c.hasContent&&c.data||null),u=function(e,t){var n,i,r;if(u&&(t||4===s.readyState))if(delete gn[l],u=undefined,s.onreadystatechange=pe.noop,t)4!==s.readyState&&s.abort();else{r={},n=s.status,"string"==typeof s.responseText&&(r.text=s.responseText);try{i=s.statusText}catch(o){i=""}n||!c.isLocal||c.crossDomain?1223===n&&(n=204):n=r.text?200:404}r&&a(n,i,r,s.getAllResponseHeaders())},c.async?4===s.readyState?_.setTimeout(u):s.onreadystatechange=gn[l]=u:u()},abort:function(){u&&u(undefined,!0)}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(t){if(t.crossDomain){var i,r=ie.head||pe("head")[0]||ie.documentElement;return{send:function(e,n){(i=ie.createElement("script")).async=!0,t.scriptCharset&&(i.charset=t.scriptCharset),i.src=t.url,i.onload=i.onreadystatechange=function(e,t){(t||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),i=null,t||n(200,"success"))},r.insertBefore(i,r.firstChild)},abort:function(){i&&i.onload(undefined,!0)}}}});var yn=[],bn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=yn.pop()||pe.expando+"_"+Xt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(e,t,n){var i,r,o,a=!1!==e.jsonp&&(bn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&bn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=pe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(bn,"$1"+i):!1!==e.jsonp&&(e.url+=(Vt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||pe.error(i+" was not called"),o[0]},e.dataTypes[0]="json",r=_[i],_[i]=function(){o=arguments},n.always(function(){r===undefined?pe(_).removeProp(i):_[i]=r,e[i]&&(e.jsonpCallback=t.jsonpCallback,yn.push(i)),o&&pe.isFunction(r)&&r(o[0]),o=r=undefined}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||ie;var i=ke.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=m([e],t,r),r&&r.length&&pe(r).remove(),pe.merge([],i.childNodes))};var xn=pe.fn.load;pe.fn.load=function(e,t,n){if("string"!=typeof e&&xn)return xn.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return-1<s&&(i=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(r="POST"),0<a.length&&pe.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?pe("<div>").append(pe.parseHTML(e)).find(i):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(t){return pe.grep(pe.timers,function(e){return t===e.elem}).length},pe.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,c=pe.css(e,"position"),u=pe(e),d={};"static"===c&&(e.style.position="relative"),s=u.offset(),o=pe.css(e,"top"),l=pe.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<pe.inArray("auto",[o,l])?(a=(i=u.position()).top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+r),"using"in t?t.using.call(e,d):u.css(d)}},pe.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){pe.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;return o?(e=o.documentElement,pe.contains(e,r)?("undefined"!=typeof r.getBoundingClientRect&&(i=r.getBoundingClientRect()),n=te(o),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===pe.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(i,"marginTop",!0),left:t.left-n.left-pe.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||mt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var o=/Y/.test(r);pe.fn[t]=function(e){return Be(this,function(e,t,n){var i=te(e);if(n===undefined)return i?r in i?i[r]:i.document.documentElement[t]:e[t];i?i.scrollTo(o?pe(i).scrollLeft():n,o?n:pe(i).scrollTop()):e[t]=n},t,e,arguments.length,null)}}),pe.each(["top","left"],function(e,n){pe.cssHooks[n]=I(de.pixelPosition,function(e,t){if(t)return t=vt(e,n),pt.test(t)?pe(e).position()[n]+"px":t})}),pe.each({Height:"height",Width:"width"},function(o,a){pe.each({padding:"inner"+o,content:a,"":"outer"+o},function(i,e){pe.fn[e]=function(e,t){var n=arguments.length&&(i||"boolean"!=typeof e),r=i||(!0===e||!0===t?"margin":"border");return Be(this,function(e,t,n){var i;return pe.isWindow(e
  )?e.document.documentElement["client"+o]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+o],i["scroll"+o],e.body["offset"+o],i["offset"+o],i["client"+o])):n===undefined?pe.css(e,t,r):pe.style(e,t,n,r)},a,n?e:undefined,n,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var wn=_.jQuery,kn=_.$;return pe.noConflict=function(e){return _.$===pe&&(_.$=kn),e&&_.jQuery===pe&&(_.jQuery=wn),pe},e||(_.jQuery=_.$=pe),pe}),function(u,l){"use strict";var c;u.rails!==l&&u.error("jquery-ujs has already been loaded!");var e=u(document);u.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return u("meta[name=csrf-token]").attr("content")},csrfParam:function(){return u("meta[name=csrf-param]").attr("content")},CSRFProtection:function(e){var t=c.csrfToken();t&&e.setRequestHeader("X-CSRF-Token",t)},refreshCSRFTokens:function(){u('form input[name="'+c.csrfParam()+'"]').val(c.csrfToken())},fire:function(e,t,n){var i=u.Event(t);return e.trigger(i,n),!1!==i.result},confirm:function(e){return confirm(e)},ajax:function(e){return u.ajax(e)},href:function(e){return e[0].href},isRemote:function(e){return e.data("remote")!==l&&!1!==e.data("remote")},handleRemote:function(i){var e,t,n,r,o,a;if(c.fire(i,"ajax:before")){if(r=i.data("with-credentials")||null,o=i.data("type")||u.ajaxSettings&&u.ajaxSettings.dataType,i.is("form")){e=i.data("ujs:submit-button-formmethod")||i.attr("method"),t=i.data("ujs:submit-button-formaction")||i.attr("action"),n=u(i[0]).serializeArray();var s=i.data("ujs:submit-button");s&&(n.push(s),i.data("ujs:submit-button",null)),i.data("ujs:submit-button-formmethod",null),i.data("ujs:submit-button-formaction",null)}else i.is(c.inputChangeSelector)?(e=i.data("method"),t=i.data("url"),n=i.serialize(),i.data("params")&&(n=n+"&"+i.data("params"))):i.is(c.buttonClickSelector)?(e=i.data("method")||"get",t=i.data("url"),n=i.serialize(),i.data("params")&&(n=n+"&"+i.data("params"))):(e=i.data("method"),t=c.href(i),n=i.data("params")||null);return a={type:e||"GET",data:n,dataType:o,beforeSend:function(e,t){if(t.dataType===l&&e.setRequestHeader("accept","*/*;q=0.5, "+t.accepts.script),!c.fire(i,"ajax:beforeSend",[e,t]))return!1;i.trigger("ajax:send",e)},success:function(e,t,n){i.trigger("ajax:success",[e,t,n])},complete:function(e,t){i.trigger("ajax:complete",[e,t])},error:function(e,t,n){i.trigger("ajax:error",[e,t,n])},crossDomain:c.isCrossDomain(t)},r&&(a.xhrFields={withCredentials:r}),t&&(a.url=t),c.ajax(a)}return!1},isCrossDomain:function(e){var t=document.createElement("a");t.href=location.href;var n=document.createElement("a");try{return n.href=e,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(i){return!0}},handleMethod:function(e){var t=c.href(e),n=e.data("method"),i=e.attr("target"),r=c.csrfToken(),o=c.csrfParam(),a=u('<form method="post" action="'+t+'"></form>'),s='<input name="_method" value="'+n+'" type="hidden" />';o===l||r===l||c.isCrossDomain(t)||(s+='<input name="'+o+'" value="'+r+'" type="hidden" />'),i&&a.attr("target",i),a.hide().append(s).appendTo("body"),a.submit()},formElements:function(e,t){return e.is("form")?u(e[0].elements).filter(t):e.find(t)},disableFormElements:function(e){c.formElements(e,c.disableSelector).each(function(){c.disableFormElement(u(this))})},disableFormElement:function(e){var t,n;t=e.is("button")?"html":"val",(n=e.data("disable-with"))!==l&&(e.data("ujs:enable-with",e[t]()),e[t](n)),e.prop("disabled",!0),e.data("ujs:disabled",!0)},enableFormElements:function(e){c.formElements(e,c.enableSelector).each(function(){c.enableFormElement(u(this))})},enableFormElement:function(e){var t=e.is("button")?"html":"val";e.data("ujs:enable-with")!==l&&(e[t](e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.prop("disabled",!1),e.removeData("ujs:disabled")},allowAction:function(e){var t,n=e.data("confirm"),i=!1;if(!n)return!0;if(c.fire(e,"confirm")){try{i=c.confirm(n)}catch(r){(console.error||console.log).call(console,r.stack||r)}t=c.fire(e,"confirm:complete",[i])}return i&&t},blankInputs:function(e,t,n){var i,r,o,a=u(),s=t||"input,textarea",l=e.find(s),c={};return l.each(function(){(i=u(this)).is("input[type=radio]")?(o=i.attr("name"),c[o]||(0===e.find('input[type=radio]:checked[name="'+o+'"]').length&&(r=e.find('input[type=radio][name="'+o+'"]'),a=a.add(r)),c[o]=o)):(i.is("input[type=checkbox],input[type=radio]")?i.is(":checked"):!!i.val())===n&&(a=a.add(i))}),!!a.length&&a},nonBlankInputs:function(e,t){return c.blankInputs(e,t,!0)},stopEverything:function(e){return u(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(e){var t=e.data("disable-with");t!==l&&(e.data("ujs:enable-with",e.html()),e.html(t)),e.bind("click.railsDisable",function(e){return c.stopEverything(e)}),e.data("ujs:disabled",!0)},enableElement:function(e){e.data("ujs:enable-with")!==l&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable"),e.removeData("ujs:disabled")}},c.fire(e,"rails:attachBindings")&&(u.ajaxPrefilter(function(e,t,n){e.crossDomain||c.CSRFProtection(n)}),u(window).on("pageshow.rails",function(){u(u.rails.enableSelector).each(function(){var e=u(this);e.data("ujs:disabled")&&u.rails.enableFormElement(e)}),u(u.rails.linkDisableSelector).each(function(){var e=u(this);e.data("ujs:disabled")&&u.rails.enableElement(e)})}),e.on("ajax:complete",c.linkDisableSelector,function(){c.enableElement(u(this))}),e.on("ajax:complete",c.buttonDisableSelector,function(){c.enableFormElement(u(this))}),e.on("click.rails",c.linkClickSelector,function(e){var t=u(this),n=t.data("method"),i=t.data("params"),r=e.metaKey||e.ctrlKey;if(!c.allowAction(t))return c.stopEverything(e);if(!r&&t.is(c.linkDisableSelector)&&c.disableElement(t),c.isRemote(t)){if(r&&(!n||"GET"===n)&&!i)return!0;var o=c.handleRemote(t);return!1===o?c.enableElement(t):o.fail(function(){c.enableElement(t)}),!1}return n?(c.handleMethod(t),!1):void 0}),e.on("click.rails",c.buttonClickSelector,function(e){var t=u(this);if(!c.allowAction(t)||!c.isRemote(t))return c.stopEverything(e);t.is(c.buttonDisableSelector)&&c.disableFormElement(t);var n=c.handleRemote(t);return!1===n?c.enableFormElement(t):n.fail(function(){c.enableFormElement(t)}),!1}),e.on("change.rails",c.inputChangeSelector,function(e){var t=u(this);return c.allowAction(t)&&c.isRemote(t)?(c.handleRemote(t),!1):c.stopEverything(e)}),e.on("submit.rails",c.formSubmitSelector,function(e){var t,n,i=u(this),r=c.isRemote(i);if(!c.allowAction(i))return c.stopEverything(e);if(i.attr("novalidate")===l)if(i.data("ujs:formnovalidate-button")===l){if((t=c.blankInputs(i,c.requiredInputSelector,!1))&&c.fire(i,"ajax:aborted:required",[t]))return c.stopEverything(e)}else i.data("ujs:formnovalidate-button",l);if(r){if(n=c.nonBlankInputs(i,c.fileInputSelector)){setTimeout(function(){c.disableFormElements(i)},13);var o=c.fire(i,"ajax:aborted:file",[n]);return o||setTimeout(function(){c.enableFormElements(i)},13),o}return c.handleRemote(i),!1}setTimeout(function(){c.disableFormElements(i)},13)}),e.on("click.rails",c.formInputClickSelector,function(e){var t=u(this);if(!c.allowAction(t))return c.stopEverything(e);var n=t.attr("name"),i=n?{name:n,value:t.val()}:null,r=t.closest("form");0===r.length&&(r=u("#"+t.attr("form"))),r.data("ujs:submit-button",i),r.data("ujs:formnovalidate-button",t.attr("formnovalidate")),r.data("ujs:submit-button-formaction",t.attr("formaction")),r.data("ujs:submit-button-formmethod",t.attr("formmethod"))}),e.on("ajax:send.rails",c.formSubmitSelector,function(e){this===e.target&&c.disableFormElements(u(this))}),e.on("ajax:complete.rails",c.formSubmitSelector,function(e){this===e.target&&c.enableFormElements(u(this))}),u(function(){c.refreshCSRFTokens()}))}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){return e.ui=e.ui||{},e.ui.version="1.12.1"}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){return e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(u){var o,n=0,s=Array.prototype.slice;return u.cleanData=(o=u.cleanData,function(e){var t,n,i;for(i=0;null!=(n=e[i]);i++)try{(t=u._data(n,"events"))&&t.remove&&u(n).triggerHandler("remove")}catch(r){}o(e)}),u.widget=function(e,n,t){var i,r,o,a={},s=e.split(".")[0],l=s+"-"+(e=e.split(".")[1]);return t||(t=n,n=u.Widget),u.isArray(t)&&(t=u.extend.apply(null,[{}].concat(t))),u.expr[":"][l.toLowerCase()]=function(e){return!!u.data(e,l)},u[s]=u[s]||{},i=u[s][e],r=u[s][e]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},u.extend(r,i,{version:t.version,_proto:u.extend({},t),_childConstructors:[]}),(o=new n).options=u.widget.extend({},o.options),u.each(t,function(t,o){u.isFunction(o)?a[t]=function(){function i(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=r,e=o.apply(this,arguments),this._super=t,this._superApply=n,e}}():a[t]=o}),r.prototype=u.widget.extend(o,{widgetEventPrefix:i&&o.widgetEventPrefix||e},a,{constructor:r,namespace:s,widgetName:e,widgetFullName:l}),i?(u.each(i._childConstructors,function(e,t){var n=t.prototype;u.widget(n.namespace+"."+n.widgetName,r,t._proto)}),delete i._childConstructors):n._childConstructors.push(r),u.widget.bridge(e,r),r},u.widget.extend=function(e){for(var t,n,i=s.call(arguments,1),r=0,o=i.length;r<o;r++)for(t in i[r])n=i[r][t],i[r].hasOwnProperty(t)&&n!==undefined&&(u.isPlainObject(n)?e[t]=u.isPlainObject(e[t])?u.widget.extend({},e[t],n):u.widget.extend({},n):e[t]=n);return e},u.widget.bridge=function(o,t){var a=t.prototype.widgetFullName||o;u.fn[o]=function(n){var e="string"==typeof n,i=s.call(arguments,1),r=this;return e?this.length||"instance"!==n?this.each(function(){var e,t=u.data(this,a);return"instance"===n?(r=t,!1):t?u.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,i))!==t&&e!==undefined?(r=e&&e.jquery?r.pushStack(e.get()):e,!1):void 0:u.error("no such method '"+n+"' for "+o+" widget instance"):u.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+n+"'")}):r=undefined:(i.length&&(n=u.widget.extend.apply(null,[n].concat(i))),this.each(function(){var e=u.data(this,a);e?(e.option(n||{}),e._init&&e._init()):u.data(this,a,new t(n,this))})),r}},u.Widget=function(){},u.Widget._childConstructors=[],u.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=u(t||this.defaultElement||this)[0],this.element=u(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=u(),this.hoverable=u(),this.focusable=u(),this.classesElementLookup={},t!==this&&(u.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=u(t.style?t.ownerDocument:t.document||t),this.window=u(this.document[0].defaultView||this.document[0].parentWindow)),this.options=u.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:u.noop,_create:u.noop,_init:u.noop,destroy:function(){var n=this;this._destroy(),u.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:u.noop,widget:function(){return this.element},option:function(e,t){var n,i,r,o=e;if(0===arguments.length)return u.widget.extend({},this.options);if("string"==typeof e)if(o={},e=(n=e.split(".")).shift(),n.length){for(i=o[e]=u.widget.extend({},this.options[e]),r=0;r<n.length-1;r++)i[n[r]]=i[n[r]]||{},i=i[n[r]];if(e=n.pop(),1===arguments.length)return i[e]===undefined?null:i[e];i[e]=t}else{if(1===arguments.length)return this.options[e]===undefined?null:this.options[e];o[e]=t}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(e){var t,n,i;for(t in e)i=this.classesElementLookup[t],e[t]!==this.options.classes[t]&&i&&i.length&&(n=u(i.get()),this._removeClass(i,t),n.addClass(this._classes({element:n,keys:t,classes:e,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(r){function e(e,t){var n,i;for(i=0;i<e.length;i++)n=a.classesElementLookup[e[i]]||u(),n=r.add?u(u.unique(n.get().concat(r.element.get()))):u(n.not(r.element).get()),a.classesElementLookup[e[i]]=n,o.push(e[i]),t&&r.classes[e[i]]&&o.push(r.classes[e[i]])}var o=[],a=this;return r=u.extend({element:this.element,classes:this.options.classes||{}},r),this._on(r.element,{remove:"_untrackClassesElement"}),r.keys&&e(r.keys.match(/\S+/g)||[],!0),r.extra&&e(r.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(n){var i=this;u.each(i.classesElementLookup,function(e,t){-1!==u.inArray(n.target,t)&&(i.classesElementLookup[e]=u(t.not(n.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var r="string"==typeof e||null===e,o={extra:r?t:n,keys:r?e:t,element:r?this.element:e,add:i};return o.element.toggleClass(this._classes(o),i),this},_on:function(a,s,e){var l,c=this;"boolean"!=typeof a&&(e=s,s=a,a=!1),e?(s=l=u(s),this.bindings=this.bindings.add(s)):(e=s,s=this.element,l=this.widget()),u.each(e,function(e,t){function n(){if(a||!0!==c.options.disabled&&!u(this).hasClass("ui-state-disabled"))return("string"==typeof t?c[t]:t).apply(c,arguments)}"string"!=typeof t&&(n.guid=t.guid=t.guid||n.guid||u.guid++);var i=e.match(/^([\w:-]*)\s*(.*)$/),r=i[1]+c.eventNamespace,o=i[2];o?l.on(r,o,n):s.on(r,n)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(t).off(t),this.bindings=u(this.bindings.not(e).get()),this.focusable=u(this.focusable.not(e).get()),this.hoverable=u(this.hoverable.not(e).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(u(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(u(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(u(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(u(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,t,n){var i,r,o=this.options[e];if(n=n||{},(t=u.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],r=t.originalEvent)for(i in r)i in t||(t[i]=r[i]);return this.element.trigger(t,n),!(u.isFunction(o)&&!1===o.apply(this.element[0],[t].concat(n))||t.isDefaultPrevented())}},u.each({show:"fadeIn",hide:"fadeOut"},function(o,a){u.Widget.prototype["_"+o]=function(t,e,n){var i;"string"==typeof e&&(e={effect:e});var r=e?!0===e||"number"==typeof e?a:e.effect||a:o;"number"==typeof(e=e||{})&&(e={duration:e}),i=!u.isEmptyObject(e),e.complete=n,e.delay&&t.delay(e.delay),i&&u.effects&&u.effects.effect[r]?t[o](e):r!==o&&t[r]?t[r](e.duration,e.easing,n):t.queue(function(e){u(this)[o](),n&&n.call(t[0]),e()})}}),u.widget}),function(e){"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],e):e(jQuery)}(function(r){var o=!1;return r(document).on("mouseup",function(){o=!1}),r.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===r.data(e.target,t.widgetName+".preventClickEvent"))return r.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!o){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var t=this,n=1===e.which,i=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&r(e.target).closest(this.options.cancel).length;return!(n&&!i&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===r.data(e.target,this.widgetName+".preventClickEvent")&&r.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),o=!0))}},_mouseMove:function(e){if(this._mouseMoved){if(r.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&r.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,o=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(i){return i.extend(i.expr[":"],{data:i.expr.createPseudo?i.expr.createPseudo(function(t){return function(e){return!!i.data(e,t)}}):function(e,t,n){return!!i.data(e,n[3])}})}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(o){return o.fn.scrollParent=function(e){var t=this.css("position"),n="absolute"===t,i=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var e=o(this);return(!n||"static"!==e.css("position"))&&i.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&r.length?r:o(this[0].ownerDocument||document)}}),function(e){"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../ie","../scroll-parent","../version","../widget"],e):e(jQuery)}(function(p){return p.widget("ui.sortable",p.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,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(e,t,n){return t<=e&&e<t+n},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),p.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;0<=e;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,t){var n=null,i=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),p(e.target).parents().each(function(){if(p.data(this,r.widgetName+"-item")===r)return n=p(this),!1}),p.data(e.target,r.widgetName+"-item")===r&&(n=p(e.target)),!!n&&(!(this.options.handle&&!t&&(p(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(i=!0)}),!i))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,t,n){var i,r,o=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(e),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},p.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",o.cursor),this.storedStylesheet=p("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(r)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(i=this.containers.length-1;0<=i;i--)this.containers[i]._trigger("activate",e,this._uiHash(this));return p.ui.ddmanager&&(p.ui.ddmanager.current=this),p.ui.ddmanager&&!o.dropBehaviour&&p.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var t,n,i,r,o=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-this.document.scrollTop()<o.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<o.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),e.pageX-this.document.scrollLeft()<o.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),!1!==a&&p.ui.ddmanager&&!o.dropBehaviour&&p.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t=this.items.length-1;0<=t;t--)if(i=(n=this.items[t]).item[0],(r=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(i===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===i||p.contains(this.placeholder[0],i)||"semi-dynamic"===this.options.type&&p.contains(this.element[0],i))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),p.ui.ddmanager&&p.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,t){if(e){if(p.ui.ddmanager&&!this.options.dropBehaviour&&p.ui.ddmanager.drop(this,e),this.options.revert){var n=this,i=this.placeholder.offset(),r=this.options.axis,o={};r&&"x"!==r||(o.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(o.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,p(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,t);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new p.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;0<=e;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),p.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?p(this.domPosition.prev).after(this.currentItem):p(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var e=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},p(e).each(function(){var e=(p(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);e&&n.push((t.key||e[1]+"[]")+"="+(t.key&&t.expression?e[1]:e[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(e){var t=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t.each(function(){n.push(p(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=e.left,a=o+e.width,s=e.top,l=s+e.height,c=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s<i+c&&i+c<l,h="y"===this.options.axis||o<t+u&&t+u<a,p=d&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&s<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t,n,i="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!i||!r)&&(t=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(0<e?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(0<e?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(e){function t(){a.push(this)}var n,i,r,o,a=[],s=[],l=this._connectWith();if(l&&e)for(n=l.length-1;0<=n;n--)for(i=(r=p(l[n],this.document[0])).length-1;0<=i;i--)(o=p.data(r[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&s.push([p.isFunction(o.options.items)?o.options.items.call(o.element):p(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(
  s.push([p.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):p(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=s.length-1;0<=n;n--)s[n][0].each(t);return p(a)},_removeCurrentsFromItems:function(){var n=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=p.grep(this.items,function(e){for(var t=0;t<n.length;t++)if(n[t]===e.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var t,n,i,r,o,a,s,l,c=this.items,u=[[p.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):p(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(t=d.length-1;0<=t;t--)for(n=(i=p(d[t],this.document[0])).length-1;0<=n;n--)(r=p.data(i[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&(u.push([p.isFunction(r.options.items)?r.options.items.call(r.element[0],e,{item:this.currentItem}):p(r.options.items,r.element),r]),this.containers.push(r));for(t=u.length-1;0<=t;t--)for(o=u[t][1],n=0,l=(a=u[t][0]).length;n<l;n++)(s=p(a[n])).data(this.widgetName+"-item",o),c.push({item:s,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var t,n,i,r;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),t=this.items.length-1;0<=t;t--)(n=this.items[t]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?p(this.options.toleranceElement,n.item):n.item,e||(n.width=i.outerWidth(),n.height=i.outerHeight()),r=i.offset(),n.left=r.left,n.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;0<=t;t--)r=this.containers[t].element.offset(),this.containers[t].containerCache.left=r.left,this.containers[t].containerCache.top=r.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(n){var i,r=(n=n||this).options;r.placeholder&&r.placeholder.constructor!==String||(i=r.placeholder,r.placeholder={element:function(){var e=n.currentItem[0].nodeName.toLowerCase(),t=p("<"+e+">",n.document[0]);return n._addClass(t,"ui-sortable-placeholder",i||n.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===e?n._createTrPlaceholder(n.currentItem.find("tr").eq(0),p("<tr>",n.document[0]).appendTo(t)):"tr"===e?n._createTrPlaceholder(n.currentItem,t):"img"===e&&t.attr("src",n.currentItem.attr("src")),i||t.css("visibility","hidden"),t},update:function(e,t){i&&!r.forcePlaceholderSize||(t.height()||t.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}),n.placeholder=p(r.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),r.placeholder.update(n,n.placeholder)},_createTrPlaceholder:function(e,t){var n=this;e.children().each(function(){p("<td>&#160;</td>",n.document[0]).attr("colspan",p(this).attr("colspan")||1).appendTo(t)})},_contactContainers:function(e){var t,n,i,r,o,a,s,l,c,u,d=null,h=null;for(t=this.containers.length-1;0<=t;t--)if(!p.contains(this.currentItem[0],this.containers[t].element[0]))if(this._intersectsWith(this.containers[t].containerCache)){if(d&&p.contains(this.containers[t].element[0],d.element[0]))continue;d=this.containers[t],h=t}else this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",e,this._uiHash(this)),this.containers[t].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[h].containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1);else{for(i=1e4,r=null,o=(c=d.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",u=c?"pageX":"pageY",n=this.items.length-1;0<=n;n--)p.contains(this.containers[h].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(s=this.items[n].item.offset()[o],l=!1,e[u]-s>this.items[n][a]/2&&(l=!0),Math.abs(e[u]-s)<i&&(i=Math.abs(e[u]-s),r=this.items[n],this.direction=l?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[h])return void(this.currentContainer.containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[h].element,!0),this._trigger("change",e,this._uiHash()),this.containers[h]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[h],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1}},_createHelper:function(e){var t=this.options,n=p.isFunction(t.helper)?p(t.helper.apply(this.element[0],[e,this.currentItem])):"clone"===t.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||p("parent"!==t.appendTo?t.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[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")}),n[0].style.width&&!t.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!t.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),p.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&p.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&p.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 e,t,n,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(e=p(i.containment)[0],t=p(i.containment).offset(),n="hidden"!==p(e).css("overflow"),this.containment=[t.left+(parseInt(p(e).css("borderLeftWidth"),10)||0)+(parseInt(p(e).css("paddingLeft"),10)||0)-this.margins.left,t.top+(parseInt(p(e).css("borderTopWidth"),10)||0)+(parseInt(p(e).css("paddingTop"),10)||0)-this.margins.top,t.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(p(e).css("borderLeftWidth"),10)||0)-(parseInt(p(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,t.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(p(e).css("borderTopWidth"),10)||0)-(parseInt(p(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&p.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(i[0].tagName);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:i.scrollTop())*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:i.scrollLeft())*n}},_generatePosition:function(e){var t,n,i=this.options,r=e.pageX,o=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&p.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid&&(t=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1],o=this.containment?t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-i.grid[1]:t+i.grid[1]:t,n=this.originalPageX+Math.round((r-this.originalPageX)/i.grid[0])*i.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-i.grid[0]:n+i.grid[0]:n)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:a.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){function n(t,n,i){return function(e){i._trigger(t,e,n._uiHash(n))}}this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)t||r.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i<r.length;i++)r[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===p.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var t=e||this;return{helper:t.helper,placeholder:t.placeholder||p([]),position:t.position,originalPosition:t.originalPosition,offset:t.positionAbs,item:t.currentItem,sender:e?e.element:null}}})}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(o){return o.ui.plugin={add:function(e,t,n){var i,r=o.ui[e].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([t,n[i]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)e.options[o[r][0]]&&o[r][1].apply(e.element,n)}}}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){return e.ui.safeActiveElement=function(e){var t;try{t=e.activeElement}catch(n){t=e.body}return t||(t=e.body),t.nodeName||(t=e.body),t}}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(t){return t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")}}),function(e){"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../safe-active-element","../safe-blur","../scroll-parent","../version","../widget"],e):e(jQuery)}(function(b){return b.widget("ui.draggable",b.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var t=this.options;return!(this.helper||t.disabled||0<b(e.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===t.iframeFix?"iframe":t.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=b(this);return b("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=b.ui.safeActiveElement(this.document[0]);b(e.target).closest(t).length||b.ui.safeBlur(t)},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),b.ui.ddmanager&&(b.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===b(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),b.ui.ddmanager&&!t.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),b.ui.ddmanager&&b.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(e,t){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!t){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new b.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",b.ui.ddmanager&&b.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var t=this,n=!1;return b.ui.ddmanager&&!this.options.dropBehaviour&&(n=b.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||b.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==t._trigger("stop",e)&&t._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),b.ui.ddmanager&&b.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),b.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new b.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!b(e.target).closest(this.element.find(this.options.handle)).length},_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(e){var t=this.options,n=b.isFunction(t.helper),i=n?b(t.helper.apply(this.element[0],[e])):"clone"===t.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===t.appendTo?this.element[0].parentNode:t.appendTo),n&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),b.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==t&&b.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_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 e,t,n,i=this.options,r=this.document[0];this.relativeContainer=null,i.containment?"window"!==i.containment?"document"!==i.containment?i.containment.constructor!==Array?("parent"===i.containment&&(i.containment=this.helper[0].parentNode),(n=(t=b(i.containment))[0])&&(e=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t)):this.containment=i.containment:this.containment=[0,0,b(r).width()-this.helperProportions.width-this.margins.left,(b(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[b(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,b(window).scrollLeft()+b(window).width()-this.helperProportions.width-this.margins.left,b(window).scrollTop()+(b(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,r,o,a=this.options,s=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),a.grid&&(r=a.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,c=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-a.grid[1]:r+a.grid[1]:r,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,t,n){return n=n||this._uiHash(),b.ui.plugin.call(this,e,[t,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),b.Widget.prototype._trigger.call(this,e,t,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),b.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,n){var i=b.extend({},e,{item:n.element});n.sortables=[],b(n.options.connectToSortable).each(function(){var e=b(this).sortable("instance");e&&!e.options.disabled&&(n.sortables.push(e),e.refreshPositions(),e._trigger("activate",t,i))})},stop:function(t,e,n){var i=b.extend({},e,{item:n.element});n.cancelHelperRemoval=!1,b.each(n.sortables,function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,i))})},drag:function(n,i,r){b.each(r.sortables,function(){var e=!1,t=this;t.positionAbs=r.positionAbs,t.helperProportions=r.helperProportions,t.offset.click=r.offset.click,t._intersectsWith(t.containerCache)&&(e=!0,b.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==t&&this._intersectsWith(this.containerCache)&&b.contains(t.element[0],this.element[0])&&(e=!1),e})),e?(t.isOver||(t.isOver=1,r._parent=i.helper.parent(),t.currentItem=i.helper.appendTo(t.element).data("ui-sortable-item",!0),t.options._helper=t.options.helper,t.options.helper=function(){return i.helper[0]},n.target=t.currentItem[0],t._mouseCapture(n,!0),t._mouseStart(n,!0,!0),t.offset.click.top=r.offset.click.top,t.offset.click.left=r.offset.click.left,t.offset.parent.left-=r.offset.parent.left-t.offset.parent.left,t.offset.parent.top-=r.offset.parent.top-t.offset.parent.top,r._trigger("toSortable",n),r.dropped=t.element,b.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,t.fromOutside=r),t.currentItem&&(t._mouseDrag(n),i.position=t.position)):t.isOver&&(t.isOver=0,t.cancelHelperRemoval=!0,t.options._revert=t.options.revert,t.options.revert=!1,t._trigger("out",n,t._uiHash(t)),t._mouseStop(n,!0),t.options.revert=t.options._revert,t.options.helper=t.options._helper,t.placeholder&&t.placeholder.remove(),i.helper.appendTo(r._parent),r._refreshOffsets(n),i.position=r._generatePosition(n,!0),r._trigger("fromSortable",n),r.dropped=!1,b.each(r.sortables,function(){this.refreshPositions()}))})}}),b.ui.plugin.add("draggable","cursor",{start:function(e,t,n){var i=b("body"),r=n.options;i.css("cursor")&&(r._cursor=i.css("cursor")),i.css("cursor",r.cursor)},stop:function(e,t,n){var i=n.options;i._cursor&&b("body").css("cursor",i._cursor)}}),b.ui.plugin.add("draggable","opacity",{start:function(e,t,n){var i=b(t.helper),r=n.options;i.css("opacity")&&(r._opacity=i.css("opacity")),i.css("opacity",r.opacity)},stop:function(e,t,n){var i=n.options;i._opacity&&b(t.helper).css("opacity",i._opacity)}}),b.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,t,n){var i=n.options,r=!1,o=n.scrollParentNotHidden[0],a=n.document[0];o!==a&&"HTML"!==o.tagName?(i.axis&&"x"===i.axis||(n.overflowOffset.top+o.offsetHeight-e.pageY<i.scrollSensitivity?o.scrollTop=r=o.scrollTop+i.scrollSpeed:e.pageY-n.overflowOffset.top<i.scrollSensitivity&&(o.scrollTop=r=o.scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(n.overflowOffset.left+o.offsetWidth-e.pageX<i.scrollSensitivity?o.scrollLeft=r=o.scrollLeft+i.scrollSpeed:e.pageX-n.overflowOffset.left<i.scrollSensitivity&&(o.scrollLeft=r=o.scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(e.pageY-b(a).scrollTop()<i.scrollSensitivity?r=b(a).scrollTop(b(a).scrollTop()-i.scrollSpeed):b(window).height()-(e.pageY-b(a).scrollTop())<i.scrollSensitivity&&(r=b(a).scrollTop(b(a).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(e.pageX-b(a).scrollLeft()<i.scrollSensitivity?r=b(a).scrollLeft(b(a).scrollLeft()-i.scrollSpeed):b(window).width()-(e.pageX-b(a).scrollLeft())<i.scrollSensitivity&&(r=b(a).scrollLeft(b(a).scrollLeft()+i.scrollSpeed)))),!1!==r&&b.ui.ddmanager&&!i.dropBehaviour&&b.ui.ddmanager.prepareOffsets(n,e)}}),b.ui.plugin.add("draggable","snap",{start:function(e,t,n){var i=n.options;n.snapElements=[],b(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var e=b(this),t=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:t.top,left:t.left})})},drag:function(e,t,n){var i,r,o,a,s,l,c,u,d,h,p=n.options,f=p.snapTolerance,m=t.offset.left,g=m+n.helperProportions.width,v=t.offset.top,y=v+n.helperProportions.height;for(d=n.snapElements.length-1;0<=d;d--)l=(s=n.snapElements[d].left-n.margins.left)+n.snapElements[d].width,u=(c=n.snapElements[d].top-n.margins.top)+n.snapElements[d].height,g<s-f||l+f<m||y<c-f||u+f<v||!b.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,b.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==p.snapMode&&(i=Math.abs(c-y)<=f,r=Math.abs(u-v)<=f,o=Math.abs(s-g)<=f,a=Math.abs(l-m)<=f,i&&(t.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(t.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s-n.helperProportions.width}).left),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l}).left)),h=i||r||o||a,"outer"!==p.snapMode&&(i=Math.abs(c-v)<=f,r=Math.abs(u-y)<=f,o=Math.abs(s-m)<=f,a=Math.abs(l-g)<=f,i&&(t.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(t.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s}).left),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(i||r||o||a||h)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,b.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=i||r||o||a||h)}}),b.ui.plugin.add("draggable","stack",{start:function(e,t,n){var i,r=n.options,o=b.makeArray(b(r.stack)).sort(function(e,t){return(parseInt(b(e).css("zIndex"),10)||0)-(parseInt(b(t).css("zIndex"),10)||0)});o.length&&(i=parseInt(b(o[0]).css("zIndex"),10)||0,b(o).each(function(e){b(this).css("zIndex",i+e)}),this.css("zIndex",i+o.length))}}),b.ui.plugin.add("draggable","zIndex",{
  start:function(e,t,n){var i=b(t.helper),r=n.options;i.css("zIndex")&&(r._zIndex=i.css("zIndex")),i.css("zIndex",r.zIndex)},stop:function(e,t,n){var i=n.options;i._zIndex&&b(t.helper).css("zIndex",i._zIndex)}}),b.ui.draggable}),function(e){"function"==typeof define&&define.amd?define(["jquery","./draggable","./mouse","../version","../widget"],e):e(jQuery)}(function(s){s.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,n=e.accept;this.isover=!1,this.isout=!0,this.accept=s.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(e){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=e},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){s.ui.ddmanager.droppables[e]=s.ui.ddmanager.droppables[e]||[],s.ui.ddmanager.droppables[e].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var e=s.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,t){if("accept"===e)this.accept=s.isFunction(t)?t:function(e){return e.is(t)};else if("scope"===e){var n=s.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(t)}this._super(e,t)},_activate:function(e){var t=s.ui.ddmanager.current;this._addActiveClass(),t&&this._trigger("activate",e,this.ui(t))},_deactivate:function(e){var t=s.ui.ddmanager.current;this._removeActiveClass(),t&&this._trigger("deactivate",e,this.ui(t))},_over:function(e){var t=s.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(t)))},_out:function(e){var t=s.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(t)))},_drop:function(t,e){var n=e||s.ui.ddmanager.current,i=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=s(this).droppable("instance");if(e.options.greedy&&!e.options.disabled&&e.options.scope===n.options.scope&&e.accept.call(e.element[0],n.currentItem||n.element)&&l(n,s.extend(e,{offset:e.element.offset()}),e.options.tolerance,t))return!(i=!0)}),!i&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(n)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.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 l=s.ui.intersect=function(){function h(e,t,n){return t<=e&&e<t+n}return function(e,t,n,i){if(!t.offset)return!1;var r=(e.positionAbs||e.position.absolute).left+e.margins.left,o=(e.positionAbs||e.position.absolute).top+e.margins.top,a=r+e.helperProportions.width,s=o+e.helperProportions.height,l=t.offset.left,c=t.offset.top,u=l+t.proportions().width,d=c+t.proportions().height;switch(n){case"fit":return l<=r&&a<=u&&c<=o&&s<=d;case"intersect":return l<r+e.helperProportions.width/2&&a-e.helperProportions.width/2<u&&c<o+e.helperProportions.height/2&&s-e.helperProportions.height/2<d;case"pointer":return h(i.pageY,c,t.proportions().height)&&h(i.pageX,l,t.proportions().width);case"touch":return(c<=o&&o<=d||c<=s&&s<=d||o<c&&d<s)&&(l<=r&&r<=u||l<=a&&a<=u||r<l&&u<a);default:return!1}}}();return!(s.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,t){var n,i,r=s.ui.ddmanager.droppables[e.options.scope]||[],o=t?t.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<r.length;n++)if(!(r[n].options.disabled||e&&!r[n].accept.call(r[n].element[0],e.currentItem||e.element))){for(i=0;i<a.length;i++)if(a[i]===r[n].element[0]){r[n].proportions().height=0;continue e}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===o&&r[n]._activate.call(r[n],t),r[n].offset=r[n].element.offset(),r[n].proportions({width:r[n].element[0].offsetWidth,height:r[n].element[0].offsetHeight}))}},drop:function(e,t){var n=!1;return s.each((s.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&l(e,this,this.options.tolerance,t)&&(n=this._drop.call(this,t)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,t)))}),n},dragStart:function(e,t){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||s.ui.ddmanager.prepareOffsets(e,t)})},drag:function(o,a){o.options.refreshPositions&&s.ui.ddmanager.prepareOffsets(o,a),s.each(s.ui.ddmanager.droppables[o.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e,t,n,i=l(o,this,this.options.tolerance,a),r=!i&&this.isover?"isout":i&&!this.isover?"isover":null;r&&(this.options.greedy&&(t=this.options.scope,(n=this.element.parents(":data(ui-droppable)").filter(function(){return s(this).droppable("instance").options.scope===t})).length&&((e=s(n[0]).droppable("instance")).greedyChild="isover"===r)),e&&"isover"===r&&(e.isover=!1,e.isout=!0,e._out.call(e,a)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,a),e&&"isout"===r&&(e.isout=!1,e.isover=!0,e._over.call(e,a)))}})},dragStop:function(e,t){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||s.ui.ddmanager.prepareOffsets(e,t)}})!==s.uiBackCompat&&s.widget("ui.droppable",s.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),s.ui.droppable}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){return e.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}}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function($){return function(){function k(e,t,n){return[parseFloat(e[0])*(l.test(e[0])?t/100:1),parseFloat(e[1])*(l.test(e[1])?n/100:1)]}function _(e,t){return parseInt($.css(e,t),10)||0}function t(e){var t=e[0];return 9===t.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:$.isWindow(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var r,C=Math.max,S=Math.abs,i=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,l=/%$/,n=$.fn.position;$.position={scrollbarWidth:function(){if(r!==undefined)return r;var e,t,n=$("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),i=n.children()[0];return $("body").append(n),e=i.offsetWidth,n.css("overflow","scroll"),e===(t=i.offsetWidth)&&(t=n[0].clientWidth),n.remove(),r=e-t},getScrollInfo:function(e){var t=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),i="scroll"===t||"auto"===t&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?$.position.scrollbarWidth():0,height:i?$.position.scrollbarWidth():0}},getWithinInfo:function(e){var t=$(e||window),n=$.isWindow(t[0]),i=!!t[0]&&9===t[0].nodeType;return{element:t,isWindow:n,isDocument:i,offset:!n&&!i?$(e).offset():{left:0,top:0},scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop(),width:t.outerWidth(),height:t.outerHeight()}}},$.fn.position=function(d){if(!d||!d.of)return n.apply(this,arguments);d=$.extend({},d);var h,p,f,m,g,e,v=$(d.of),y=$.position.getWithinInfo(d.within),b=$.position.getScrollInfo(y),x=(d.collision||"flip").split(" "),w={};return e=t(v),v[0].preventDefault&&(d.at="left top"),p=e.width,f=e.height,m=e.offset,g=$.extend({},m),$.each(["my","at"],function(){var e,t,n=(d[this]||"").split(" ");1===n.length&&(n=i.test(n[0])?n.concat(["center"]):o.test(n[0])?["center"].concat(n):["center","center"]),n[0]=i.test(n[0])?n[0]:"center",n[1]=o.test(n[1])?n[1]:"center",e=a.exec(n[0]),t=a.exec(n[1]),w[this]=[e?e[0]:0,t?t[0]:0],d[this]=[s.exec(n[0])[0],s.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===d.at[0]?g.left+=p:"center"===d.at[0]&&(g.left+=p/2),"bottom"===d.at[1]?g.top+=f:"center"===d.at[1]&&(g.top+=f/2),h=k(w.at,p,f),g.left+=h[0],g.top+=h[1],this.each(function(){var n,e,a=$(this),s=a.outerWidth(),l=a.outerHeight(),t=_(this,"marginLeft"),i=_(this,"marginTop"),r=s+t+_(this,"marginRight")+b.width,o=l+i+_(this,"marginBottom")+b.height,c=$.extend({},g),u=k(w.my,a.outerWidth(),a.outerHeight());"right"===d.my[0]?c.left-=s:"center"===d.my[0]&&(c.left-=s/2),"bottom"===d.my[1]?c.top-=l:"center"===d.my[1]&&(c.top-=l/2),c.left+=u[0],c.top+=u[1],n={marginLeft:t,marginTop:i},$.each(["left","top"],function(e,t){$.ui.position[x[e]]&&$.ui.position[x[e]][t](c,{targetWidth:p,targetHeight:f,elemWidth:s,elemHeight:l,collisionPosition:n,collisionWidth:r,collisionHeight:o,offset:[h[0]+u[0],h[1]+u[1]],my:d.my,at:d.at,within:y,elem:a})}),d.using&&(e=function(e){var t=m.left-c.left,n=t+p-s,i=m.top-c.top,r=i+f-l,o={target:{element:v,left:m.left,top:m.top,width:p,height:f},element:{element:a,left:c.left,top:c.top,width:s,height:l},horizontal:n<0?"left":0<t?"right":"center",vertical:r<0?"top":0<i?"bottom":"middle"};p<s&&S(t+n)<p&&(o.horizontal="center"),f<l&&S(i+r)<f&&(o.vertical="middle"),C(S(t),S(n))>C(S(i),S(r))?o.important="horizontal":o.important="vertical",d.using.call(this,e,o)}),a.offset($.extend(c,{using:e}))})},$.ui.position={fit:{left:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=e.left-t.collisionPosition.marginLeft,s=r-a,l=a+t.collisionWidth-o-r;t.collisionWidth>o?0<s&&l<=0?(n=e.left+s+t.collisionWidth-o-r,e.left+=s-n):e.left=0<l&&s<=0?r:l<s?r+o-t.collisionWidth:r:0<s?e.left+=s:0<l?e.left-=l:e.left=C(e.left-a,e.left)},top:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,s=r-a,l=a+t.collisionHeight-o-r;t.collisionHeight>o?0<s&&l<=0?(n=e.top+s+t.collisionHeight-o-r,e.top+=s-n):e.top=0<l&&s<=0?r:l<s?r+o-t.collisionHeight:r:0<s?e.top+=s:0<l?e.top-=l:e.top=C(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,o=r.offset.left+r.scrollLeft,a=r.width,s=r.isWindow?r.scrollLeft:r.offset.left,l=e.left-t.collisionPosition.marginLeft,c=l-s,u=l+t.collisionWidth-a-s,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,h="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];c<0?((n=e.left+d+h+p+t.collisionWidth-a-o)<0||n<S(c))&&(e.left+=d+h+p):0<u&&(0<(i=e.left-t.collisionPosition.marginLeft+d+h+p-s)||S(i)<u)&&(e.left+=d+h+p)},top:function(e,t){var n,i,r=t.within,o=r.offset.top+r.scrollTop,a=r.height,s=r.isWindow?r.scrollTop:r.offset.top,l=e.top-t.collisionPosition.marginTop,c=l-s,u=l+t.collisionHeight-a-s,d="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,h="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,p=-2*t.offset[1];c<0?((i=e.top+d+h+p+t.collisionHeight-a-o)<0||i<S(c))&&(e.top+=d+h+p):0<u&&(0<(n=e.top-t.collisionPosition.marginTop+d+h+p-s)||S(n)<u)&&(e.top+=d+h+p)}},flipfit:{left:function(){$.ui.position.flip.left.apply(this,arguments),$.ui.position.fit.left.apply(this,arguments)},top:function(){$.ui.position.flip.top.apply(this,arguments),$.ui.position.fit.top.apply(this,arguments)}}}}(),$.ui.position}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){return e.fn.extend({uniqueId:(t=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}});var t}),function(e){"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../safe-active-element","../unique-id","../version","../widget"],e):e(jQuery)}(function(s){return s.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=!1,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(e){e.preventDefault()},"click .ui-menu-item":function(e){var t=s(e.target),n=s(s.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var t=s(e.target).closest(".ui-menu-item"),n=s(e.currentTarget);t[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(e){this._delay(function(){!s.contains(this.element[0],s.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").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(),e.children().each(function(){var e=s(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var t,n,i,r,o=!0;switch(e.keyCode){case s.ui.keyCode.PAGE_UP:this.previousPage(e);break;case s.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case s.ui.keyCode.HOME:this._move("first","first",e);break;case s.ui.keyCode.END:this._move("last","last",e);break;case s.ui.keyCode.UP:this.previous(e);break;case s.ui.keyCode.DOWN:this.next(e);break;case s.ui.keyCode.LEFT:this.collapse(e);break;case s.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case s.ui.keyCode.ENTER:case s.ui.keyCode.SPACE:this._activate(e);break;case s.ui.keyCode.ESCAPE:this.collapse(e);break;default:o=!1,n=this.previousFilter||"",r=!1,i=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),i===n?r=!0:i=n+i,t=this._filterMenuItems(i),(t=r&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),t=this._filterMenuItems(i)),t.length?(this.focus(e,t),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&e.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e,t,n,i,r=this,o=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=s(this),t=e.prev(),n=s("<span>").data("ui-menu-submenu-caret",!0);r._addClass(n,"ui-menu-icon","ui-icon "+o),t.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(e=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=s(this);r._isDivider(e)&&r._addClass(e,"ui-menu-divider","ui-widget-content")}),i=(n=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!s.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var n,i,r;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),r=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,n,i,r,o,a;this._hasScroll()&&(t=parseFloat(s.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(s.css(this.activeMenu[0],"paddingTop"))||0,i=e.offset().top-this.activeMenu.offset().top-t-n,r=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=e.outerHeight(),i<0?this.activeMenu.scrollTop(r+i):o<i+a&&this.activeMenu.scrollTop(r+i-o+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=s.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var e=n?this.element:s(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this._removeClass(e.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=e},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!s(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},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(e,t,n){var i;this.active&&(i="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[t]()),this.focus(n,i)},nextPage:function(e){var t,n,i;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(t=s(this)).offset().top-n-i<0}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,n,i;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=s(this)).offset().top-n+i}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||s(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var t=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(s.trim(s(this).children(".ui-menu-item-wrapper").text()))})}})}),function(e){"function"==typeof define&&define.amd?define(["jquery","./menu","../keycode","../position","../safe-active-element","../version","../widget"],e):e(jQuery)}(function(a){return a.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,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 n,i,r,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,o="input"===e;this.isMultiLine=t||!o&&this._isContentEditable(this.element),this.valueMethod=this.element[t||o?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))i=r=n=!0;else{i=r=n=!1;var t=a.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:n=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:n=!0,this._move("nextPage",e);break;case t.UP:n=!0,this._keyEvent("previous",e);break;case t.DOWN:n=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(n=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:i=!0,this._searchTimeout(e)}}},keypress:function(e){if(n)return n=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault());if(!i){var t=a.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){if(r)return r=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=a("<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(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==a.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,t){var n,i;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){a(e.target).trigger(e.originalEvent)});i=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:i})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(i.value),(n=t.item.attr("aria-label")||i.value)&&a.trim(n).length&&(this.liveRegion.children().hide(),a("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==a.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=a("<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(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var t=this.menu.element[0];return e.target===this.element[0]||e.target===t||a.contains(t,e.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?a(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var n,i,r=this;a.isArray(this.options.source)?(n=this.options.source,this.source=function(e,t){t(a.ui.autocomplete.filter(n,e.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,t){r.xhr&&r.xhr.abort(),r.xhr=a.ajax({url:i,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(i){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),n=i.altKey||i.ctrlKey||i.metaKey||i.shiftKey;e&&(!e||t||n)||(this.selectedItem=null,this.search(null,i))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return a.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:a.map(e,function(e){return"string"==typeof e?{label:e,value:e}:a.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(n,e){var i=this;a.each(e,function(e,t){i._renderItemData(n,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return a("<li>").append(a("<div>").text(t.label)).appendTo(e)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),a.extend(a.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var n=new RegExp(a.ui.autocomplete.escapeRegex(t),"i");return a.grep(e,function(e){return n.test(e.label||e.value||e)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),a("<div>").text(t).appendTo(this.liveRegion))}}),a.ui.autocomplete}),function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var n=window.Cookies,i=window.Cookies=e();i.noConflict=function(){return window.Cookies=n,i}}}(function(){function g(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]=n[i]}return t}function e(f){function m(e,t,n){var i;if("undefined"!=typeof document){if(1<arguments.length){if("number"==typeof(n=g({path:"/"},m.defaults,n)).expires){var r=new Date;r.setMilliseconds(r.getMilliseconds()+864e5*n.expires),n.expires=r}n.expires=n.expires?n.expires.toUTCString():"";try{i=JSON.stringify(t),/^[\{\[]/.test(i)&&(t=i)}catch(p){}t=f.write?f.write(t,e):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var o="";for(var a in n)n[a]&&(o+="; "+a,!0!==n[a]&&(o+="="+n[a]));return document.cookie=e+"="+t+o}e||(i={});for(var s=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,c=0;c<s.length;c++){var u=s[c].split("="),d=u.slice(1).join("=");this.json||'"'!==d.charAt(0)||(d=d.slice(1,-1));try{var h=u[0].replace(l,decodeURIComponent);if(d=f.read?f.read(d,h):f(d,h)||d.replace(l,decodeURIComponent),this.json)try{d=JSON.parse(d)}catch(p){}if(e===h){i=d;break}e||(i[h]=d)}catch(p){}}return i}}return(m.set=m).get=function(e){return m.call(m,e)},m.getJSON=function(){return m.apply({json:!0},[].slice.call(arguments))},m.defaults={},m.remove=function(e,t){m(e,"",g(t,{expires:-1}))},m.withConverter=e,m}return e(function(){})}),function(L){"use strict";function n(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),L(this).ajaxSubmit(t))}function i(e){var t=e.target,n=L(t);if(!n.is(":submit,input:image")){var i=n.closest(":submit");if(0===i.length)return;t=i[0]
  }var r=this;if("image"==(r.clk=t).type)if(e.offsetX!==undefined)r.clk_x=e.offsetX,r.clk_y=e.offsetY;else if("function"==typeof L.fn.offset){var o=n.offset();r.clk_x=e.pageX-o.left,r.clk_y=e.pageY-o.top}else r.clk_x=e.pageX-t.offsetLeft,r.clk_y=e.pageY-t.offsetTop;setTimeout(function(){r.clk=r.clk_x=r.clk_y=null},100)}function O(){if(L.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var v={};v.fileapi=L("<input type='file'/>").get(0).files!==undefined,v.formdata=window.FormData!==undefined,L.fn.ajaxSubmit=function(D){function e(e){for(var n=new FormData,t=0;t<e.length;t++)n.append(e[t].name,e[t].value);if(D.extraData)for(var i in D.extraData)D.extraData.hasOwnProperty(i)&&n.append(i,D.extraData[i]);D.data=null;var r=L.extend(!0,{},L.ajaxSettings,D,{contentType:!1,processData:!1,cache:!1,type:"POST"});D.uploadProgress&&(r.xhr=function(){var e=jQuery.ajaxSettings.xhr();return e.upload&&(e.upload.onprogress=function(e){var t=0,n=e.loaded||e.position,i=e.total;e.lengthComputable&&(t=Math.ceil(n/i*100)),D.uploadProgress(e,n,i,t)}),e}),r.data=null;var o=r.beforeSend;r.beforeSend=function(e,t){t.data=n,o&&o.call(t,e,D)},L.ajax(r)}function t(e){function d(e){return e.contentWindow?e.contentWindow.document:e.contentDocument?e.contentDocument:e.document}function t(){function n(){try{var e=d(g).readyState;O("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(n,50)}catch(t){O("Server abort: ",t," (",t.name,")"),h(w),b&&clearTimeout(b),b=undefined}}var e=I.attr("target"),t=I.attr("action");s.setAttribute("target",o),E||s.setAttribute("method","POST"),t!=p.url&&s.setAttribute("action",p.url),p.skipEncodingOverride||E&&!/post/i.test(E)||I.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),p.timeout&&(b=setTimeout(function(){y=!0,h(x)},p.timeout));var i=[];try{if(p.extraData)for(var r in p.extraData)p.extraData.hasOwnProperty(r)&&i.push(L('<input type="hidden" name="'+r+'">').attr("value",p.extraData[r]).appendTo(s)[0]);p.iframeTarget||(m.appendTo("body"),g.attachEvent?g.attachEvent("onload",h):g.addEventListener("load",h,!1)),setTimeout(n,15),s.submit()}finally{s.setAttribute("action",t),e?s.setAttribute("target",e):I.removeAttr("target"),L(i).remove()}}function h(e){if(!v.aborted&&!C){try{_=d(g)}catch(u){O("cannot access response document: ",u),e=w}if(e===x&&v)v.abort("timeout");else if(e==w&&v)v.abort("server abort");else if(_&&_.location.href!=p.iframeSrc||y){g.detachEvent?g.detachEvent("onload",h):g.removeEventListener("load",h,!1);var t,n="success";try{if(y)throw"timeout";var i="xml"==p.dataType||_.XMLDocument||L.isXMLDoc(_);if(O("isXml="+i),!i&&window.opera&&(null===_.body||!_.body.innerHTML)&&--S)return O("requeing onLoad callback, DOM not available"),void setTimeout(h,250);var r=_.body?_.body:_.documentElement;v.responseText=r?r.innerHTML:null,v.responseXML=_.XMLDocument?_.XMLDocument:_,i&&(p.dataType="xml"),v.getResponseHeader=function(e){return{"content-type":p.dataType}[e]},r&&(v.status=Number(r.getAttribute("status"))||v.status,v.statusText=r.getAttribute("statusText")||v.statusText);var o=(p.dataType||"").toLowerCase(),a=/(json|script|text)/.test(o);if(a||p.textarea){var s=_.getElementsByTagName("textarea")[0];if(s)v.responseText=s.value,v.status=Number(s.getAttribute("status"))||v.status,v.statusText=s.getAttribute("statusText")||v.statusText;else if(a){var l=_.getElementsByTagName("pre")[0],c=_.getElementsByTagName("body")[0];l?v.responseText=l.textContent?l.textContent:l.innerText:c&&(v.responseText=c.textContent?c.textContent:c.innerText)}}else"xml"==o&&!v.responseXML&&v.responseText&&(v.responseXML=$(v.responseText));try{k=M(v,o,p)}catch(e){n="parsererror",v.error=t=e||n}}catch(e){O("error caught: ",e),n="error",v.error=t=e||n}v.aborted&&(O("upload aborted"),n=null),v.status&&(n=200<=v.status&&v.status<300||304===v.status?"success":"error"),"success"===n?(p.success&&p.success.call(p.context,k,"success",v),f&&L.event.trigger("ajaxSuccess",[v,p])):n&&(t===undefined&&(t=v.statusText),p.error&&p.error.call(p.context,v,n,t),f&&L.event.trigger("ajaxError",[v,p,t])),f&&L.event.trigger("ajaxComplete",[v,p]),f&&!--L.active&&L.event.trigger("ajaxStop"),p.complete&&p.complete.call(p.context,v,n),C=!0,p.timeout&&clearTimeout(b),setTimeout(function(){p.iframeTarget||m.remove(),v.responseXML=null},100)}}}var n,i,p,f,o,m,g,v,r,a,y,b,s=I[0],l=!!L.fn.prop;if(L(":input[name=submit],:input[id=submit]",s).length)alert('Error: Form elements must not have name or id of "submit".');else{if(e)for(i=0;i<P.length;i++)n=L(P[i]),l?n.prop("disabled",!1):n.removeAttr("disabled");if((p=L.extend(!0,{},L.ajaxSettings,D)).context=p.context||p,o="jqFormIO"+(new Date).getTime(),p.iframeTarget?(a=(m=L(p.iframeTarget)).attr("name"))?o=a:m.attr("name",o):(m=L('<iframe name="'+o+'" src="'+p.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),g=m[0],v={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";O("aborting upload... "+t),this.aborted=1,m.attr("src",p.iframeSrc),v.error=t,p.error&&p.error.call(p.context,v,t,e),f&&L.event.trigger("ajaxError",[v,p,t]),p.complete&&p.complete.call(p.context,v,t)}},(f=p.global)&&0==L.active++&&L.event.trigger("ajaxStart"),f&&L.event.trigger("ajaxSend",[v,p]),p.beforeSend&&!1===p.beforeSend.call(p.context,v,p))p.global&&L.active--;else if(!v.aborted){(r=s.clk)&&(a=r.name)&&!r.disabled&&(p.extraData=p.extraData||{},p.extraData[a]=r.value,"image"==r.type&&(p.extraData[a+".x"]=s.clk_x,p.extraData[a+".y"]=s.clk_y));var x=1,w=2,c=L("meta[name=csrf-token]").attr("content"),u=L("meta[name=csrf-param]").attr("content");u&&c&&(p.extraData=p.extraData||{},p.extraData[u]=c),p.forceSync?t():setTimeout(t,10);var k,_,C,S=50,$=L.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},T=L.parseJSON||function(e){return window.eval("("+e+")")},M=function(e,t,n){var i=e.getResponseHeader("content-type")||"",r="xml"===t||!t&&0<=i.indexOf("xml"),o=r?e.responseXML:e.responseText;return r&&"parsererror"===o.documentElement.nodeName&&L.error&&L.error("parsererror"),n&&n.dataFilter&&(o=n.dataFilter(o,t)),"string"==typeof o&&("json"===t||!t&&0<=i.indexOf("json")?o=T(o):("script"===t||!t&&0<=i.indexOf("javascript"))&&L.globalEval(o)),o}}}}if(!this.length)return O("ajaxSubmit: skipping submit process - no element selected"),this;var E,n,i,I=this;"function"==typeof D&&(D={success:D}),E=this.attr("method"),(i=(i="string"==typeof(n=this.attr("action"))?L.trim(n):"")||window.location.href||"")&&(i=(i.match(/^([^#]+)/)||[])[1]),D=L.extend(!0,{url:i,success:L.ajaxSettings.success,type:E||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},D);var r={};if(this.trigger("form-pre-serialize",[this,D,r]),r.veto)return O("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(D.beforeSerialize&&!1===D.beforeSerialize(this,D))return O("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var o=D.traditional;o===undefined&&(o=L.ajaxSettings.traditional);var a,P=[],s=this.formToArray(D.semantic,P);if(D.data&&(D.extraData=D.data,a=L.param(D.data,o)),D.beforeSubmit&&!1===D.beforeSubmit(s,this,D))return O("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[s,this,D,r]),r.veto)return O("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var l=L.param(s,o);a&&(l=l?l+"&"+a:a),"GET"==D.type.toUpperCase()?(D.url+=(0<=D.url.indexOf("?")?"&":"?")+l,D.data=null):D.data=l;var c=[];if(D.resetForm&&c.push(function(){I.resetForm()}),D.clearForm&&c.push(function(){I.clearForm(D.includeHidden)}),!D.dataType&&D.target){var u=D.success||function(){};c.push(function(e){var t=D.replaceTarget?"replaceWith":"html";L(D.target)[t](e).each(u,arguments)})}else D.success&&c.push(D.success);D.success=function(e,t,n){for(var i=D.context||D,r=0,o=c.length;r<o;r++)c[r].apply(i,[e,t,n||I,I])};var d=0<L("input:file:enabled[value]",this).length,h="multipart/form-data",p=I.attr("enctype")==h||I.attr("encoding")==h,f=v.fileapi&&v.formdata;O("fileAPI :"+f);var m=(d||p)&&!f;!1!==D.iframe&&(D.iframe||m)?D.closeKeepAlive?L.get(D.closeKeepAlive,function(){t(s)}):t(s):(d||p)&&f?e(s):L.ajax(D);for(var g=0;g<P.length;g++)P[g]=null;return this.trigger("form-submit-notify",[this,D]),this},L.fn.ajaxForm=function(e){if((e=e||{}).delegation=e.delegation&&L.isFunction(L.fn.on),!e.delegation&&0===this.length){var t={s:this.selector,c:this.context};return!L.isReady&&t.s?(O("DOM not ready, queuing ajaxForm"),L(function(){L(t.s,t.c).ajaxForm(e)})):O("terminating; zero elements found by selector"+(L.isReady?"":" (DOM not ready)")),this}return e.delegation?(L(document).off("submit.form-plugin",this.selector,n).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,e,n).on("click.form-plugin",this.selector,e,i),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,n).bind("click.form-plugin",e,i)},L.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},L.fn.formToArray=function(e,t){var n=[];if(0===this.length)return n;var i,r,o,a,s,l,c,u=this[0],d=e?u.getElementsByTagName("*"):u.elements;if(!d)return n;for(i=0,l=d.length;i<l;i++)if(o=(s=d[i]).name)if(e&&u.clk&&"image"==s.type)s.disabled||u.clk!=s||(n.push({name:o,value:L(s).val(),type:s.type}),n.push({name:o+".x",value:u.clk_x},{name:o+".y",value:u.clk_y}));else if((a=L.fieldValue(s,!0))&&a.constructor==Array)for(t&&t.push(s),r=0,c=a.length;r<c;r++)n.push({name:o,value:a[r]});else if(v.fileapi&&"file"==s.type&&!s.disabled){t&&t.push(s);var h=s.files;if(h.length)for(r=0;r<h.length;r++)n.push({name:o,value:h[r],type:s.type});else n.push({name:o,value:"",type:s.type})}else null!=a&&(t&&t.push(s),n.push({name:o,value:a,type:s.type,required:s.required}));if(!e&&u.clk){var p=L(u.clk),f=p[0];(o=f.name)&&!f.disabled&&"image"==f.type&&(n.push({name:o,value:p.val()}),n.push({name:o+".x",value:u.clk_x},{name:o+".y",value:u.clk_y}))}return n},L.fn.formSerialize=function(e){return L.param(this.formToArray(e))},L.fn.fieldSerialize=function(r){var o=[];return this.each(function(){var e=this.name;if(e){var t=L.fieldValue(this,r);if(t&&t.constructor==Array)for(var n=0,i=t.length;n<i;n++)o.push({name:e,value:t[n]});else null!=t&&o.push({name:this.name,value:t})}}),L.param(o)},L.fn.fieldValue=function(e){for(var t=[],n=0,i=this.length;n<i;n++){var r=this[n],o=L.fieldValue(r,e);null==o||o.constructor==Array&&!o.length||(o.constructor==Array?L.merge(t,o):t.push(o))}return t},L.fieldValue=function(e,t){var n=e.name,i=e.type,r=e.tagName.toLowerCase();if(t===undefined&&(t=!0),t&&(!n||e.disabled||"reset"==i||"button"==i||("checkbox"==i||"radio"==i)&&!e.checked||("submit"==i||"image"==i)&&e.form&&e.form.clk!=e||"select"==r&&-1==e.selectedIndex))return null;if("select"==r){var o=e.selectedIndex;if(o<0)return null;for(var a=[],s=e.options,l="select-one"==i,c=l?o+1:s.length,u=l?o:0;u<c;u++){var d=s[u];if(d.selected){var h=d.value;if(h||(h=d.attributes&&d.attributes.value&&!d.attributes.value.specified?d.text:d.value),l)return h;a.push(h)}}return a}return L(e).val()},L.fn.clearForm=function(e){return this.each(function(){L("input,select,textarea",this).clearFields(e)})},L.fn.clearFields=L.fn.clearInputs=function(n){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();i.test(e)||"textarea"==t?this.value="":"checkbox"==e||"radio"==e?this.checked=!1:"select"==t?this.selectedIndex=-1:n&&(!0===n&&/hidden/.test(e)||"string"==typeof n&&L(this).is(n))&&(this.value="")})},L.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},L.fn.enable=function(e){return e===undefined&&(e=!0),this.each(function(){this.disabled=!e})},L.fn.selected=function(n){return n===undefined&&(n=!0),this.each(function(){var e=this.type;if("checkbox"==e||"radio"==e)this.checked=n;else if("option"==this.tagName.toLowerCase()){var t=L(this).parent("select");n&&t[0]&&"select-one"==t[0].type&&t.find("option").selected(!1),this.selected=n}})},L.fn.ajaxSubmit.debug=!1}(jQuery),function(){"use strict";var v,s,r,i,l,c;l=864e5,c=3600,v=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},s=function(e,t,n){var i=n||"0",r=e.toString();return r.length<t?s(i+r,t):r},r=function(e){var t,n;for(e=e||{},t=1;t<arguments.length;t++)if(n=arguments[t])for(var i in n)n.hasOwnProperty(i)&&("object"==typeof n[i]?r(e[i],n[i]):e[i]=n[i]);return e},i={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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"],meridiem:["AM","PM"],ordinal:function(e){var t=e%10,n={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(e%100/10)&&n[t]?n[t]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},(DateFormatter=function(e){var t=this,n=r(i,e);t.dateSettings=n.dateSettings,t.separators=n.separators,t.validParts=n.validParts,t.intParts=n.intParts,t.tzParts=n.tzParts,t.tzClip=n.tzClip}).prototype={constructor:DateFormatter,parseDate:function(e,t){var n,i,r,o,a,s,l,c,u,d,h=this,p=!1,f=!1,m=h.dateSettings,g={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!e)return undefined;if(e instanceof Date)return e;if("number"==typeof e)return new Date(e);if("U"===t)return(r=parseInt(e))?new Date(1e3*r):e;if("string"!=typeof e)return"";if(!(n=t.match(h.validParts))||0===n.length)throw new Error("Invalid date format definition.");for(i=e.replace(h.separators,"\0").split("\0"),r=0;r<i.length;r++)switch(o=i[r],a=parseInt(o),n[r]){case"y":case"Y":2===(u=o.length)?g.year=parseInt((a<70?"20":"19")+o):4===u&&(g.year=a),p=!0;break;case"m":case"n":case"M":case"F":isNaN(o)?(-1<(s=m.monthsShort.indexOf(o))&&(g.month=s+1),-1<(s=m.months.indexOf(o))&&(g.month=s+1)):1<=a&&a<=12&&(g.month=a),p=!0;break;case"d":case"j":1<=a&&a<=31&&(g.day=a),p=!0;break;case"g":case"h":d=i[l=-1<n.indexOf("a")?n.indexOf("a"):-1<n.indexOf("A")?n.indexOf("A"):-1],-1<l?(c=v(d,m.meridiem[0])?0:v(d,m.meridiem[1])?12:-1,1<=a&&a<=12&&-1<c?g.hour=a+c:0<=a&&a<=23&&(g.hour=a)):0<=a&&a<=23&&(g.hour=a),f=!0;break;case"G":case"H":0<=a&&a<=23&&(g.hour=a),f=!0;break;case"i":0<=a&&a<=59&&(g.min=a),f=!0;break;case"s":0<=a&&a<=59&&(g.sec=a),f=!0}if(!0===p&&g.year&&g.month&&g.day)g.date=new Date(g.year,g.month-1,g.day,g.hour,g.min,g.sec,0);else{if(!0!==f)return!1;g.date=new Date(0,0,0,g.hour,g.min,g.sec,0)}return g.date},guessDate:function(e,t){if("string"!=typeof e)return e;var n,i,r,o,a=this,s=e.replace(a.separators,"\0").split("\0"),l=/^[djmn]/g,c=t.match(a.validParts),u=new Date,d=0;if(!l.test(c[0]))return e;for(i=0;i<s.length;i++){switch(d=2,r=s[i],o=parseInt(r.substr(0,2)),i){case 0:"m"===c[0]||"n"===c[0]?u.setMonth(o-1):u.setDate(o);break;case 1:"m"===c[0]||"n"===c[0]?u.setDate(o):u.setMonth(o-1);break;case 2:n=u.getFullYear(),r.length<4?(u.setFullYear(parseInt(n.toString().substr(0,4-r.length)+r)),d=r.length):(u.setFullYear=parseInt(r.substr(0,4)),d=4);break;case 3:u.setHours(o);break;case 4:u.setMinutes(o);break;case 5:u.setSeconds(o)}0<r.substr(d).length&&s.splice(i+1,0,r.substr(d))}return u},parseFormat:function(e,i){var n,t=this,r=t.dateSettings,o=/\\?(.?)/gi,a=function(e,t){return n[e]?n[e]():t};return n={d:function(){return s(n.j(),2)},D:function(){return r.daysShort[n.w()]},j:function(){return i.getDate()},l:function(){return r.days[n.w()]},N:function(){return n.w()||7},w:function(){return i.getDay()},z:function(){var e=new Date(n.Y(),n.n()-1,n.j()),t=new Date(n.Y(),0,1);return Math.round((e-t)/l)},W:function(){var e=new Date(n.Y(),n.n()-1,n.j()-n.N()+3),t=new Date(e.getFullYear(),0,4);return s(1+Math.round((e-t)/l/7),2)},F:function(){return r.months[i.getMonth()]},m:function(){return s(n.n(),2)},M:function(){return r.monthsShort[i.getMonth()]},n:function(){return i.getMonth()+1},t:function(){return new Date(n.Y(),n.n(),0).getDate()},L:function(){var e=n.Y();return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){var e=n.n(),t=n.W();return n.Y()+(12===e&&t<9?1:1===e&&9<t?-1:0)},Y:function(){return i.getFullYear()},y:function(){return n.Y().toString().slice(-2)},a:function(){return n.A().toLowerCase()},A:function(){var e=n.G()<12?0:1;return r.meridiem[e]},B:function(){var e=i.getUTCHours()*c,t=60*i.getUTCMinutes(),n=i.getUTCSeconds();return s(Math.floor((e+t+n+c)/86.4)%1e3,3)},g:function(){return n.G()%12||12},G:function(){return i.getHours()},h:function(){return s(n.g(),2)},H:function(){return s(n.G(),2)},i:function(){return s(i.getMinutes(),2)},s:function(){return s(i.getSeconds(),2)},u:function(){return s(1e3*i.getMilliseconds(),6)},e:function(){return/\((.*)\)/.exec(String(i))[1]||"Coordinated Universal Time"},T:function(){return(String(i).match(t.tzParts)||[""]).pop().replace(t.tzClip,"")||"UTC"},I:function(){return new Date(n.Y(),0)-Date.UTC(n.Y(),0)!=new Date(n.Y(),6)-Date.UTC(n.Y(),6)?1:0},O:function(){var e=i.getTimezoneOffset(),t=Math.abs(e);return(0<e?"-":"+")+s(100*Math.floor(t/60)+t%60,4)},P:function(){var e=n.O();return e.substr(0,3)+":"+e.substr(3,2)},Z:function(){return 60*-i.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(o,a)},r:function(){return"D, d M Y H:i:s O".replace(o,a)},U:function(){return i.getTime()/1e3||0}},a(e,e)},formatDate:function(e,t){var n,i,r,o,a,s=this,l="";if("string"==typeof e&&!1===(e=s.parseDate(e,t)))return!1;if(e instanceof Date){for(r=t.length,n=0;n<r;n++)"S"!==(a=t.charAt(n))&&(o=s.parseFormat(a,e),n!==r-1&&s.intParts.test(a)&&"S"===t.charAt(n+1)&&(i=parseInt(o),o+=s.dateSettings.ordinal(i)),l+=o);return l}return""}}}(),function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(U){"use strict";function Y(e,t,n){this.date=e,this.desc=t,this.style=n}var G=!1,s={i18n:{ar:{months:["\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0634\u0628\u0627\u0637","\u0622\u0630\u0627\u0631","\u0646\u064a\u0633\u0627\u0646","\u0645\u0627\u064a\u0648","\u062d\u0632\u064a\u0631\u0627\u0646","\u062a\u0645\u0648\u0632","\u0622\u0628","\u0623\u064a\u0644\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644","\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a","\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"],dayOfWeekShort:["\u0646","\u062b","\u0639","\u062e","\u062c","\u0633","\u062d"],dayOfWeek:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a","\u0627\u0644\u0623\u062d\u062f"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","S\xe2"],dayOfWeek:["Duminic\u0103","Luni","Mar\u0163i","Miercuri","Joi","Vineri","S\xe2mb\u0103t\u0103"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Jan\xfaar","Febr\xfaar","Mars","Apr\xedl","Ma\xed","J\xfan\xed","J\xfal\xed","\xc1g\xfast","September","Okt\xf3ber","N\xf3vember","Desember"],dayOfWeekShort:["Sun","M\xe1n","\xderi\xf0","Mi\xf0","Fim","F\xf6s","Lau"],dayOfWeek:["Sunnudagur","M\xe1nudagur","\xderi\xf0judagur","Mi\xf0vikudagur","Fimmtudagur","F\xf6studagur","Laugardagur"]},bg:{months:["\u042f\u043d\u0443\u0430\u0440\u0438","\u0424\u0435\u0432\u0440\u0443\u0430\u0440\u0438","\u041c\u0430\u0440\u0442","\u0410\u043f\u0440\u0438\u043b","\u041c\u0430\u0439","\u042e\u043d\u0438","\u042e\u043b\u0438","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438","\u041e\u043a\u0442\u043e\u043c\u0432\u0440\u0438","\u041d\u043e\u0435\u043c\u0432\u0440\u0438","\u0414\u0435\u043a\u0435\u043c\u0432\u0440\u0438"],dayOfWeekShort:["\u041d\u0434","\u041f\u043d","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041f\u0442","\u0421\u0431"],dayOfWeek:["\u041d\u0435\u0434\u0435\u043b\u044f","\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a","\u0412\u0442\u043e\u0440\u043d\u0438\u043a","\u0421\u0440\u044f\u0434\u0430","\u0427\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a","\u041f\u0435\u0442\u044a\u043a","\u0421\u044a\u0431\u043e\u0442\u0430"]},fa:{months:["\u0641\u0631\u0648\u0631\u062f\u06cc\u0646","\u0627\u0631\u062f\u06cc\u0628\u0647\u0634\u062a","\u062e\u0631\u062f\u0627\u062f","\u062a\u06cc\u0631","\u0645\u0631\u062f\u0627\u062f","\u0634\u0647\u0631\u06cc\u0648\u0631","\u0645\u0647\u0631","\u0622\u0628\u0627\u0646","\u0622\u0630\u0631","\u062f\u06cc","\u0628\u0647\u0645\u0646","\u0627\u0633\u0641\u0646\u062f"],dayOfWeekShort:["\u06cc\u06a9\u0634\u0646\u0628\u0647","\u062f\u0648\u0634\u0646\u0628\u0647","\u0633\u0647 \u0634\u0646\u0628\u0647","\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647","\u067e\u0646\u062c\u0634\u0646\u0628\u0647","\u062c\u0645\u0639\u0647","\u0634\u0646\u0628\u0647"],dayOfWeek:["\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647","\u062f\u0648\u0634\u0646\u0628\u0647","\u0633\u0647\u200c\u0634\u0646\u0628\u0647","\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647","\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647","\u062c\u0645\u0639\u0647","\u0634\u0646\u0628\u0647","\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647"]},ru:{months:["\u042f\u043d\u0432\u0430\u0440\u044c","\u0424\u0435\u0432\u0440\u0430\u043b\u044c","\u041c\u0430\u0440\u0442","\u0410\u043f\u0440\u0435\u043b\u044c","\u041c\u0430\u0439","\u0418\u044e\u043d\u044c","\u0418\u044e\u043b\u044c","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c","\u041e\u043a\u0442\u044f\u0431\u0440\u044c","\u041d\u043e\u044f\u0431\u0440\u044c","\u0414\u0435\u043a\u0430\u0431\u0440\u044c"],dayOfWeekShort:["\u0412\u0441","\u041f\u043d","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041f\u0442","\u0421\u0431"],dayOfWeek:["\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","\u0412\u0442\u043e\u0440\u043d\u0438\u043a","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041f\u044f\u0442\u043d\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043e\u0442\u0430"]},uk:{months:["\u0421\u0456\u0447\u0435\u043d\u044c","\u041b\u044e\u0442\u0438\u0439","\u0411\u0435\u0440\u0435\u0437\u0435\u043d\u044c","\u041a\u0432\u0456\u0442\u0435\u043d\u044c","\u0422\u0440\u0430\u0432\u0435\u043d\u044c","\u0427\u0435\u0440\u0432\u0435\u043d\u044c","\u041b\u0438\u043f\u0435\u043d\u044c","\u0421\u0435\u0440\u043f\u0435\u043d\u044c","\u0412\u0435\u0440\u0435\u0441\u0435\u043d\u044c","\u0416\u043e\u0432\u0442\u0435\u043d\u044c","\u041b\u0438\u0441\u0442\u043e\u043f\u0430\u0434","\u0413\u0440\u0443\u0434\u0435\u043d\u044c"],dayOfWeekShort:["\u041d\u0434\u043b","\u041f\u043d\u0434","\u0412\u0442\u0440","\u0421\u0440\u0434","\u0427\u0442\u0432","\u041f\u0442\u043d","\u0421\u0431\u0442"],dayOfWeek:["\u041d\u0435\u0434\u0456\u043b\u044f","\u041f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a","\u0412\u0456\u0432\u0442\u043e\u0440\u043e\u043a","\u0421\u0435\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440","\u041f'\u044f\u0442\u043d\u0438\u0446\u044f","\u0421\u0443\u0431\u043e\u0442\u0430"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2","\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2","\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2","\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2","\u039c\u03ac\u03b9\u03bf\u03c2","\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2","\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2","\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2","\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2","\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2","\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2","\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2"],dayOfWeekShort:["\u039a\u03c5\u03c1","\u0394\u03b5\u03c5","\u03a4\u03c1\u03b9","\u03a4\u03b5\u03c4","\u03a0\u03b5\u03bc","\u03a0\u03b1\u03c1","\u03a3\u03b1\u03b2"],dayOfWeek:["\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1","\u03a4\u03c1\u03af\u03c4\u03b7","\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7","\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7","\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae","\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf"]},de:{months:["Januar","Februar","M\xe4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","\u015eubat","Mart","Nisan","May\u0131s","Haziran","Temmuz","A\u011fustos","Eyl\xfcl","Ekim","Kas\u0131m","Aral\u0131k"],dayOfWeekShort:["Paz","Pts","Sal","\xc7ar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Sal\u0131","\xc7ar\u015famba","Per\u015fembe","Cuma","Cumartesi"]},fr:{months:["Janvier","F\xe9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xfbt","Septembre","Octobre","Novembre","D\xe9cembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mi\xe9","Jue","Vie","S\xe1b"],dayOfWeek:["Domingo","Lunes","Martes","Mi\xe9rcoles","Jueves","Viernes","S\xe1bado"]},th:{months:["\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21","\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c","\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21","\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19","\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21","\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19","\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21","\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21","\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19","\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21","\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19","\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21"],dayOfWeekShort:["\u0e2d\u0e32.","\u0e08.","\u0e2d.","\u0e1e.","\u0e1e\u0e24.","\u0e28.","\u0e2a."],dayOfWeek:["\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c","\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c","\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23","\u0e1e\u0e38\u0e18","\u0e1e\u0e24\u0e2b\u0e31\u0e2a","\u0e28\u0e38\u0e01\u0e23\u0e4c","\u0e40\u0e2a\u0e32\u0e23\u0e4c","\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c"]},pl:{months:["stycze\u0144","luty","marzec","kwiecie\u0144","maj","czerwiec","lipiec","sierpie\u0144","wrzesie\u0144","pa\u017adziernik","listopad","grudzie\u0144"],dayOfWeekShort:["nd","pn","wt","\u015br","cz","pt","sb"],dayOfWeek:["niedziela","poniedzia\u0142ek","wtorek","\u015broda","czwartek","pi\u0105tek","sobota"]},pt:{months:["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Ter\xe7a","Quarta","Quinta","Sexta","S\xe1bado"]},ch:{months:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],dayOfWeekShort:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["S\xf6n","M\xe5n","Tis","Ons","Tor","Fre","L\xf6r"]},kr:{months:["1\uc6d4","2\uc6d4","3\uc6d4","4\uc6d4","5\uc6d4","6\uc6d4","7\uc6d4","8\uc6d4","9\uc6d4","10\uc6d4","11\uc6d4","12\uc6d4"],dayOfWeekShort:["\uc77c","\uc6d4","\ud654","\uc218","\ubaa9","\uae08","\ud1a0"],dayOfWeek:["\uc77c\uc694\uc77c","\uc6d4\uc694\uc77c","\ud654\uc694\uc77c","\uc218\uc694\uc77c","\ubaa9\uc694\uc77c","\uae08\uc694\uc77c","\ud1a0\uc694\uc77c"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Luned\xec","Marted\xec","Mercoled\xec","Gioved\xec","Venerd\xec","Sabato"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeekShort:["S\xf8n","Man","Tir","Ons","Tor","Fre","L\xf8r"],dayOfWeek:["s\xf8ndag","mandag","tirsdag","onsdag","torsdag","fredag","l\xf8rdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["S\xf8n","Man","Tir","Ons","Tor","Fre","L\xf8r"],dayOfWeek:["S\xf8ndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","L\xf8rdag"]},ja:{months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeekShort:["\u65e5","\u6708","\u706b","\u6c34","\u6728","\u91d1","\u571f"],dayOfWeek:["\u65e5\u66dc","\u6708\u66dc","\u706b\u66dc","\u6c34\u66dc","\u6728\u66dc","\u91d1\u66dc","\u571f\u66dc"]},vi:{months:["Th\xe1ng 1","Th\xe1ng 2","Th\xe1ng 3","Th\xe1ng 4","Th\xe1ng 5","Th\xe1ng 6","Th\xe1ng 7","Th\xe1ng 8","Th\xe1ng 9","Th\xe1ng 10","Th\xe1ng 11","Th\xe1ng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Ch\u1ee7 nh\u1eadt","Th\u1ee9 hai","Th\u1ee9 ba","Th\u1ee9 t\u01b0","Th\u1ee9 n\u0103m","Th\u1ee9 s\xe1u","Th\u1ee9 b\u1ea3y"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","\u010cet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","\u010cetrtek","Petek","Sobota"]},cs:{months:["Leden","\xdanor","B\u0159ezen","Duben","Kv\u011bten","\u010cerven","\u010cervenec","Srpen","Z\xe1\u0159\xed","\u0158\xedjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","\xdat","St","\u010ct","P\xe1","So"]},hu:{months:["Janu\xe1r","Febru\xe1r","M\xe1rcius","\xc1prilis","M\xe1jus","J\xfanius","J\xfalius","Augusztus","Szeptember","Okt\xf3ber","November","December"],dayOfWeekShort:["Va","H\xe9","Ke","Sze","Cs","P\xe9","Szo"],dayOfWeek:["vas\xe1rnap","h\xe9tf\u0151","kedd","szerda","cs\xfct\xf6rt\xf6k","p\xe9ntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","\xc7a","\xc7","Ca","C","\u015e"],dayOfWeek:["Bazar","Bazar ert\u0259si","\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131","\xc7\u0259r\u015f\u0259nb\u0259","C\xfcm\u0259 ax\u015fam\u0131","C\xfcm\u0259","\u015e\u0259nb\u0259"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","\u010cet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","\u010cetvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Mar\xe7","Abril","Maig","Juny","Juliol","Agost",
  "Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et:{months:["Jaanuar","Veebruar","M\xe4rts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["P\xfchap\xe4ev","Esmasp\xe4ev","Teisip\xe4ev","Kolmap\xe4ev","Neljap\xe4ev","Reede","Laup\xe4ev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kes\xe4kuu","Hein\xe4kuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","M\xe9rcores","Xoves","Venres","S\xe1bado"]},hr:{months:["Sije\u010danj","Velja\u010da","O\u017eujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","\u010cet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","\u010cetvrtak","Petak","Subota"]},ko:{months:["1\uc6d4","2\uc6d4","3\uc6d4","4\uc6d4","5\uc6d4","6\uc6d4","7\uc6d4","8\uc6d4","9\uc6d4","10\uc6d4","11\uc6d4","12\uc6d4"],dayOfWeekShort:["\uc77c","\uc6d4","\ud654","\uc218","\ubaa9","\uae08","\ud1a0"],dayOfWeek:["\uc77c\uc694\uc77c","\uc6d4\uc694\uc77c","\ud654\uc694\uc77c","\uc218\uc694\uc77c","\ubaa9\uc694\uc77c","\uae08\uc694\uc77c","\ud1a0\uc694\uc77c"]},lt:{months:["Sausio","Vasario","Kovo","Baland\u017eio","Gegu\u017e\u0117s","Bir\u017eelio","Liepos","Rugpj\u016b\u010dio","Rugs\u0117jo","Spalio","Lapkri\u010dio","Gruod\u017eio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","\u0160e\u0161"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","Tre\u010diadienis","Ketvirtadienis","Penktadienis","\u0160e\u0161tadienis"]},lv:{months:["Janv\u0101ris","Febru\u0101ris","Marts","Apr\u012blis ","Maijs","J\u016bnijs","J\u016blijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["Sv\u0113tdiena","Pirmdiena","Otrdiena","Tre\u0161diena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["\u0458\u0430\u043d\u0443\u0430\u0440\u0438","\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438","\u043c\u0430\u0440\u0442","\u0430\u043f\u0440\u0438\u043b","\u043c\u0430\u0458","\u0458\u0443\u043d\u0438","\u0458\u0443\u043b\u0438","\u0430\u0432\u0433\u0443\u0441\u0442","\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438","\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438","\u043d\u043e\u0435\u043c\u0432\u0440\u0438","\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438"],dayOfWeekShort:["\u043d\u0435\u0434","\u043f\u043e\u043d","\u0432\u0442\u043e","\u0441\u0440\u0435","\u0447\u0435\u0442","\u043f\u0435\u0442","\u0441\u0430\u0431"],dayOfWeek:["\u041d\u0435\u0434\u0435\u043b\u0430","\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a","\u0412\u0442\u043e\u0440\u043d\u0438\u043a","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0440\u0442\u043e\u043a","\u041f\u0435\u0442\u043e\u043a","\u0421\u0430\u0431\u043e\u0442\u0430"]},mn:{months:["1-\u0440 \u0441\u0430\u0440","2-\u0440 \u0441\u0430\u0440","3-\u0440 \u0441\u0430\u0440","4-\u0440 \u0441\u0430\u0440","5-\u0440 \u0441\u0430\u0440","6-\u0440 \u0441\u0430\u0440","7-\u0440 \u0441\u0430\u0440","8-\u0440 \u0441\u0430\u0440","9-\u0440 \u0441\u0430\u0440","10-\u0440 \u0441\u0430\u0440","11-\u0440 \u0441\u0430\u0440","12-\u0440 \u0441\u0430\u0440"],dayOfWeekShort:["\u0414\u0430\u0432","\u041c\u044f\u0433","\u041b\u0445\u0430","\u041f\u04af\u0440","\u0411\u0441\u043d","\u0411\u044f\u043c","\u041d\u044f\u043c"],dayOfWeek:["\u0414\u0430\u0432\u0430\u0430","\u041c\u044f\u0433\u043c\u0430\u0440","\u041b\u0445\u0430\u0433\u0432\u0430","\u041f\u04af\u0440\u044d\u0432","\u0411\u0430\u0430\u0441\u0430\u043d","\u0411\u044f\u043c\u0431\u0430","\u041d\u044f\u043c"]},"pt-BR":{months:["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","S\xe1b"],dayOfWeek:["Domingo","Segunda","Ter\xe7a","Quarta","Quinta","Sexta","S\xe1bado"]},sk:{months:["Janu\xe1r","Febru\xe1r","Marec","Apr\xedl","M\xe1j","J\xfan","J\xfal","August","September","Okt\xf3ber","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","\u0160t","Pi","So"],dayOfWeek:["Nede\u013ea","Pondelok","Utorok","Streda","\u0160tvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","N\xebntor","Dhjetor"],dayOfWeekShort:["Die","H\xebn","Mar","M\xebr","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E H\xebn\xeb","E Mart\u0113","E M\xebrkur\xeb","E Enjte","E Premte","E Shtun\xeb"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","\u010det","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","\u010cetvrtak","Petak","Subota"]},sr:{months:["\u0458\u0430\u043d\u0443\u0430\u0440","\u0444\u0435\u0431\u0440\u0443\u0430\u0440","\u043c\u0430\u0440\u0442","\u0430\u043f\u0440\u0438\u043b","\u043c\u0430\u0458","\u0458\u0443\u043d","\u0458\u0443\u043b","\u0430\u0432\u0433\u0443\u0441\u0442","\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440","\u043e\u043a\u0442\u043e\u0431\u0430\u0440","\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440","\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"],dayOfWeekShort:["\u043d\u0435\u0434","\u043f\u043e\u043d","\u0443\u0442\u043e","\u0441\u0440\u0435","\u0447\u0435\u0442","\u043f\u0435\u0442","\u0441\u0443\u0431"],dayOfWeek:["\u041d\u0435\u0434\u0435\u0459\u0430","\u041f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a","\u0423\u0442\u043e\u0440\u0430\u043a","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0440\u0442\u0430\u043a","\u041f\u0435\u0442\u0430\u043a","\u0421\u0443\u0431\u043e\u0442\u0430"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["S\xf6n","M\xe5n","Tis","Ons","Tor","Fre","L\xf6r"],dayOfWeek:["S\xf6ndag","M\xe5ndag","Tisdag","Onsdag","Torsdag","Fredag","L\xf6rdag"]},"zh-TW":{months:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],dayOfWeekShort:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],dayOfWeek:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"]},zh:{months:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],dayOfWeekShort:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],dayOfWeek:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"]},he:{months:["\u05d9\u05e0\u05d5\u05d0\u05e8","\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8","\u05de\u05e8\u05e5","\u05d0\u05e4\u05e8\u05d9\u05dc","\u05de\u05d0\u05d9","\u05d9\u05d5\u05e0\u05d9","\u05d9\u05d5\u05dc\u05d9","\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8","\u05e1\u05e4\u05d8\u05de\u05d1\u05e8","\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8","\u05e0\u05d5\u05d1\u05de\u05d1\u05e8","\u05d3\u05e6\u05de\u05d1\u05e8"],dayOfWeekShort:["\u05d0'","\u05d1'","\u05d2'","\u05d3'","\u05d4'","\u05d5'","\u05e9\u05d1\u05ea"],dayOfWeek:["\u05e8\u05d0\u05e9\u05d5\u05df","\u05e9\u05e0\u05d9","\u05e9\u05dc\u05d9\u05e9\u05d9","\u05e8\u05d1\u05d9\u05e2\u05d9","\u05d7\u05de\u05d9\u05e9\u05d9","\u05e9\u05d9\u05e9\u05d9","\u05e9\u05d1\u05ea","\u05e8\u05d0\u05e9\u05d5\u05df"]},hy:{months:["\u0540\u0578\u0582\u0576\u057e\u0561\u0580","\u0553\u0565\u057f\u0580\u057e\u0561\u0580","\u0544\u0561\u0580\u057f","\u0531\u057a\u0580\u056b\u056c","\u0544\u0561\u0575\u056b\u057d","\u0540\u0578\u0582\u0576\u056b\u057d","\u0540\u0578\u0582\u056c\u056b\u057d","\u0555\u0563\u0578\u057d\u057f\u0578\u057d","\u054d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580","\u0540\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580","\u0546\u0578\u0575\u0565\u0574\u0562\u0565\u0580","\u0534\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580"],dayOfWeekShort:["\u053f\u056b","\u0535\u0580\u056f","\u0535\u0580\u0584","\u0549\u0578\u0580","\u0540\u0576\u0563","\u0548\u0582\u0580\u0562","\u0547\u0562\u0569"],dayOfWeek:["\u053f\u056b\u0580\u0561\u056f\u056b","\u0535\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b","\u0535\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b","\u0549\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b","\u0540\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b","\u0548\u0582\u0580\u0562\u0561\u0569","\u0547\u0561\u0562\u0561\u0569"]},kg:{months:["\u04ae\u0447\u0442\u04af\u043d \u0430\u0439\u044b","\u0411\u0438\u0440\u0434\u0438\u043d \u0430\u0439\u044b","\u0416\u0430\u043b\u0433\u0430\u043d \u041a\u0443\u0440\u0430\u043d","\u0427\u044b\u043d \u041a\u0443\u0440\u0430\u043d","\u0411\u0443\u0433\u0443","\u041a\u0443\u043b\u0436\u0430","\u0422\u0435\u043a\u0435","\u0411\u0430\u0448 \u041e\u043e\u043d\u0430","\u0410\u044f\u043a \u041e\u043e\u043d\u0430","\u0422\u043e\u0433\u0443\u0437\u0434\u0443\u043d \u0430\u0439\u044b","\u0416\u0435\u0442\u0438\u043d\u0438\u043d \u0430\u0439\u044b","\u0411\u0435\u0448\u0442\u0438\u043d \u0430\u0439\u044b"],dayOfWeekShort:["\u0416\u0435\u043a","\u0414\u04af\u0439","\u0428\u0435\u0439","\u0428\u0430\u0440","\u0411\u0435\u0439","\u0416\u0443\u043c","\u0418\u0448\u0435"],dayOfWeek:["\u0416\u0435\u043a\u0448\u0435\u043c\u0431","\u0414\u04af\u0439\u0448\u04e9\u043c\u0431","\u0428\u0435\u0439\u0448\u0435\u043c\u0431","\u0428\u0430\u0440\u0448\u0435\u043c\u0431","\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438","\u0416\u0443\u043c\u0430","\u0418\u0448\u0435\u043d\u0431"]},rm:{months:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],dayOfWeekShort:["Du","Gli","Ma","Me","Gie","Ve","So"],dayOfWeek:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"]},ka:{months:["\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8","\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8","\u10db\u10d0\u10e0\u10e2\u10d8","\u10d0\u10de\u10e0\u10d8\u10da\u10d8","\u10db\u10d0\u10d8\u10e1\u10d8","\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8","\u10d8\u10d5\u10da\u10d8\u10e1\u10d8","\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd","\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8","\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8","\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8","\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8"],dayOfWeekShort:["\u10d9\u10d5","\u10dd\u10e0\u10e8","\u10e1\u10d0\u10db\u10e8","\u10dd\u10d7\u10ee","\u10ee\u10e3\u10d7","\u10de\u10d0\u10e0","\u10e8\u10d0\u10d1"],dayOfWeek:["\u10d9\u10d5\u10d8\u10e0\u10d0","\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8","\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8","\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8","\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8","\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8","\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8"]}},value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,disabledMinTime:!1,disabledMaxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1},X=null,n="en",V="en",i={meridiem:["AM","PM"]},r=function(){var e=s.i18n[V],t={days:e.dayOfWeek,daysShort:e.dayOfWeekShort,months:e.months,monthsShort:U.map(e.months,function(e){return e.substring(0,3)})};X=new DateFormatter({dateSettings:U.extend({},i,t)})};U.datetimepicker={setLocale:function(e){var t=s.i18n[e]?e:n;V!=t&&(V=t,r())},setDateFormatter:function(e){X=e},RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"},r(),window.getComputedStyle||(window.getComputedStyle=function(n){return this.el=n,this.getPropertyValue=function(e){var t=/(\-([a-z]){1})/g;return"float"===e&&(e="styleFloat"),t.test(e)&&(e=e.replace(t,function(e,t,n){return n.toUpperCase()})),n.currentStyle[e]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,i;for(n=t||0,i=this.length;n<i;n+=1)if(this[n]===e)return n;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},U.fn.xdsoftScroller=function(v){return this.each(function(){var o,a,s,l,c,u=U(this),n=function(e){var t,n={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],n.x=t.clientX,n.y=t.clientY):"mousedown"!==e.type&&"mouseup"!==e.type&&"mousemove"!==e.type&&"mouseover"!==e.type&&"mouseout"!==e.type&&"mouseenter"!==e.type&&"mouseleave"!==e.type||(n.x=e.clientX,n.y=e.clientY),n},d=100,i=!1,r=0,h=0,p=0,f=!1,m=0,g=function(){};"hide"!==v?(U(this).hasClass("xdsoft_scroller_box")||(o=u.children().eq(0),a=u[0].clientHeight,s=o[0].offsetHeight,l=U('<div class="xdsoft_scrollbar"></div>'),c=U('<div class="xdsoft_scroller"></div>'),l.append(c),u.addClass("xdsoft_scroller_box").append(l),g=function(e){var t=n(e).y-r+m;t<0&&(t=0),t+c[0].offsetHeight>p&&(t=p-c[0].offsetHeight),u.trigger("scroll_element.xdsoft_scroller",[d?t/d:0])},c.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(t){a||u.trigger("resize_scroll.xdsoft_scroller",[v]),r=n(t).y,m=parseInt(c.css("margin-top"),10),p=l[0].offsetHeight,"mousedown"===t.type||"touchstart"===t.type?(document&&U(document.body).addClass("xdsoft_noselect"),U([document.body,window]).on("touchend mouseup.xdsoft_scroller",function e(){U([document.body,window]).off("touchend mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",g).removeClass("xdsoft_noselect")}),U(document.body).on("mousemove.xdsoft_scroller",g)):(f=!0,t.stopPropagation(),t.preventDefault())}).on("touchmove",function(e){f&&(e.preventDefault(),g(e))}).on("touchend touchcancel",function(){f=!1,m=0}),u.on("scroll_element.xdsoft_scroller",function(e,t){a||u.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=1<t?1:t<0||isNaN(t)?0:t,c.css("margin-top",d*t),setTimeout(function(){o.css("marginTop",-parseInt((o[0].offsetHeight-a)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,n){var i,r;a=u[0].clientHeight,s=o[0].offsetHeight,r=(i=a/s)*l[0].offsetHeight,1<i?c.hide():(c.show(),c.css("height",parseInt(10<r?r:10,10)),d=l[0].offsetHeight-c[0].offsetHeight,!0!==n&&u.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(o.css("marginTop"),10))/(s-a)]))}),u.on("mousewheel",function(e){var t=Math.abs(parseInt(o.css("marginTop"),10));return(t-=20*e.deltaY)<0&&(t=0),u.trigger("scroll_element.xdsoft_scroller",[t/(s-a)]),e.stopPropagation(),!1}),u.on("touchstart",function(e){i=n(e),h=Math.abs(parseInt(o.css("marginTop"),10))}),u.on("touchmove",function(e){if(i){e.preventDefault();var t=n(e);u.trigger("scroll_element.xdsoft_scroller",[(h-(t.y-i.y))/(s-a)])}}),u.on("touchend touchcancel",function(){i=!1,h=0})),u.trigger("resize_scroll.xdsoft_scroller",[v])):u.find(".xdsoft_scrollbar").hide()})},U.fn.datetimepicker=function(T,t){var n,i,r=this,h=48,p=57,g=96,v=105,y=17,M=46,D=13,E=27,I=8,P=37,L=38,O=39,F=40,j=9,A=116,N=65,W=67,H=86,z=90,B=89,R=!1,q=U.isPlainObject(T)||!T?U.extend(!0,{},s,T):U.extend(!0,{},s),o=0,a=function(t){t.on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function e(){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(o),o=setTimeout(function(){t.data("xdsoft_datetimepicker")||n(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",e).trigger("open.xdsoft")},100))})};return n=function(b){function t(){var e,t=!1;return q.startDate?t=x.strToDate(q.startDate):(t=q.value||(b&&b.val&&b.val()?b.val():""))?t=x.strToDateTime(t):q.defaultDate&&(t=x.strToDateTime(q.defaultDate),q.defaultTime&&(e=x.strtotime(q.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes()))),t&&x.isValidDate(t)?w.data("changed",!0):t="",t||0}function n(o){var a=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(n).test(t)},s=function(e){try{if(document.selection&&document.selection.createRange)return document.selection.createRange().getBookmark().charCodeAt(2)-2;if(e.setSelectionRange)return e.selectionStart}catch(t){return 0}},l=function(e,t){if(!(e="string"==typeof e||e instanceof String?document.getElementById(e):e))return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};o.mask&&b.off("keydown.xdsoft"),!0===o.mask&&("undefined"!=typeof moment?o.mask=o.format.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59"):o.mask=o.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===U.type(o.mask)&&(a(o.mask,b.val())||(b.val(o.mask.replace(/[0-9]/g,"_")),l(b[0],0)),b.on("keydown.xdsoft",function(e){var t,n,i=this.value,r=e.which;if(h<=r&&r<=p||g<=r&&r<=v||r===I||r===M){for(t=s(this),n=r!==I&&r!==M?String.fromCharCode(g<=r&&r<=v?r-h:r):"_",r!==I&&r!==M||!t||(t-=1,n="_");/[^0-9_]/.test(o.mask.substr(t,1))&&t<o.mask.length&&0<t;)t+=r===I||r===M?-1:1;if(i=i.substr(0,t)+n+i.substr(t+1),""===U.trim(i))i=o.mask.replace(/[0-9]/g,"_");else if(t===o.mask.length)return e.preventDefault(),!1;for(t+=r===I||r===M?0:1;/[^0-9_]/.test(o.mask.substr(t,1))&&t<o.mask.length&&0<t;)t+=r===I||r===M?-1:1;a(o.mask,i)?(this.value=i,l(this,t)):""===U.trim(i)?this.value=o.mask.replace(/[0-9]/g,"_"):b.trigger("error_input.xdsoft")}else if(-1!==[N,W,H,z,B].indexOf(r)&&R||-1!==[E,L,F,P,O,A,y,j,D].indexOf(r))return!0;return e.preventDefault(),!1}))}var i,r,o,a,x,f,w=U('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),e=U('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),m=U('<div class="xdsoft_datepicker active"></div>'),k=U('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),_=U('<div class="xdsoft_calendar"></div>'),s=U('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),c=s.find(".xdsoft_time_box").eq(0),C=U('<div class="xdsoft_time_variant"></div>'),l=U('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),S=U('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),$=U('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),d=!1,u=0;q.id&&w.attr("id",q.id),q.style&&w.attr("style",q.style),q.weeks&&w.addClass("xdsoft_showweeks"),q.rtl&&w.addClass("xdsoft_rtl"),w.addClass("xdsoft_"+q.theme),w.addClass(q.className),k.find(".xdsoft_month span").after(S),k.find(".xdsoft_year span").after($),k.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(e){var t,n,i=U(this).find(".xdsoft_select").eq(0),r=0,o=0,a=i.is(":visible");for(k.find(".xdsoft_select").hide(),x.currentTime&&(r=x.currentTime[U(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),i[a?"hide":"show"](),t=i.find("div.xdsoft_option"),n=0;n<t.length&&t.eq(n).data("value")!==r;n+=1)o+=t[0].offsetHeight;return i.xdsoftScroller(o/(i.children()[0].offsetHeight-i[0].clientHeight)),e.stopPropagation(),!1}),k.find(".xdsoft_select").xdsoftScroller().on("touchstart mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("touchstart mousedown.xdsoft",".xdsoft_option",function(){x.currentTime!==undefined&&null!==x.currentTime||(x.currentTime=x.now());var e=x.currentTime.getFullYear();x&&x.currentTime&&x.currentTime[U(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](U(this).data("value")),U(this).parent().parent().hide(),w.trigger("xchange.xdsoft"),q.onChangeMonth&&U.isFunction(q.onChangeMonth)&&q.onChangeMonth.call(w,x.currentTime,w.data("input")),e!==x.currentTime.getFullYear()&&U.isFunction(q.onChangeYear)&&q.onChangeYear.call(w,x.currentTime,w.data("input"))}),w.getValue=function(){return x.getCurrentTime()},w.setOptions=function(e){var u={};q=U.extend(!0,{},q,e),e.allowTimes&&U.isArray(e.allowTimes)&&e.allowTimes.length&&(q.allowTimes=U.extend(!0,[],e.allowTimes)),e.weekends&&U.isArray(e.weekends)&&e.weekends.length&&(q.weekends=U.extend(!0,[],e.weekends)),e.allowDates&&U.isArray(e.allowDates)&&e.allowDates.length&&(q.allowDates=U.extend(!0,[],e.allowDates)),e.allowDateRe&&"[object String]"===Object.prototype.toString.call(e.allowDateRe)&&(q.allowDateRe=new RegExp(e.allowDateRe)),e.highlightedDates&&U.isArray(e.highlightedDates)&&e.highlightedDates.length&&(U.each(e.highlightedDates,function(e,t){var n,i=U.map(t.split(","),U.trim),r=new Y(X.parseDate(i[0],q.formatDate),i[1],i[2]),o=X.formatDate(r.date,q.formatDate);u[o]!==undefined?(n=u[o].desc)&&n.length&&r.desc&&r.desc.length&&(u[o].desc=n+"\n"+r.desc):u[o]=r}),q.highlightedDates=U.extend(!0,[],u)),e.highlightedPeriods&&U.isArray(e.highlightedPeriods)&&e.highlightedPeriods.length&&(u=U.extend(!0,[],q.highlightedDates),U.each(e.highlightedPeriods,function(e,t){var n,i,r,o,a,s,l;if(U.isArray(t))n=t[0],i=t[1],r=t[2],l=t[3];else{var c=U.map(t.split(","),U.trim);n=X.parseDate(c[0],q.formatDate),i=X.parseDate(c[1],q.formatDate),r=c[2],l=c[3]}for(;n<=i;)o=new Y(n,r,l),a=X.formatDate(n,q.formatDate),n.setDate(n.getDate()+1),u[a]!==undefined?(s=u[a].desc)&&s.length&&o.desc&&o.desc.length&&(u[a].desc=s+"\n"+o.desc):u[a]=o}),q.highlightedDates=U.extend(!0,[],u)),e.disabledDates&&U.isArray(e.disabledDates)&&e.disabledDates.length&&(q.disabledDates=U.extend(!0,[],e.disabledDates)),e.disabledWeekDays&&U.isArray(e.disabledWeekDays)&&e.disabledWeekDays.length&&(q.disabledWeekDays=U.extend(!0,[],e.disabledWeekDays)),!q.open&&!q.opened||q.inline||b.trigger("open.xdsoft"),q.inline&&(d=!0,w.addClass("xdsoft_inline"),b.after(w).hide()),q.inverseButton&&(q.next="xdsoft_prev",q.prev="xdsoft_next"),q.datepicker?m.addClass("active"):m.removeClass("active"),q.timepicker?s.addClass("active"):s.removeClass("active"),q.value&&(x.setCurrentTime(q.value),b&&b.val&&b.val(x.str)),isNaN(q.dayOfWeekStart)?q.dayOfWeekStart=0:q.dayOfWeekStart=parseInt(q.dayOfWeekStart,10)%7,q.timepickerScrollbar||c.xdsoftScroller("hide"),q.minDate&&/^[\+\-](.*)$/.test(q.minDate)&&(q.minDate=X.formatDate(x.strToDateTime(q.minDate),q.formatDate)),q.maxDate&&/^[\+\-](.*)$/.test(q.maxDate)&&(q.maxDate=X.formatDate(x.strToDateTime(q.maxDate),q.formatDate)),l.toggle(q.showApplyButton),k.find(".xdsoft_today_button").css("visibility",q.todayButton?"visible":"hidden"),k.find("."+q.prev).css("visibility",q.prevButton?"visible":"hidden"),k.find("."+q.next).css("visibility",q.nextButton?"visible":"hidden"),n(q),q.validateOnBlur&&b.off("blur.xdsoft").on("blur.xdsoft",function(){if(q.allowBlank&&(!U.trim(U(this).val()).length||"string"==typeof q.mask&&U.trim(U(this).val())===q.mask.replace(/[0-9]/g,"_")))U(this).val(null),w.data("xdsoft_datetime").empty();else{var e=X.parseDate(U(this).val(),q.format);if(e)U(this).val(X.formatDate(e,q.format));else{var t=+[U(this).val()[0],U(this).val()[1]].join(""),n=+[U(this).val()[2],U(this).val()[3]].join("");!q.datepicker&&q.timepicker&&0<=t&&t<24&&0<=n&&n<60?U(this).val([t,n].map(function(e){return 9<e?e:"0"+e}).join(":")):U(this).val(X.formatDate(x.now(),q.format))}w.data("xdsoft_datetime").setCurrentTime(U(this).val())}w.trigger("changedatetime.xdsoft"),w.trigger("close.xdsoft")}),q.dayOfWeekStartPrev=0===q.dayOfWeekStart?6:q.dayOfWeekStart-1,w.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},w.data("options",q).on("touchstart mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),$.hide(),S.hide(),!1}),c.append(C),c.xdsoftScroller(),w.on("afterOpen.xdsoft",function(){c.xdsoftScroller()}),w.append(m).append(s),!0!==q.withoutCopyright&&w.append(e),m.append(k).append(_).append(l),U(q.parentID).append(w),x=new function(){var r=this;r.now=function(e){var t,n,i=new Date;return!e&&q.defaultDate&&(t=r.strToDateTime(q.defaultDate),i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(t.getDate())),q.yearOffset&&i.setFullYear(i.getFullYear()+q.yearOffset),!e&&q.defaultTime&&(n=r.strtotime(q.defaultTime),i.setHours(n.getHours()),i.setMinutes(n.getMinutes())),i},r.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},r.setCurrentTime=function(e,t){"string"==typeof e?r.currentTime=r.strToDateTime(e):r.isValidDate(e)?r.currentTime=e:e||t||!q.allowBlank?r.currentTime=r.now():r.currentTime=null,w.trigger("xchange.xdsoft")},r.empty=function(){r.currentTime=null},r.getCurrentTime=function(){return r.currentTime},r.nextMonth=function(){r.currentTime!==undefined&&null!==r.currentTime||(r.currentTime=r.now());var e,t=r.currentTime.getMonth()+1;return 12===t&&(r.currentTime.setFullYear(r.currentTime.getFullYear()+1),t=0),e=r.currentTime.getFullYear(),r.currentTime.setDate(Math.min(new Date(r.currentTime.getFullYear(),t+1,0).getDate(),r.currentTime.getDate())),r.currentTime.setMonth(t),q.onChangeMonth&&U.isFunction(q.onChangeMonth)&&q.onChangeMonth.call(w,x.currentTime,w.data("input")),e!==r.currentTime.getFullYear()&&U.isFunction(q.onChangeYear)&&q.onChangeYear.call(w,x.currentTime,w.data("input")),w.trigger("xchange.xdsoft"),t},r.prevMonth=function(){r.currentTime!==undefined&&null!==r.currentTime||(r.currentTime=r.now());var e=r.currentTime.getMonth()-1;return-1===e&&(r.currentTime.setFullYear(r.currentTime.getFullYear()-1),e=11),r.currentTime.setDate(Math.min(new Date(r.currentTime.getFullYear(),e+1,0).getDate(),r.currentTime.getDate())),r.currentTime.setMonth(e),q.onChangeMonth&&U.isFunction(q.onChangeMonth)&&q.onChangeMonth.call(w,x.currentTime,w.data("input")),w.trigger("xchange.xdsoft"),e},r.getWeekOfYear=function(e){if(q.onGetWeekOfYear&&U.isFunction(q.onGetWeekOfYear)){var t=q.onGetWeekOfYear.call(w,e);if(void 0!==t)return t}var n=new Date(e.getFullYear(),0,1);return 4!=n.getDay()&&n.setMonth(0,1+(4-n.getDay()+7)%7),Math.ceil(((e-n)/864e5+n.getDay()+1)/7)},r.strToDateTime=function(e){var t,n,i=[];return e&&e instanceof Date&&r.isValidDate(e)?e:((i=/^(\+|\-)(.*)$/.exec(e))&&(i[2]=X.parseDate(i[2],q.formatDate)),i&&i[2]?(t=i[2].getTime()-6e4*i[2].getTimezoneOffset(),n=new Date(r.now(!0).getTime()+parseInt(i[1]+"1",10)*t)):n=e?X.parseDate(e,q.format):r.now(),r.isValidDate(n)||(n=r.now()),n)},r.strToDate=function(e){if(e&&e instanceof Date&&r.isValidDate(e))return e;var t=e?X.parseDate(e,q.formatDate):r.now(!0);return r.isValidDate(t)||(t=r.now(!0)),t},r.strtotime=function(e){if(e&&e instanceof Date&&r.isValidDate(e))return e;var t=e?X.parseDate(e,q.formatTime):r.now(!0);return r.isValidDate(t)||(t=r.now(!0)),t},r.str=function(){return X.formatDate(r.currentTime,q.format)},r.currentTime=this.now()},l.on("touchend click",function(e){e.preventDefault(),w.data("changed",!0),x.setCurrentTime(t()),b.val(x.str()),w.trigger("close.xdsoft")}),k.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",function(){w.data("changed",!0),x.setCurrentTime(0,!0),w.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){var e,t,n=x.getCurrentTime();n=new Date(n.getFullYear(),n.getMonth(),n.getDate()),e=x.strToDate(q.minDate),n<(e=new Date(e.getFullYear(),e.getMonth(),e.getDate()))||(t=x.strToDate(q.maxDate),(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()))<n||(b.val(x.str()),b.trigger("change"),w.trigger("close.xdsoft")))}),k.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var n=U(this),i=0,r=!1;!function e(t){n.hasClass(q.next)?x.nextMonth():n.hasClass(q.prev)&&x.prevMonth(),q.monthChangeSpinner&&(r||(i=setTimeout(e,t||100)))}(500),U([document.body,window]).on("touchend mouseup.xdsoft",function e(){clearTimeout(i),r=!0,U([document.body,window]).off("touchend mouseup.xdsoft",e)})}),s.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var o=U(this),a=0,s=!1,l=110;!function e(t){var n=c[0].clientHeight,i=C[0].offsetHeight,r=Math.abs(parseInt(C.css("marginTop"),10));o.hasClass(q.next)&&i-n-q.timeHeightInTimePicker>=r?C.css("marginTop","-"+(r+q.timeHeightInTimePicker)+"px"):o.hasClass(q.prev)&&0<=r-q.timeHeightInTimePicker&&C.css("marginTop","-"+(r-q.timeHeightInTimePicker)+"px"),c.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(C[0].style.marginTop,10)/(i-n))]),l=10<l?10:l-10,s||(a=setTimeout(e,t||l))}(500),U([document.body,window]).on("touchend mouseup.xdsoft",function e(){clearTimeout(a),s=!0,U([document.body,window]).off("touchend mouseup.xdsoft",e)})}),i=0,w.on("xchange.xdsoft",function(e){clearTimeout(i),i=setTimeout(function(){if(x.currentTime===undefined||null===x.currentTime){if(q.allowBlank)return;x.currentTime=x.now()}for(var e,t,n,i,r,o,a,s,l,c,u="",d=new Date(x.currentTime.getFullYear(),x.currentTime.getMonth(),1,12,0,0),h=0,p=x.now(),f=!1,m=!1,g=[],v=!0,y="";d.getDay()!==q.dayOfWeekStart;)d.setDate(d.getDate()-1);for(u+="<table><thead><tr>",q.weeks&&(u+="<th></th>"),e=0;e<7;e+=1)u+="<th>"+q.i18n[V].dayOfWeekShort[(e+q.dayOfWeekStart)%7]+"</th>";for(u+="</tr></thead>",u+="<tbody>",!1!==q.maxDate&&(f=x.strToDate(q.maxDate),f=new Date(f.getFullYear(),f.getMonth(),f.getDate(),23,59,59,999)),!1!==q.minDate&&(m=x.strToDate(q.minDate),m=new Date(m.getFullYear(),m.getMonth(),m.getDate()));h<x.currentTime.countDaysInMonth()||d.getDay()!==q.dayOfWeekStart||x.currentTime.getMonth()===d.getMonth();)g=[],h+=1,n=d.getDay(),i=d.getDate(),r=d.getFullYear(),o=d.getMonth(),a=x.getWeekOfYear(d),c="",g.push("xdsoft_date"),s=q.beforeShowDay&&U.isFunction(q.beforeShowDay.call)?q.beforeShowDay.call(w,d):null,q.allowDateRe&&"[object RegExp]"===Object.prototype.toString.call(q.allowDateRe)?q.allowDateRe.test(X.formatDate(d,q.formatDate))||g.push("xdsoft_disabled"):q.allowDates&&0<q.allowDates.length?-1===q.allowDates.indexOf(X.formatDate(d,q.formatDate))&&g.push("xdsoft_disabled"
  ):!1!==f&&f<d||!1!==m&&d<m||s&&!1===s[0]?g.push("xdsoft_disabled"):-1!==q.disabledDates.indexOf(X.formatDate(d,q.formatDate))?g.push("xdsoft_disabled"):-1!==q.disabledWeekDays.indexOf(n)?g.push("xdsoft_disabled"):b.is("[readonly]")&&g.push("xdsoft_disabled"),s&&""!==s[1]&&g.push(s[1]),x.currentTime.getMonth()!==o&&g.push("xdsoft_other_month"),(q.defaultSelect||w.data("changed"))&&X.formatDate(x.currentTime,q.formatDate)===X.formatDate(d,q.formatDate)&&g.push("xdsoft_current"),X.formatDate(p,q.formatDate)===X.formatDate(d,q.formatDate)&&g.push("xdsoft_today"),0!==d.getDay()&&6!==d.getDay()&&-1===q.weekends.indexOf(X.formatDate(d,q.formatDate))||g.push("xdsoft_weekend"),q.highlightedDates[X.formatDate(d,q.formatDate)]!==undefined&&(t=q.highlightedDates[X.formatDate(d,q.formatDate)],g.push(t.style===undefined?"xdsoft_highlighted_default":t.style),c=t.desc===undefined?"":t.desc),q.beforeShowDay&&U.isFunction(q.beforeShowDay)&&g.push(q.beforeShowDay(d)),v&&(u+="<tr>",v=!1,q.weeks&&(u+="<th>"+a+"</th>")),u+='<td data-date="'+i+'" data-month="'+o+'" data-year="'+r+'" class="xdsoft_date xdsoft_day_of_week'+d.getDay()+" "+g.join(" ")+'" title="'+c+'"><div>'+i+"</div></td>",d.getDay()===q.dayOfWeekStartPrev&&(u+="</tr>",v=!0),d.setDate(i+1);if(u+="</tbody></table>",_.html(u),k.find(".xdsoft_label span").eq(0).text(q.i18n[V].months[x.currentTime.getMonth()]),k.find(".xdsoft_label span").eq(1).text(x.currentTime.getFullYear()),o=y="",l=function(e,t){var n,i,r=x.now(),o=q.allowTimes&&U.isArray(q.allowTimes)&&q.allowTimes.length;r.setHours(e),e=parseInt(r.getHours(),10),r.setMinutes(t),t=parseInt(r.getMinutes(),10),(n=new Date(x.currentTime)).setHours(e),n.setMinutes(t),!(g=[])!==q.minDateTime&&q.minDateTime>n||!1!==q.maxTime&&x.strtotime(q.maxTime).getTime()<r.getTime()||!1!==q.minTime&&x.strtotime(q.minTime).getTime()>r.getTime()?g.push("xdsoft_disabled"):!1!==q.minDateTime&&q.minDateTime>n||!1!==q.disabledMinTime&&r.getTime()>x.strtotime(q.disabledMinTime).getTime()&&!1!==q.disabledMaxTime&&r.getTime()<x.strtotime(q.disabledMaxTime).getTime()?g.push("xdsoft_disabled"):b.is("[readonly]")&&g.push("xdsoft_disabled"),(i=new Date(x.currentTime)).setHours(parseInt(x.currentTime.getHours(),10)),o||i.setMinutes(Math[q.roundTime](x.currentTime.getMinutes()/q.step)*q.step),(q.initTime||q.defaultSelect||w.data("changed"))&&i.getHours()===parseInt(e,10)&&(!o&&59<q.step||i.getMinutes()===parseInt(t,10))&&(q.defaultSelect||w.data("changed")?g.push("xdsoft_current"):q.initTime&&g.push("xdsoft_init_time")),parseInt(p.getHours(),10)===parseInt(e,10)&&parseInt(p.getMinutes(),10)===parseInt(t,10)&&g.push("xdsoft_today"),y+='<div class="xdsoft_time '+g.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+X.formatDate(r,q.formatTime)+"</div>"},q.allowTimes&&U.isArray(q.allowTimes)&&q.allowTimes.length)for(h=0;h<q.allowTimes.length;h+=1)l(x.strtotime(q.allowTimes[h]).getHours(),o=x.strtotime(q.allowTimes[h]).getMinutes());else for(e=h=0;h<(q.hours12?12:24);h+=1)for(e=0;e<60;e+=q.step)l((h<10?"0":"")+h,o=(e<10?"0":"")+e);for(C.html(y),T="",h=0,h=parseInt(q.yearStart,10)+q.yearOffset;h<=parseInt(q.yearEnd,10)+q.yearOffset;h+=1)T+='<div class="xdsoft_option '+(x.currentTime.getFullYear()===h?"xdsoft_current":"")+'" data-value="'+h+'">'+h+"</div>";for($.children().eq(0).html(T),h=parseInt(q.monthStart,10),T="";h<=parseInt(q.monthEnd,10);h+=1)T+='<div class="xdsoft_option '+(x.currentTime.getMonth()===h?"xdsoft_current":"")+'" data-value="'+h+'">'+q.i18n[V].months[h]+"</div>";S.children().eq(0).html(T),U(w).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){var e,t,n,i;q.timepicker&&(C.find(".xdsoft_current").length?e=".xdsoft_current":C.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=c[0].clientHeight,(n=C[0].offsetHeight)-t<(i=C.find(e).index()*q.timeHeightInTimePicker+1)&&(i=n-t),c.trigger("scroll_element.xdsoft_scroller",[parseInt(i,10)/(n-t)])):c.trigger("scroll_element.xdsoft_scroller",[0]))}),r=0,_.on("touchend click.xdsoft","td",function(e){e.stopPropagation(),r+=1;var t=U(this),n=x.currentTime;if(n!==undefined&&null!==n||(x.currentTime=x.now(),n=x.currentTime),t.hasClass("xdsoft_disabled"))return!1;n.setDate(1),n.setFullYear(t.data("year")),n.setMonth(t.data("month")),n.setDate(t.data("date")),w.trigger("select.xdsoft",[n]),b.val(x.str()),q.onSelectDate&&U.isFunction(q.onSelectDate)&&q.onSelectDate.call(w,x.currentTime,w.data("input"),e),w.data("changed",!0),w.trigger("xchange.xdsoft"),w.trigger("changedatetime.xdsoft"),(1<r||!0===q.closeOnDateSelect||!1===q.closeOnDateSelect&&!q.timepicker)&&!q.inline&&w.trigger("close.xdsoft"),setTimeout(function(){r=0},200)}),C.on("touchmove","div",function(){G=!0}).on("touchend click.xdsoft","div",function(e){if(e.stopPropagation(),G)G=!1;else{var t=U(this),n=x.currentTime;if(n!==undefined&&null!==n||(x.currentTime=x.now(),n=x.currentTime),t.hasClass("xdsoft_disabled"))return!1;n.setHours(t.data("hour")),n.setMinutes(t.data("minute")),w.trigger("select.xdsoft",[n]),w.data("input").val(x.str()),q.onSelectTime&&U.isFunction(q.onSelectTime)&&q.onSelectTime.call(w,x.currentTime,w.data("input"),e),w.data("changed",!0),w.trigger("xchange.xdsoft"),w.trigger("changedatetime.xdsoft"),!0!==q.inline&&!0===q.closeOnTimeSelect&&w.trigger("close.xdsoft")}}),m.on("mousewheel.xdsoft",function(e){return!q.scrollMonth||(e.deltaY<0?x.nextMonth():x.prevMonth(),!1)}),b.on("mousewheel.xdsoft",function(e){return!q.scrollInput||(!q.datepicker&&q.timepicker?(0<=(o=C.find(".xdsoft_current").length?C.find(".xdsoft_current").eq(0).index():0)+e.deltaY&&o+e.deltaY<C.children().length&&(o+=e.deltaY),C.children().eq(o).length&&C.children().eq(o).trigger("mousedown"),!1):q.datepicker&&!q.timepicker?(m.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),b.val&&b.val(x.str()),w.trigger("changedatetime.xdsoft"),!1):void 0)}),w.on("changedatetime.xdsoft",function(e){if(q.onChangeDateTime&&U.isFunction(q.onChangeDateTime)){var t=w.data("input");q.onChangeDateTime.call(w,x.currentTime,t,e),delete q.value,t.trigger("change")}}).on("generate.xdsoft",function(){q.onGenerate&&U.isFunction(q.onGenerate)&&q.onGenerate.call(w,x.currentTime,w.data("input")),d&&(w.trigger("afterOpen.xdsoft"),d=!1)}).on("click.xdsoft",function(e){e.stopPropagation()}),o=0,f=function(e,t){do{if(!1===t(e=e.parentNode))break}while("HTML"!==e.nodeName)},a=function(){var e,t,n,i,r,o,a,s,l,c,u,d,h;if(e=(s=w.data("input")).offset(),t=s[0],c="top",n=e.top+t.offsetHeight-1,i=e.left,r="absolute",l=U(window).width(),d=U(window).height(),h=U(window).scrollTop(),document.documentElement.clientWidth-e.left<m.parent().outerWidth(!0)){var p=m.parent().outerWidth(!0)-t.offsetWidth;i-=p}"rtl"===s.parent().css("direction")&&(i-=w.outerWidth()-s.outerWidth()),q.fixed?(n-=h,i-=U(window).scrollLeft(),r="fixed"):(a=!1,f(t,function(e){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return!(a=!0)}),a?(r="fixed",n+w.outerHeight()>d+h?(c="bottom",n=d+h-e.top):n-=h):n+t.offsetHeight>d+h&&(n=e.top-t.offsetHeight+1),n<0&&(n=0),i+t.offsetWidth>l&&(i=l-t.offsetWidth)),o=w[0],f(o,function(e){if("relative"===window.getComputedStyle(e).getPropertyValue("position")&&l>=e.offsetWidth)return i-=(l-e.offsetWidth)/2,!1}),(u={position:r,left:i,top:"",bottom:""})[c]=n,w.css(u)},w.on("open.xdsoft",function(t){var n=!0;q.onShow&&U.isFunction(q.onShow)&&(n=q.onShow.call(w,x.currentTime,w.data("input"),t)),!1!==n&&(w.show(),a(),U(window).off("resize.xdsoft",a).on("resize.xdsoft",a),q.closeOnWithoutClick&&U([document.body,window]).on("touchstart mousedown.xdsoft",function e(){w.trigger("close.xdsoft"),U([document.body,window]).off("touchstart mousedown.xdsoft",e)}))}).on("close.xdsoft",function(e){var t=!0;k.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),q.onClose&&U.isFunction(q.onClose)&&(t=q.onClose.call(w,x.currentTime,w.data("input"),e)),!1===t||q.opened||q.inline||w.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(){w.is(":visible")?w.trigger("close.xdsoft"):w.trigger("open.xdsoft")}).data("input",b),u=0,w.data("xdsoft_datetime",x),w.setOptions(q),x.setCurrentTime(t()),b.data("xdsoft_datetimepicker",w).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){b.is(":disabled")||b.data("xdsoft_datetimepicker").is(":visible")&&q.closeOnInputClick||(clearTimeout(u),u=setTimeout(function(){b.is(":disabled")||(d=!0,x.setCurrentTime(t(),!0),q.mask&&n(q),w.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(e){var t,n=e.which;return-1!==[D].indexOf(n)&&q.enterLikeTab?(t=U("input:visible,textarea:visible,button:visible,a:visible"),w.trigger("close.xdsoft"),t.eq(t.index(this)+1).focus(),!1):-1!==[j].indexOf(n)?(w.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){w.trigger("close.xdsoft")})},i=function(e){var t=e.data("xdsoft_datetimepicker");t&&(t.data("xdsoft_datetime",null),t.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),U(window).off("resize.xdsoft"),U([window,document.body]).off("mousedown.xdsoft touchstart"),e.unmousewheel&&e.unmousewheel())},U(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode===y&&(R=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===y&&(R=!1)}),this.each(function(){var e=U(this).data("xdsoft_datetimepicker");if(e){if("string"===U.type(T))switch(T){case"show":U(this).select().focus(),e.trigger("open.xdsoft");break;case"hide":e.trigger("close.xdsoft");break;case"toggle":e.trigger("toggle.xdsoft");break;case"destroy":i(U(this));break;case"reset":this.value=this.defaultValue,this.value&&e.data("xdsoft_datetime").isValidDate(X.parseDate(this.value,q.format))||e.data("changed",!1),e.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":e.data("input").trigger("blur.xdsoft");break;default:e[T]&&U.isFunction(e[T])&&(r=e[T](t))}else e.setOptions(T);return 0}"string"!==U.type(T)&&(!q.lazyInit||q.open||q.inline?n(U(this)):a(U(this)))}),r},U.fn.datetimepicker.defaults=s}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(h){function t(e){var t=e||window.event,n=v.call(arguments,1),i=0,r=0,o=0,a=0,s=0,l=0;if((e=h.event.fix(t)).type="mousewheel","detail"in t&&(o=-1*t.detail),"wheelDelta"in t&&(o=t.wheelDelta),"wheelDeltaY"in t&&(o=t.wheelDeltaY),"wheelDeltaX"in t&&(r=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(r=-1*o,o=0),i=0===o?r:o,"deltaY"in t&&(i=o=-1*t.deltaY),"deltaX"in t&&(r=t.deltaX,0===o&&(i=-1*r)),0!==o||0!==r){if(1===t.deltaMode){var c=h.data(this,"mousewheel-line-height");i*=c,o*=c,r*=c}else if(2===t.deltaMode){var u=h.data(this,"mousewheel-page-height");i*=u,o*=u,r*=u}if(a=Math.max(Math.abs(o),Math.abs(r)),(!g||a<g)&&f(t,g=a)&&(g/=40),f(t,a)&&(i/=40,r/=40,o/=40),i=Math[1<=i?"floor":"ceil"](i/g),r=Math[1<=r?"floor":"ceil"](r/g),o=Math[1<=o?"floor":"ceil"](o/g),y.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();s=e.clientX-d.left,l=e.clientY-d.top}return e.deltaX=r,e.deltaY=o,e.deltaFactor=g,e.offsetX=s,e.offsetY=l,e.deltaMode=0,n.unshift(e,i,r,o),m&&clearTimeout(m),m=setTimeout(p,200),(h.event.dispatch||h.event.handle).apply(this,n)}}function p(){g=null}function f(e,t){return y.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var m,g,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],n="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],v=Array.prototype.slice;if(h.event.fixHooks)for(var i=e.length;i;)h.event.fixHooks[e[--i]]=h.event.mouseHooks;var y=h.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=n.length;e;)this.addEventListener(n[--e],t,!1);else this.onmousewheel=t;h.data(this,"mousewheel-line-height",y.getLineHeight(this)),h.data(this,"mousewheel-page-height",y.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=n.length;e;)this.removeEventListener(n[--e],t,!1);else this.onmousewheel=null;h.removeData(this,"mousewheel-line-height"),h.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=h(e),n=t["offsetParent"in h.fn?"offsetParent":"parent"]();return n.length||(n=h("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return h(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};h.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(b){"use strict";var o=function(e,t){this.options=t,this.$element=b(e),this.$container=b("<div/>",{"class":"ms-container"}),this.$selectableContainer=b("<div/>",{"class":"ms-selectable"}),this.$selectionContainer=b("<div/>",{"class":"ms-selection"}),this.$selectableUl=b("<ul/>",{"class":"ms-list",tabindex:"-1"}),this.$selectionUl=b("<ul/>",{"class":"ms-list",tabindex:"-1"}),this.scrollTo=0,this.elemsSelector="li:visible:not(.ms-optgroup-label,.ms-optgroup-container,."+t.disabledClass+")"};o.prototype={constructor:o,init:function(){var e=this,t=this.$element;if(0===t.next(".ms-container").length){t.css({position:"absolute",left:"-9999px"}),t.attr("id",t.attr("id")?t.attr("id"):Math.ceil(1e3*Math.random())+"multiselect"),this.$container.attr("id","ms-"+t.attr("id")),this.$container.addClass(e.options.cssClass),t.find("option").each(function(){e.generateLisFromOption(this)}),this.$selectionUl.find(".ms-optgroup-label").hide(),e.options.selectableHeader&&e.$selectableContainer.append(e.options.selectableHeader),e.$selectableContainer.append(e.$selectableUl),e.options.selectableFooter&&e.$selectableContainer.append(e.options.selectableFooter),e.options.selectionHeader&&e.$selectionContainer.append(e.options.selectionHeader),e.$selectionContainer.append(e.$selectionUl),e.options.selectionFooter&&e.$selectionContainer.append(e.options.selectionFooter),e.$container.append(e.$selectableContainer),e.$container.append(e.$selectionContainer),t.after(e.$container),e.activeMouse(e.$selectableUl),e.activeKeyboard(e.$selectableUl);var n=e.options.dblClick?"dblclick":"click";e.$selectableUl.on(n,".ms-elem-selectable",function(){e.select(b(this).data("ms-value"))}),e.$selectionUl.on(n,".ms-elem-selection",function(){e.deselect(b(this).data("ms-value"))}),e.activeMouse(e.$selectionUl),e.activeKeyboard(e.$selectionUl),t.on("focus",function(){e.$selectableUl.focus()})}var i=t.find("option:selected").map(function(){return b(this).val()}).get();e.select(i,"init"),"function"==typeof e.options.afterInit&&e.options.afterInit.call(this,this.$container)},generateLisFromOption:function(e,t){for(var n=this,i=n.$element,r="",o=b(e),a=0;a<e.attributes.length;a++){var s=e.attributes[a];"value"!==s.name&&"disabled"!==s.name&&(r+=s.name+'="'+s.value+'" ')}var l=b("<li "+r+"><span>"+n.escapeHTML(o.text())+"</span></li>"),c=l.clone(),u=o.val(),d=n.sanitize(u);l.data("ms-value",u).addClass("ms-elem-selectable").attr("id",d+"-selectable"),c.data("ms-value",u).addClass("ms-elem-selection").attr("id",d+"-selection").hide(),(o.prop("disabled")||i.prop("disabled"))&&(c.addClass(n.options.disabledClass),l.addClass(n.options.disabledClass));var h=o.parent("optgroup");if(0<h.length){var p=h.attr("label"),f=n.sanitize(p),m=n.$selectableUl.find("#optgroup-selectable-"+f),g=n.$selectionUl.find("#optgroup-selection-"+f);if(0===m.length){var v='<li class="ms-optgroup-container"></li>',y='<ul class="ms-optgroup"><li class="ms-optgroup-label"><span>'+p+"</span></li></ul>";m=b(v),g=b(v),m.attr("id","optgroup-selectable-"+f),g.attr("id","optgroup-selection-"+f),m.append(b(y)),g.append(b(y)),n.options.selectableOptgroup&&(m.find(".ms-optgroup-label").on("click",function(){var e=h.children(":not(:selected, :disabled)").map(function(){return b(this).val()}).get();n.select(e)}),g.find(".ms-optgroup-label").on("click",function(){var e=h.children(":selected:not(:disabled)").map(function(){return b(this).val()}).get();n.deselect(e)})),n.$selectableUl.append(m),n.$selectionUl.append(g)}t=t==undefined?m.find("ul").children().length:t+1,l.insertAt(t,m.children()),c.insertAt(t,g.children())}else t=t==undefined?n.$selectableUl.children().length:t,l.insertAt(t,n.$selectableUl),c.insertAt(t,n.$selectionUl)},addOption:function(e){var r=this;e.value!==undefined&&null!==e.value&&(e=[e]),b.each(e,function(e,t){if(t.value!==undefined&&null!==t.value&&0===r.$element.find("option[value='"+t.value+"']").length){var n=b('<option value="'+t.value+'">'+t.text+"</option>"),i=(e=parseInt("undefined"==typeof t.index?r.$element.children().length:t.index),t.nested==undefined?r.$element:b("optgroup[label='"+t.nested+"']"));n.insertAt(e,i),r.generateLisFromOption(n.get(0),e,t.nested)}})},escapeHTML:function(e){return b("<div>").text(e).html()},activeKeyboard:function(n){var i=this;n.on("focus",function(){b(this).addClass("ms-focus")}).on("blur",function(){b(this).removeClass("ms-focus")}).on("keydown",function(e){switch(e.which){case 40:case 38:return e.preventDefault(),e.stopPropagation(),void i.moveHighlight(b(this),38===e.which?-1:1);case 37:case 39:return e.preventDefault(),e.stopPropagation(),void i.switchList(n);case 9:if(i.$element.is("[tabindex]")){e.preventDefault();var t=parseInt(i.$element.attr("tabindex"),10);return t=e.shiftKey?t-1:t+1,void b('[tabindex="'+t+'"]').focus()}e.shiftKey&&i.$element.trigger("focus")}if(-1<b.inArray(e.which,i.options.keySelect))return e.preventDefault(),e.stopPropagation(),void i.selectHighlighted(n)})},moveHighlight:function(e,t){var n=e.find(this.elemsSelector),i=n.filter(".ms-hover"),r=null,o=n.first().outerHeight(),a=e.height();this.$container.prop("id");if(n.removeClass("ms-hover"),1===t){if(0===(r=i.nextAll(this.elemsSelector).first()).length)if((l=i.parent()).hasClass("ms-optgroup")){var s=l.parent().next(":visible");r=0<s.length?s.find(this.elemsSelector).first():n.first()}else r=n.first()}else if(-1===t){var l;if(0===(r=i.prevAll(this.elemsSelector).first()).length)if((l=i.parent()).hasClass("ms-optgroup")){var c=l.parent().prev(":visible");r=0<c.length?c.find(this.elemsSelector).last():n.last()}else r=n.last()}if(0<r.length){r.addClass("ms-hover");var u=e.scrollTop()+r.position().top-a/2+o/2;e.scrollTop(u)}},selectHighlighted:function(e){var t=e.find(this.elemsSelector),n=t.filter(".ms-hover").first();0<n.length&&(e.parent().hasClass("ms-selectable")?this.select(n.data("ms-value")):this.deselect(n.data("ms-value")),t.removeClass("ms-hover"))},switchList:function(e){e.blur(),this.$container.find(this.elemsSelector).removeClass("ms-hover"),e.parent().hasClass("ms-selectable")?this.$selectionUl.focus():this.$selectableUl.focus()},activeMouse:function(){var e=this;b("body").on("mouseenter",e.elemsSelector,function(){b(this).parents(".ms-container").find(e.elemsSelector).removeClass("ms-hover"),b(this).addClass("ms-hover")}),b("body").on("mouseleave",e.elemsSelector,function(){b(this).parents(".ms-container").find(e.elemsSelector).removeClass("ms-hover")})},refresh:function(){this.destroy(),this.$element.multiSelect(this.options)},destroy:function(){b("#ms-"+this.$element.attr("id")).remove(),this.$element.css("position","").css("left",""),this.$element.removeData("multiselect")},select:function(e,t){"string"==typeof e&&(e=[e]);var n=this,i=this.$element,r=b.map(e,function(e){return n.sanitize(e)}),o=this.$selectableUl.find("#"+r.join("-selectable, #")+"-selectable").filter(":not(."+n.options.disabledClass+")"),a=this.$selectionUl.find("#"+r.join("-selection, #")+"-selection").filter(":not(."+n.options.disabledClass+")"),s=i.find("option:not(:disabled)").filter(function(){return-1<b.inArray(this.value,e)});if("init"===t&&(o=this.$selectableUl.find("#"+r.join("-selectable, #")+"-selectable"),a=this.$selectionUl.find("#"+r.join("-selection, #")+"-selection")),0<o.length){o.addClass("ms-selected").hide(),a.addClass("ms-selected").show(),s.prop("selected",!0),n.$container.find(n.elemsSelector).removeClass("ms-hover");var l=n.$selectableUl.children(".ms-optgroup-container");if(0<l.length)l.each(function(){var e=b(this).find(".ms-elem-selectable");e.length===e.filter(".ms-selected").length&&b(this).find(".ms-optgroup-label").hide()}),n.$selectionUl.children(".ms-optgroup-container").each(function(){0<b(this).find(".ms-elem-selection").filter(".ms-selected").length&&b(this).find(".ms-optgroup-label").show()});else if(n.options.keepOrder&&"init"!==t){var c=n.$selectionUl.find(".ms-selected");1<c.length&&c.last().get(0)!=a.get(0)&&a.insertAfter(c.last())}"init"!==t&&(i.trigger("change"),"function"==typeof n.options.afterSelect&&n.options.afterSelect.call(this,e))}},deselect:function(e){"string"==typeof e&&(e=[e]);var t=this,n=this.$element,i=b.map(e,function(e){return t.sanitize(e)}),r=this.$selectableUl.find("#"+i.join("-selectable, #")+"-selectable"),o=this.$selectionUl.find("#"+i.join("-selection, #")+"-selection").filter(".ms-selected").filter(":not(."+t.options.disabledClass+")"),a=n.find("option").filter(function(){return-1<b.inArray(this.value,e)});if(0<o.length){r.removeClass("ms-selected").show(),o.removeClass("ms-selected").hide(),a.prop("selected",!1),t.$container.find(t.elemsSelector).removeClass("ms-hover");var s=t.$selectableUl.children(".ms-optgroup-container");if(0<s.length)s.each(function(){0<b(this).find(".ms-elem-selectable").filter(":not(.ms-selected)").length&&b(this).find(".ms-optgroup-label").show()}),t.$selectionUl.children(".ms-optgroup-container").each(function(){0===b(this).find(".ms-elem-selection").filter(".ms-selected").length&&b(this).find(".ms-optgroup-label").hide()});n.trigger("change"),"function"==typeof t.options.afterDeselect&&t.options.afterDeselect.call(this,e)}},select_all:function(){var e=this.$element,t=e.val();if(e.find('option:not(":disabled")').prop("selected",!0),this.$selectableUl.find(".ms-elem-selectable").filter(":not(."+this.options.disabledClass+")").addClass("ms-selected").hide(),this.$selectionUl.find(".ms-optgroup-label").show(),this.$selectableUl.find(".ms-optgroup-label").hide(),this.$selectionUl.find(".ms-elem-selection").filter(":not(."+this.options.disabledClass+")").addClass("ms-selected").show(),this.$selectionUl.focus(),e.trigger("change"),"function"==typeof this.options.afterSelect){var n=b.grep(e.val(),function(e){return b.inArray(e,t)<0});this.options.afterSelect.call(this,n)}},deselect_all:function(){var e=this.$element,t=e.val();e.find("option").prop("selected",!1),this.$selectableUl.find(".ms-elem-selectable").removeClass("ms-selected").show(),this.$selectionUl.find(".ms-optgroup-label").hide(),this.$selectableUl.find(".ms-optgroup-label").show(),this.$selectionUl.find(".ms-elem-selection").removeClass("ms-selected").hide(),this.$selectableUl.focus(),e.trigger("change"),"function"==typeof this.options.afterDeselect&&this.options.afterDeselect.call(this,t)},sanitize:function(e){var t,n=0;if(0==e.length)return n;var i=0;for(t=0,i=e.length;t<i;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n}},b.fn.multiSelect=function(e){var i=e,r=arguments;return this.each(function(){var e=b(this),t=e.data("multiselect"),n=b.extend({},b.fn.multiSelect.defaults,e.data(),"object"==typeof i&&i);t||e.data("multiselect",t=new o(this,n)),"string"==typeof i?t[i](r[1]):t.init()})},b.fn.multiSelect.defaults={keySelect:[32],selectableOptgroup:!1,disabledClass:"disabled",dblClick:!1,keepOrder:!1,cssClass:""},b.fn.multiSelect.Constructor=o,b.fn.insertAt=function(e,t){return this.each(function(){0===e?t.prepend(this):t.children().eq(e-1).after(this)})}}(window.jQuery),function(u,a,o){function s(e,t,n){var i=a.createElement(e);return t&&(i.id=te+t),n&&(i.style.cssText=n),u(i)}function d(){return o.innerHeight?o.innerHeight:u(o).height()}function l(e,n){n!==Object(n)&&(n={}),this.cache={},this.el=e,this.value=function(e){var t;return void 0===this.cache[e]&&(void 0!==(t=u(this.el).attr("data-cbox-"+e))?this.cache[e]=t:void 0!==n[e]?this.cache[e]=n[e]:void 0!==Z[e]&&(this.cache[e]=Z[e])),this.cache[e]},this.get=function(e){var t=this.value(e);return u.isFunction(t)?t.call(this.el,this):t}}function c(e){var t=D.length,n=(Y+e)%t;return n<0?t+n:n}function h(e,t){return Math.round((/%/.test(e)?("x"===t?E.width():d())/100:1)*parseInt(e,10))}function p(e,t){return e.get("photo")||e.get("photoRegex").test(t)}function f(e,t){return e.get("retinaUrl")&&1<o.devicePixelRatio?t.replace(e.get("photoRegex"),e.get("retinaSuffix")):t}function m(e){"contains"in k[0]&&!k[0].contains(e.target)&&e.target!==w[0]&&(e.stopPropagation(),k.focus())}function g(e){g.str!==e&&(k.add(w).removeClass(g.str).addClass(e),g.str=e)}function v(e){Y=0,e&&!1!==e?(D=u("."+ne).filter(function(){return new l(this,u.data(this,ee)).get("rel")===e}),-1===(Y=D.index(z.el))&&(D=D.add(z.el),Y=D.length-1)):D=u(z.el)}function y(e){u(a).trigger(e),ce.triggerHandler(e)}function i(e){var t;if(!J){if(t=u(e).data("colorbox"),v((z=new l(e,t)).get("rel")),!X){X=V=!0,g(z.get("className")),k.css({visibility:"hidden",display:"block",opacity:""}),I=s(ue,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),C.css({width:"",height:""}).append(I),B=S.height()+M.height()+C.outerHeight(!0)-C.height(),R=$.width()+T.width()+C.outerWidth(!0)-C.width(),q=I.outerHeight(!0),U=I.outerWidth(!0);var n=h(z.get("initialWidth"),"x"),i=h(z.get("initialHeight"),"y"),r=z.get("maxWidth"),o=z.get("maxHeight");z.w=(!1!==r?Math.min(n,h(r,"x")):n)-U-R,z.h=(!1!==o?Math.min(i,h(o,"y")):i)-q-B,I.css({width:"",height:z.h}),Q.position(),y(ie),z.get("onOpen"),H.add(O).hide(),k.focus(),z.get("trapFocus")&&a.addEventListener&&(a.addEventListener("focus",m,!0),ce.one(se,function(){a.removeEventListener("focus",m,!0)})),z.get("returnFocus")&&ce.one(se,function(){u(z.el).focus()})}w.css({opacity:parseFloat(z.get("opacity"))||"",cursor:z.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),z.get("closeButton")?W.html(z.get("close")).appendTo(C):W.appendTo("<div/>"),x()}}function r(){!k&&a.body&&(t=!1,E=u(o),k=s(ue).attr({id:ee,"class":!1===u.support.opacity?te+"IE":"",role:"dialog",tabindex:"-1"}).hide(),w=s(ue,"Overlay").hide(),L=u([s(ue,"LoadingOverlay")[0],s(ue,"LoadingGraphic")[0]]),_=s(ue,"Wrapper"),C=s(ue,"Content").append(O=s(ue,"Title"),F=s(ue,"Current"),N=u('<button type="button"/>').attr({id:te+"Previous"}),A=u('<button type="button"/>').attr({id:te+"Next"}),j=s("button","Slideshow"),L),W=u('<button type="button"/>').attr({id:te+"Close"}),_.append(s(ue).append(s(ue,"TopLeft"),S=s(ue,"TopCenter"),s(ue,"TopRight")),s(ue,!1,"clear:left").append($=s(ue,"MiddleLeft"),C,T=s(ue,"MiddleRight")),s(ue,!1,"clear:left").append(s(ue,"BottomLeft"),M=s(ue,"BottomCenter"),s(ue,"BottomRight"))).find("div div").css({"float":"left"}),P=s(ue,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),H=A.add(N).add(F).add(j),u(a.body).append(w,k.append(_,P)))}function b(){function e(e){1<e.which||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),i(this))}return!!k&&(t||(t=!0,A.click(function(){Q.next()}),N.click(function(){Q.prev()}),W.click(function(){Q.close()}),w.click(function(){z.get("overlayClose")&&Q.close()}),u(a).bind("keydown."+te,function(e){var t=e.keyCode;X&&z.get("escKey")&&27===t&&(e.preventDefault(),Q.close()),X&&z.get("arrowKey")&&D[1]&&!e.altKey&&(37===t?(e.preventDefault(),N.click()):39===t&&(e.preventDefault(),A.click()))}),u.isFunction(u.fn.on)?u(a).on("click."+te,"."+ne,e):u("."+ne).live("click."+te,e)),!0)}function x(){var e,t,n,i=Q.prep,r=++de;G=!(V=!0),y(le),y(re),z.get("onLoad"),z.h=z.get("height")?h(z.get("height"),"y")-q-B:z.get("innerHeight")&&h(z.get("innerHeight"),"y"),z.w=z.get("width")?h(z.get("width"),"x")-U-R:z.get("innerWidth")&&h(z.get("innerWidth"),"x"),z.mw=z.w,z.mh=z.h,z.get("maxWidth")&&(z.mw=h(z.get("maxWidth"),"x")-U-R,z.mw=z.w&&z.w<z.mw?z.w:z.mw),z.get("maxHeight")&&(z.mh=h(z.get("maxHeight"),"y")-q-B,z.mh=z.h&&z.h<z.mh?z.h:z.mh),e=z.get("href"),K=setTimeout(function(){L.show()},100),z.get("inline")?(n=s(ue).hide().insertBefore(u(e)[0]),ce.one(le,function(){n.replaceWith(I.children())}),i(u(e))):z.get("iframe")?i(" "):z.get("html")?i(z.get("html")):p(z,e)?(e=f(z,e),G=new Image,u(G).addClass(te+"Photo").bind("error",function(){i(s(ue,"Error").html(z.get("imgError")))}).one("load",function(){r===de&&setTimeout(function(){var e;u.each(["alt","longdesc","aria-describedby"],function(e,t){var n=u(z.el).attr(t)||u(z.el).attr("data-"+t);n&&G.setAttribute(t,n)}),z.get("retinaImage")&&1<o.devicePixelRatio&&(G.height=G.height/o.devicePixelRatio,G.width=G.width/o.devicePixelRatio),z.get("scalePhotos")&&(t=function(){G.height-=G.height*e,G.width-=G.width*e},z.mw&&G.width>z.mw&&(e=(G.width-z.mw)/G.width,t()),z.mh&&G.height>z.mh&&(e=(G.height-z.mh)/G.height,t())),z.h&&(G.style.marginTop=Math.max(z.mh-G.height,0)/2+"px"),D[1]&&(z.get("loop")||D[Y+1])&&(G.style.cursor="pointer",G.onclick=function(){Q.next()}),G.style.width=G.width+"px",G.style.height=G.height+"px",i(G)},1)}),G.src=e):e&&P.load(e,z.get("data"),function(e,t){r===de&&i("error"===t?s(ue,"Error").html(z.get("xhrError")):u(this).contents())})}var w,k,_,C,S,$,T,M,D,E,I,P,L,O,F,j,A,N,W,H,z,B,R,q,U,Y,G,X,V,J,K,Q,t,Z={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return u(this).attr("href")},title:function(){return this.title}},ee="colorbox",te="cbox",ne=te+"Element",ie=te+"_open",re=te+"_load",oe=te+"_complete",ae=te+"_cleanup",se=te+"_closed",le=te+"_purge",ce=u("<a/>"),ue="div",de=0,he={},pe=function(){function e(){clearTimeout(a)}function t(){(z.get("loop")||D[Y+1])&&(e(),a=setTimeout(Q.next,z.get("slideshowSpeed")))}function n(){j.html(z.get("slideshowStop")).unbind(l).one(l,i),ce.bind(oe,t).bind(re,e),k.removeClass(s+"off").addClass(s+"on")}function i(){e(),ce.unbind(oe,t).unbind(re,e),j.html(z.get("slideshowStart")).unbind(l).one(l,function(){Q.next(),n()}),k.removeClass(s+"on").addClass(s+"off")}function r(){o=!1,j.hide(),e(),ce.unbind(oe,t).unbind(re,e),k.removeClass(s+"off "+s+"on")}var o,a,s=te+"Slideshow_",l="click."+te;return function(){o?z.get("slideshow")||(ce.unbind(ae,r),r()):z.get("slideshow")&&D[1]&&(o=!0,ce.one(ae,r),z.get("slideshowAuto")?n():i(),j.show())}}();u.colorbox||(u(r),(Q=u.fn[ee]=u[ee]=function(t,e){var n=this;if(t=t||{},u.isFunction(n))n=u("<a/>"),t.open=!0;else if(!n[0])return n;return n[0]&&(r(),b()&&(e&&(t.onComplete=e),n.each(function(){var e=u.data(this,ee)||{};u.data(this,ee,u.extend(e,t))}).addClass(ne),new l(n[0],t).get("open")&&i(n[0]))),n}).position=function(t,e){function n(){S[0].style.width=M[0].style.width=C[0].style.width=parseInt(k[0].style.width,10)-R+"px",C[0].style.height=$[0].style.height=T[0].style.height=parseInt(k[0].style.height,10)-B+"px"}var i,r,o,a=0,s=0,l=k.offset();if(E.unbind("resize."+te),k.css({top:-9e4,left:-9e4}),r=E.scrollTop(),o=E.scrollLeft(),z.get("fixed")?(l.top-=r,l.left-=o,k.css({position:"fixed"})):(a=r,s=o,k.css({position:"absolute"})),s+=!1!==z.get("right")?Math.max(E.width()-z.w-U-R-h(z.get("right"),"x"),0):!1!==z.get("left")?h(z.get("left"),"x"):Math.round(Math.max(E.width()-z.w-U-R,0)/2),a+=!1!==z.get("bottom")?Math.max(d()-z.h-q-B-h(z.get("bottom"),"y"),0):!1!==z.get("top")?h(z.get("top"),"y"):Math.round(Math.max(d()-z.h-q-B,0)/2),k.css({top:l.top,left:l.left,visibility:"visible"}),_[0].style.width=_[0].style.height="9999px",i={width:z.w+U+R,height:z.h+q+B,top:a,left:s},t){var c=0;u.each(i,function(e){return i[e]!==he[e]?void(c=t):void 0}),t=c}he=i,t||k.css(i),k.dequeue().animate(i,{duration:t||0,complete:function(){n(),V=!1,_[0].style.width=z.w+U+R+"px",_[0].style.height=z.h+q+B+"px",z.get("reposition")&&setTimeout(function(){E.bind("resize."+te,Q.position)},1),e&&e()},step:n})},Q.resize=function(e){var t;X&&((e=e||{}).width&&(z.w=h(e.width,"x")-U-R),e.innerWidth&&(z.w=h(e.innerWidth,"x")),I.css({width:z.w}),e.height&&(z.h=h(e.height,"y")-q-B),e.innerHeight&&(z.h=h(e.innerHeight,"y")),e.innerHeight||e.height||(
  t=I.scrollTop(),I.css({height:"auto"}),z.h=I.height()),I.css({height:z.h}),t&&I.scrollTop(t),Q.position("none"===z.get("transition")?0:z.get("speed")))},Q.prep=function(e){function t(){return z.w=z.w||I.width(),z.w=z.mw&&z.mw<z.w?z.mw:z.w,z.w}function n(){return z.h=z.h||I.height(),z.h=z.mh&&z.mh<z.h?z.mh:z.h,z.h}if(X){var i,r="none"===z.get("transition")?0:z.get("speed");I.remove(),(I=s(ue,"LoadedContent").append(e)).hide().appendTo(P.show()).css({width:t(),overflow:z.get("scrolling")?"auto":"hidden"}).css({height:n()}).prependTo(C),P.hide(),u(G).css({"float":"none"}),g(z.get("className")),i=function(){function e(){!1===u.support.opacity&&k[0].style.removeAttribute("filter")}var t,n,i=D.length;X&&(n=function(){clearTimeout(K),L.hide(),y(oe),z.get("onComplete")},O.html(z.get("title")).show(),I.show(),1<i?("string"==typeof z.get("current")&&F.html(z.get("current").replace("{current}",Y+1).replace("{total}",i)).show(),A[z.get("loop")||Y<i-1?"show":"hide"]().html(z.get("next")),N[z.get("loop")||Y?"show":"hide"]().html(z.get("previous")),pe(),z.get("preloading")&&u.each([c(-1),c(1)],function(){var e=D[this],t=new l(e,u.data(e,ee)),n=t.get("href");n&&p(t,n)&&(n=f(t,n),a.createElement("img").src=n)})):H.hide(),z.get("iframe")?("frameBorder"in(t=a.createElement("iframe"))&&(t.frameBorder=0),"allowTransparency"in t&&(t.allowTransparency="true"),z.get("scrolling")||(t.scrolling="no"),u(t).attr({src:z.get("href"),name:(new Date).getTime(),"class":te+"Iframe",allowFullScreen:!0}).one("load",n).appendTo(I),ce.one(le,function(){t.src="//about:blank"}),z.get("fastIframe")&&u(t).trigger("load")):n(),"fade"===z.get("transition")?k.fadeTo(r,1,e):e())},"fade"===z.get("transition")?k.fadeTo(r,0,function(){Q.position(0,i)}):Q.position(r,i)}},Q.next=function(){!V&&D[1]&&(z.get("loop")||D[Y+1])&&(Y=c(1),i(D[Y]))},Q.prev=function(){!V&&D[1]&&(z.get("loop")||Y)&&(Y=c(-1),i(D[Y]))},Q.close=function(){X&&!J&&(X=!(J=!0),y(ae),z.get("onCleanup"),E.unbind("."+te),w.fadeTo(z.get("fadeOut")||0,0),k.stop().fadeTo(z.get("fadeOut")||0,0,function(){k.hide(),w.hide(),y(le),I.remove(),setTimeout(function(){J=!1,y(se),z.get("onClosed")},1)}))},Q.remove=function(){k&&(k.stop(),u.colorbox.close(),k.stop().remove(),w.remove(),J=!1,k=null,u("."+ne).removeData(ee).removeClass(ne),u(a).unbind("click."+te))},Q.element=function(){return u(z.el)},Q.settings=Z)}(jQuery,document,window),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(w){"use strict";function n(t,e){var n,i,r,o,a,s=w('<div class="minicolors" />'),l=w.minicolors.defaults;if(!t.data("minicolors-initialized")){if(e=w.extend(!0,{},l,e),s.addClass("minicolors-theme-"+e.theme).toggleClass("minicolors-with-opacity",e.opacity),e.position!==undefined&&w.each(e.position.split(" "),function(){s.addClass("minicolors-position-"+this)}),n="rgb"===e.format?e.opacity?"25":"20":e.keywords?"11":"7",t.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",e).prop("size",n).wrap(s).after('<div class="minicolors-panel minicolors-slider-'+e.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),e.inline||(t.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'),t.next(".minicolors-input-swatch").on("click",function(e){e.preventDefault(),t.focus()})),(o=t.parent().find(".minicolors-panel")).on("selectstart",function(){return!1}).end(),e.swatches&&0!==e.swatches.length)for(o.addClass("minicolors-with-swatches"),i=w('<ul class="minicolors-swatches"></ul>').appendTo(o),a=0;a<e.swatches.length;++a)r=D(r=e.swatches[a])?$(r,!0):h(_(r,!0)),w('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color"></span></li>').appendTo(i).data("swatch-color",e.swatches[a]).find(".minicolors-swatch-color").css({backgroundColor:u(r),opacity:r.a}),e.swatches[a]=r;e.inline&&t.parent().addClass("minicolors-inline"),c(t,!1),t.data("minicolors-initialized",!0)}}function i(e){var t=e.parent();e.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),t.before(e).remove()}function r(e){var t=e.parent(),n=t.find(".minicolors-panel"),i=e.data("minicolors-settings");!e.data("minicolors-initialized")||e.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus")||(o(),t.addClass("minicolors-focus"),n.stop(!0,!0).fadeIn(i.showSpeed,function(){i.show&&i.show.call(e.get(0))}))}function o(){w(".minicolors-focus").each(function(){var e=w(this),t=e.find(".minicolors-input"),n=e.find(".minicolors-panel"),i=t.data("minicolors-settings");n.fadeOut(i.hideSpeed,function(){i.hide&&i.hide.call(t.get(0)),e.removeClass("minicolors-focus")})})}function a(e,t,n){var i,r,o,a,s=e.parents(".minicolors").find(".minicolors-input"),l=s.data("minicolors-settings"),c=e.find("[class$=-picker]"),u=e.offset().left,d=e.offset().top,h=Math.round(t.pageX-u),p=Math.round(t.pageY-d),f=n?l.animationSpeed:0;t.originalEvent.changedTouches&&(h=t.originalEvent.changedTouches[0].pageX-u,p=t.originalEvent.changedTouches[0].pageY-d),h<0&&(h=0),p<0&&(p=0),h>e.width()&&(h=e.width()),p>e.height()&&(p=e.height()),e.parent().is(".minicolors-slider-wheel")&&c.parent().is(".minicolors-grid")&&(i=75-h,r=75-p,o=Math.sqrt(i*i+r*r),(a=Math.atan2(r,i))<0&&(a+=2*Math.PI),75<o&&(h=(o=75)-75*Math.cos(a),p=75-75*Math.sin(a)),h=Math.round(h),p=Math.round(p)),e.is(".minicolors-grid")?c.stop(!0).animate({top:p+"px",left:h+"px"},f,l.animationEasing,function(){m(s,e)}):c.stop(!0).animate({top:p+"px"},f,l.animationEasing,function(){m(s,e)})}function m(e,t){function n(e,t){var n,i;return e.length&&t?(n=e.offset().left,i=e.offset().top,{x:n-t.offset().left+e.outerWidth()/2,y:i-t.offset().top+e.outerHeight()/2}):null}var i,r,o,a,s,l,c,u=e.val(),d=e.attr("data-opacity"),h=e.parent(),p=e.data("minicolors-settings"),f=h.find(".minicolors-input-swatch"),m=h.find(".minicolors-grid"),g=h.find(".minicolors-slider"),v=h.find(".minicolors-opacity-slider"),y=m.find("[class$=-picker]"),b=g.find("[class$=-picker]"),x=v.find("[class$=-picker]"),w=n(y,m),k=n(b,g),_=n(x,v);if(t.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(p.control){case"wheel":a=m.width()/2-w.x,s=m.height()/2-w.y,l=Math.sqrt(a*a+s*s),(c=Math.atan2(s,a))<0&&(c+=2*Math.PI),75<l&&(l=75,w.x=69-75*Math.cos(c),w.y=69-75*Math.sin(c)),r=M(l/.75,0,100),u=P({h:i=M(180*c/Math.PI,0,360),s:r,b:o=M(100-Math.floor(k.y*(100/g.height())),0,100)}),g.css("backgroundColor",P({h:i,s:r,b:100}));break;case"saturation":u=P({h:i=M(parseInt(w.x*(360/m.width()),10),0,360),s:r=M(100-Math.floor(k.y*(100/g.height())),0,100),b:o=M(100-Math.floor(w.y*(100/m.height())),0,100)}),g.css("backgroundColor",P({h:i,s:100,b:o})),h.find(".minicolors-grid-inner").css("opacity",r/100);break;case"brightness":u=P({h:i=M(parseInt(w.x*(360/m.width()),10),0,360),s:r=M(100-Math.floor(w.y*(100/m.height())),0,100),b:o=M(100-Math.floor(k.y*(100/g.height())),0,100)}),g.css("backgroundColor",P({h:i,s:r,b:100})),h.find(".minicolors-grid-inner").css("opacity",1-o/100);break;default:u=P({h:i=M(360-parseInt(k.y*(360/g.height()),10),0,360),s:r=M(Math.floor(w.x*(100/m.width())),0,100),b:o=M(100-Math.floor(w.y*(100/m.height())),0,100)}),m.css("backgroundColor",P({h:i,s:100,b:100}))}C(e,u,d=p.opacity?parseFloat(1-_.y/v.height()).toFixed(2):1)}else f.find("span").css({backgroundColor:u,opacity:d}),S(e,u,d)}function C(e,t,n){var i,r=e.parent(),o=e.data("minicolors-settings"),a=r.find(".minicolors-input-swatch");o.opacity&&e.attr("data-opacity",n),"rgb"===o.format?(i=D(t)?$(t,!0):h(_(t,!0)),n=""===e.attr("data-opacity")?1:M(parseFloat(e.attr("data-opacity")).toFixed(2),0,1),!isNaN(n)&&o.opacity||(n=1),t=e.minicolors("rgbObject").a<=1&&i&&o.opacity?"rgba("+i.r+", "+i.g+", "+i.b+", "+parseFloat(n)+")":"rgb("+i.r+", "+i.g+", "+i.b+")"):(D(t)&&(t=I(t)),t=k(t,o.letterCase)),e.val(t),a.find("span").css({backgroundColor:t,opacity:n}),S(e,t,n)}function c(e,t){var n,i,r,o,a,s,l,c,u,d,h=e.parent(),p=e.data("minicolors-settings"),f=h.find(".minicolors-input-swatch"),m=h.find(".minicolors-grid"),g=h.find(".minicolors-slider"),v=h.find(".minicolors-opacity-slider"),y=m.find("[class$=-picker]"),b=g.find("[class$=-picker]"),x=v.find("[class$=-picker]");switch(D(e.val())?(n=I(e.val()),(a=M(parseFloat(E(e.val())).toFixed(2),0,1))&&e.attr("data-opacity",a)):n=k(_(e.val(),!0),p.letterCase),n||(n=k(T(p.defaultValue,!0),p.letterCase)),i=L(n),o=p.keywords?w.map(p.keywords.split(","),function(e){return w.trim(e.toLowerCase())}):[],s=""!==e.val()&&-1<w.inArray(e.val().toLowerCase(),o)?k(e.val()):D(e.val())?$(e.val()):n,t||e.val(s),p.opacity&&(r=""===e.attr("data-opacity")?1:M(parseFloat(e.attr("data-opacity")).toFixed(2),0,1),isNaN(r)&&(r=1),e.attr("data-opacity",r),f.find("span").css("opacity",r),c=M(v.height()-v.height()*r,0,v.height()),x.css("top",c+"px")),"transparent"===e.val().toLowerCase()&&f.find("span").css("opacity",0),f.find("span").css("backgroundColor",n),p.control){case"wheel":u=M(Math.ceil(.75*i.s),0,m.height()/2),d=i.h*Math.PI/180,l=M(75-Math.cos(d)*u,0,m.width()),c=M(75-Math.sin(d)*u,0,m.height()),y.css({top:c+"px",left:l+"px"}),c=150-i.b/(100/m.height()),""===n&&(c=0),b.css("top",c+"px"),g.css("backgroundColor",P({h:i.h,s:i.s,b:100}));break;case"saturation":l=M(5*i.h/12,0,150),c=M(m.height()-Math.ceil(i.b/(100/m.height())),0,m.height()),y.css({top:c+"px",left:l+"px"}),c=M(g.height()-i.s*(g.height()/100),0,g.height()),b.css("top",c+"px"),g.css("backgroundColor",P({h:i.h,s:100,b:i.b})),h.find(".minicolors-grid-inner").css("opacity",i.s/100);break;case"brightness":l=M(5*i.h/12,0,150),c=M(m.height()-Math.ceil(i.s/(100/m.height())),0,m.height()),y.css({top:c+"px",left:l+"px"}),c=M(g.height()-i.b*(g.height()/100),0,g.height()),b.css("top",c+"px"),g.css("backgroundColor",P({h:i.h,s:i.s,b:100})),h.find(".minicolors-grid-inner").css("opacity",1-i.b/100);break;default:l=M(Math.ceil(i.s/(100/m.width())),0,m.width()),c=M(m.height()-Math.ceil(i.b/(100/m.height())),0,m.height()),y.css({top:c+"px",left:l+"px"}),c=M(g.height()-i.h/(360/g.height()),0,g.height()),b.css("top",c+"px"),m.css("backgroundColor",P({h:i.h,s:100,b:100}))}e.data("minicolors-initialized")&&S(e,s,r)}function S(e,t,n){var i,r,o,a=e.data("minicolors-settings"),s=e.data("minicolors-lastChange");if(!s||s.value!==t||s.opacity!==n){if(e.data("minicolors-lastChange",{value:t,opacity:n}),a.swatches&&0!==a.swatches.length){for(i=D(t)?$(t,!0):h(t),r=-1,o=0;o<a.swatches.length;++o)if(i.r===a.swatches[o].r&&i.g===a.swatches[o].g&&i.b===a.swatches[o].b&&i.a===a.swatches[o].a){r=o;break}e.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"),-1!==r&&e.parent().find(".minicolors-swatches .minicolors-swatch").eq(o).addClass("selected")}a.change&&(a.changeDelay?(clearTimeout(e.data("minicolors-changeTimeout")),e.data("minicolors-changeTimeout",setTimeout(function(){a.change.call(e.get(0),t,n)},a.changeDelay))):a.change.call(e.get(0),t,n)),e.trigger("change").trigger("input")}}function s(e){var t,n=w(e).attr("data-opacity");D(w(e).val())?t=$(w(e).val(),!0):t=h(_(w(e).val(),!0));return t?(n!==undefined&&w.extend(t,{a:parseFloat(n)}),t):null}function l(e,t){var n,i=w(e).attr("data-opacity");D(w(e).val())?n=$(w(e).val(),!0):n=h(_(w(e).val(),!0));return n?(i===undefined&&(i=1),t?"rgba("+n.r+", "+n.g+", "+n.b+", "+parseFloat(i)+")":"rgb("+n.r+", "+n.g+", "+n.b+")"):null}function k(e,t){return"uppercase"===t?e.toUpperCase():e.toLowerCase()}function _(e,t){return(e=e.replace(/^#/g,"")).match(/^[A-F0-9]{3,6}/gi)?3!==e.length&&6!==e.length?"":(3===e.length&&t&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),"#"+e):""}function $(e,t){var n=e.replace(/[^\d,.]/g,"").split(",");return n[0]=M(parseInt(n[0],10),0,255),n[1]=M(parseInt(n[1],10),0,255),n[2]=M(parseInt(n[2],10),0,255),n[3]&&(n[3]=M(parseFloat(n[3],10),0,1)),t?n[3]?{r:n[0],g:n[1],b:n[2],a:n[3]}:{r:n[0],g:n[1],b:n[2]}:"undefined"!=typeof n[3]&&n[3]<=1?"rgba("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+")":"rgb("+n[0]+", "+n[1]+", "+n[2]+")"}function T(e,t){return D(e)?$(e):_(e,t)}function M(e,t,n){return e<t&&(e=t),n<e&&(e=n),e}function D(e){var t=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!t||4!==t.length)}function E(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i))&&6===e.length?e[4]:"1"}function t(e){var t={},n=Math.round(e.h),i=Math.round(255*e.s/100),r=Math.round(255*e.b/100);if(0===i)t.r=t.g=t.b=r;else{var o=r,a=(255-i)*r/255,s=n%60*(o-a)/60;360===n&&(n=0),n<60?(t.r=o,t.b=a,t.g=a+s):n<120?(t.g=o,t.b=a,t.r=o-s):n<180?(t.g=o,t.r=a,t.b=a+s):n<240?(t.b=o,t.r=a,t.g=o-s):n<300?(t.b=o,t.g=a,t.r=a+s):n<360?(t.r=o,t.g=a,t.b=o-s):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}function I(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}function u(e){var n=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];return w.each(n,function(e,t){1===t.length&&(n[e]="0"+t)}),"#"+n.join("")}function P(e){return u(t(e))}function L(e){var t=d(h(e));return 0===t.s&&(t.h=360),t}function d(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),i=Math.max(e.r,e.g,e.b),r=i-n;return t.b=i,t.s=0!==i?255*r/i:0,0!==t.s?e.r===i?t.h=(e.g-e.b)/r:e.g===i?t.h=2+(e.b-e.r)/r:t.h=4+(e.r-e.g)/r:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}function h(e){return{r:(e=parseInt(-1<e.indexOf("#")?e.substring(1):e,16))>>16,g:(65280&e)>>8,b:255&e}}w.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default",swatches:[]}},w.extend(w.fn,{minicolors:function(e,t){switch(e){case"destroy":return w(this).each(function(){i(w(this))}),w(this);case"hide":return o(),w(this);case"opacity":return t===undefined?w(this).attr("data-opacity"):(w(this).each(function(){c(w(this).attr("data-opacity",t))}),w(this));case"rgbObject":return s(w(this),"rgbaObject"===e);case"rgbString":case"rgbaString":return l(w(this),"rgbaString"===e);case"settings":return t===undefined?w(this).data("minicolors-settings"):(w(this).each(function(){var e=w(this).data("minicolors-settings")||{};i(w(this)),w(this).minicolors(w.extend(!0,e,t))}),w(this));case"show":return r(w(this).eq(0)),w(this);case"value":return t===undefined?w(this).val():(w(this).each(function(){"object"==typeof t&&"null"!==t?(t.opacity&&w(this).attr("data-opacity",M(t.opacity,0,1)),t.color&&w(this).val(t.color)):w(this).val(t),c(w(this))}),w(this));default:return"create"!==e&&(t=e),w(this).each(function(){n(w(this),t)}),w(this)}}}),w([document]).on("mousedown.minicolors touchstart.minicolors",function(e){w(e.target).parents().add(e.target).hasClass("minicolors")||o()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(e){var t=w(this);e.preventDefault(),w(e.delegateTarget).data("minicolors-target",t),a(t,e,!0)}).on("mousemove.minicolors touchmove.minicolors",function(e){var t=w(e.delegateTarget).data("minicolors-target");t&&a(t,e)}).on("mouseup.minicolors touchend.minicolors",function(){w(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(e){e.preventDefault();var t=w(this),n=t.parents(".minicolors").find(".minicolors-input"),i=t.data("swatch-color");C(n,i,E(i)),c(n)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(e){var t=w(this).parent().find(".minicolors-input");e.preventDefault(),r(t)}).on("focus.minicolors",".minicolors-input",function(){var e=w(this);e.data("minicolors-initialized")&&r(e)}).on("blur.minicolors",".minicolors-input",function(){var e,t,n,i,r,o=w(this),a=o.data("minicolors-settings");o.data("minicolors-initialized")&&(e=a.keywords?w.map(a.keywords.split(","),function(e){return w.trim(e.toLowerCase())}):[],r=""!==o.val()&&-1<w.inArray(o.val().toLowerCase(),e)?o.val():null===(n=D(o.val())?$(o.val(),!0):(t=_(o.val(),!0))?h(t):null)?a.defaultValue:"rgb"===a.format?a.opacity?$("rgba("+n.r+","+n.g+","+n.b+","+o.attr("data-opacity")+")"):$("rgb("+n.r+","+n.g+","+n.b+")"):u(n),i=a.opacity?o.attr("data-opacity"):1,"transparent"===r.toLowerCase()&&(i=0),o.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",i),o.val(r),""===o.val()&&o.val(T(a.defaultValue,!0)),o.val(k(o.val(),a.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(e){var t=w(this);if(t.data("minicolors-initialized"))switch(e.keyCode){case 9:o();break;case 13:case 27:o(),t.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var e=w(this);e.data("minicolors-initialized")&&c(e,!0)}).on("paste.minicolors",".minicolors-input",function(){var e=w(this);e.data("minicolors-initialized")&&setTimeout(function(){c(e,!0)},1)})}),function(m){var g,e={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},v=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace"],y=m('<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>').data("autosize",!0)[0];(y.style.lineHeight="99px")===m(y).css("lineHeight")&&v.push("lineHeight"),y.style.lineHeight="",m.fn.autosize=function(f){return this.length?(f=m.extend({},e,f||{}),y.parentNode!==document.body&&m(document.body).append(y),this.each(function(){function i(){var n,i=window.getComputedStyle?window.getComputedStyle(s,null):null;i?(n=parseFloat(i.width),"border-box"!==i.boxSizing&&"border-box"!==i.webkitBoxSizing&&"border-box"!==i.mozBoxSizing||m.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(e,t){n-=parseFloat(i[t])})):n=l.width(),y.style.width=Math.max(n,0)+"px"}function n(){var n={};if(g=s,y.className=f.className,y.id=f.id,r=parseFloat(l.css("maxHeight")),m.each(v,function(e,t){n[t]=l.css(t)}),m(y).css(n).attr("wrap",l.attr("wrap")),i(),window.chrome){var e=s.style.width;s.style.width="0px";s.offsetWidth;s.style.width=e}}function t(){var e,t;g!==s?n():i(),!s.value&&f.placeholder?y.value=l.attr("placeholder")||"":y.value=s.value,y.value+=f.append||"",y.style.overflowY=s.style.overflowY,t=parseFloat(s.style.height)||0,y.scrollTop=0,y.scrollTop=9e4,e=y.scrollTop,r&&r<e?(s.style.overflowY="scroll",e=r):(s.style.overflowY="hidden",e<o&&(e=o)),e+=c,.01<Math.abs(t-e)&&(s.style.height=e+"px",y.className=y.className,u&&f.callback.call(s,s),l.trigger("autosize.resized"))}function e(){clearTimeout(a),a=setTimeout(function(){var e=l.width();e!==h&&(h=e,t())},parseInt(f.resizeDelay,10))}var r,o,a,s=this,l=m(s),c=0,u=m.isFunction(f.callback),d={height:s.style.height,overflow:s.style.overflow,overflowY:s.style.overflowY,wordWrap:s.style.wordWrap,resize:s.style.resize},h=l.width(),p=l.css("resize");l.data("autosize")||(l.data("autosize",!0),"border-box"!==l.css("box-sizing")&&"border-box"!==l.css("-moz-box-sizing")&&"border-box"!==l.css("-webkit-box-sizing")||(c=l.outerHeight()-l.height()),o=Math.max(parseFloat(l.css("minHeight"))-c||0,l.height()),l.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word"}),"vertical"===p?l.css("resize","none"):"both"===p&&l.css("resize","horizontal"),"onpropertychange"in s?"oninput"in s?l.on("input.autosize keyup.autosize",t):l.on("propertychange.autosize",function(){"value"===event.propertyName&&t()}):l.on("input.autosize",t),!1!==f.resizeDelay&&m(window).on("resize.autosize",e),l.on("autosize.resize",t),l.on("autosize.resizeIncludeStyle",function(){g=null,t()}),l.on("autosize.destroy",function(){g=null,clearTimeout(a),m(window).off("resize",e),l.off("autosize").off(".autosize").css(d).removeData("autosize")}),t())})):this}}(jQuery||$),function(){function c(e){this.tokens=[],this.tokens.links={},this.options=e||p.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function i(e,t){if(this.options=t||p.defaults,this.links=e,this.rules=r.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=r.breaks:this.rules=r.gfm:this.options.pedantic&&(this.rules=r.pedantic)}function n(e){this.options=e||{}}function u(e){this.tokens=[],this.token=null,this.options=e||p.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function d(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function a(e){return e.replace(/&([#\w]+);/g,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function e(i,r){return i=i.source,r=r||"",function e(t,n){return t?(n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),i=i.replace(t,n),e):new RegExp(i,r)}}function t(){}function h(e){for(var t,n,i=1;i<arguments.length;i++)for(n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function p(e,n,i){if(i||"function"==typeof n){i||(i=n,n=null);var r,o,a=(n=h({},p.defaults,n||{})).highlight,t=0;try{r=c.lex(e,n)}catch(l){return i(l)}o=r.length;var s=function(){var e,t;try{e=u.parse(r,n)}catch(l){t=l}return n.highlight=a,t?i(t):i(null,e)};if(!a||a.length<3)return s();if(delete n.highlight,!o)return s();for(;t<r.length;t++)!function(n){"code"!==n.type?--o||s():a(n.text,n.lang,function(e,t){if(null==t||t===n.text)return--o||s();n.text=t,n.escaped=!0,--o||s()})}(r[t])}else try{return n&&(n=h({},p.defaults,n)),u.parse(c.lex(e,n),n)}catch(l){if(l.message+="\nPlease report this to https://github.com/chjj/marked.",(n||p.defaults).silent)return"<p>An error occured:</p><pre>"+d(l.message+"",!0)+"</pre>";throw l}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:t,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:t,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:t,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};f.item=e(f.item,"gm")(/bull/g,f.bullet)(),f.list=e(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=e(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=e(f.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,f._tag)(),f.paragraph=e(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=h({},f),f.gfm=h({},f.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),f.gfm.paragraph=e(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=h({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),c.rules=f,c.lex=function(e,t){return new c(t).lex(e)},c.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},c.prototype.token=function(e,t,n){var i,r,o,a,s,l,c,u,d;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),1<o[0].length&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u<l.align.length;u++)/^ *-+: *$/.test(l.align[u])?l.align[u]="right":/^ *:-+: *$/.test(l.align[u])?l.align[u]="center":/^ *:-+ *$/.test(l.align[u])?l.align[u]="left":l.align[u]=null;for(u=0;u<l.cells.length;u++)l.cells[u]=l.cells[u].split(/ *\| */);this.tokens.push(l)}else if(o=this.rules.lheading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:"="===o[2]?1:2,text:o[1]});else if(o=this.rules.hr.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"hr"});else if(o=this.rules.blockquote.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"blockquote_start"}),o=o[0].replace(/^ *> ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:1<a.length}),i=!1,d=(o=o[0].match(this.rules.item)).length,u=0;u<d;u++)c=(l=o[u]).length,~(l=l.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(c-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+c+"}","gm"),"")),this.options.smartLists&&u!==d-1&&(a===(s=f.bullet.exec(o[u+1])[0])||1<a.length&&1<s.length||(e=o.slice(u+1).join("\n")+e,u=d-1)),r=i||/\n\n(?!\s*$)/.test(l),u!==d-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===o[1]||"script"===o[1]||"style"===o[1],text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u<l.align.length;u++)/^ *-+: *$/.test(l.align[u])?l.align[u]="right":/^ *:-+: *$/.test(l.align[u])?l.align[u]="center":/^ *:-+ *$/.test(l.align[u])?l.align[u]="left":l.align[u]=null;for(u=0;u<l.cells.length;u++)l.cells[u]=l.cells[u].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(l)}else if(t&&(o=this.rules.paragraph.exec(e)))e=e.substring(o[0].length),this.tokens.push({type:"paragraph",text:"\n"===o[1].charAt(o[1].length-1)?o[1].slice(0,-1):o[1]});else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"text",text:o[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var r={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:t,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:t,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/,_inside:/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,_href:/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/};r.link=e(r.link)("inside",r._inside)("href",r._href)(),r.reflink=e(r.reflink)("inside",r._inside)(),r.normal=h({},r),r.pedantic=h({},r.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),r.gfm=h({},r.normal,{escape:e(r.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:e(r.text)("]|","~]|")("|","|https?://|")()}),r.breaks=h({},r.gfm,{br:e(r.br)("{2,}","*")(),text:e(r.gfm.text)("{2,}","*")()}),i.rules=r,i.output=function(e,t,n){return new i(t,n).output(e)},i.prototype.output=function(e){for(var t,n,i,r,o="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),o+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),i=this.mangle("mailto:")+n):i=n=d(r[1]),o+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(e))){if(r=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(r[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),o+=this.options.sanitize?d(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,o+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e))){if(e=e.substring(r[0].length),t=(r[2]||r[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=r[0].charAt(0),e=r[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(r,t),this.inLink=!1}else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),o+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),o+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e))e=e.substring(r[0].length),o+=this.renderer.codespan(d(r[2],!0));else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),o+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),o+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),o+=d(this.smartypants(r[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(r[0].length),i=n=d(r[1]),o+=this.renderer.link(i,null,n);return o},i.prototype.outputLink=function(e,t){var n=d(t.href),i=t.title?d(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,d(e[1]))},i.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/--/g,"\u2014").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026"):e},i.prototype.mangle=function(e){for(var t,n="",i=e.length,r=0;r<i;r++)t=e.charCodeAt(r),.5<Math.random()&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'<pre><code class="'+this.options.langPrefix+d(t,!0)+'">'+(n?e:d(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:d(e,!0))+"\n</code></pre>"},n.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},n.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},n.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},n.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},n.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},n.prototype.tablerow=function(e){
  return"<tr>\n"+e+"</tr>\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},n.prototype.strong=function(e){return"<strong>"+e+"</strong>"},n.prototype.em=function(e){return"<em>"+e+"</em>"},n.prototype.codespan=function(e){return"<code>"+e+"</code>"},n.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.prototype.del=function(e){return"<del>"+e+"</del>"},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(o){return""}if(0===i.indexOf("javascript:"))return""}var r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},n.prototype.image=function(e,t,n){var i='<img src="'+e+'" alt="'+n+'"';return t&&(i+=' title="'+t+'"'),i+=this.options.xhtml?"/>":">"},u.parse=function(e,t,n){return new u(t,n).parse(e)},u.prototype.parse=function(e){this.inline=new i(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},u.prototype.next=function(){return this.token=this.tokens.pop()},u.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},u.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},u.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r="",o="";for(n="",e=0;e<this.token.header.length;e++)({header:!0,align:this.token.align[e]}),n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(r+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",i=0;i<t.length;i++)n+=this.renderer.tablecell(this.inline.output(t[i]),{header:!1,align:this.token.align[i]});o+=this.renderer.tablerow(n)}return this.renderer.table(r,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=this.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var a=this.token.ordered;"list_end"!==this.next().type;)o+=this.tok();return this.renderer.list(o,a);case"list_item_start":for(o="";"list_item_end"!==this.next().type;)o+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(o);case"loose_item_start":for(o="";"list_item_end"!==this.next().type;)o+=this.tok();return this.renderer.listitem(o);case"html":var s=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(s);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},t.exec=t,p.options=p.setOptions=function(e){return h(p.defaults,e),p},p.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new n,xhtml:!1},p.Parser=u,p.parser=u.parse,p.Renderer=n,p.Lexer=c,p.lexer=c.lex,p.InlineLexer=i,p.inlineLexer=i.output,p.parse=p,"object"==typeof exports?module.exports=p:"function"==typeof define&&define.amd?define(function(){return p}):this.marked=p}.call(function(){return this||("undefined"!=typeof window?window:global)}()),String.prototype.startsWith||function(){"use strict";var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(i){}return n}(),u={}.toString,t=function(e,t){if(null==this)throw TypeError();var n=String(this);if(e&&"[object RegExp]"==u.call(e))throw TypeError();var i=n.length,r=String(e),o=r.length,a=1<arguments.length?t:undefined,s=a?Number(a):0;s!=s&&(s=0);var l=Math.min(Math.max(s,0),i);if(i<o+l)return!1;for(var c=-1;++c<o;)if(n.charCodeAt(l+c)!=r.charCodeAt(c))return!1;return!0};e?e(String.prototype,"startsWith",{value:t,configurable:!0,writable:!0}):String.prototype.startsWith=t}(),String.prototype.repeat||function(){"use strict";var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(i){}return n}(),t=function(e){if(null==this)throw TypeError();var t=String(this),n=e?Number(e):0;if(n!=n&&(n=0),n<0||n==Infinity)throw RangeError();for(var i="";n;)n%2==1&&(i+=t),1<n&&(t+=t),n>>=1;return i};e?e(String.prototype,"repeat",{value:t,configurable:!0,writable:!0}):String.prototype.repeat=t}(),$(function(){var e,n,i,r;return $.ajaxSetup({cache:!1,global:!0}),SS.render(),$(window).width(),(n=(n=$("#crumbs a[href]").map(function(){return $(this).attr("href")})).get()).shift(),r=location.pathname+"/",(e=function(e){var t;return t=!1,$($(e).get().reverse()).each(function(){var e;if(e=(i=$(this)).attr("href"),r.match(new RegExp("^"+e+"(/|$)"))||-1!==n.indexOf(e))return i.addClass("current").parent().addClass("current"),!(t=!0)}),t})("#navi .mod-navi a")||e("#navi .main-navi a"),$("#navi .main-navi h3.current").parent().prev("h2").addClass("current"),$(".sp-menu-button a").click(function(){return $("#navi").slideToggle(),$(this).toggleClass("active"),!1}),$(".dropdown-toggle").click(function(e){var t,n,i,r;return i=$(this),n=$(e.target),t=(r=i.data("ref"))?i.find(r):n.closest(".dropdown"),$(".dropdown").not(t.get(0)).each(function(){return $(this).removeClass("active"),$(this).find(".dropdown-menu").removeClass("active")}),t.toggleClass("active"),t.find(".dropdown-menu").toggleClass("active"),SS_PopupNotice.closePopup(),e.stopPropagation()}),$(document).click(function(){return $(".dropdown").removeClass("active"),$(".dropdown-menu").removeClass("active")}),$("select").change(function(){return""===$(this).val()?$(this).addClass("blank-value has-blank-value"):$(this).removeClass("blank-value")}),$("select").change(),SS_ListUI.render(),SS_Mobile.render(),SS_AddonTabs.render(),SS_Tooltips.render(".tooltip"),SS_SearchUI.render(),SS_Color.render(),SS_TextZoom.render(),SS_PopupNotice.render(),SS_CascadeMenu.render()}),this.SS=function(){function r(){}return r.config={},r.head="",r.href="",r.loading='<img style="vertical-align:middle" src="/assets/img/loading.gif" alt="loading.." border="0" widtth="16" height="11" />',r.noticeTimeoutId=null,r.page="",r.pageName=null,r.parts=null,r.siteName=null,r.disableClick=function(e){return!e.data("clicked")&&(e.data("clicked",!0),!0)},r.load=function(){},r.render=function(e){return null==e&&(e=null),e?this.renderInBox(e):this.renderNotInBox(),(e=$(document)).find("a[href^=http]").each(function(){return $(this).addClass("external")}),this.renderAjaxBox(),this.renderDateTimePicker()},r.renderNotInBox=function(){return SS_Login.render()},r.renderInBox=function(e){var t;return t=function(){return $("#cboxLoadedContent .ajax-box:not(.cboxElement)").each(function(){var e;if((e=$(this)).addClass("cboxElement"),!e.attr("target")&&!e.data("target"))return e.colorbox({fixed:!0,width:"90%",height:"90%",onComplete:t})})},$(e).find(".ajax-box:not(.cboxElement)").each(function(){var e;if(!(e=$(this)).attr("target")&&!e.data("target"))return e.colorbox({fixed:!0,width:"90%",height:"90%",onComplete:t})})},r.renderClipboardCopy=function(){$(".ss-clipboard-copy").click(function(){var e=$(this).attr("data-clip-attr");return e?SS_Clipboard.copy($(this).attr(e),{success_alert:!0}):SS_Clipboard.copy($(this).text(),{success_alert:!0}),!1})},r.renderLayout=function(e){var n,i;return i=$("head"),n=$("body"),r.head=i.html(),r.page=$("#page").html(),n.html(""),$.ajax({type:"GET",url:SS_Kana.url(e),dataType:"json",cache:!0,async:!1,success:function(e){var t;return n.append(e.body.replace("</ yield />",r.page)),$("#ss-site-name").html(r.siteName),$("#ss-page-name").html(r.pageName),e.href!==r.href&&(t=$.ajaxSettings.cache,$.ajaxSettings.cache=!0,r.href&&(i.children("link").remove(),i.children("script").remove()),i.append(e.head),$.ajaxSettings.cache=t),r.href=e.href,r.renderTools()},error:function(){return n.html(r.page)},complete:function(){return $(".ss-part").each(function(){return r.renderPart($(this))})}})},r.renderPart=function(t){var e;return e=t.data("href")||t.attr("href"),e=SS_Kana.url(e.replace(/\.html/,".json")),t.append(" "+r.loading),$.ajax({type:"GET",url:e,dataType:"json",data:"ref="+SS_Kana.url(location.pathname,!1),success:function(e){return $(t).replaceWith(e)},error:function(){return $(t).find("img").remove()},complete:function(){if(r.part=r.part-1,0===r.part)return SS_Recommend.render()}})},r.ajaxForm=function(e,t){var n;null==t&&(t={}),e=$(e),n={url:e.attr("action")+".json",dataType:"json",success:function(){},error:function(e){alert(["== Error =="].concat(e.responseJSON).join("\n"))}},e.on("submit",function(e){$(this).ajaxSubmit($.extend(!0,n,t)),e.preventDefault()})},r.ajax=function(e,i){return null==i&&(i={}),$(e).click(function(e){var t,n;return t={url:(n=$(this)).attr("href"),beforeSend:function(){return n.html(r.loading)},success:function(){return console.log("success")},error:function(){return alert("== Error ==")}},$.ajax($.extend(!0,t,i)),e.preventDefault(),!1})},r.ajaxDelete=function(e,i){return null==i&&(i={}),$(e).click(function(e){var t,n;return confirm("\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f")&&(t={type:"DELETE",data:"_method=delete",url:(n=$(this)).attr("href")+".json",dataType:"json",beforeSend:function(){return n.html(r.loading)},success:function(){if(n.data("remove"))return $(n.data("remove")).remove()},error:function(e){return alert(["== Error =="].concat(e.responseJSON).join("\n"))}},$.ajax($.extend(!0,t,i)),e.preventDefault()),!1})},r.notice=function(e,t){var n;if(null==t&&(t={}),r.clearNotice(),(n=$("#notice")).hasClass("js-notice")||n.addClass("js-notice").click(function(){return n.slideUp("normal")}),n.find(".wrap").html(e),n.slideDown("normal"),!t||0!==t.timeout)return r.noticeTimeoutId=setTimeout(function(){return $("#notice").slideUp("normal")},1800),r.noticeTimeoutId},r.clearNotice=function(){var e;return r.noticeTimeoutId&&(clearTimeout(r.noticeTimeoutId),r.noticeTimeoutId=null),(e=$("#notice")).hide(),e.find(".wrap").html("")},r.formChanged=!1,r.confirmUnloading=function(){r.formChanged=!1,$("input[type=text],textarea,select").change(function(){r.formChanged=!0}),$(window).on("beforeunload",function(){if(r.formChanged)return"\u5165\u529b\u3057\u305f\u30c7\u30fc\u30bf\u306f\u4fdd\u5b58\u3055\u308c\u307e\u305b\u3093\u3002"}),$("input[type=submit]").click(function(){return!(r.formChanged=!1)})},r.randomPassword=function(e){var t,n,i,r,o;for(null==e&&(e=8),t="abcdefghijkmnopqrstuvwxyz!@#$%&-+ABCDEFGHIJKLMNOP234567890",r="",n=i=0,o=e;0<=o?i<=o:o<=i;n=0<=o?++i:--i)n=Math.floor(Math.random()*t.length),r+=t.charAt(n);return r},r.fileCheck=function(){return $("#item_files").change(function(){var e,t;if(e=$(this).val())return t=location.pathname.split("/"),$.ajax({type:"get",url:t.join("/"),dataType:"json",data:{"do":"check",item_files:e},success:function(e){return e.message?($(".js-uploader-alert-message").html(e.message),$(".js-uploader-alert-message").show()):$(".js-uploader-alert-message").hide()},error:function(e){var t;try{return t=$.parseJSON(e.responseText),alert(["== Error =="].concat(t).join("\n"))}catch(n){return alert(["== Error =="].concat(e.statusText).join("\n"))}}});$(".js-uploader-alert-message").hide()})},r.renderAjaxBox=function(e,t){var n=null,i=null;0<arguments.length&&("object"==typeof e?e.jquery?n=e:i=e:n=$(e),!i&&1<arguments.length&&(i=t)),n||(n=$(document)),i||(i={fixed:!0,width:"90%",height:"90%"}),n.find(".ajax-box:not(.cboxElement)").each(function(){var e=$(this);e.attr("target")||e.data("target")||e.colorbox(i)})},r.renderDateTimePicker=function(){if($.datetimepicker.setLocale("ja"),$.support.opacity)return $.each($(".js-date"),function(){var e,t;return t={timepicker:!1,format:"Y/m/d",closeOnDateSelect:!0,scrollInput:!1},null!==(e=$(this).data()).minDate&&(t.minDate=e.minDate),null!==e.maxDate&&(t.maxDate=e.maxDate),$(this).datetimepicker(t)}),$.each($(".js-datetime"),function(){var e,t;return t={roundTime:"ceil",step:30},null!==(e=$(this).data()).minDate&&(t.minDate=e.minDate),null!==e.maxDate&&(t.maxDate=e.maxDate),$(this).datetimepicker(t)})},r}(),this.SS_Form=function(){function e(){}return e.disableEnterKey=function(e){return null==e&&(e=null),e?$(e).on("keypress",function(e){return 13!==e.which}):$(document).on("keypress","input:not(.allow-submit)",function(e){return 13!==e.which})},e}(),this.SS_Font=function(){function e(){}return e.size=null,e.render=function(){var e;return this.size=parseInt(Cookies.get("ss-font"))||100,100!==this.size&&this.set(this.size),(e=$("#ss-medium")).html('<a href="#" onclick="return SS_Font.set(100)">'+e.html()+"</a>"),(e=$("#ss-small")).html('<a href="#" onclick="return SS_Font.set(false)">'+e.html()+"</a>"),(e=$("#ss-large")).html('<a href="#" onclick="return SS_Font.set(true)">'+e.html()+"</a>")},e.set=function(e){if(!0===e){if(200<(e=this.size+20))return!1}else if(!1===e&&(e=this.size-20)<60)return!1;return this.size=e,$("body").css("font-size",e+"%"),Cookies.set("ss-font",e,{expires:7,path:"/"}),!1},e}();var moduleKeywords,indexOf=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};moduleKeywords=["extended","included"],this.SS_Module=function(){function e(){}return e.extend=function(e){var t,n,i;for(t in e)i=e[t],indexOf.call(moduleKeywords,t)<0&&(this[t]=i);return null!=(n=e.extended)&&n.apply(this),this},e.include=function(e){var t,n,i;for(t in e)i=e[t],indexOf.call(moduleKeywords,t)<0&&(this.prototype[t]=i);return null!=(n=e.included)&&n.apply(this),this},e}(),this.SS_Login=function(){function t(){}return t.intervalID=null,t.intervalTime=6e5,t.render=function(){return $(document).on("ajaxComplete",function(e,t){if(t.getResponseHeader("ajaxRedirect")&&4===t.readyState&&200===t.status)return location.reload()}),setTimeout(this.startLoggedinCheck,this.intervalTime)},t.startLoggedinCheck=function(){return $.ajax({url:"/.mypage/status",complete:function(e){if(4===e.readyState&&200===e.status)return t.intervalID=setInterval(t.keepLoggedinCheck,t.intervalTime)}})},t.keepLoggedinCheck=function(){return $.ajax({url:"/.mypage/status",complete:function(e){if(4===e.readyState&&403===e.status)return t.intervalID&&clearInterval(t.intervalID),alert("\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u6709\u52b9\u671f\u9650\u304c\u5207\u308c\u307e\u3057\u305f\u3002")}})},t}(),this.SS_AddonTabs=function(){function i(){}return i.render=function(){return $(document).on("click",".toggle-head",function(){i.toggleWithAnimation(this)})},i.findAddonView=function(e){var t,n=$(e);return n.hasClass("addon-view")?t=n:(t=n.closest(".addon-view"))[0]||(t=n.parent()),t},i.show=function(e){var t=i.findAddonView(e);t[0]&&(t.find(".toggle-body").show(),t.removeClass("body-closed"),t.trigger("ss:addonShown"))},i.hide=function(e){var t=i.findAddonView(e);t[0]&&(t.find(".toggle-body").hide(),t.addClass("body-closed"),t.trigger("ss:addonHidden"))},i.toggleWithAnimation=function(e){var t=i.findAddonView(e);if(t[0]){var n=t.find(".toggle-body");n[0]&&n.animate({height:"toggle"},"fast",function(){t[0]&&(i.isShown(n)?(t.removeClass("body-closed"),t.trigger("ss:addonShown")):(t.addClass("body-closed"),t.trigger("ss:addonHidden")))})}},i.isShown=function(e){return"none"!==e.css("display")&&"hidden"!==e.css("visibility")},i}(),this.SS_Addon_Markdown=function(){function t(){}return t.container="ss-addon-markdown",t.content="ss-addon-markdown-content",t.toolbar="ss-addon-markdown-toolbar",t.options="ss-addon-markdown-options",t.type="ss-addon-markdown-type",t.preview="ss-addon-markdown-preview",t.previewUrl="/.u/addons/markdown",t.previewLabel="\u30d7\u30ec\u30d3\u30e5\u30fc",t.previewButton="ss-addon-markdown-preview-button",t.helpUrl="https://help.github.com/articles/basic-writing-and-formatting-syntax/",t.helpLabel="Markdown \u30d8\u30eb\u30d7",t.helpButton="ss-addon-markdown-help-button",t.render=function(){return $("."+this.toolbar).append("<span class='"+this.options+"'></span>"),$("."+this.container).append("<div class='"+this.preview+" markdown-body'>preview</div>"),this.renderForm($("."+this.type).val()),$("."+this.type).change(function(){return t.renderForm($(this).val())})},t.resetContent=function(){return $("."+this.preview).html("").hide(),$("."+this.content+" textarea").show()},t.renderForm=function(e){if($("."+this.options).html(""),this.resetContent(),"markdown"===e)return this.renderFormMarkdown()},t.renderFormMarkdown=function(){return $("."+this.options).append("<input type='button' class='btn "+this.previewButton+"' value='"+this.previewLabel+"' />"),$("."+this.options).append("<a href='"+this.helpUrl+"' class='"+this.helpButton+"' target='_blank'>"+this.helpLabel+"</a>"),$("."+this.previewButton).on("click",function(){var e;return $(this).toggleClass("active"),$(this).hasClass("active")?(e=$("."+t.content+" textarea").val(),$("."+t.content+" textarea").hide(),$.ajax({url:t.previewUrl,method:"post",data:{text:e},success:function(e){return $("."+t.preview).html(e).show()}})):t.resetContent()})},t}(),this.SS_Addon_TempFile=function(){function n(e,t,n){this.selector=e.selector||e,this.userId=t,this.dropEventTriggered=null,n&&n.select&&(this.select=n.select),n&&n.selectUrl&&(this.selectUrl=n.selectUrl),n&&n.uploadUrl&&(this.uploadUrl=n.uploadUrl),this.render()}return n.renderDrop=function(e,t){return new n(e,t,{})},n.prototype.select=function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t]._id,r=this.selectUrl(i),o={};$("#show-file-size").val()&&(o.file_size=$("#show-file-size").val()),$.ajax({url:r,data:o,success:function(e){$("#selected-files").append(e)}})}},n.prototype.selectUrl=function(e){return"/.u"+this.userId+"/apis/temp_files/"+e+"/select"},n.prototype.uploadUrl=function(){return"/.u"+this.userId+"/apis/temp_files.json"},n.prototype.render=function(){var l=this;$(document).on("dragenter",this.selector,function(){return $(this).addClass("file-dragenter"),!1}),$(document).on("dragleave",this.selector,function(){return $(this).removeClass("file-dragenter"),!1}),$(document).on("dragover",this.selector,function(){return $(this).addClass("file-dragenter"),!1}),$(document).on("drop",this.selector,function(e){var i=e.target,t=$('meta[name="csrf-token"]').attr("content"),n=new FormData;n.append("authenticity_token",t),$("#file-resizing").val()&&n.append("item[resizing]",$("#file-resizing").val());var r=e.originalEvent.dataTransfer.files;if(0===r.length)return!1;if(l.dropEventTriggered)return!1;l.dropEventTriggered=!0;for(var o=0,a=r.length;o<a;o++)n.append("item[in_files][]",r[o]);var s=new XMLHttpRequest;return s.onload=function(){if(s.readyState===XMLHttpRequest.DONE){if($(i).removeClass("file-dragenter"),200===s.status||201===s.status){var e=JSON.parse(s.response);l.select(e,i)}else if(413===s.status)alert(["== Error =="].concat("\u30c7\u30fc\u30bf\u306e\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u307e\u3059\u3002").join("\n"));else try{var t=$.parseJSON(s.response);alert(["== Error =="].concat(t).join("\n"))}catch(n){alert(["== Error =="].concat(s.statusText).join("\n"))}l.dropEventTriggered=!1}},s.open("POST",l.uploadUrl()),s.send(n),!1})},n}(),SS_ImageEditor=function(e){var n=this;this.$el=$(e),this.cropper=new Cropper(this.$el.find("img.target")[0],{zoomOnWheel:!1,ready:function(){n.updateInspect(),n.chooseSize()},cropmove:function(){n.updateInspect(),n.chooseSize()}}),this.$el.find(".toolbar button").on("click",function(e){var t=$(this).data("func");if(t&&n[t])return n[t](),n.updateInspect(),n.chooseSize(),e.preventDefault(),!1}),this.$el.find(".toolbar select[name=size]").on("change",function(){var e=$(this).val();if(e){var t=e.split(",");n.changeSize(parseInt(t[0],10),parseInt(t[1],10))}})},SS_ImageEditor.prototype={inspect:function(){if(this.cropper){var e=this.cropper.getData(!0);console.log(e);var t=this.cropper.getImageData();console.log(t);var n=this.cropper.getCanvasData();console.log(n)}},updateInspect:function(){var e=this.cropper.getData(!0);this.$el.find(".toolbar input[name=x]").val(e.x),this.$el.find(".toolbar input[name=y]").val(e.y),this.$el.find(".toolbar input[name=width]").val(e.width),this.$el.find(".toolbar input[name=height]").val(e.height)},changeSize:function(e,t){var n=this.cropper.getData(!0);n.width=e,n.height=t,this.cropper.setData(n),this.updateInspect()},chooseSize:function(){var e=this.cropper.getData(!0),t=e.width+","+e.height;this.$el.find(".toolbar select[name=size] option").each(function(){this.selected=this.value===t})},zoomIn:function(){if(this.cropper){var e=this.cropper.getData(!0);this.cropper.zoom(.1);var t=this.cropper.getData(!0);t.width=e.width,t.height=e.height,this.cropper.setData(t)}},zoomOut:function(){if(this.cropper){var e=this.cropper.getData(!0);this.cropper.zoom(-.1);var t=this.cropper.getData(!0);t.width=e.width,t.height=e.height,this.cropper.setData(t)}},rotateLeft:function(){this.cropper&&this.cropper.rotate(-90)},rotateRight:function(){this.cropper&&this.cropper.rotate(90)},normalizeFormat:function(e){return"image/jpeg"===e||"image/png"===e?e:"image/jpg"===e?"image/jpeg":"image/png"},submit:function(){if(this.cropper){var e=this.normalizeFormat(this.$el.find("img.target").data("format")),t=this.cropper.getCroppedCanvas().toDataURL(e);this.cropper.destroy(),this.cropper=null,this.$el.find(".toolbar").hide(),this.$el.find("img.target").attr("src",t),this.$el.find("input[name='item[in_data_url]']").val(t)}},cancel:function(){this.cropper.destroy(),this.cropper=null,this.$el.find(".toolbar").hide()}},this.SS_ListUI=function(){function e(){}return e.render=function(e){var d;(d=e?$(e):$(document)).find(".list-head input:checkbox").change(function(){var e;return e=$(this).prop("checked"),d.find(".list-item").each(function(){return $(this).toggleClass("checked",e),$(this).find("input:checkbox").prop("checked",e)})}),d.find(".list-item").each(function(){var o;return(o=$(this)).find("input:checkbox").change(function(){return o.toggleClass("checked",$(this).prop("checked"))}),o.mouseup(function(e){var t,n,i,r;if(!$(e.target).is("a")&&!$(e.target).closest("a,label").length)return(t=o.find(".tap-menu")).hasClass("tap-menu-relative")?(n=$(this).offset(),i=e.pageX-n.left,r=e.pageY-n.top):(i=e.pageX,r=e.pageY),t.css("left",i-t.width()+5).css("top",r).show()}),o.mouseleave(function(){return d.find(".tap-menu").hide()})}),d.find(".list-head .destroy-all").on("click",function(){var e,t,n,i,r,o;if(o=$('meta[name="csrf-token"]').attr("content"),0===(e=d.find(".list-item input:checkbox:checked").map(function(){return $(this).val()})).length)return!1;if(!confirm("\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f"))return!1;for((t=$("<form/>",{action:"",method:"post"})).append($("<input/>",{name:"_method",value:"delete",type:"hidden"})),t.append($("<input/>",{name:"authenticity_token",value:o,type:"hidden"})),n=0,r=e.length;n<r;n++)i=e[n],t.append($("<input/>",{name:"ids[]",value:i,type:"hidden"}));return t.appendTo(document.body).submit()}),d.find(".list-head .set-tag-all").on("click",function(){var e,t,n,i,r,o,a;if(a=$('meta[name="csrf-token"]').attr("content"),e=d.find(".list-item input:checkbox:checked").map(function(){return $(this).val()}),o=d.find(".list-head .tag").val(),0===e.length)return!1;if(!o)return!1;if(!confirm("\u30bf\u30b0\u3092\u8a2d\u5b9a\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f"))return!1;for((t=$("<form/>",{action:"pages/tag",method:"post"})).append($("<input/>",{name:"authenticity_token",value:a,type:"hidden"})),t.append($("<input/>",{name:"tag",value:o,type:"hidden"})),n=0,r=e.length;n<r;n++)i=e[n],t.append($("<input/>",{name:"ids[]",value:i,type:"hidden"}));return t.appendTo(document.body).submit()}),d.find(".list-head .reset-tag-all").on("click",function(){var e,t,n,i,r,o,a;if(a=$('meta[name="csrf-token"]').attr("content"),e=d.find(".list-item input:checkbox:checked").map(function(){return $(this).val()}),o=d.find(".list-head .tag").val(),0===e.length)return!1;if(!o)return!1;if(!confirm("\u30bf\u30b0\u3092\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f"))return!1;for((t=$("<form/>",{action:"pages/tag",method:"post"})).append($("<input/>",{name:"_method",value:"delete",type:"hidden"})),t.append($("<input/>",{name:"authenticity_token",value:a,type:"hidden"})),t.append($("<input/>",{name:"tag",value:o,type:"hidden"})),n=0,r=e.length;n<r;n++)i=e[n],t.append($("<input/>",{name:"ids[]",value:i,type:"hidden"}));return t.appendTo(document.body).submit()}),d.find(".list-head [data-ss-list-head-method]").on("click",function(){var e,t,n,i,r,o,a,s,l,c,u;if(l=$(this).data("ss-list-head-method")||"post",e=$(this).data("ss-list-head-action")||"",c={authenticity_token:$('meta[name="csrf-token"]').attr("content")},"delete"!==(l=l.toString().toLowerCase())&&"patch"!==l||(c._method=l,l="post"),0===(t=d.find(".list-item input:checkbox:checked").map(function(){return $(this).val()})).length)return!1;if((n=$(this).data("ss-confirmation")||"")&&!confirm(n))return!1;for(a in i=$("<form/>",{action:e,method:l}),c)u=c[a],i.append($("<input/>",{name:a,value:u,type:"hidden"}));for(r=0,s=t.length;r<s;r++)o=t[r],i.append($("<input/>",{name:"ids[]",value:o,type:"hidden"}));return i.appendTo(document.body).submit()})},e}(),this.SS_TreeUI=function(){function c(e,t){var s;null==t&&(t={});var l=null;this.tree=$(e),s=[],l=t.expand_all,this.tree.find("tbody tr").each(function(){return s.push(parseInt($(this).attr("data-depth")))}),s=Math.min.apply(null,s),s=parseInt(s),isNaN(s)||s<0||(this.tree.find("tbody tr").each(function(){var e,t,n,i,r,o,a;for(a=$(this).find(".expandable"),t=parseInt($(this).attr("data-depth")),a.prepend('<img src="'+c.closeImagePath+'" alt="toggle" class="toggle closed">'),t!==s&&(l||$(this).hide()),n=i=r=s,o=t;r<=o?i<o:o<i;n=r<=o?++i:--i)a.prepend('<span class="padding">');if(e=parseInt($(this).next("tr").attr("data-depth"))||0,n=$(this).find(".toggle:first"),0===e||e<=t)return n.replaceWith('<span class="padding">')}),this.tree.find(".toggle").on("mousedown mouseup",function(e){return e.stopPropagation(),!1}),this.tree.find(".toggle").on("click",function(e){var n,t,i;return t=(i=$(this).closest("tr")).find(".toggle:first"),n=parseInt(i.attr("data-depth")),c.toggleImage(t),i.nextAll("tr").each(function(){var e,t;return e=parseInt($(this).attr("data-depth")),t=$(this).find(".toggle:first"),!(e<=n)&&(n+1===e?$(this).toggle():$(this).hide(),c.closeImage(t))}),e.stopPropagation(),!1}),l?c.openImage(this.tree.find("tbody tr img")):this.tree.find("tr[data-depth='"+s+"'] img").click())}return c.openImagePath="/assets/img/tree-open.png",c.closeImagePath="/assets/img/tree-close.png",c.render=function(e,t){return new c(e,t)},c.toggleImage=function(e){return e.attr("src")===c.openImagePath?c.closeImage(e):e.attr("src")===c.closeImagePath?c.openImage(e):void 0},c.openImage=function(e){return e.attr("src",c.openImagePath),e.addClass("opened"),e.removeClass("closed")},c.closeImage=function(e){return e.attr("src",c.closeImagePath),e.removeClass("opened"),e.addClass("closed")},c.prototype.expandAll=function(){return this.tree.find("tr img.toggle.closed").click()},c.prototype.collapseAll=function(){return $(this.tree.find("tr img.toggle.opened").get().reverse()).each(function(){return $(this).click()})},c}(),SS_TreeNavi.prototype.render=function(e){var i=this,t=$(SS.loading);this.registerEvents(),$.ajax({url:e,beforeSend:function(){i.errorEl&&i.errorEl.hide(),i.el.append(t)},success:function(e){i.el.append(i.renderItems(e.items))},error:function(e,t,n){i.showError(e,t,n)},complete:function(){t.remove()}})},SS_TreeNavi.prototype.renderChildren=function(t){var i=this,e=$(SS.loading);return $.ajax({url:$(t).find(".item-mark").attr("href"),data:"only_children=1",beforeSend:function(){i.errorEl&&i.errorEl.hide(),t.after(e)},success:function(e){t.after(i.renderItems(e.items))},error:function(e,t,n){i.showError(e,t,n)},complete:function(){e.remove()}}),!1},SS_TreeNavi.prototype.renderItems=function(e){var r=this;return $.map(e,function(e){var t=e.is_current||e.is_parent,n=t?r.openMark:r.closeMark,i=t?["is-open is-cache"]:["is-close"];return e.is_current&&i.push("is-current"),'<div class="tree-item '+i.join(" ")+'" data-id="'+e.id+'" data-filename="'+e.filename+'">'+'<div class="item-pad"></div>'.repeat(e.depth-1)+'<a class="item-mark" href="'+e.tree_url+'">'+n+'</a><a class="item-name" href="'+e.url+'">'+e.name.replace("<","")+"</a></div>"})},SS_TreeNavi.prototype.registerEvents=function(){var t=this;this.el.on("click",".tree-item .item-mark",function(){var e=$(this).closest(".tree-item");return e.hasClass("is-open")?t.closeItem(e,$(this)):t.openItem(e,$(this)),!1})},SS_TreeNavi.prototype.openItem=function(e,t){e.addClass("is-open"),t.html(this.openMark),e.hasClass("is-cache")?this.el.find(".tree-item").each(function(){$(this).data("filename").startsWith(e.data("filename")+"/")&&$(this).show()}):this.renderChildren(e)},SS_TreeNavi.prototype.closeItem=function(e,t){e.addClass("is-cache"),e.removeClass("is-open"),t.html(this.closeMark),this.el.find(".tree-item").each(function(){$(this).data("filename").startsWith(e.data("filename")+"/")&&$(this).hide()})},SS_TreeNavi.prototype.showError=function(e,t,n){this.errorEl||(this.errorEl=$('<div class="error" />'),this.el.append(this.errorEl),this.errorEl.hide()),this.errorEl.html(n),this.errorEl.show()},this.SS_Mobile=function(){function e(){}return e.render=function(){var e,t;if(navigator.userAgent.match(/(Android|iPad|iPhone)/))return"pc"===Cookies.get("ss-mobile")?((e=$("head")).children("meta[name=viewport]").remove(),e.append('<meta name="viewport" content="width=1024" />'),(t=$("#ss-mb")).html('<a href="#" onclick="return SS_Mobile.unset()">'+t.text()+"</a>").show()):(t=$("#ss-pc")).html('<a href="#" onclick="return SS_Mobile.setPc()">'+t.text()+"</a>").show()},e.unset=function(){return Cookies.remove("ss-mobile",{path:"/"}),location.reload(),!1},e.setPc=function(){return Cookies.set("ss-mobile","pc",{expires:7,path:"/"}),location.reload(),!1},e}(),this.SS_SearchUI=function(){function e(){}return e.anchorAjaxBox,e.defaultSelector=function(e){var t,n,i,r,o,a,s;return a=this,i=(n=e.closest("[data-id]")).data("id"),o=n.data("name")||n.find(".select-item").text()||e.text()||n.text(),s=$("<tr />").attr("data-id",i),r=(r=a.anchorAjaxBox.closest("dl").find(".hidden-ids").clone(!1)).val(i).removeClass("hidden-ids"),t=$('<a class="deselect btn" href="#">\u524a\u9664</a>').on("click",a.deselect),s.append($("<td />").append(r).append(o)),s.append($("<td />").append(t)),a.anchorAjaxBox.closest("dl").find(".ajax-selected tbody").prepend(s),a.anchorAjaxBox.closest("dl").find(".ajax-selected").trigger("change")},e.select=function(e){var t;return(t=this.anchorAjaxBox.data("on-select"))?t(e):this.defaultSelector(e)},e.selectItems=function(e){e||(e=$("#ajax-box"));var t=this;return e.find(".items input:checkbox").filter(":checked").each(function(){return t.select($(this))}),t.anchorAjaxBox.closest("dl").find(".ajax-selected").show()},e.deselect=function(e){var t;return t=$(this).parents(".ajax-selected:first"),$(this).parents("tr:first").remove(),0===t.find("tbody tr").size()&&t.hide(),t.trigger("change"),e.preventDefault()},e.toggleSelectButton=function(e){return e||(e=$("#ajax-box")),0<e.find(".items input:checkbox").filter(":checked").size()?e.find(".select-items").parent("div").show():e.find(".select-items").parent("div").hide()},e.render=function(){var e;return e=this,$(".ajax-selected").each(function(){if($(this).find("a.deselect").on("click",e.deselect),0===$(this).find("a.deselect").size())return $(this).hide()})},e.modal=function(e){e||(e={});var t=this,n=e.colorbox||$.colorbox;t.anchorAjaxBox=e.anchor||n.element();var i=e.$el||$("#ajax-box"),r=window==i[0].ownerDocument.defaultView;return r&&i.find("form.search").on("submit",function(e){var t=$("<span />",{"class":"loading"}).html(SS.loading);return i.find("[type=submit]").after(t),$(this).ajaxSubmit({url:$(this).attr("action"),success:function(e){i.closest("#cboxLoadedContent").html(e)},error:function(){t.html("== Error ==")}}),e.preventDefault(),!1}),i.find(".pagination a").on("click",function(e){return t.selectItems(i),!r||(i.find(".pagination").html(SS.loading),$.ajax({url:$(this).attr("href"),type:"GET",success:function(e){i.closest("#cboxLoadedContent").html(e)},error:function(){i.find(".pagination").html("== Error ==")}}),e.preventDefault(),!1)}),$.each(e.submit_on_changes||["#s_group"],function(){i.find(this).on("change",function(){return t.selectItems(i),i.find("form.search").submit()})}),i.find(".submit-on-change").on("change",function(){return t.selectItems(i),i.find("form.search").submit()}),
  t.anchorAjaxBox.closest("dl").find(".ajax-selected tr[data-id]").each(function(){var e,t,n;return e=$(this).data("id"),(n=$("#colorbox .items [data-id='"+e+"']")).find("input[type=checkbox]").remove(),t=n.find(".select-item,.select-single-item").html(),n.find(".select-item,.select-single-item").replaceWith("<span class='select-item' style='color: #888'>"+t+"</span>")}),i.find("table.index").each(function(){SS_ListUI.render(this)}),i.find("a.select-item").on("click",function(e){return SS.disableClick($(this))&&(t.select($(this)),t.anchorAjaxBox.closest("dl").find(".ajax-selected").show(),e.preventDefault(),n.close()),!1}),i.find(".select-single-item").on("click",function(e){return SS.disableClick($(this))&&(t.anchorAjaxBox.closest("dl").find(".ajax-selected tr[data-id]").each(function(){if($(this).find("input[value]").length)return $(this).remove()}),t.select($(this)),t.anchorAjaxBox.closest("dl").find(".ajax-selected").show(),e.preventDefault(),n.close()),!1}),i.find(".select-items").on("click",function(e){return SS.disableClick($(this))&&(t.selectItems(i),e.preventDefault(),n.close()),!1}),i.find(".index").on("change",function(){return t.toggleSelectButton(i)}),t.toggleSelectButton(i)},e}(),this.SS_Tooltips=function(){function e(){}return e.render=function(o){return $(document).on("click",o,function(e){var t,n,i,r;return e.preventDefault(),e.stopPropagation(),(o=$(o)).find("ul").hide(),i=(n=$(this)).find("ul").outerHeight(),n.offset().top-i<0?(n.find("ul").css("bottom",-1*i-15+"px"),t="ul:after {border: 8px solid transparent; border-bottom-color:#fff; bottom:"+(i-5)+"px;}"):(n.find("ul").css("bottom","18px"),t="ul:after {border: 8px solid transparent; border-top-color:#fff; bottom:-13px;}"),r=$("<style>").append(document.createTextNode(t)),o.find("ul style").remove(),n.find("ul").append(r),n.find("ul").show()}),$(document).click(function(e){if(!(o=$(o)).is($(e.target).closest("div,span")))return o.find("ul").hide()})},e}(),this.SS_Dropdown=function(){function t(e,t){this.elem=$(e),this.options=t,this.target=$(this.options.target),this.bindEvents()}return t.render=function(){return $("button.dropdown").each(function(){var e;if(e=new t(this,{target:$(this).parent().find(".dropdown-container")[0]}),!t.dropdown)return t.dropdown=e})},t.openDropdown=function(){if(t.dropdown)return t.dropdown.openDropdown()},t.closeDropdown=function(){if(t.dropdown)return t.dropdown.closeDropdown()},t.toggleDropdown=function(){if(t.dropdown)return t.dropdown.toggleDropdown()},t.prototype.bindEvents=function(){var t,n,i;return this.elem.on("click",(t=this,function(e){return t.toggleDropdown(),t.cancelEvent(e)})),$(document).on("click",(n=this,function(e){if(e.target!==n.elem&&e.target!==n.target)return n.closeDropdown()})),this.elem.on("keydown",(i=this,function(e){if(27===e.keyCode)return i.closeDropdown(),i.cancelEvent(e)}))},t.prototype.openDropdown=function(){return this.target.show()},t.prototype.closeDropdown=function(){return this.target.hide()},t.prototype.toggleDropdown=function(){return this.target.toggle()},t.prototype.cancelEvent=function(e){return e.preventDefault(),e.stopPropagation(),!1},t}(),this.SS_Clipboard=function(){function e(){}return e.copy=function(e,t){var n,i,r;if(null==t&&(t={}),document.queryCommandSupported("copy"))try{return r="position: absolute; overflow: hidden; width: 0; height: 0;",r+="border: none; box-shadow: none; background: transparent; resize: none;",n=$("<textarea style='"+r+"'>"+e+"</textarea>"),$("body").after(n),n.select(),document.execCommand("copy"),n.remove(),t.success_alert&&alert("\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f\u3002"),!0}catch(o){return i=o,console.log(i),alert("\u30b3\u30d4\u30fc\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002"),!1}},e.renderCopy=function(){return $(".js-clipboard-copy").each(function(){var e,t;return!(t=$(this).text())||(e="\u30b3\u30d4\u30fc",$(this).append("<a href='#' class='clipboard-copy-button' data-text='"+t+"'>"+e+"</a>"))}),$(".clipboard-copy-button").click(function(){return $(".clipboard-copy-button").removeClass("copied"),e.copy($(this).data("text"))&&$(this).addClass("copied"),!1})},e}(),this.SS_Color=function(){function e(){}return e.render=function(){return $(".js-color").each(function(){var e,t;if((t=$(this)).minicolors(),t.data("clear"))return e=$("<input type='button' class='btn' value='\u30af\u30ea\u30a2' />").uniqueId(),$(t).after(e).after(" "),$("#"+e.attr("id")).click(function(){return $(t).minicolors("value",{color:"transparent"})})})},e}(),SS_Workflow=function(e,t){this.$el=$(e),this.options=t;var r=this;this.$el.on("click",".update-item",function(e){return r.updateItem($(this)),e.preventDefault(),!1}),$(document).on("click",".mod-workflow-approve .update-item",function(e){return r.updateItem($(this)),e.preventDefault(),!1}),$(document).on("click",".mod-workflow-view .request-cancel",function(e){return r.cancelRequest($(this)),e.preventDefault(),!1}),this.$el.find(".mod-workflow-approve").insertBefore("#addon-basic"),this.$el.find(".toggle-label").on("click",function(e){return r.$el.find(".request-setting").slideToggle(),e.preventDefault(),!1}),this.$el.find(".workflow-partial-section").each(function(){r.loadRouteList()}),this.$el.on("click",".workflow-route-start",function(e){var t=$(this).siblings("#workflow_route:first").val();return r.loadRoute(t),e.preventDefault(),!1}),this.$el.on("click",".workflow-route-cancel",function(e){return r.loadRouteList(),e.preventDefault(),!1}),this.$el.on("click",".workflow-reroute",function(e){var t=$(this),n=t.data("level"),i=t.data("user-id");return r.reroute(n,i),e.preventDefault(),!1}),$(".mod-workflow-approve .btn-file-upload").data("on-select",function(e){$.colorbox.close(),r.onUploadFileSelected(e)}),this.tempFile=new SS_Addon_TempFile(".mod-workflow-approve .upload-drop-area",this.options.user_id,{select:function(e,t){r.onDropFile(e,t)}})},SS_Workflow.prototype={collectApprovers:function(){var e=[];return this.$el.find(".workflow-multi-select").each(function(){e=e.concat($(this).val())}),this.$el.find("input[name='workflow_approvers']").each(function(){e.push($(this).prop("value"))}),e},collectApproverAttachmentUses:function(){var e=[];return this.$el.find("input[name='workflow_approver_attachment_uses']").each(function(){e.push($(this).prop("value"))}),e},collectCirculations:function(){var e=[];return this.$el.find("input[name='workflow_circulations']").each(function(){e.push($(this).prop("value"))}),e},agentType:function(){return this.$el.find("input[name=agent_type]:checked").val()},collectDelegatees:function(){var e=[];return"agent"!==this.agentType()||this.$el.find("input[name='workflow_delegatees']").each(function(){e.push($(this).prop("value"))}),e},collectCirculationAttachmentUses:function(){var e=[];return this.$el.find("input[name='workflow_circulation_attachment_uses']").each(function(){e.push($(this).prop("value"))}),e},collectFileIds:function(){var e=[];return $("input[name='workflow_file_ids[]']").each(function(){e.push($(this).prop("value"))}),e},composeWorkflowUrl:function(e){if(this.options&&this.options.paths&&this.options.paths[e])return this.options.paths[e];var t=location.pathname.split("/");return t[2]=this.options.workflow_node,t[3]=e,5<t.length&&t.splice(4,1),t.join("/")},updateItem:function(e){var t=this,n=e.attr("updatetype"),i=this.collectApprovers();if($.isEmptyObject(i)&&"request"===n)alert(this.options.errors.not_select);else{var r=[];this.$el.find("input[name='workflow_required_counts']").each(function(){r.push($(this).prop("value"))});var o=this.composeWorkflowUrl("pages");o+="/"+n+"_update";var a,s=$("#workflow_comment").prop("value"),l=$("#workflow_pull_up").prop("value"),c=$("#workflow_on_remand").prop("value"),u=$("#remand_comment").prop("value");a="request"==n?$("#forced-request").prop("checked"):$("#forced-update").prop("checked");var d=this.collectCirculations(),h=this.collectFileIds();$.ajax({type:"POST",url:o,async:!1,data:{workflow_comment:s,workflow_pull_up:l,workflow_on_remand:c,workflow_approvers:i,workflow_required_counts:r,workflow_approver_attachment_uses:this.collectApproverAttachmentUses(),remand_comment:u,url:this.options.request_url,forced_update_option:a,workflow_circulations:d,workflow_circulation_attachment_uses:this.collectCirculationAttachmentUses(),workflow_file_ids:h,workflow_agent_type:this.agentType(),workflow_users:this.collectDelegatees()},success:function(e){e.workflow_alert?alert(e.workflow_alert):e.redirect&&e.redirect.reload?location.reload():e.redirect&&e.redirect.show?location.href=e.redirect.show:"approve"===e.workflow_state&&t.options.redirect_location?location.href=t.options.redirect_location:location.reload()},error:function(e){try{var t=$.parseJSON(e.responseText);alert(["== Error =="].concat(t).join("\n"))}catch(n){alert(["== Error =="].concat(e.statusText).join("\n"))}}})}},cancelRequest:function(e){var t=e.data("ss-confirmation");if(t&&!confirm(t))return!1;var n=e.data("ss-method")||"post",i=e.attr("href"),r=$('meta[name="csrf-token"]').attr("content");$.ajax({type:n,url:i,async:!1,data:{authenticity_token:r},success:function(e){e.workflow_alert?alert(e.workflow_alert):"approve"===e.workflow_state&&""!==redirect_location?location.href=redirect_location:location.reload()},error:function(e){try{var t=$.parseJSON(e.responseText);alert(["== Error =="].concat(t).join("\n"))}catch(n){alert(["== Error =="].concat(e.statusText).join("\n"))}}})},loadRouteList:function(){var t=this,e=this.composeWorkflowUrl("wizard");$.ajax({type:"GET",url:e,async:!1,success:function(e){t.$el.find(".workflow-partial-section").html(e)},error:function(e){try{var t=$.parseJSON(e.responseText);alert(["== Error =="].concat(t).join("\n"))}catch(n){alert(["== Error =="].concat(e.statusText).join("\n"))}}})},loadRoute:function(e){var t=this,n=this.composeWorkflowUrl("wizard");n+="/approver_setting";var i={route_id:e};$.ajax({type:"POST",url:n,async:!1,data:i,success:function(e){t.$el.find(".workflow-partial-section").html(e)},error:function(e){try{var t=$.parseJSON(e.responseText);alert(t.join("\n"))}catch(n){alert(["== Error =="].concat(e.statusText).join("\n"))}}})},reroute:function(i,r){var e=this.composeWorkflowUrl("wizard");e+="/reroute",e+="?"+$.param({level:i,user_id:r});var o=this;$("<a/>").attr("href",e).colorbox({fixed:!0,width:"90%",height:"90%",open:!0,onCleanup:function(){var e=$("#cboxLoadedContent input[name=selected_user_id]").val();if(e){var t=o.composeWorkflowUrl("wizard");t+="/reroute";var n={level:i,user_id:r,new_user_id:e,url:o.options.request_url};$.ajax({type:"POST",url:t,data:n,success:function(){location.reload()},error:function(e){try{var t=$.parseJSON(e.responseText);alert(t.join("\n"))}catch(n){alert(["== Error =="].concat(e.statusText).join("\n"))}}})}}})},fileSelectViewUrl:function(e){return"/.u:user/apis/temp_files/:id/select.html".replace(/:user/g,this.options.user_id).replace(/:id/g,e)},onUploadFileSelected:function(e){var t=this;$.ajax({url:this.fileSelectViewUrl(e.data("id")),success:function(e){t.renderFileHtml(e)},error:function(){alert("== Error ==")}})},renderFileHtml:function(e){var t=this,n=$(e);n.find("input[name='item[file_ids][]']").attr("name","workflow_file_ids[]"),n.find(".action .action-delete").removeAttr("onclick","").on("click",function(e){return e.preventDefault(),t.deleteUploadedFile($(this)),!1}),n.find(".action .action-attach").remove(),n.find(".action .action-paste").remove(),n.find(".action .action-thumb").remove(),$("#selected-files").append(n)},deleteUploadedFile:function(e){e.closest("div[data-file-id]").remove()},onDropFile:function(e){for(var t=this,n=0,i=e.length;n<i;n++){var r=e[n]._id,o=t.fileSelectViewUrl(r);$.ajax({url:o,success:function(e){t.renderFileHtml(e)},error:function(){alert("== Error ==")}})}}},SS_WorkflowRerouteBox=function(e,t){this.$el=$(e),this.options=t;var n=this;this.$el.find("form.search").on("submit",function(e){$(this).ajaxSubmit({url:$(this).attr("action"),success:function(e){n.$el.closest("#cboxLoadedContent").html(e)},error:function(){alert("== Error ==")}}),e.preventDefault()}),this.$el.find(".pagination a").on("click",function(e){var t=$(this).attr("href");return n.$el.closest("#cboxLoadedContent").load(t,function(e,t){"error"===t&&alert("== Error ==")}),e.preventDefault(),!1}),this.$el.find(".select-single-item").on("click",function(e){var t=$(this);if(!SS.disableClick(t))return!1;n.selectItem(t),e.preventDefault(),$.colorbox.close()})},SS_WorkflowRerouteBox.prototype={selectItem:function(e){var t=e.closest(".list-item"),n=t.data("id"),i=t.data("name"),r=t.data("email"),o=this.$el.data("name"),a=this.$el.data("email");o&&a&&(o+="("+a+")");var s="";o&&(s+=o,s+="\u3092"),s+=i+"("+r+")\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f",confirm(s)&&this.$el.find("input[name=selected_user_id]").val(n)}},SS_SortableForm.prototype.renderItems=function(e){var i=this;$.each(e.reverse(),function(e,t){var n=i.base.clone();$.each(t,function(e,t){n.find("[name*=\\["+e+"\\]]").val(t)}),i.body.prepend(n),i.setEvent(n)})},SS_SortableForm.prototype.resetItems=function(){var e=this.base.clone();this.body.find("tr").remove(),this.body.prepend(e),this.setEvent(e)},SS_SortableForm.prototype.setEvent=function(t){var n=this;t.find(".action-insert").click(function(){if(n.limit&&n.body.find("tr").length>=n.limit)return!1;var e=n.base.clone();return $(this).closest("tr").after(e),n.onInsert&&n.onInsert(e),n.setEvent(e),!1}),t.find(".action-remove").click(function(){if(t.remove(),0==n.body.find("tr").length){var e=n.base.clone();n.body.append(e),n.setEvent(e)}return!1})},SS_TextZoom.render=function(){SS_Font.render();var t=this;this.$el=$(".text-zoom"),this.$el.on("click",".zoom-out",function(e){e.preventDefault(),e.stopPropagation(),t.zoomOut($(this))}),this.$el.on("click",".zoom-in",function(e){e.preventDefault(),e.stopPropagation(),t.zoomIn($(this))}),this.$el.on("click",".zoom-reset",function(e){e.preventDefault(),e.stopPropagation(),t.zoomReset($(this))})},SS_TextZoom.zoomIn=function(e){SS_Font.set(!0),SS.notice(e.closest(".text-zoom").data("notice").replace(":size",SS_Font.size.toString()))},SS_TextZoom.zoomOut=function(e){SS_Font.set(!1),SS.notice(e.closest(".text-zoom").data("notice").replace(":size",SS_Font.size.toString()))},SS_TextZoom.zoomReset=function(e){SS_Font.set(100),SS.notice(e.closest(".text-zoom").data("notice").replace(":size",SS_Font.size.toString()))},this.SS_PopupNotice=function(){function i(e){this.target=e,this.loading='<img style="vertical-align:middle" src="/assets/img/loading.gif" alt="loading.." border="0" widtth="16" height="11" />'}return i.ajaxTriggered=!1,i.render=function(){return $(document).on("click",function(){return i.closePopup()})},i.closePopup=function(){return $(".popup-notice").hide()},i.closeDropdown=function(){return $(".dropdown,.dropdown-menu").removeClass("active")},i.prototype.render=function(){return $(this.target).find(".popup-notice").hide(),$(this.target).on("click",function(e){return e.stopPropagation()}),$($(this.target).find(".ajax-popup-notice")).on("click",(n=this,function(e){var t;return!i.ajaxTriggered&&(i.closeDropdown(),$(e.currentTarget).hasClass("toggle-popup-notice")&&$(n.target).find(".popup-notice").is(":visible")?$(n.target).find(".popup-notice").hide():(i.closePopup(),$(n.target).find(".popup-notice").show(),$(n.target).find(".popup-notice-items").html(n.loading).addClass("popup-notice-loading"),t=$(e.currentTarget).attr("data-url")||$(e.currentTarget).attr("href"),$.ajax({url:t,beforeSend:function(){return i.ajaxTriggered=!0},success:function(e){return $(".popup-notice-loading").html(e).removeClass("popup-notice-loading"),i.ajaxTriggered=!1}})),!1)}));var n},i}(),SS_CascadeMenu.render=function(){$(".cascade-menu").on("click",function(e){var t=$(this),n=t.data("ref");if(n){var i=t.closest(".dropdown-menu"),r=$(n);r.addClass("active"),i.removeClass("active"),r.data("load")&&r.data("load")(),e.preventDefault(),e.stopPropagation()}}),$(".cascade-back").on("click",function(e){var t=$(this),n=t.attr("href"),i=t.closest(".dropdown-menu");$(n).addClass("active"),i.removeClass("active"),e.preventDefault(),e.stopPropagation()})},this.Cms_Editor_Module=function(){function e(){}return e.editorId="item_html",e.getEditorHtml=function(e){return null==e&&(e=null),e||(e=Cms_Form.editorId),"undefined"!=typeof tinymce?tinymce.get(e).getContent():"undefined"!=typeof CKEDITOR?CKEDITOR.instances[e].getData():""},e.setEditorHtml=function(e,t){var n=null;return(t=t||{}).id&&(n=t.id),n||(n=Cms_Form.editorId),"undefined"!=typeof tinymce?tinymce.get(n).setContent(e):"undefined"!=typeof CKEDITOR?CKEDITOR.instances[n].setData(e):void 0},e}(),this.Cms_Editor_CodeMirror=function(){function n(){}return n.render=function(e,n){return null==n&&(n={}),$(e).each(function(){var e,t;return t=$(this),(e=CodeMirror.fromTextArea(t.get(0),n)).setSize(null,t.height()),n.readonly&&e.refresh(),t.data("editor",e)})},n.lock=function(e,t){return n.setOption(e,t),$(document).on("change",e,function(){return n.setOption(e,t)})},n.setOption=function(e,t){var n;return n=$(t).next(".CodeMirror")[0].CodeMirror,""===$(e).val()?(n.setOption("mode","text/html"),n.setOption("readOnly",!1)):(n.setOption("mode","text/plain"),n.setOption("readOnly",!0))},n}(),this.Cms_Editor_CKEditor=function(){function e(){}return e.render=function(e,t){null==t&&(t={}),$(e).ckeditor(t).editor.on("change",function(){SS.formChanged=!0}),CKEDITOR.on("dialogDefinition",function(e){var t,n,i,r;if(i=e.data.name,t=e.data.definition,"table"===i||"tableProperties"===i)return(r=(n=t.getContents("info")).get("txtWidth"))["default"]="",(r=n.get("txtCellSpace")).controlStyle="display: none",r.label="",r["default"]="",(r=n.get("txtCellPad")).controlStyle="display: none",r.label="",r["default"]="",(r=n.get("txtBorder")).controlStyle="display: none",r.label="",r["default"]="",(r=n.get("txtSummary")).controlStyle="display: none",r.label="",r["default"]=""})},e}(),this.Cms_Editor_TinyMCE=function(){function e(){}return e.render=function(e,t){return null==t&&(t={}),t.selector=e,tinymce.init(t)},e}(),this.Cms_Form=function(){function n(){}return n.options={check:{syntax:!0}},n.addonSelector=".mod-cms-body",n.render=function(){n.options.check.syntax&&Syntax_Checker.render(n,{afterCheck:n.afterSyntaxCheck}),Link_Checker.render(),Mobile_Size_Checker.render(),Form_Alert.addValidation(Form_Alert.clonedName),Form_Alert.addValidation(Form_Alert.closeConfirmation),n.options.check.syntax&&Form_Alert.addValidation(Form_Alert.validateSyntaxCheck),Form_Alert.addValidation(Mobile_Size_Checker.validateHtml),Form_Alert.render(),Form_Preview.render()},n.editorId="item_html",n.getEditorHtml=function(e){return null==e&&(e=null),e||(e=n.editorId),"undefined"!=typeof tinymce?"<div>"+tinymce.get(e).getContent()+"</div>":"undefined"!=typeof CKEDITOR?"<div>"+CKEDITOR.instances[e].getData()+"</div>":""},n.setEditorHtml=function(e,t){return t=t||{},id=t.id,null==id&&(id=null),id||(id=n.editorId),"undefined"!=typeof tinymce?tinymce.get(id).setContent(e):"undefined"!=typeof CKEDITOR?CKEDITOR.instances[id].setData(e):void 0},n.syntaxChecks={},n.addSyntaxCheck=function(e,t){n.syntaxChecks[e]=t},n.activateSyntaxChecks=function(){Syntax_Checker.resetChecks(),$.each(n.syntaxChecks,function(e,t){var n=$("#"+e)[0];n&&$(n).is(":visible")&&Syntax_Checker.addCheck(e,t)})},n.afterSyntaxCheck=function(){$("[data-check-presence]").each(function(){var e=$(this).attr("data-check-presence");if(e&&!$(this).val()){var t=null;t=(t=$(this).closest(".column-value").attr("id"))||$(this).closest(".addon-view").attr("id"),Syntax_Checker.errors.push({id:t,idx:0,code:e,msg:e+"\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",ele:this})}});var e,t,n,i,r=[],o=[];if($("#addon-cms-agents-addons-form-page .column-value-cms-column-headline").each(function(){o.push($(this).attr("id")),r.push($(this).find('[name="item[column_values][][in_wrap][head]"]').val())}),e=[],r.length)for(n=i=0,t=r.length-1;0<=t?i<=t:t<=i;n=0<=t?++i:--i)0===n?/h[12]/i.test(r[n])||e.push(n):/h3/i.test(r[n])?/h[234]/i.test(r[n-1])||e.push(n):/h4/i.test(r[n])&&(/h[34]/i.test(r[n-1])||e.push(n));for(n=0;n<e.length;n++){var a=e[n];Syntax_Checker.errors.push({id:o[a],idx:0,code:r[a],msg:Syntax_Checker.message.invalidOrderOfH,detail:Syntax_Checker.detail.invalidOrderOfH})}},n.form_html_path=null,n.form_link_check_path=null,n.getHtml=function(t,i){if(".mod-cms-body"!==n.addonSelector)if(n.form_html_path){var e=n.getFormData($("#"+Form_Preview.form_id));e.append("route",Form_Preview.page_route),$.ajax({type:"POST",url:n.form_html_path,data:e,processData:!1,contentType:!1,cache:!1,success:function(e){t("<div>"+e+"</div>")},error:function(e,t,n){i&&i(e,t,n)}})}else i&&i(null,null,"form html path is not configured");else t(n.getEditorHtml())},n.getFormData=function(e,t){t||(t={});var n=new FormData;return $.each(e.serializeArray(),function(){(t.preserveMethod||"_method"!==this.name)&&n.append(this.name,this.value)}),n},n}(),this.Form_Alert=function(){function h(){}return(Cms_Form.alert=h).alerts={},h.validations=[],h.beforeSaves=[],h.render=function(){$("input:submit").on("click.form_alert",function(e){var t=this,n=$(t).closest("form"),i=function(e){h.validate(n,t,{html:e})?($(t).off(".form_alert"),$(t).trigger("click")):h.showAlert(n,t)},r=function(e,t,n){alert(n)};return Cms_Form.getHtml(i,r),e.preventDefault(),!1})},h.validate=function(e,t,n){return h.alerts={},$.each(h.validations,function(){this(e,t,n)}),$.isEmptyObject(h.alerts)},h.addValidation=function(e){return h.validations.push(e)},h.runBeforeSave=function(e,t){return $.each(h.beforeSaves,function(){return this(e,t)})},h.showAlert=function(e,t){var n=$('<div id="alertExplanation" class="errorExplanation">');n.append("<h2>\u8b66\u544a</h2>");var i=h.alerts;for(var r in i){var o=i[r];n.append("<p>"+r+"</p>");var a,s,l,c=$("<ul>").appendTo(n);for(a=s=0,l=o.length;s<l;a=++s){var u=o[a];u.msg&&c.append("<li>"+u.msg+"</li>")}}var d=$(document.createElement("footer")).addClass("send");d.append('<button name="button" type="button" class="btn-primary save">\u8b66\u544a\u3092\u7121\u8996\u3059\u308b</button>'),d.append('<button name="button" type="button" class="btn-default cancel">\u30ad\u30e3\u30f3\u30bb\u30eb</button>'),$.colorbox({html:n.get(0).outerHTML+d.get(0).outerHTML,maxHeight:"80%",fixed:!0}),$("#cboxLoadedContent").find(".save").on("click",function(){return h.runBeforeSave(e,t),$(t).off(".form_alert"),$(t).trigger("click")}),$("#cboxLoadedContent").find(".cancel").on("click",function(){return $.colorbox.close(),!1})},h.addBeforeSave=function(e){return h.beforeSaves.push(e)},h.validateSyntaxCheck=function(){Syntax_Checker.asyncCheck(),$.each(Syntax_Checker.errors,function(e,t){h.add("\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u30c1\u30a7\u30c3\u30af",t.ele,t.msg)})},h.presence=function(e){return $(e).find("input.presence,textarea.presence").each(function(){var e,t;if(""===$(this).val())return $(this).closest("dl").show(),e=$(this).closest(".addon-view").find("header").text(),t=h.justText($(this).closest("dd").prev("dt")),h.add(e,this,t+"\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002")})},h.clonedName=function(e,t){var n,i;if(i=$(e).find("#addon-basic #item_name"),$(t).hasClass("publish_save")&&/^\[\u8907\u88fd\]/.test($(i).val()))return n=$(i).closest(".addon-view").find("header").text(),h.justText($(i).closest("dd").prev("dt")),h.add(n,i,"\u30bf\u30a4\u30c8\u30eb\u306b[\u8907\u88fd]\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002")},h.closeConfirmation=function(e,t){var n,i;if($(t).attr("data-close-confirmation"))return n="\u975e\u516c\u958b\u72b6\u614b\u3067\u4fdd\u5b58\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059",i=null,$(t).attr("data-contain-links-path")&&(i='<a href="'+$(t).attr("data-contain-links-path")+'" target="_blank">\u3053\u306e\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u3092\u78ba\u8a8d\u3059\u308b\u3002</a>'),h.add(n,null,i)},h.add=function(e,t,n){var i;return(i=h.alerts)[e]||(i[e]=[]),h.alerts[e].push({ele:t,msg:n})},h.justText=function(e){return $(e).clone().children().remove().end().text()},h.validateReplaceWord=function(e){var t,n,i,r,o,a;if(a=Syntax_Checker.config.replace_words){for(i in t=["#addon-basic","#addon-cms-agents-addons-meta","#addon-event-agents-addons-date","#addon-map-agents-addons-page"],n=['[name="item[basename]"]',"location-search.keyword"],r=[],a)o=a[i],r.push($(e).find(t.join(",")).find("input,textarea").not(n.join(",")).each(function(){var e,t,n;if((n=$(this).val())&&!$.isEmptyObject(n.match(RegExp(""+i.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),"g"))))return $(this).closest("dl").show(),e=$(this).closest(".addon-view").find(".addon-head").text(),t=h.justText($(this).closest("dd").prev("dt")),h.add(e,this,t+"\u306b\u4f7f\u7528\u304c\u597d\u307e\u3057\u304f\u306a\u3044\u5358\u8a9e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u300c"+i+"\u300d\u2192\u300c"+o+"\u300d")}));return r}},h}(),this.Form_Preview=function(){function u(){}return u.form_preview_path,u.form_id="item-form",u.page_route,u.render=function(){return $("button.preview").on("click",function(){var e,t,n,i,r,o,a,s,l,c;if(o=$("#"+u.form_id+" input[name='item[name]']").val(),e=$("#"+u.form_id+" input[name='item[basename]']").val(),t=[],o||t.push("\u30bf\u30a4\u30c8\u30eb\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),e?/^[\w\-]+(\.html)?$/.test(e)||t.push("\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u4e0d\u6b63\u306a\u5024\u3067\u3059\u3002"):t.push("\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),!$.isEmptyObject(t))return alert(t.join("\n")),!1;for(r in s=$('meta[name="csrf-token"]').attr("content"),n=$("<form>"),$(n).attr("method","post"),$(n).attr("action",u.form_preview_path),$(n).attr("target","FormPreview"),a=$("#"+u.form_id).serializeArray())l=a[r],/^item\[/.test(l.name)&&"item[html]"!==l.name&&"item[body_parts][]"!==l.name&&n.append($("<input/>",{name:l.name.replace(/^item\[/,"preview_item["),value:l.value,type:"hidden"}));return $("textarea[id^=item_html_part_]").each(function(){var e;return e=$(this).attr("id"),o=$(this).attr("name").replace(/^item\[/,"preview_item["),n.append($("<input/>",{name:o,value:Cms_Form.getEditorHtml(e),type:"hidden"}))}),n.append($("<input/>",{name:"preview_item[route]",value:u.page_route,type:"hidden"})),n.append($("<input/>",{name:"preview_item[html]",value:Cms_Form.getEditorHtml("item_html"),type:"hidden"})),n.append($("<input/>",{name:"authenticity_token",value:s,type:"hidden"})),c=$(window).width(),i=$(window).height(),window.open("about:blank","FormPreview","width="+c+",height="+i+",resizable=yes,scrollbars=yes"),n.appendTo("body"),n.submit(),!1})},u}(),this.Form_Save_Event=function(){function e(){}return e.render=function(){return document.onkeydown=function(){if((event.ctrlKey||event.metaKey)&&83===event.keyCode)return event.keyCode=0,$("#"+Form_Preview.form_id).submit(),!1}},e}(),this.Cms_Inplace_Form=function(){function i(){}return i.addonSelector=".inplace-checkers",i.resolveType="text",i.getFormData=Cms_Form.getFormData,i.options={check:{form:!0,syntax:!0,link:!0}},i.linkChecker=null,i.formChecker=null,i.render=function(){i.options.check.syntax&&Syntax_Checker.render(i,{afterCheck:i.afterSyntaxCheck}),i.options.check.link&&(i.linkChecker=Link_Checker.render(i)),i.options.check.form&&(i.formChecker=Form_Checker.render(i)),i.renderSaveIfNoAlerts()},i.setEditorHtml=function(e,t){t=t||{},i.setContent(e,t)},i.afterSyntaxCheck=function(){$("[data-check-presence]").each(function(){var e=$(this).attr("data-check-presence");if(e&&!$(this).val()){var t=null;t=$(this).closest(".column-value").attr("id"),Syntax_Checker.errors.push({id:t,idx:0,code:e,msg:e+"\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",ele:this})}})},i.renderSaveIfNoAlerts=function(){$('input:submit[name="save_if_no_alerts"]').on("click.form_alert",function(e){var n=$(this),t=[];return i.options.check.syntax&&t.push(Syntax_Checker.asyncCheck()),i.options.check.link&&t.push(i.linkChecker.asyncCheck()),i.options.check.form&&t.push(i.formChecker.asyncCheck()),0===t.length||($.when.apply($,t).then(function(){for(var e=!0,t=0;t<arguments.length;t++)if("ok"!==arguments[t].status){e=!1;break}e&&(n.off(".form_alert"),n.trigger("click"))}),e.preventDefault(),!1)})},i}(),this.Syntax_Checker=function(){function n(e){this.$el=null,this.$elBody=null,this.form=e}function c(){}return n.prototype.init=function(){if(this.$el)return this;var e=$("#errorSyntaxChecker");if(e[0])return this.$el=e,this.$elBody=e.find(".errorExplanationBody"),this.moveLast();(e=$("<div/>",{id:"errorSyntaxChecker","class":"errorExplanation"})).append("<h2>\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u30c1\u30a7\u30c3\u30af</h2>");var t=$("<div/>",{"class":"errorExplanationBody"});return e.append(t),this.$el=e,this.$elBody=t,this.moveLast()},n.prototype.moveLast=function(){return $(this.form.addonSelector).append(this.$el),this},n.prototype.showMessage=function(e){return this.init(),this.$elBody.html(e),this.moveLast(),this},n.prototype.showChecking=function(){return this.showMessage(SS.loading)},n.prototype.showResult=function(e,t){if(0!=t.length){this.init();var n=$("<ul/>");return this.appendMessage(n,e,t),this.$elBody.html(""),this.$elBody.append("<p>\u6b21\u306e\u9805\u76ee\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002</p>"),this.$elBody.append(n),this.moveLast(),SS_Tooltips.render(".detail"),$(window).trigger("resize"),this}this.showMessage("<p>\u30a8\u30e9\u30fc\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002</p>")},n.prototype.appendMessage=function(t,e,n){var s,i,l,c,u,d,r;s=this;var h={};$.each(n,function(e,t){var n=t.id;h[n]=h[n]||[],h[n].push(t)}),$.each(e,function(o,a){(n=h[o])&&(a.name&&((r=$('<li class="column-name">')).text(a.name),t.append(r)),$.each(n,function(e,r){(d=$("<code>")).text(r.code),t.append('<li class="code">'),t.find("li:last").append(d),t.append("<ul>"),t.find("> ul:last").append("<li>"),c=t.find("> ul:last li:last"),u=$('<span class="message detail">'+r.msg+"</span>"),r.detail&&(l=$("<ul>").appendTo(u),$.each(r.detail,function(){l.append("<li>"+this+"</li>"),l.hide()})),c.append(u),r.correctContent&&((i=$('<a href="#" class="correct">\u81ea\u52d5\u4fee\u6b63</a>')).on("click",function(){var e,t,n,i;return n=r.correctContent,e=a.setContent,t=a.getContent,i=a.type,e(n(o,{content:t(),type:i},r)),$(s.form.addonSelector).find("button.syntax-check").trigger("click"),!1}),c.append(i))}))})},c.checks={},c.errors=[],c.errorCount=0,c.form=null,c.resultBox=null,c.afterCheck=null,c.render=function(e,t){e=e||Cms_Form,t=t||{},c.form=e,c.options=t,c.resultBox=new n(c.form),c.afterCheck=t.afterCheck,$(document).on("click","button.syntax-check",function(){var e=this;e.disabled=!0;var t=function(){e.disabled=!1};c.resultBox.init(),c.resultBox.showChecking(),c.asyncCheck().done(t).fail(t)})},c.config={},c.asyncCheck=function(){var t=$.Deferred();return function(){try{c.check(),c.resultBox.showResult(c.checks,c.errors),t.resolve({status:0==c.errors.length?"ok":"failed"})}catch(e){c.resultBox.showMessage("<p>"+e+"</p>"),t.reject(null,null,e)}}(),t.promise()},c.addCheck=function(e,t){var n=(t=t||{}).name||null,i=t.resolve||"text",r=t.type||"string",o=t.getContent,a=t.setContent,s=t.afterCheck;c.checks[e]={name:n,resolve:i,type:r,getContent:o,setContent:a,afterCheck:s}},c.resetChecks=function(){c.checks={},c.errors=[],c.errorCount=0},c.getContents=function(){var n={};return $.each(c.checks,function(e,t){n[e]={content:t.getContent(),resolve:t.resolve,type:t.type,afterCheck:t.afterCheck}}),n},c.check=function(){var e,n;return c.reset(),e=c.getContents(),$.each(e,function(e,t){"html"==t.resolve?c.checkHtml(e,t):c.checkText(e,t),(n=t.afterCheck)&&n(e,t)}),c.afterCheck&&c.afterCheck(),c.errors},c.reset=function(){this.errors=[]},c.checkHtml=function(e,t){c.checkDateFormat(e,t),c.checkInterwordSpace(e,t),c.checkKanaCharacter(e,t),c.checkMultibyteCharacter(e,t),c.checkReplaceWords(e,t),c.checkAdjacentA(e,t),c.checkAppletAlt(e,t),c.checkAreaAlt(e,t),c.checkEmbeddedMedia(e,t),c.checkImgAlt(e,t),c.checkImgDataUriScheme(e,t),c.checkLinkText(e,t),c.checkObjectText(e,t),c.checkOrderOfH(e,t),c.checkTable(e,t)},c.checkText=function(e,t){c.checkDateFormat(e,t),c.checkInterwordSpace(e,t),c.checkKanaCharacter(e,t),c.checkMultibyteCharacter(e,t),c.checkReplaceWords(e,t)},c.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&(!isNaN(e.getTime())&&0<e.getYear())},c.justText=function(e){return $(e).clone().children().remove().end().text()},
  c.outerHtmlSummary=function(e){return $(e).get(0).outerHTML.replace(/[\r\n]|&nbsp;/g,"")},c.message={notSetImgAlt:"\u753b\u50cf\u306e\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",notSetAppletAlt:"\u30a2\u30d7\u30ec\u30c3\u30c8\u8981\u7d20\u306e\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",notSetAreaAlt:"\u30a8\u30ea\u30a2\u8981\u7d20\u306e\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",invalidImgScheme:"\u753b\u50cf\u306eURI\u306b\u30d0\u30a4\u30ca\u30ea\u30fc\u6587\u5b57\u5217\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002",notSetTableCaption:"\u8868\u306b\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",notSetThScope:"\u8868\u306e\u30d8\u30c3\u30c0\u30fc\u306b\u30b9\u30b3\u30fc\u30d7\u5c5e\u6027\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",invalidOrderOfH:"\u898b\u51fa\u3057(H)\u306e\u9806\u756a\u304c\u4e0d\u6b63\u3067\u3059\u3002",invalidMultibyteCharacter:"\u82f1\u6570\u5b57\u306f\u534a\u89d2\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",invalidKanaCharacter:"\u534a\u89d2\u30ab\u30ca\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002",invalidDateFormat:"\u65e5\u4ed8\u306e\u8868\u8a18\u306f\u25cb\u5e74\u25cb\u6708\u25cb\u65e5\u3068\u3057\u3066\u304f\u3060\u3055\u3044\u3002",invalidAdjacentA:"\u96a3\u63a5\u3059\u308b\u540c\u3058\u30ea\u30f3\u30af\u3092\u4e00\u3064\u306e\u30ea\u30f3\u30af\u306b\u307e\u3068\u3081\u3066\u304f\u3060\u3055\u3044\u3002",checkInterwordSpace:"\u5358\u8a9e\u306e\u6587\u5b57\u9593\u306e\u30b9\u30da\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",checkLinkText:"\u30ea\u30f3\u30af\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",checkObjectText:"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u8981\u7d20\u306e\u30dc\u30c7\u30a3\u306b\u9069\u5207\u306a\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3092\u8a18\u8ff0\u3057\u3066\u304f\u3060\u3055\u3044\u3002",checkEmbeddedMedia:"\u52d5\u753b\u3084\u97f3\u58f0\u3092\u542b\u3080\u5834\u5408\u3001\u8aac\u660e\u304c\u3042\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",replaceWord:"\u4f7f\u7528\u304c\u597d\u307e\u3057\u304f\u306a\u3044\u5358\u8a9e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"},c.detail={notSetImgAlt:["\u753b\u50cf\u306e\u5185\u5bb9\u3092\u793a\u3059\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],notSetAppletAlt:["\u30a2\u30d7\u30ec\u30c3\u30c8\u306e\u5185\u5bb9\u3092\u793a\u3059\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],notSetAreaAlt:["\u30a8\u30ea\u30a2\u8981\u7d20\u306e\u5185\u5bb9\u3092\u793a\u3059\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],invalidImgScheme:["\u753b\u50cf\u306eSRC\u5c5e\u6027\u306b\u30c7\u30fc\u30bf\u5f62\u5f0f\u306eURI\u30b9\u30ad\u30fc\u30e0\u304c\u5b58\u5728\u3057\u307e\u3059\u3002","\u4ed6\u306eURI\u30b9\u30ad\u30fc\u30e0\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],notSetTableCaption:["\u8868\u306b\u898b\u51fa\u3057(CAPTION)\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093","TABLE\u30bf\u30b0\u306e\u4e2d\u306bCAPTION\u30bf\u30b0\u3092\u8ffd\u8a18\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],notSetThScope:["\u8868\u306e\u30d8\u30c3\u30c0\u30fc(TH)\u306b\u898b\u51fa\u3057\u306e\u65b9\u5411\u3067\u3042\u308bSCOPE\u5c5e\u6027\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",'\u884c\u65b9\u5411\u3067\u3042\u308c\u3070scope="col\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002','\u5217\u65b9\u5411\u3067\u3042\u308c\u3070scope="row"\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002'],invalidOrderOfH:["\u9069\u5207\u306a\u9806\u306b\u914d\u7f6e\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],invalidMultibyteCharacter:["\u672c\u6587\u306b\u5168\u89d2\u82f1\u6570\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002","\u534a\u89d2\u82f1\u6570\u306b\u7f6e\u304d\u63db\u3048\u308b\u304b\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],invalidKanaCharacter:["\u672c\u6587\u306b\u534a\u89d2\u30ab\u30ca\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002","\u5168\u89d2\u6587\u5b57\u306b\u7f6e\u304d\u63db\u3048\u308b\u304b\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],invalidDateFormat:["\u65e5\u4ed8\u306e\u5f62\u5f0f\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],invalidAdjacentA:["\u96a3\u308a\u5408\u3046\u30ea\u30f3\u30af(A)\u306b\u540c\u3058\u30ea\u30f3\u30af\u5148\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002","\u4e00\u3064\u306e\u30ea\u30f3\u30af(A)\u306b\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],checkInterwordSpace:["\u5358\u8a9e\u306e\u6587\u5b57\u9593\u306b\u4e0d\u8981\u306a\u30b9\u30da\u30fc\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],checkLinkText:["\u30ea\u30f3\u30af\u5185\u306e\u30c6\u30ad\u30b9\u30c8\u306f\u9077\u79fb\u5148\u3092\u8868\u3059\u3082\u306e\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],checkObjectText:["\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u8981\u7d20\u304c\u6b63\u3057\u304f\u8aad\u307f\u8fbc\u307e\u308c\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u8aac\u660e\u3092\u8981\u7d20\u5185\u306b\u8a18\u8ff0\u3057\u3066\u304f\u3060\u3055\u3044\u3002"],checkEmbeddedMedia:["\u52d5\u753b\u3084\u97f3\u58f0\u3092\u672c\u6587\u306b\u57cb\u3081\u8fbc\u3080\u5834\u5408\u306f\u8aac\u660e\u3092\u8a18\u8ff0\u3057\u3066\u304f\u3060\u3055\u3044\u3002"]},c.mediaExtensions=["aac","aif","aiff","au","avi","flac","flv","mid","midi","mp3","m4a","mp4","mpg","mpeg","oga","ogg","tta","vdo","wav","wma","wmv"],c.formatContent=function(e){var t=e.content,n=e.resolve,i=e.type,r=[];return"array"==i?$.each(t,function(e,t){t=t||"","html"==n?r.push(t):r.push("<div>"+t+"</div>")}):(t=t||"","html"==n?r.push(t):r.push("<div>"+t+"</div>")),r},c.checkMultibyteCharacter=function(n,e){var t,i;t=c.formatContent(e),$.each(t,function(e,t){i=[],$(t).find(":not(iframe)").addBack().contents().filter(function(){return 3==this.nodeType}).each(function(){var e;if(e=this.textContent.match(/[\uff21-\uff3a\uff41-\uff5a\uff10-\uff19]/g))return i.push(e)}),$.isEmptyObject(i)||c.errors.push({id:n,idx:e,code:i.join(","),ele:t,msg:c.message.invalidMultibyteCharacter,detail:c.detail.invalidMultibyteCharacter,correctContent:c.correctMultibyteCharacter})})},c.correctMultibyteCharacter=function(e,t){var n,i;return i=[],n=c.formatContent(t),$.each(n,function(e,t){(t=$(t)).find(":not(iframe)").addBack().contents().filter(function(){return 3==this.nodeType}).each(function(){var e;return e=this.textContent.replace(/[\uff21-\uff3a\uff41-\uff5a\uff10-\uff19]/g,function(e){return String.fromCharCode(e.charCodeAt(0)-65248)}),this.textContent=e}),i.push(t.html())}),"array"==t.type?i:i[0]},c.checkKanaCharacter=function(n,e){var t,i;t=c.formatContent(e),$.each(t,function(e,t){i=t.match(/[\uff61-\uff9f]/g),$.isEmptyObject(i)||c.errors.push({id:n,idx:e,code:i.join(","),ele:t,msg:c.message.invalidKanaCharacter,detail:c.detail.invalidKanaCharacter,correctContent:c.correctKanaCharacter})})},c.correctKanaCharacter=function(e,t){var n,r,o,a,s;for(r=[],n=c.formatContent(t),a="\uff61\uff62\uff63\uff64\uff65\uff66\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\uff70\uff71\uff72\uff73\uff74\uff75\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff95\uff96\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff9d\uff9e\uff9f".split(""),o="\u3002\u300c\u300d\u3001\u30fb\u30f2\u30a1\u30a3\u30a5\u30a7\u30a9\u30e3\u30e5\u30e7\u30c3\u30fc\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f3\u309b\u309c".split(""),s={},i=j=0,len=a.length;j<len;i=++j)v=a[i],s[v]=o[i];return $.each(n,function(e,t){(t=$(t)).find(":not(iframe)").addBack().contents().filter(function(){return 3===this.nodeType}).each(function(){var e;return e=this.textContent.replace(/[\uff61-\uff9f]/g,function(e){return s[e]}),this.textContent=e}),r.push(t.html())}),"array"==t.type?r:r[0]},c.checkReplaceWords=function(o,e){var t,a;t=c.formatContent(e),(a=c.config.replace_words)&&$.each(t,function(e,t){var n,i,r;for(i in a)r=a[i],n=t.match(RegExp(""+i.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),"g")),$.isEmptyObject(n)||c.errors.push({id:o,idx:e,code:n[0],ele:t,msg:c.message.replaceWord+"\u300c"+i+"\u300d\u2192\u300c"+r+"\u300d",correctContent:c.correctReplaceWords,replaceKey:i,replaceValue:r})})},c.correctReplaceWords=function(e,t,n){var i,r,o,a;if(o=c.formatContent(t),i=n.replaceKey,r=n.replaceValue,a=[],i||r)return $.each(o,function(e,t){(t=$(t)).find(":not(iframe)").addBack().contents().filter(function(){return 3===this.nodeType}).each(function(){var e;return e=this.textContent.replace(RegExp(""+i.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),"g"),function(){return r}),this.textContent=e}),a.push(t.html())}),"array"==t.type?a:a[0]},c.checkDateFormat=function(n,e){var t,i;t=c.formatContent(e),$.each(t,function(e,t){i=[],$(t).find(":not(iframe)").addBack().contents().filter(function(){return 3===this.nodeType}).each(function(){var e;if(e=this.textContent.match(/\d{4}[\.\-\/]\d{1,2}[\.\-\/]\d{1,2}/g))return i.push(e)}),$.isEmptyObject(i)||(i=$.grep(i,function(e){return c.isValidDate(new Date(e))}),$.isEmptyObject(i)||c.errors.push({id:n,idx:e,code:i.join(","),ele:t,msg:c.message.invalidDateFormat,detail:c.detail.invalidDateFormat,correctContent:c.correctDateFormat}))})},c.correctDateFormat=function(e,t){var n,i;return i=c.formatContent(t),n=[],$.each(i,function(e,t){(t=$(t)).find(":not(iframe)").addBack().contents().filter(function(){return 3===this.nodeType}).each(function(){var e;return e=this.textContent.replace(/(\d{4})[\.\-\/](\d{1,2})[\.\-\/](\d{1,2})/g,function(e,t,n,i){return c.isValidDate(new Date([t,n,i].join("/")))?t+"\u5e74"+n+"\u6708"+i+"\u65e5":e}),this.textContent=e}),n.push(t.html())}),"array"==t.type?n:n[0]},c.checkImgAlt=function(n,e){var t;t=c.formatContent(e),$.each(t,function(t,e){$(e).find("img").each(function(){var e;(e=$(this).attr("alt"))&&""!==$.trim(e)&&!/^[\w\s\.\-]*$/.test(e)||c.errors.push({id:n,idx:t,code:c.outerHtmlSummary(this),ele:this,msg:c.message.notSetImgAlt,detail:c.detail.notSetImgAlt})})})},c.checkAppletAlt=function(n,e){var t;t=c.formatContent(e),$.each(t,function(t,e){$(e).find("applet").each(function(){var e;(e=$(this).attr("alt"))&&""!==$.trim(e)&&!/^[\w\s\.\-]*$/.test(e)||c.errors.push({id:n,idx:t,code:c.outerHtmlSummary(this),ele:this,msg:c.message.notSetAppletAlt,detail:c.detail.notSetAppletAlt})})})},c.checkAreaAlt=function(n,e){var t;t=c.formatContent(e),$.each(t,function(t,e){$(e).find("area").each(function(){var e;(e=$(this).attr("alt"))&&""!==$.trim(e)&&!/^[\w\s\.\-]*$/.test(e)||c.errors.push({id:n,idx:t,code:c.outerHtmlSummary(this),ele:this,msg:c.message.notSetAreaAlt,detail:c.detail.notSetAreaAlt})})})},c.checkImgDataUriScheme=function(n,e){var t;t=c.formatContent(e),$.each(t,function(t,e){$(e).find("img[src]").each(function(){var e;e=$(this).attr("src"),/^data:.*?,.*?$/.test(e)&&c.errors.push({id:n,idx:t,code:c.outerHtmlSummary(this),ele:this,msg:c.message.invalidImgScheme,detail:c.detail.invalidImgScheme})})})},c.checkTable=function(i,e){var t;t=c.formatContent(e),$.each(t,function(n,e){$(e).find("table").each(function(){var e,t;t=this,(e=$(this).find("caption"))&&""!==$.trim(e.text())||c.errors.push({id:i,idx:n,code:c.outerHtmlSummary(this),ele:t,msg:c.message.notSetTableCaption,detail:c.detail.notSetTableCaption,correctContent:c.correctTableCaption}),$(t).find("th").each(function(){if(!$(this).attr("scope"))return c.errors.push({id:i,idx:n,code:c.outerHtmlSummary(this),ele:t,msg:c.message.notSetThScope,detail:c.detail.notSetThScope,correctContent:c.correctTableScope}),!1})})})},c.correctTableCaption=function(e,t){var n,i;return i=c.formatContent(t),n=[],$.each(i,function(e,t){t=$(t).find("table"),$(t).find("caption").remove(),$(t).prepend("<caption>\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3</caption>"),t=$(t).parents().last().html()||$(t).html(),n.push(t)}),"array"==t.type?n:n[0]},c.correctTableScope=function(e,t){var n,i,r;return n=c.formatContent(t),i=[],$.each(n,function(e,t){t=$(t).find("table"),r=1==$(t).find("tr:first th").length?"row":"col",$(t).find("tr:first th").each(function(){if(!$(this).attr("scope"))return $(this).attr("scope",r)}),$(t).find("tr:not(:first) th").each(function(){if(!$(this).attr("scope"))return $(this).attr("scope","row")}),t=$(t).parents().last().html()||$(t).html(),i.push(t)}),"array"==t.type?i:i[0]},c.checkOrderOfH=function(n,e){var t,i,r,o,a,s;t=c.formatContent(e),$.each(t,function(e,t){if(t=$(t),!(r=$(t).find("h1,h2,h3,h4,h5,h6")).length)return!1;for(i="",o=a=0,s=r.length-1;0<=s?a<=s:s<=a;o=0<=s?++a:--a)0===o?/h[12]/i.test(r[o].tagName)||(i+=r[o].tagName+" "):/h3/i.test(r[o].tagName)?/h[23456]/i.test(r[o-1].tagName)||(i+=r[o].tagName+" "):/h4/i.test(r[o].tagName)?/h[3456]/i.test(r[o-1].tagName)||(i+=r[o].tagName+" "):/h5/i.test(r[o].tagName)?/h[456]/i.test(r[o-1].tagName)||(i+=r[o].tagName+" "):/h6/i.test(r[o].tagName)&&(/h[56]/i.test(r[o-1].tagName)||(i+=r[o].tagName+" "));""!==i&&c.errors.push({id:n,idx:e,code:i,ele:t,msg:c.message.invalidOrderOfH,detail:c.detail.invalidOrderOfH,correctContent:c.correctOrderOfH})})},c.correctOrderOfH=function(e,t){var n,i,r,o,a,s,l;return n=c.formatContent(t),i=[],$.each(n,function(e,t){if(t=$(t),(r=$(t).find("h1,h2,h3,h4,h5,h6")).length){for(l=t,o=a=0,s=r.length-1;0<=s?a<=s:s<=a;o=0<=s?++a:--a)0===o?/h[12]/i.test(r[o].tagName)||(l=$("<h1>"+$(r[o]).html()+"</h1>"),$(r[o]).after(l).remove(),r[o]=l[0]):/h3/i.test(r[o].tagName)?/h[23456]/i.test(r[o-1].tagName)||((l=$("<"+r[o-1].tagName.replace("1","2")+">")).html($(r[o]).html()),$(r[o]).after(l).remove(),r[o]=l[0]):/h4/i.test(r[o].tagName)?/h[3456]/i.test(r[o-1].tagName)||((l=$("<"+r[o-1].tagName.replace("1","2")+">")).html($(r[o]).html()),$(r[o]).after(l).remove(),r[o]=l[0]):/h5/i.test(r[o].tagName)?/h[456]/i.test(r[o-1].tagName)||((l=$("<"+r[o-1].tagName.replace("1","2")+">")).html($(r[o]).html()),$(r[o]).after(l).remove(),r[o]=l[0]):/h6/i.test(r[o].tagName)&&(/h[56]/i.test(r[o-1].tagName)||((l=$("<"+r[o-1].tagName.replace("1","2")+">")).html($(r[o]).html()),$(r[o]).after(l).remove(),r[o]=l[0]));l=$(l).parents().last().html()||$(l).html(),i.push(l)}else i.push($(t).parents().last().html())}),"array"==t.type?i:i[0]},c.checkAdjacentA=function(i,e){var t;t=c.formatContent(e),$.each(t,function(n,e){e=$(e),$(e).find("a[href]").each(function(){var e,t;t=$(this).attr("href"),(e=$(this).next("a[href]")).length&&t==e.attr("href")&&c.errors.push({id:i,idx:n,code:c.outerHtmlSummary(this)+c.outerHtmlSummary(e),ele:this,msg:c.message.invalidAdjacentA,detail:c.detail.invalidAdjacentA,correctContent:c.correctAdjacentA})})})},c.correctAdjacentA=function(e,t){var n,i,r,o;return n=c.formatContent(t),i=[],$.each(n,function(e,t){t=$(t),o=$(t).attr("href"),(r=$(t).next("a[href]")).length&&o==r.attr("href")&&($(t).html()!==$(r).html()&&$(t).html($(t).html()+$(r).html()),r.remove()),t=$(t).parents().last().html()||$(t).html(),i.push(t)}),"array"==t.type?i:i[0]},c.checkInterwordSpace=function(o,e){var t;t=c.formatContent(e),$.each(t,function(r,e){e=$(e),$(e).find(":not(iframe)").addBack().contents().filter(function(){return 3==this.nodeType}).each(function(){var e,t,n,i;if(i=$.trim(c.justText(this)),/[\u3000]/.test(i))for(e=t=0,n=i.length-1;0<=n?t<=n:n<=t;e=0<=n?++t:--t)if(256<=i.charCodeAt(e)){c.errors.push({id:o,idx:r,code:i,msg:c.message.checkInterwordSpace,detail:c.detail.checkInterwordSpace});break}})})},c.checkLinkText=function(n,e){var t;t=c.formatContent(e),$.each(t,function(e,t){t=$(t),$(t).find("a[href]").each(function(){$(this).text().length<=3&&c.errors.push({id:n,idx:e,code:c.outerHtmlSummary(this),msg:c.message.checkLinkText,detail:c.detail.checkLinkText})})})},c.checkObjectText=function(n,e){var t;t=c.formatContent(e),$.each(t,function(t,e){e=$(e),$(e).find("object").each(function(){var e;e=$(this).text(),$.trim(e)||c.errors.push({id:n,idx:t,code:c.outerHtmlSummary(this),msg:c.message.checkObjectText,detail:c.detail.checkObjectText})})})},c.checkEmbeddedMedia=function(i,e){var t,r,o;t=c.formatContent(e),$.each(t,function(n,e){e=$(e),$(e).find("embed,video").each(function(){c.errors.push({id:i,idx:n,code:c.outerHtmlSummary(this),msg:c.message.checkEmbeddedMedia,detail:c.detail.checkEmbeddedMedia})}),r=new RegExp("("+c.mediaExtensions.join("|")+")","i"),o=/https?:\/\/www\.youtube\.com\//,$(e).find("iframe[src]").each(function(){var e,t;e=(t=$(this).attr("src")).replace(/\?.*$/,"").replace(/.*\//,"").split(".").pop(),(r.test(e)||o.test(t))&&c.errors.push({id:i,idx:n,code:c.outerHtmlSummary(this),msg:c.message.checkEmbeddedMedia,detail:c.detail.checkEmbeddedMedia})}),$(e).find("a[href]").each(function(){var e,t;e=(t=$(this).attr("href")).replace(/\?.*$/,"").replace(/.*\//,"").split(".").pop(),(r.test(e)||o.test(t))&&c.errors.push({id:i,idx:n,code:c.outerHtmlSummary(this),msg:c.message.checkEmbeddedMedia,detail:c.detail.checkEmbeddedMedia})})})},c}(),this.Form_Checker=function(){function n(e){this.$el=null,this.$elBody=null,this.form=e}function o(e,t){this.$el=$(e),this.form=t,this.resultBox=new n(t)}return n.prototype.init=function(){if(this.$el)return this;var e=$("#errorFormChecker");if(e[0])return this.$el=e,this.$elBody=e.find(".errorExplanationBody"),this.moveLast();(e=$("<div/>",{id:"errorFormChecker","class":"errorExplanation"})).append("<h2>"+o.message.header+"</h2>");var t=$("<div/>",{"class":"errorExplanationBody"});return e.append(t),this.$el=e,this.$elBody=t,this.moveLast()},n.prototype.moveLast=function(){return $(this.form.addonSelector).append(this.$el),this},n.prototype.showMessage=function(e){return this.init(),this.$elBody.html(e),this.moveLast(),this},n.prototype.showChecking=function(){return this.showMessage(SS.loading)},n.prototype.showResult=function(e){if(!e||0==e.length)return this.$elBody.html(""),void this.$elBody.append("<p>"+o.message.noErrors+"</p>");var t=$("<ul/>");return $.each(e,function(){t.append("<li>"+this+"</li>")}),this.$elBody.html(""),this.$elBody.append("<p>"+o.message.body+"</p>"),this.$elBody.append(t),this.moveLast()},o.message={header:"\u5236\u7d04\u30c1\u30a7\u30c3\u30af",body:"\u6b21\u306e\u9805\u76ee\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",noErrors:"\u30a8\u30e9\u30fc\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002",formCheckerError:"\u5185\u5bb9\u30c1\u30a7\u30c3\u30af\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u6b21\u306eURL\u306b\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3002"},o.render=function(e){e=e||Cms_Form;var t=new o(document,e);return t.render(),t},o.prototype.render=function(){var n=this;this.$el.on("click","button.form-check",function(){var e=this;e.disabled=!0;var t=function(){e.disabled=!1};n.asyncCheck().done(t).fail(t)})},o.prototype.asyncCheck=function(){var r=$.Deferred();this.resultBox.showChecking();var e=this.form.getFormData($("#"+Form_Preview.form_id)),t=this;return $.ajax({type:"POST",url:this.form.form_check_path,data:e,processData:!1,contentType:!1,cache:!1,success:function(e){t.resultBox.showResult(e),r.resolve({status:e&&0<e.length?"error":"ok"})},error:function(e,t,n){var i=o.message.formCheckerError+": "+form.form_check_path;o.resultBox.showMessage("<p>"+i+"</p>"),r.reject(e,t,n)}}),r.promise()},o}(),this.Mobile_Size_Checker=function(){function e(){this.$el=null,this.$elBody=null}function f(){}return e.prototype.init=function(){if(this.$el)return this;var e=$("#errorMobileChecker");if(e[0])return this.$el=e,this.$elBody=e.find(".errorExplanationBody"),this.moveLast();(e=$("<div/>",{id:"errorMobileChecker","class":"errorExplanation"})).append("<h2>"+f.message.header+"</h2>");var t=$("<div/>",{"class":"errorExplanationBody"});return e.append(t),this.$el=e,this.$elBody=t,this.moveLast()},e.prototype.moveLast=function(){return $(Cms_Form.addonSelector).append(this.$el),this},e.prototype.showMessage=function(e){return this.init(),this.$elBody.html(e),this.moveLast(),this},e.prototype.showChecking=function(){return this.showMessage(SS.loading)},e.prototype.showResult=function(){if(0===f.error.length)return this.showMessage("<p>"+f.message.mobile_check+"</p>");var e=f.error;this.$elBody.html("");for(var t=0,n=e.length;t<n;t++){var i=e[t];this.$elBody.append('<p class="error">'+i+"</p>")}return this.moveLast()},f.message={header:"\u643a\u5e2f\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u30c1\u30a7\u30c3\u30af",body:"",success:"\u6210\u529f",failure:"\u5931\u6557",mobile_disable:"\u30e2\u30d0\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",mobile_check:"\u672c\u6587\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306fOK\u3067\u3059\u3002",SizeCheckServerError:"\u672c\u6587\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306e\u30c1\u30a7\u30c3\u30af\u4e2d\u306b\u30b5\u30fc\u30d0\u30fc\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002"},f.error=[],f.url="/.cms/mobile_size_check/check.json",f.rootUrl="",f.imgs=[],f.hostFullUrl="",f.resultBox=new e,f.render=function(){return $(document).on("click","button.mobile-size-check",function(){if(f.enabled){var t=this;t.disabled=!0,f.resultBox.showChecking(),f.reset();var e=function(e){f.check(e,!0,function(){f.resultBox.showResult(),t.disabled=!1})},n=function(){f.resultBox.showMessage("<p>"+f.message.SizeCheckServerError+"</p>"),t.disabled=!1};Cms_Form.getHtml(e,n)}else f.resultBox.showMessage("<p>"+f.message.mobile_disable+"</p>")})},f.reset=function(){this.message.body="",this.imgs={},this.error=""},f.get_str_byte=function(e){var t,n,i,r,o;if(t=";,/?:@&=+$ ",n=[0,1,1,1,2,3,2,3,4,3],o=0,null===e||""===e)return o;for(r in e)i=e[r],0<=t.indexOf(i)?o++:o+=n[encodeURI(i).length];return o},f.check=function(e,t,n){var i,r,o,a,s,l,c,u,d,h,p;if((l=f.mobile_size)<(u=f.get_str_byte(e)))return i='<p class="error">',i+=f.message.SizeCheckError,i+="(\u672c\u6587\u30b5\u30a4\u30ba\uff1a"+parseInt(u/1024)+"KB",i+="</p>",f.error=[i],void n();for(r=[],o={},a=0,s=(c=$(e).find("img[src]")).length;a<s;a++)d=c[a],(h=(p=(p=$(d).attr("src")).replace(f.hostFullUrl.replace(/\/$/,""),"")).match(/^\/fs\/(.+?)\/_\//))&&(o[h[1].replace(/\//g,"")]=p.match(/_\/thumb\//),r.push(parseInt(h[1].replace(/\//g,""))));0!=r.length?$.ajax({type:"POST",url:f.url,cache:!1,data:JSON.stringify({img_ids:r,mobile_size:l,is_thumb:o}),contentType:"application/json",dataType:"json",crossDomain:!0,async:t,success:function(e){if(0<e.errors.length)return f.error=e.errors},error:function(){var e;e="<p>",e+=f.message.SizeCheckServerError,e+="</p>",f.error=[e]},complete:function(){n()}}):n()},f.checkHtmlSize=function(e){if(f.reset(),f.enabled)return f.check(e,!1,function(){var e,t,n,i,r,o;if(0<f.error.length){for(o=f.result_open(),t=[],n=0,i=(r=f.error).length;n<i;n++)e=r[n],t.push({code:"",msg:e,detail:e}),o.append('<p class="error">'+e+"</p>");return Syntax_Checker.pushError(t),f.result_close(o)}})},f.validateHtml=function(e,t,n){var i=Syntax_Checker.errorCount;if(!f.checkHtmlSize(n.html)&&Syntax_Checker.errors[i]){var r,o,a,s,l,c;for(c=[],o=a=0,s=(l=Syntax_Checker.errors[i]).length;a<s;o=++a)(r=l[o]).correct&&Syntax_Checker.autoCorrect?c.push(Form_Alert.add("\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u30c1\u30a7\u30c3\u30af\uff08\u4fdd\u5b58\u6642\u306b\u81ea\u52d5\u3067\u4fee\u6b63\u3055\u308c\u307e\u3059\uff09",this,r.msg)):c.push(Form_Alert.add("\u643a\u5e2f\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u30c1\u30a7\u30c3\u30af",this,r.msg));return c}},f}(),this.Link_Checker=function(){function n(e){this.$el=null,this.$elBody=null,this.form=e}function a(e,t){this.$el=$(e),this.form=t,this.links={},this.linkErrorCount=0,this.resultBox=new n(t)}return n.prototype.init=function(){if(this.$el)return this;var e=$("#errorLinkChecker");if(e[0])return this.$el=e,this.$elBody=e.find(".errorExplanationBody"),this.moveLast();(e=$("<div/>",{id:"errorLinkChecker","class":"errorExplanation"})).append("<h2>"+a.message.header+"</h2>");var t=$("<div/>",{"class":"errorExplanationBody"});return e.append(t),this.$el=e,this.$elBody=t,this.moveLast()},n.prototype.moveLast=function(){return $(this.form.addonSelector).append(this.$el),this},n.prototype.showMessage=function(e){return this.init(),this.$elBody.html(e),this.moveLast(),this},n.prototype.showChecking=function(){return this.showMessage(SS.loading)},n.prototype.showResult=function(e){var n=$("<ul/>");return $.each(e,function(e,t){n.append("<li>"+t+"</li>")}),this.$elBody.html(""),this.$elBody.append("<p>"+a.message.checkLinks+"</p>"),this.$elBody.append(n),this.moveLast()},a.message={header:"\u30ea\u30f3\u30af\u30c1\u30a7\u30c3\u30af",noLinks:"\u30ea\u30f3\u30af\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002",checkLinks:"\u6b21\u306e\u30ea\u30f3\u30af\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002",success:"\u6210\u529f",failure:"\u5931\u6557",linkCheckerError:"\u30ea\u30f3\u30af\u30c1\u30a7\u30c3\u30af\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u6b21\u306eURL\u306b\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3002"},a.url="/.cms/link_check/check.json",a.rootUrl="",a.instance=null,a.render=function(e){e=e||Cms_Form;var t=a.instance=new a(document,e);return t.render(),t},a.reset=function(){a.instance&&a.instance.reset()},a.prototype.render=function(){var n=this;return this.$el.on("click","button.link-check",function(){var e=this;e.disabled=!0;var t=function(){e.disabled=!1};n.asyncCheck().done(t).fail(t)})},a.prototype.asyncCheck=function(){return".mod-cms-body"===this.form.addonSelector?this.asyncCheckInEditor():this.asyncCheckInForm()},a.prototype.asyncCheckInEditor=function(){var r=this,o=$.Deferred();this.beforeCheck();var t=$(this.form.getEditorHtml()),n=[];return t.find("a[href]").each(function(){var e=$(this).attr("href");"#"!==e&&("#"===e[0]?r.addMessage(e,0!==t.find(e).length):(/^\//.test(e)&&(e=a.rootUrl+e.slice(1)),n.push(e)))}),0===n.length?($.isEmptyObject(this.links)?this.resultBox.showMessage("<p>"+a.message.noLinks+"</p>"):this.resultBox.showResult(this.links),o.resolve({status:0===this.linkErrorCount?"ok":"failed"})):$.ajax({type:"POST",url:a.url,cache:!1,data:JSON.stringify({url:n}),contentType:"application/json",dataType:"json",crossDomain:!0,success:function(e){$.each(e,function(e,t){r.addMessage(e,200===t)}),r.resultBox.showResult(r.links),o.resolve({status:0===r.linkErrorCount?"ok":"failed"})},error:function(e,t,n){var i=a.message.linkCheckerError+": "+a.url;r.resultBox.showMessage("<p>"+i+"</p>"),o.reject(e,t,n)}}),o.promise()},a.prototype.asyncCheckInForm=function(){var r=this,o=$.Deferred();if(this.beforeCheck(),!this.form.form_link_check_path){var e="form link check path is not configured";return this.resultBox.showMessage("<p>"+e+"</p>"),void o.reject(null,null,e)}var t=this.form.getFormData($("#"+Form_Preview.form_id));return t.append("route",Form_Preview.page_route),$.ajax({type:"POST",url:r.form.form_link_check_path,data:t,processData:!1,contentType:!1,cache:!1,success:function(e){if(!e||0===e.length)return r.resultBox.showMessage("<p>"+a.message.noLinks+"</p>"),void o.resolve({status:"ok"});result="ok",$.each(e,function(){var e=this[0],t=this[1],n='<span class="'+t+'">'+a.message[t]+"</span>";r.addMessage(e,null,n),"failure"===t&&(result="failed")}),r.resultBox.showResult(r.links),o.resolve({status:result})},error:function(e,t,n){var i=a.message.linkCheckerError+": "+r.form.form_link_check_path;r.resultBox.showMessage("<p>"+i+"</p>"),o.reject(e,t,n)}}),o.promise()},a.prototype.reset=function(){this.links={},this.linkErrorCount=0},a.prototype.beforeCheck=function(){this.reset(),$.support.cors=!0,this.resultBox.showChecking()},a.prototype.addMessage=function(e,t,n){n||(t?n='<span class="success">'+a.message.success+"</span>":(n='<span class="failure">'+a.message.failure+"</span>",this.linkErrorCount++)),this.links[e]=e+" "+n},a}(),this.Cms_EditLock=function(){function e(e,t,n){this.releaseLockOnCancel=i(this.releaseLockOnCancel,this),this.releaseLock=i(this.releaseLock,this),this.refreshLock=i(this.refreshLock,this),this.selector=e,this.lock_url=t,this.unlock_url=n,this.unloading=!1,this.interval=12e4,$.support.opacity?$(window).bind("beforeunload",this.releaseLock):($('button[type="reset"]').bind("click",this.releaseLockOnCancel),$("a.back-to-index").bind("click",this.releaseLockOnCancel),$("a.back-to-show").bind("click",this.releaseLockOnCancel)),this.refreshLock()}var i=function(e,t){return function(){return e.apply(t,arguments)}};return e.prototype.updateView=function(e){if($(this.selector+" .lock_until").text(""),e)return $(this.selector+" .lock_until").text(e)},e.prototype.refreshLock=function(){var t;if(!this.unloading)return $.ajax({type:"GET",url:this.lock_url,dataType:"json",cache:!1,statusCode:{200:(t=this,function(e){return e.lock_until_pretty?t.updateView(e.lock_until_pretty):t.updateView(null)})}}),setTimeout(this.refreshLock,this.interval)},e.prototype.releaseLock=function(){this.unloading=!0,$.ajax({type:"POST",url:this.unlock_url,dataType:"json",data:{_method:"delete"},timeout:5e3})},e.prototype.releaseLockOnCancel=function(){return this.releaseLock(),!0},e}();var extend=function(e,t){function n(){this.constructor=e}for(var i in t)hasProp.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},hasProp={}.hasOwnProperty;this.Cms_Source_Cleaner=function(e){function d(){return d.__super__.constructor.apply(this,arguments)}return extend(d,e),d.extend(Cms_Editor_Module),d.config={},d.render=function(e,t){e||(e=".source-cleaner"),t||(t={}),$(e).on("click",function(){var e=d.getEditorHtml(t.editor);return e=d.cleanUp(e),d.setEditorHtml(e,{id:t.editor})})},d.cleanUp=function(e){var t,n,i,r,o,a,s,l,c;for(r in n={remove:{tag:this.removeTag,attribute:this.removeAttribute,string:this.removeString,regexp:this.removeRegex},replace:{tag:this.replaceTag,attribute:this.replaceAttribute,string:this.replaceString,regexp:this.replaceRegexp}},o=d.config.source_cleaner){t=(c=o[r]).action_type,s=c.target_type,l=c.target_value,a=c.replaced_value;try{e=(0,n[t][s])(e,{value:l,replaced:a})}catch(u){i=u,console.warn(t,s,i)}}return e},d.removeTag=function(e,t){var n,i;return i=t.value,n=$("<div>"+e+"</div>"),$(n).find(i).remove(),n.html()},d.removeAttribute=function(e,t){var n,i;return i=t.value,n=$("<div>"+e+"</div>"),$(n).find("*").removeAttr(i),n.html()},d.removeString=function(e,t){var n,i;return i=t.value,e,n=new RegExp(d.regexpEscape(i),"g"),e.replace(n,"")},d.removeRegexp=function(e,t){var n,i;return i=t.value,e,n=new RegExp(i,"g"),e.replace(n,"")},d.replaceTag=function(e,t){var n,i,r;return r=t.value,n=t.replaced,i=$("<div>"+e+"</div>"),$(i).find(r).sort(function(e,t){return $(t).parents().length-$(e).parents().length}).each(function(){var e;return(e=$(document.createElement(n))).html($(this).html()),$.each(this.attributes,function(){return e.attr(this.name,this.value)}),$(this).replaceWith(e)}),i.html()},d.replaceAttribute=function(e,t){var n,i,r;return r=t.value,n=t.replaced,i=$("<div>"+e+"</div>"),$(i).find("*").attr(r,n),i.html()},d.replaceString=function(e,t){var n,i,r;return r=t.value,i=t.replaced,e,n=new RegExp(d.regexpEscape(r),"g"),e.replace(n,i)},d.replaceRegexp=function(e,t){var n,i,r;return r=t.value,i=t.replaced,e,n=new RegExp(r,"g"),e.replace(n,i)},d.regexpEscape=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},d}(SS_Module),Cms_TemplateForm=function(e){this.options=e,this.$formChangeBtn=$("#addon-basic .btn-form-change"),this.$formSelect=$('#addon-basic select[name="item[form_id]"]'),this.$formPage=$("#addon-cms-agents-addons-form-page"),this.$formPageBody=this.$formPage.find(".addon-body"),this.selectedFormId=null,Cms_TemplateForm.target&&this.bind(Cms_TemplateForm.target.el,Cms_TemplateForm.target.options)},Cms_TemplateForm.instance=null,Cms_TemplateForm.userId=null,Cms_TemplateForm.target=null,Cms_TemplateForm.confirms={},Cms_TemplateForm.paths={},Cms_TemplateForm.duration=400,Cms_TemplateForm.render=function(e){if(!Cms_TemplateForm.instance){var t=new Cms_TemplateForm(e);t.render(),Cms_TemplateForm.instance=t}},Cms_TemplateForm.bind=function(e,t){
  Cms_TemplateForm.instance?Cms_TemplateForm.instance.bind(e,t):(Cms_TemplateForm.target.el=e,Cms_TemplateForm.target.options=t)},Cms_TemplateForm.prototype.render=function(){var e=this;this.$formChangeBtn.on("click",function(){e.changeForm()})},Cms_TemplateForm.prototype.changeForm=function(){var e=this.$formSelect.val();e?this.selectedFormId&&this.selectedFormId===e?this.activateForm():(this.loadAndActivateForm(e),this.selectedFormId=e):this.deactivateForm()},Cms_TemplateForm.prototype.loadAndActivateForm=function(e){var i=this;this.$formChangeBtn.attr("disabled",!0),$.ajax({url:Cms_TemplateForm.paths.formUrlTemplate.replace(":id",e),type:"GET",success:function(e){i.loadForm(e),i.activateForm()},error:function(e,t,n){i.showError(n),i.activateForm()},complete:function(){i.$formChangeBtn.attr("disabled",!1)}})},Cms_TemplateForm.prototype.loadForm=function(e){this.$formPage.html($(e).html()),SS.renderAjaxBox(),SS.renderDateTimePicker()},Cms_TemplateForm.prototype.showError=function(e){this.$formPageBody.html("<p>"+e+"</p>")},Cms_TemplateForm.prototype.activateForm=function(){this.$formPage.removeClass("hide"),$("#addon-cms-agents-addons-body").addClass("hide"),$("#addon-cms-agents-addons-file").addClass("hide"),Cms_Form.addonSelector="#addon-cms-agents-addons-form-page .addon-body",Cms_Form.activateSyntaxChecks()},Cms_TemplateForm.prototype.deactivateForm=function(){this.$formPageBody.html(""),this.$formPage.addClass("hide"),$("#addon-cms-agents-addons-body").removeClass("hide"),$("#addon-cms-agents-addons-file").removeClass("hide"),Cms_Form.addonSelector=".mod-cms-body",Cms_Form.activateSyntaxChecks()},Cms_TemplateForm.prototype.bind=function(e,t){(!this.el||this.el!==e)&&this.bindOne(e,t),this.resetOrder()},Cms_TemplateForm.prototype.bindOne=function(e,t){this.el=e,this.$el=$(e);var n=this;this.$el.on("change",".column-value-controller-move-position",function(){n.movePosition($(this))}),this.$el.on("click",".column-value-controller-move-up",function(){n.moveUp($(this))}),this.$el.on("click",".column-value-controller-move-down",function(){n.moveDown($(this))}),this.$el.on("click",".column-value-controller-delete",function(){n.remove($(this))}),this.$el.on("click",".column-value-palette [data-form-id]",function(){var i=$(this),e=i.data("form-id"),t=i.data("column-id");i.closest("fieldset").attr("disabled",!0),i.css("cursor","wait"),i.closest(".column-value-palette").find(".column-value-palette-error").addClass("hide").html(""),$.ajax({url:Cms_TemplateForm.paths.formColumn.replace(/:formId/,e).replace(/:columnId/,t),success:function(e){var t=i.closest(".column-value-palette");t.before(e);t.prev(".column-value");SS.renderAjaxBox(),SS.renderDateTimePicker(),Cms_Form.activateSyntaxChecks(),n.resetOrder()},error:function(e,t,n){i.closest(".column-value-palette").find(".column-value-palette-error").html(n).removeClass("hide")},complete:function(){i.css("cursor","pointer"),i.closest("fieldset").attr("disabled",!1)}})}),t&&"entry"===t.type&&this.$el.find(".addon-body").sortable({axis:"y",handle:".sortable-handle",items:"> .column-value",update:function(){n.resetOrder()}})},Cms_TemplateForm.prototype.resetOrder=function(){for(var e=this.$el.find(".column-value").length,t='<option value=":value">:display</option>',n=[],i=0;i<e;i++)n.push(t.replace(":value",i.toString()).replace(":display",(i+1).toString()));this.$el.find(".column-value").each(function(e){var t=$(this).find(".column-value-controller-move-position");t.html(n.join("")),t.val(e)})},Cms_TemplateForm.prototype.movePosition=function(e){var t=this,n=e.val();if(n){n=parseInt(n);var i,r,o=e.closest(".column-value"),a=o[0],s=this.$el.find(".column-value"),l=-1;if(s.each(function(e){if(this===a)return l=e,!1}),!(l<0))if(!(n===l||n>=s.length||n<0))n<l?(i=$(s[n]),r=i.before.bind(i)):(i=$(s[n]),r=i.after.bind(i)),Cms_TemplateForm.insertElement(o,i,function(){r(o),t.resetOrder()})}},Cms_TemplateForm.prototype.moveUp=function(e){var t=e.closest(".column-value");if(t[0]){var n=t.prev(".column-value");if(n[0]){var i=this;Cms_TemplateForm.swapElement(n,t,function(){n.before(t),i.resetOrder()})}}},Cms_TemplateForm.prototype.moveDown=function(e){var t=e.closest(".column-value");if(t[0]){var n=t.next(".column-value");if(n[0]){var i=this;Cms_TemplateForm.swapElement(t,n,function(){n.after(t),i.resetOrder()})}}},Cms_TemplateForm.swapElement=function(e,t,n){var i=e[0],r=t[0],o=r.offsetTop-i.offsetTop,a=r.offsetTop-(i.offsetTop+i.offsetHeight);i.style.transitionDuration=Cms_TemplateForm.duration+"ms",r.style.transitionDuration=Cms_TemplateForm.duration+"ms",i.style.transform="translateY("+(r.offsetHeight+a)+"px)",r.style.transform="translateY("+-o+"px)",setTimeout(function(){i.style.transitionDuration="",r.style.transitionDuration="",i.style.transform="",r.style.transform="",n()},Cms_TemplateForm.duration)},Cms_TemplateForm.insertElement=function(e,t,n){var i=e[0],r=t[0];if(i!==r){var o,a,s=[];if(r.offsetTop<i.offsetTop){if(i===r.nextElementSibling)return void Cms_TemplateForm.swapElement(t,e,n);var l=i.offsetTop+i.offsetHeight,c=i.previousElementSibling,u=c.offsetTop+c.offsetHeight;o=r.offsetTop-i.offsetTop,a=l-u;for(var d=r;d!==i;)s.push(d),d=d.nextElementSibling}else if(r.offsetTop>i.offsetTop){if(i===r.previousElementSibling)return void Cms_TemplateForm.swapElement(e,t,n);var h=r.offsetTop+r.offsetHeight,p=(l=i.offsetTop+i.offsetHeight,i.nextElementSibling);o=h-l,a=i.offsetTop-p.offsetTop;for(d=r;d!==i;)s.push(d),d=d.previousElementSibling}i.style.transitionDuration=Cms_TemplateForm.duration+"ms",i.style.transform="translateY("+o+"px)",s.forEach(function(e){e.style.transitionDuration=Cms_TemplateForm.duration+"ms",e.style.transform="translateY("+a+"px)"}),setTimeout(function(){i.style.transitionDuration="",i.style.transform="",s.forEach(function(e){e.style.transitionDuration="",e.style.transform=""}),n()},Cms_TemplateForm.duration)}else n()},Cms_TemplateForm.prototype.remove=function(e){var t=e.closest(".column-value");if(t[0]&&confirm(Cms_TemplateForm.confirms["delete"])){var n=this;t.addClass("column-value-deleting").fadeOut(Cms_TemplateForm.duration).queue(function(){t.remove(),n.resetOrder(),Cms_Form.activateSyntaxChecks()})}},Cms_Column_FileUpload=function(e,t){this.$el=$(e),this.options=t||{}},Cms_Column_FileUpload.userId=null,Cms_Column_FileUpload.fileUploadPath=null,Cms_Column_FileUpload.fileSelectPath=null,Cms_Column_FileUpload.render=function(e,t){var n=new Cms_Column_FileUpload(e,t);return n.render(),n},Cms_Column_FileUpload.prototype.getUserId=function(){return this.options.userId||Cms_Column_FileUpload.userId},Cms_Column_FileUpload.prototype.getFileUploadPath=function(){return this.options.fileUploadPath||Cms_Column_FileUpload.fileUploadPath},Cms_Column_FileUpload.prototype.getFileSelectPath=function(){return this.options.fileSelectPath||Cms_Column_FileUpload.fileSelectPath},Cms_Column_FileUpload.prototype.getTempFileOptions=function(){var n=this,e={uploadUrl:function(){return n.getFileUploadPath()},select:function(e){if(e[0]){var i=n.$el.find(".column-value-files");i.addClass("hide");var t=e[0]._id;$.ajax({url:n.getFileSelectPath().replace(":fileId",t),type:"GET",success:function(e){i.html(e)},error:function(e,t,n){i.html(n)},complete:function(){i.removeClass("hide")}})}}};return e},Cms_Column_FileUpload.prototype.render=function(){this.tempFile=new SS_Addon_TempFile(this.$el.find(".column-value-upload-drop-area"),this.getUserId(),this.getTempFileOptions());var t=this;this.$el.find(".btn-file-upload").each(function(){$(this).data("on-select",function(e){t.selectFile(e)})}),this.$el.on("click",".btn-file-delete",function(e){var t=$(this).closest(".file-view");return t.fadeOut(Cms_TemplateForm.duration||400).queue(function(){t.remove()}),e.preventDefault(),!1})},Cms_Column_FileUpload.prototype.selectFile=function(e){var i=this.$el.find(".column-value-files");i.addClass("hide"),$.colorbox.close();var t=e.data("id");t&&$.ajax({url:this.getFileSelectPath().replace(":fileId",t),type:"GET",success:function(e){i.html(e)},error:function(e,t,n){i.html(n)},complete:function(){i.removeClass("hide")}})},Cms_Column_Free=function(e,t){this.$el=$(e),this.options=t||{}},Cms_Column_Free.userId=null,Cms_Column_Free.fileUploadPath=null,Cms_Column_Free.fileSelectPath=null,Cms_Column_Free.render=function(e,t){var n=new Cms_Column_Free(e,t);return n.render(),n},Cms_Column_Free.prototype.getUserId=function(){return this.options.userId||Cms_Column_Free.userId},Cms_Column_Free.prototype.getEditorId=function(){return this.options.editorId},Cms_Column_Free.prototype.getObjectName=function(){return this.options.objectName},Cms_Column_Free.prototype.getFileUploadPath=function(){return this.options.fileUploadPath||Cms_Column_Free.fileUploadPath},Cms_Column_Free.prototype.getFileSelectPath=function(){return this.options.fileSelectPath||Cms_Column_Free.fileSelectPath},Cms_Column_Free.prototype.getTempFileOptions=function(){var r=this,e={uploadUrl:function(){return r.getFileUploadPath()},select:function(e){if(e[0]){var i=r.$el.find(".column-value-files");i.addClass("hide");var n=[];$.each(e,function(){var e=this._id,t=$.ajax({url:r.getFileSelectPath().replace(":fileId",e),type:"GET",success:function(e){r.addFile(e)}});n.push(t)}),$.when.apply($,n).fail(function(e,t,n){i.html(n)}).always(function(){i.removeClass("hide")})}}};return e},Cms_Column_Free.prototype.render=function(){this.tempFile=new SS_Addon_TempFile(this.$el.find(".column-value-upload-drop-area"),this.getUserId(),this.getTempFileOptions());var t=this;this.$el.find(".btn-file-upload").each(function(){$(this).data("on-select",function(e){t.selectFile(e)})}),this.$el.on("click",".btn-file-attach",function(e){return t.insertAttachment($(this).closest(".file-view")),e.preventDefault(),!1}),this.$el.on("click",".btn-file-image-paste",function(e){return t.insertImage($(this).closest(".file-view")),e.preventDefault(),!1}),this.$el.on("click",".btn-file-thumb-paste",function(e){return t.insertThumb($(this).closest(".file-view")),e.preventDefault(),!1}),this.$el.on("click",".btn-file-delete",function(e){var t=$(this).closest(".file-view");return t.fadeOut(Cms_TemplateForm.duration||400).queue(function(){t.remove()}),e.preventDefault(),!1})},Cms_Column_Free.prototype.selectFile=function(e){var i=this.$el.find(".column-value-files");i.addClass("hide"),$.colorbox.close();var t=e.data("id");if(t){var n=this;$.ajax({url:this.getFileSelectPath().replace(":fileId",t),type:"GET",success:function(e){n.addFile(e)},error:function(e,t,n){i.html(n)},complete:function(){i.removeClass("hide")}})}},Cms_Column_Free.prototype.addFile=function(e){var t=this.$el.find(".column-value-files"),n=$("<div>"+e+"</div>");n.find("a.action-attach").removeClass("action-attach").addClass("btn-file-attach").removeAttr("onclick"),n.find("a.action-paste").removeClass("action-paste").addClass("btn-file-image-paste").removeAttr("onclick"),n.find("a.action-thumb").removeClass("action-thumb").addClass("btn-file-thumb-paste").removeAttr("onclick"),n.find("a.action-delete").removeClass("action-delete").addClass("btn-file-delete").removeAttr("onclick"),n.find("[name='item[file_ids][]']").removeClass("file-id").attr("name",this.getObjectName()+"[][in_wrap][file_ids][]"),t.append(n.html())},Cms_Column_Free.prototype.insertContent=function(e){if("undefined"!=typeof tinymce)tinymce.get(this.getEditorId()).execCommand("mceInsertContent",!1,e);else if("undefined"!=typeof CKEDITOR){$(this.getEditorId()).data("ckeditorInstance").insertHtml(e)}},Cms_Column_Free.prototype.insertAttachment=function(e){var t=e.data("humanized-name"),n=$("<a/>",{href:e.data("url"),"class":"icon-"+e.data("extname")}).html(t);this.insertContent(n.prop("outerHTML"))},Cms_Column_Free.prototype.insertImage=function(e){var t=$("<img/>",{src:e.data("url"),alt:e.data("name")});this.insertContent(t.prop("outerHTML"))},Cms_Column_Free.prototype.insertThumb=function(e){var t=$("<img/>",{src:e.data("thumb-url"),alt:e.data("name")}),n=$("<a/>",{href:e.data("url"),"class":"ajax-box",target:"_blank"}).html(t);this.insertContent(n.prop("outerHTML"))},Cms_Column_List=function(e){this.$el=$(e)},Cms_Column_List.render=function(e){var t=new Cms_Column_List(e);return t.render(),t},Cms_Column_List.prototype.render=function(){var e=this;this.$el.on("click",".btn-add-list",function(){e.addList($(this))}),this.$el.on("click",".btn-delete-list",function(){e.removeList($(this))})},Cms_Column_List.prototype.addList=function(e){var t=e.closest(".column-value"),n=t.find(".template").html();t.find(".list").append(n)},Cms_Column_List.prototype.removeList=function(e){e.closest(".column-value");e.closest("li").remove()},this.Event_Form=function(){function a(){}return a.maxTermForm=10,a.deleteMessage="\u30a4\u30d9\u30f3\u30c8\u65e5\u3092\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f",a.render=function(){$("form .mod-event").length&&($(".mod-event button:button.add-date").click(function(){$(".mod-event dd.dates").length<a.maxTermForm&&a.cloneTermForm()}),$(".mod-event button:button.clear").click(function(){var e,t;t=$(this).parent("dd").find(".start").val(),e=$(this).parent("dd").find(".close").val(),""!==t||""!==e?confirm(a.deleteMessage)&&a.clearTermForm($(this).parent("dd")):a.clearTermForm($(this).parent("dd"))}),$("form").submit(function(){var e,t,n,i,r,o;for(t=[],n=0,i=(o=$(".mod-event .dates")).length;n<i;n++)r=o[n],e=a.termToDates($(r).find(".start").val(),$(r).find(".close").val()),t=t.concat(e);$(".mod-event .event-dates").val(a.datesToString(t))}),a.setStoredDates(),$(".mod-event dd.dates").length>=this.maxTermForm&&$(".mod-event .setting-dates").hide())},a.dateToString=function(e){var t,n,i;return(i=e.getYear())<2e3&&(i+=1900),(n=e.getMonth()+1)<10&&(n="0"+n),(t=e.getDate())<10&&(t="0"+t),i+"/"+n+"/"+t},a.datesToString=function(e){var t,n,i,r,o,a,s,l;for(l=[],i=0,o=e.length;i<o;i++){for(t=e[i],n=0;n<l.length&&this.dateToString(t)!==this.dateToString(l[n]);)n++;n===l.length&&l.push(t)}for((e=l).sort(function(e,t){return e-t}),s="",r=0,a=e.length;r<a;r++)t=e[r],s+=this.dateToString(t),s+="\r\n";return s},a.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&(!isNaN(e.getTime())&&0<e.getYear())},a.termToDates=function(e,t){var n,i,r,o;if(o=new Date(e),n=new Date(t),r=[],this.isValidDate(o)&&this.isValidDate(n))for(i=new Date(o);i<=n;)r.push(new Date(i)),i.setDate(i.getDate()+1);else this.isValidDate(o)?r.push(new Date(o)):this.isValidDate(n)&&r.push(new Date(n));return r},a.datesToTerm=function(e){var t,n,i,r,o,a,s;for(a=[],o=[],n=i=0,r=e.length;i<r;n=++i)t=e[n],o.push(t),(s=new Date(t)).setDate(s.getDate()+1),n+1<e.length&&this.dateToString(e[n+1])!==this.dateToString(s)&&(a.push([o[0],o[o.length-1]]),o=[]);return 1<=o.length&&a.push([o[0],o[o.length-1]]),a},a.setStoredDates=function(){var e,t,n,i,r,o,a,s,l,c,u,d;for(n=[],r=0,a=(c=$(".mod-event .event-dates").val().split(/\r\n|\n/)).length;r<a;r++)e=c[r],t=new Date(e),this.isValidDate(t)&&n.push(t);for(l=[],i=o=0,s=(d=this.datesToTerm(n)).length;o<s;i=++o)u=d[i],0!==i&&this.cloneTermForm(),$(".mod-event dd.dates:last").find(".start").val(this.dateToString(u[0])),l.push($(".mod-event dd.dates:last").find(".close").val(this.dateToString(u[1])));return l},a.cloneTermForm=function(){var e;if((e=$(".mod-event dd.dates:last").clone(!1).insertAfter($(".mod-event dd.dates:last"))).find(".start").val(""),e.find(".close").val(""),e.find(".clear").click(function(){var e,t;t=$(this).parent("dd").find(".start").val(),e=$(this).parent("dd").find(".close").val(),""!==t||""!==e?confirm(a.deleteMessage)&&a.clearTermForm($(this).parent("dd")):a.clearTermForm($(this).parent("dd"))}),$(".mod-event .date").attr("id","").datetimepicker({lang:"ja",timepicker:!1,format:"Y/m/d"}),$(".mod-event dd.dates").length>=this.maxTermForm)return $(".mod-event .setting-dates").hide()},a.clearTermForm=function(e){if(e.find(".start").val(""),e.find(".close").val(""),1<$(".mod-event dd.dates").length&&e.remove(),$(".mod-event dd.dates").length<this.maxTermForm)return $(".mod-event .setting-dates").show()},a}(),this.Googlemaps_Map=function(){function a(){}return a.map=null,a.form=null,a.center=[36.204824,138.252924],a.zoom=13,a.markers=null,a.openedInfo=null,a.resized=null,a.kmlLayer=null,a.attachMessage=function(e){return google.maps.event.addListener(a.markers[e].marker,"click",function(){return a.openedInfo&&a.openedInfo.close(),a.markers[e].window&&a.markers[e].window.open(a.markers[e].marker.getMap(),a.markers[e].marker),a.openedInfo=a.markers[e].window}),google.maps.event.addListener(a.markers[e].window,"closeclick",function(){return a.openedInfo=null})},a.setForm=function(e){return this.form=e},a.load=function(e,t){var n;t&&t.zoom&&(a.zoom=t.zoom),n={center:new google.maps.LatLng(this.center[0],this.center[1]),zoom:this.zoom,mapTypeId:google.maps.MapTypeId.ROADMAP,panControl:!1,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.LARGE},mapTypeControl:!0,scaleControl:!0,scrollwheel:!0,streetViewControl:!0,overviewMapControl:!0,overviewMapControlOptions:{opened:!0}},this.map=new google.maps.Map($(e).get(0),n)},a.resize=function(){return google.maps.event.trigger(this.map,"resize"),this.resized||(this.map.setCenter(new google.maps.LatLng(this.center[0],this.center[1])),this.form&&this.form.renderMarkers()),this.resized=!0},a.renderMarkers=function(){if(this.form)return this.form.renderMarkers()},a.renderEvents=function(){if(this.form)return this.form.renderEvents()},a.setMarkers=function(e){var o;a.markers=e,o=new google.maps.LatLngBounds,$.each(a.markers,function(e,t){var n,i,r;t.image?a.markers[e].marker=new google.maps.Marker({position:new google.maps.LatLng(t.loc[0],t.loc[1]),icon:t.image,map:a.map}):a.markers[e].marker=new google.maps.Marker({position:new google.maps.LatLng(t.loc[0],t.loc[1]),map:a.map}),o.extend(new google.maps.LatLng(t.loc[0],t.loc[1])),t.html?(n=t.html,a.markers[e].window=new google.maps.InfoWindow({content:n}),a.attachMessage(e)):(t.name||t.text)&&(i=t.name,r=t.text,n='<div class="marker-info">',i&&""!==i&&(n+="<p>"+i+"</p>",r&&""!==r&&$.each(r.split(/[\r\n]+/),function(){return this.match(/^https?:\/\//)?n+='<p><a href="'+this+'">'+this+"</a></p>":n+="<p>"+this+"</p>"})),n+="</div>",a.markers[e].window=new google.maps.InfoWindow({content:n}),a.attachMessage(e))}),0===a.markers.length?a.map.setCenter(new google.maps.LatLng(a.center[0],a.center[1])):(a.map.fitBounds(o),google.maps.event.addListenerOnce(a.map,"idle",function(){a.map.getZoom()>a.zoom&&a.map.setZoom(a.zoom)}))},a.setKmlLayer=function(e){a.kmlLayer=new google.maps.KmlLayer({url:e,suppressInfoWindows:!0,preserveViewport:!1})},a.setGeoJson=function(e){a.map.data.setStyle({fillColor:"#b2c9e8",strokeColor:"#5A88C6",strokeWeight:1}),a.map.data.loadGeoJson(e,{},function(e){var t=new google.maps.LatLngBounds,n=[];e.forEach(function(e){e.getGeometry().forEachLatLng(function(e){t.extend(e),n.push(e)})}),0==n.length?a.map.setCenter(new google.maps.LatLng(a.center[0],a.center[1])):(a.map.fitBounds(t),google.maps.event.addListenerOnce(a.map,"idle",function(){a.map.getZoom()>a.zoom&&a.map.setZoom(a.zoom)}))})},a}(),this.Map_Form=function(){function r(){}return r.maxPointForm=10,r.deleteMessage="\u30de\u30fc\u30ab\u30fc\u3092\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f",r.dataID=0,r.clickIcon="//maps.google.com/mapfiles/ms/icons/blue-dot.png",r.clickMarker=null,r.setMapLoc=function(e,t,n){t=Math.ceil(t*Math.pow(10,6))/Math.pow(10,6),n=Math.ceil(n*Math.pow(10,6))/Math.pow(10,6),e.val(t.toFixed(6)+","+n.toFixed(6))},r.getMapLoc=function(e){var t;return t=e.val().split(","),new google.maps.LatLng(parseFloat(t[0]),parseFloat(t[1]))},r.validateLoc=function(e){var t,n,i;return n=e.val().split(","),t=parseFloat(n[0]),i=parseFloat(n[1]),!(!t||isNaN(t))&&(!(!i||isNaN(i))&&(-90<=t&&t<=90&&-180<=i&&i<=180))},r.attachMessage=function(i){google.maps.event.addListener(Googlemaps_Map.markers[i],"click",function(){Googlemaps_Map.openedInfo&&Googlemaps_Map.openedInfo.close(),$('dd[data-id = "'+i+'"]').each(function(){var e,t,n;return t=$(this).find(".marker-name").val(),n=$(this).find(".marker-text").val(),""===t&&""===n||(e='<div class="marker-info">',""!==t&&(e+="<p>"+t+"</p>"),""!==n&&$.each(n.split(/[\r\n]+/),function(){return this.match(/^https?:\/\//)?e+='<p><a href="'+this+'">'+this+"</a></p>":e+="<p>"+this+"</p>"}),Googlemaps_Map.openedInfo=new google.maps.InfoWindow({content:e,maxWidth:260}),Googlemaps_Map.openedInfo.open(Googlemaps_Map.markers[i].getMap(),Googlemaps_Map.markers[i])),!1})})},r.geocoderSearch=function(e){return(new google.maps.Geocoder).geocode({address:e,region:"jp"},function(e,t){var n;t===google.maps.GeocoderStatus.OK?(n=e[0],Googlemaps_Map.map.setCenter(n.geometry.location),n.geometry.viewport&&Googlemaps_Map.map.fitBounds(n.geometry.viewport)):alert("\u5ea7\u6a19\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002")}),!1},r.clonePointForm=function(){var e;$(".mod-map dd.marker").length<r.maxPointForm&&((e=$(".mod-map dd.marker:last").clone(!1).insertAfter($(".mod-map dd.marker:last"))).attr("data-id",r.dataID),r.dataID+=1,e.find("input,textarea").val(""),e.find(".marker-name").val(""),e.find(".clear-marker").on("click",function(){return r.clearPointForm(e)}),e.find(".set-marker").on("click",function(){return r.createMarker(e)}),e.find(".marker-name").on("keypress",function(e){if(13===e.which)return!1}),e.find(".marker-loc-input").on("keypress",function(e){if(13===e.which)return $(this).closest("dd.marker").find(".set-marker").trigger("click"),!1}),e.find(".marker-loc-input").on("focus",function(){if(null!==r.clickMarker)return r.clickMarker.setMap(null),$(".mod-map .clicked").val("")})),$(".mod-map dd.marker").length===r.maxPointForm&&$(".mod-map dd .add-marker").parent().hide()},r.clearPointForm=function(e){""!==e.find(".marker-loc").val()?confirm(r.deleteMessage)&&(Googlemaps_Map.markers[parseInt(e.attr("data-id"))]&&Googlemaps_Map.markers[parseInt(e.attr("data-id"))].setMap(null),e.find("input,textarea").val(""),1<$(".mod-map dd.marker").length&&e.remove()):(Googlemaps_Map.markers[parseInt(e.attr("data-id"))]&&Googlemaps_Map.markers[parseInt(e.attr("data-id"))].setMap(null),e.find("input,textarea").val(""),1<$(".mod-map dd.marker").length&&e.remove()),$(".mod-map dd .add-marker").parent().show()},r.createMarker=function(e){var t,n;if(n=null,""!==$(".mod-map .clicked").val()?n=$(".mod-map .clicked").val():""!==e.find(".marker-loc-input").val()&&(r.validateLoc(e.find(".marker-loc-input"))?n=e.find(".marker-loc-input").val():alert("\u6b63\u3057\u3044\u5ea7\u6a19\u3092\u30ab\u30f3\u30de(,)\u533a\u5207\u308a\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u4f8b\uff0933.8957612,133.6806607")),n)return e.find(".marker-loc").val(n),e.find(".marker-loc-input").val(n),t=parseInt(e.attr("data-id")),Googlemaps_Map.markers[t]&&Googlemaps_Map.markers[t].setMap(null),Googlemaps_Map.markers[t]=new google.maps.Marker({position:r.getMapLoc(e.find(".marker-loc")),map:Googlemaps_Map.map}),r.attachMessage(t),r.clickMarker?($(".mod-map .clicked").val(""),r.clickMarker.setMap(null)):void 0},r.renderMarkers=function(){var e,t,n;if(n=new google.maps.LatLngBounds,Googlemaps_Map.markers){var i=Googlemaps_Map.markers;for(e=0,t=i.length;e<t;e++){i[e].setMap(null)}}Googlemaps_Map.markers=[],r.dataID=0,$(".mod-map dd.marker").each(function(){if($(this).attr("data-id",r.dataID),""!==$(this).find(".marker-loc").val()){var e=r.getMapLoc($(this).find(".marker-loc"));Googlemaps_Map.markers[r.dataID]=new google.maps.Marker({position:e,map:Googlemaps_Map.map}),r.attachMessage(r.dataID),n.extend(e)}r.dataID+=1}),0===Googlemaps_Map.markers.length?Googlemaps_Map.map.setCenter(new google.maps.LatLng(Googlemaps_Map.center[0],Googlemaps_Map.center[1])):(Googlemaps_Map.map.fitBounds(n),google.maps.event.addListenerOnce(Googlemaps_Map.map,"idle",function(){Googlemaps_Map.map.getZoom()>Googlemaps_Map.zoom&&Googlemaps_Map.map.setZoom(Googlemaps_Map.zoom)}))},r.renderEvents=function(){return google.maps.event.addListener(Googlemaps_Map.map,"click",function(e){return r.setMapLoc($(".mod-map .clicked"),e.latLng.lat(),e.latLng.lng()),null!==r.clickMarker&&r.clickMarker.setMap(null),r.clickMarker=new google.maps.Marker({position:new google.maps.LatLng(e.latLng.lat(),e.latLng.lng()),icon:r.clickIcon,map:Googlemaps_Map.map})}),google.maps.event.addListener(Googlemaps_Map.map,"bounds_changed",function(){var e=Googlemaps_Map.map.getZoom();$('input[name="item[map_zoom_level]"]').val(e)}),$(".mod-map .add-marker").on("click",function(){return r.clonePointForm(),!1}),$(".mod-map .clear-marker").on("click",function(){return r.clearPointForm($(this).closest("dd.marker")),!1}),$(".mod-map .set-marker").on("click",function(){return r.createMarker($(this).closest("dd.marker")),!1}),$(".mod-map .location-search button").on("click",function(){return r.geocoderSearch($(".mod-map .keyword").val()),!1}),$(".mod-map .keyword").on("keypress",function(e){if(13===e.which)return r.geocoderSearch($(this).val()),!1}),$(".mod-map .marker-name").on("keypress",function(e){if(13===e.which)return!1}),$(".mod-map .marker-loc-input").on("keypress",function(e){if(13===e.which)return $(this).closest("dd.marker").find(".set-marker").trigger("click"),!1}),$(".mod-map .marker-loc-input").on("focus",function(){if(null!==r.clickMarker)return r.clickMarker.setMap(null),$(".mod-map .clicked").val("")})},r}(),this.Facility_Search=function(){function e(){}return e.render=function(e,t){var n,i,r;return null==t&&(t={}),n=t.markers,r=function(e){var t,n,i;return t=e.offset().top,n=e.closest("#map-sidebar").offset().top,i=e.closest("#map-sidebar").scrollTop(),e.closest("#map-sidebar").animate({scrollTop:t-n+i},"fast")},Googlemaps_Map.load(e),i=Googlemaps_Map.attachMessage,Googlemaps_Map.attachMessage=function(n){return i(n),google.maps.event.addListener(Googlemaps_Map.markers[n].marker,"click",function(){var e,t;return $("#map-sidebar .column").removeClass("current"),t=Googlemaps_Map.markers[n].id,(e=$('#map-sidebar .column[data-id="'+t+'"]')).addClass("current"),r(e)}),google.maps.event.addListener(Googlemaps_Map.markers[n].window,"closeclick",function(){return $("#map-sidebar .column").removeClass("current")})},Googlemaps_Map.setMarkers(n),$("#map-sidebar .column .click-marker").on("click",function(){var i;return i=parseInt($(this).closest(".column").attr("data-id")),$("#map-sidebar .column").removeClass("current"),$.each(Googlemaps_Map.markers,function(e,t){var n;if(i===t.id)return Googlemaps_Map.openedInfo&&Googlemaps_Map.openedInfo.close(),t.window.open(t.marker.getMap(),t.marker),Googlemaps_Map.openedInfo=t.window,(n=$('#map-sidebar .column[data-id="'+i+'"]')).addClass("current"),r(n),!1}),!1}),$(".filters a").on("click",function(){var r;return $(this).hasClass("clicked")?$(this).removeClass("clicked"):$(this).addClass("clicked"),r=[],$(".filters a.clicked").each(function(){return r.push(parseInt($(this).attr("data-id")))}),$.each(Googlemaps_Map.markers,function(e){var t,n,i;return i=!1,$.each(r,function(){if(0<=$.inArray(parseInt(this),Googlemaps_Map.markers[e].category))return!(i=!0)}),n=Googlemaps_Map.markers[e].id,t=$('#map-sidebar .column[data-id="'+n+'"]'),i?(Googlemaps_Map.markers[e].marker.setVisible(!0),t.show()):(Googlemaps_Map.markers[e].marker.setVisible(!1),Googlemaps_Map.markers[e].window.close(),t.hide())}),!1}),$(".filters .focus").on("change",function(){var i;return(i=$(this)).find("option:selected").each(function(){var e,t,n;return""!==$(this).val()&&(t=$(this).val().split(","),n=$(this).attr("data-zoom-level"),e=new google.maps.LatLng(t[0],t[1]),Googlemaps_Map.map.setCenter(e),n&&Googlemaps_Map.map.setZoom(parseInt(n)),i.val(""))})})},e}(),this.Member_Photo_Form=function(){function r(){}return r.maxPointForm=10,r.deleteMessage="\u30de\u30fc\u30ab\u30fc\u3092\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f",r.setExifMessage="\u753b\u50cf\u306b\u4f4d\u7f6e\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u4f4d\u7f6e\u60c5\u5831\u3092\u5730\u56f3\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u304b\uff1f",r.dataID=0,r.clickIcon="//maps.google.com/mapfiles/ms/icons/blue-dot.png",r.clickMarker=null,r.setMapLoc=function(e,t,n){t=Math.ceil(t*Math.pow(10,6))/Math.pow(10,6),n=Math.ceil(n*Math.pow(10,6))/Math.pow(10,6),e.val(t.toFixed(6)+","+n.toFixed(6))},r.getMapLoc=function(e){var t;return t=e.val().split(","),new google.maps.LatLng(parseFloat(t[0]),parseFloat(t[1]))},r.attachMessage=function(i){google.maps.event.addListener(Googlemaps_Map.markers[i],"click",function(){Googlemaps_Map.openedInfo&&Googlemaps_Map.openedInfo.close(),$('dd[data-id = "'+i+'"]').each(function(){var e,t,n;return t=$(this).find(".marker-name").val(),n=$(this).find(".marker-text").val(),""===t&&""===n||(e='<div class="marker-info">',""!==t&&(e+="<p>"+t+"</p>"),""!==n&&$.each(n.split(/[\r\n]+/),function(){return this.match(/^https?:\/\//)?e+='<p><a href="'+this+'">'+this+"</a></p>":e+="<p>"+this+"</p>"}),Googlemaps_Map.openedInfo=new google.maps.InfoWindow({content:e,maxWidth:260}),Googlemaps_Map.openedInfo.open(Googlemaps_Map.markers[i].getMap(),Googlemaps_Map.markers[i])),!1})})},r.clearMarker=function(e){var t;t=0,""!==e.val()?confirm(r.deleteMessage)&&Googlemaps_Map.markers[t]&&(Googlemaps_Map.markers[t].setMap(null),e.val("")):Googlemaps_Map.markers[t]&&Googlemaps_Map.markers[t].setMap(null)},r.createMarker=function(e){var t;""!==$(".mod-map .clicked").val()&&(e.val($(".mod-map .clicked").val()),t=0,Googlemaps_Map.markers[t]&&Googlemaps_Map.markers[t].setMap(null),Googlemaps_Map.markers[t]=new google.maps.Marker({position:r.getMapLoc($(".mod-map .marker-loc")),map:Googlemaps_Map.map}),r.attachMessage(t))},r.renderMarkers=function(){var e,t,n,i;if(n=new google.maps.LatLngBounds,Googlemaps_Map.markers)for(e=0,t=(i=Googlemaps_Map.markers).length;e<t;e++)i[e].setMap(null);Googlemaps_Map.markers=[],r.dataID=0,$(".mod-map .marker").each(function(){var e;return $(this).attr("data-id",r.dataID),""!==$(this).find(".marker-loc").val()&&(e=r.getMapLoc($(this).find(".marker-loc")),Googlemaps_Map.markers[r.dataID]=new google.maps.Marker({position:e,map:Googlemaps_Map.map}),r.attachMessage(r.dataID),n.extend(e)),r.dataID+=1}),0<Googlemaps_Map.markers.length&&Googlemaps_Map.map.setCenter(n.getCenter())},r.setExifLatLng=function(e){return $(e).change(function(e){if(e.target.files[0])return EXIF.getData(e.target.files[0],function(){var e,t,n,i;return e=EXIF.getTag(this,"GPSLatitude"),n=EXIF.getTag(this,"GPSLongitude"),t=EXIF.getTag(this,"GPSLatitudeRef")||"N",i=EXIF.getTag(this,"GPSLongitudeRef")||"W",!(!e||!n)&&(!!confirm(r.setExifMessage)&&(t="N"===t?1:-1,i="W"===i?-1:1,e=(e[0]+e[1]/60+e[2]/3600)*t,n=(n[0]+n[1]/60+n[2]/3600)*i,$(".mod-map .clicked").val([e,n].join()),r.createMarker($(".mod-map .marker-loc")),Googlemaps_Map.map.setCenter(new google.maps.LatLng(e,n))))})})},r.renderEvents=function(){google.maps.event.addListener(Googlemaps_Map.map,"click",function(e){return r.setMapLoc($(".mod-map .clicked"),e.latLng.lat(),e.latLng.lng()),r.createMarker($(".mod-map .marker-loc"))}),$(".mod-map .clear-marker").on("click",function(){return r.clearMarker($(".mod-map .marker-loc")),!1}),google.maps.event.addListener(Googlemaps_Map.map,"bounds_changed",function(){var e=Googlemaps_Map.map.getZoom();$('input[name="item[map_zoom_level]"]').val(e)})},r}(),this.Openlayers_Map=function(){function n(e,t){null==t&&(t={}),this.canvas=e,this.opts=t,this.opts.zoom||(this.opts.zoom=n.defaultZoom),this.markerFeature=null,this.markerLayer=null,this.popup=null,this.markerIcon="/assets/img/map-marker.png",this.render()}return n.defaultZoom=10,n.prototype.render=function(){return this.initMap(),this.initPopup(),this.opts.markers&&this.renderMarkers(this.opts.markers),this.resize(),this.renderEvents()},n.prototype.createLayers=function(e){var t,n,i,r,o,a,s,l;for(i=[],t=0,r=e.length;t<r;t++)s=(o=e[t]).source,l=o.url,a=o.projection,n=new ol.layer.Tile({source:new ol.source[s]({url:l,projection:a})}),i.push(n);return i},n.prototype.initMap=function(){var e,t;return e=this.opts.center||[138.252924,36.204824],(t=this.opts.layers)||(t=[{source:"XYZ",url:"http://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",projection:"EPSG:3857"}]),this.map=new ol.Map({target:this.canvas,renderer:["canvas","dom"],layers:this.createLayers(t),controls:ol.control.defaults({attributionOptions:{collapsible:!1}}),view:new ol.View({projection:"EPSG:3857",center:ol.proj.transform(e,"EPSG:4326","EPSG:3857"),maxZoom:18,zoom:this.opts.zoom}),logo:!0})},n.prototype.initPopup=function(){var i,e;return $("body").append('<div id="marker-popup"><div class="closer"></div><div class="content"></div></div>'),this.popup=$("#marker-popup"),this.popup.hide(),
  this.popupOverlay=new ol.Overlay({element:this.popup.get(0),autoPan:!0,autoPanAnimation:{duration:250}}),this.map.addOverlay(this.popupOverlay),this.map.on("pointermove",(i=this,function(e){var t,n;if(!e.dragging)return n=i.map.getEventPixel(e.originalEvent),t=i.map.hasFeatureAtPixel(n)?"pointer":"",i.map.getTarget().style.cursor=t;i.popup.hide()})),this.popup.find(".closer").on("click",(e=this,function(){return e.popupOverlay.setPosition(void 0),$(e).blur(),!1}))},n.prototype.showPopup=function(e,t){var n;if(n=e.get("markerHtml"))return this.popup.find(".content").html(n),this.popup.show(),this.popupOverlay.setPosition(t);this.popup.hide()},n.prototype.renderEvents=function(){return this.map.on("click",(n=this,function(e){var t;(t=n.map.forEachFeatureAtPixel(e.pixel,function(e){return e}))&&n.showPopup(t,e.coordinate)}));var n},n.prototype.createMarkerStyle=function(e){return new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],anchorXUnits:"fraction",anchorYUnits:"fraction",src:e})})},n.prototype.setMarker=function(e,t){var n,i,r,o,a,s,l;return null==t&&(t={}),i=this.markerIcon,t.image&&(i=t.image),l=this.createMarkerStyle(i),r=[e[1],e[0]],(n=new ol.Feature({geometry:new ol.geom.Point(ol.proj.transform(r,"EPSG:4326","EPSG:3857")),markerId:null!=(o=t.id)?o:null,markerHtml:null!=(a=t.html)?a:null,category:null!=(s=t.category)?s:null,iconSrc:i})).setStyle(l),this.markerLayer?this.markerLayer.getSource().addFeature(n):(this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[n]})}),this.map.addLayer(this.markerLayer)),n},n.prototype.getMarker=function(t){var n;return n=null,this.markerLayer&&this.markerLayer.getSource().forEachFeature(function(e){if(e.get("markerId")===t)return n=e}),n},n.prototype.getMarkers=function(){return this.markerLayer.getSource().getFeatures()},n.prototype.removeMarkers=function(){var t;this.popup&&this.popup.hide(),this.markerLayer&&(t=this.markerLayer.getSource()).forEachFeature(function(e){t.removeFeature(e)})},n.prototype.setCenter=function(e){return this.map.getView().setCenter(ol.proj.transform(e,"EPSG:4326","EPSG:3857"))},n.prototype.setZoom=function(e){return this.map.getView().setZoom(e)},n.prototype.renderMarkers=function(e){var t,n,i,r,o,a,s,l,c,u,d,h,p;for(i in d=[],e)n="/assets/img/map-marker.png",(r=e[i]).image&&(n=r.image),h=this.createMarkerStyle(n),o="",a=r.name,p=r.text,a&&(o+="<p>"+a+"</p>"),p&&$.each(p.split(/[\r\n]+/),function(){return this.match(/^https?:\/\//)?o+='<p><a href="'+this+'">'+this+"</a></p>":o+="<p>"+this+"</p>"}),s=[r.loc[1],r.loc[0]],(t=new ol.Feature({geometry:new ol.geom.Point(ol.proj.transform(s,"EPSG:4326","EPSG:3857")),markerId:null!=(l=r.id)?l:i,markerHtml:null!=(c=r.html)?c:o,category:null!=(u=r.category)?u:null,iconSrc:n})).setStyle(h),this.markerLayer?d.push(this.markerLayer.getSource().addFeature(t)):(this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[t]})}),d.push(this.map.addLayer(this.markerLayer)));return d},n.prototype.resize=function(){var e;this.markerLayer&&(e=this.markerLayer.getSource().getExtent(),this.map.getView().fit(e,this.map.getSize()),this.map.getView().getZoom()>this.opts.zoom&&this.map.getView().setZoom(this.opts.zoom))},n.prototype.loadLayer=function(o,e){var a=this,s=o,l=e,c=new ol.source.Vector({format:new l,loader:function(t,e,n){n.getCode();var i=new XMLHttpRequest,r=function(){console.log("loadLayer error:"+o)};i.open("GET",s),i.onerror=r,i.onloadstart=function(){$(a.canvas).hide()},i.onload=function(){if(200==i.status){var e=(new l).readFeatures(i.responseText,{featureProjection:n});c.addFeatures(e),t=u.getSource().getExtent(),$(a.canvas).show(),a.map.getView().fit(t,a.map.getSize()),a.map.getView().getZoom()>a.opts.zoom&&a.map.getView().setZoom(a.opts.zoom)}else r()},i.send()}}),u=new ol.layer.Vector({map:this.map,source:c})},n}(),this.Openlayers_Map_Form=function(){function e(e,t){null==t&&(t={}),this.clonePointForm=n(this.clonePointForm,this),this.canvas=e,this.opts=t,this.markerFeature=null,this.markerLayer=null,this.popup=null,this.maxPointForm=10,this.deleteMessage="\u30de\u30fc\u30ab\u30fc\u3092\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f",this.dataID=0,this.markerIcon="/assets/img/map-marker.png",this.clickIcon="/assets/img/map-marker-click.png",this.clickMarkerId=null,this.render()}var n=function(e,t){return function(){return e.apply(t,arguments)}};return e.prototype.getMapLoc=function(e){var t;return t=e.val().split(","),[parseFloat(t[0]),parseFloat(t[1])]},e.prototype.setMapLoc=function(e,t,n){t=Math.ceil(t*Math.pow(10,6))/Math.pow(10,6),n=Math.ceil(n*Math.pow(10,6))/Math.pow(10,6),e.val(t.toFixed(6)+","+n.toFixed(6))},e.prototype.render=function(){this.initMap(),this.renderMarkers(),this.initPopup(),this.resize(),this.renderEvents()},e.prototype.createLayers=function(e){var t,n,i,r,o,a,s,l;for(i=[],t=0,r=e.length;t<r;t++)s=(o=e[t]).source,l=o.url,a=o.projection,n=new ol.layer.Tile({source:new ol.source[s]({url:l,projection:a})}),i.push(n);return i},e.prototype.initMap=function(){var e,t;return e=this.opts.center||[138.252924,36.204824],(t=this.opts.layers)||(t=[{source:"XYZ",url:"http://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",projection:"EPSG:3857"}]),this.maxPointForm=this.opts.max_point_form||10,this.map=new ol.Map({target:this.canvas,renderer:["canvas","dom"],layers:this.createLayers(t),controls:ol.control.defaults({attributionOptions:{collapsible:!1}}),view:new ol.View({projection:"EPSG:3857",center:ol.proj.transform(e,"EPSG:4326","EPSG:3857"),minZoom:3,maxZoom:18,zoom:this.opts.zoom||10}),logo:!1})},e.prototype.initPopup=function(){var i,e;return $("body").append('<div id="marker-popup"><div class="closer"></div><div class="content"></div></div>'),this.popup=$("#marker-popup"),this.popup.hide(),this.popupOverlay=new ol.Overlay({element:this.popup.get(0),autoPan:!0,autoPanAnimation:{duration:250}}),this.map.addOverlay(this.popupOverlay),this.map.on("pointermove",(i=this,function(e){var t,n;if(!e.dragging)return n=i.map.getEventPixel(e.originalEvent),t=i.map.hasFeatureAtPixel(n)?"pointer":"",i.map.getTarget().style.cursor=t;i.popup.hide()})),this.popup.find(".closer").on("click",(e=this,function(){return e.popupOverlay.setPosition(void 0),$(e).blur(),!1}))},e.prototype.renderMarkers=function(){return $(".mod-map dd.marker").each((i=this,function(e,t){var n;return $(t).attr("data-id",i.dataID),""!==$(t).find(".marker-loc").val()&&(n=i.getMapLoc($(t).find(".marker-loc")),i.setMarker(n,{id:parseInt(i.dataID)})),i.dataID+=1}));var i},e.prototype.showPopup=function(e,t){var n,i;if(0===(i=t.get("markerId"))||i){if(n="",$('dd[data-id = "'+i+'"]').each(function(){var e,t;if(e=$(this).find(".marker-name").val(),t=$(this).find(".marker-text").val(),e&&(n+="<p>"+e+"</p>"),t)return $.each(t.split(/[\r\n]+/),function(){return this.match(/^https?:\/\//)?n+='<p><a href="'+this+'">'+this+"</a></p>":n+="<p>"+this+"</p>"})}),n)return this.popup.find(".content").html(n),this.popup.attr({dataId:i}),this.popup.show(),this.popupOverlay.setPosition(e.coordinate)}else this.popup.hide()},e.prototype.setMarker=function(e,t){var n,i,r,o,a,s,l;return null==t&&(t={}),s=this.markerIcon,t.image&&(s=t.image),l=new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],anchorXUnits:"fraction",anchorYUnits:"fraction",src:s})}),i=[e[1],e[0]],(n=new ol.Feature({geometry:new ol.geom.Point(ol.proj.transform(i,"EPSG:4326","EPSG:3857")),markerId:null!=(r=t.id)?r:null,markerHtml:null!=(o=t.html)?o:null,category:null!=(a=t.category)?a:null})).setStyle(l),this.markerLayer?this.markerLayer.getSource().addFeature(n):(this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[n]})}),this.map.addLayer(this.markerLayer)),n},e.prototype.getMarker=function(t){var n;return n=null,this.markerLayer&&this.markerLayer.getSource().forEachFeature(function(e){if(e.get("markerId")===t)return n=e}),n},e.prototype.removeMarker=function(e){var t;return!!(t=this.getMarker(e))&&(this.markerLayer.getSource().removeFeature(t),t.get("markerId")===parseInt(this.popup.attr("dataId"))&&this.popup.hide(),!0)},e.prototype.renderEvents=function(){var i,e,n,r,t;return this.map.on("click",(i=this,function(e){var t,n;if(!(t=i.map.forEachFeatureAtPixel(e.pixel,function(e){return e}))){for(i.clickMarkerId&&(t=i.getMarker(i.clickMarkerId),i.markerLayer.getSource().removeFeature(t)),n=ol.proj.transform(e.coordinate,"EPSG:3857","EPSG:4326");n[0]<180;)n[0]+=360;for(;180<n[0];)n[0]-=360;return n.reverse(),i.clickMarkerId="click",i.setMarker(n,{image:i.clickIcon,id:i.clickMarkerId}),i.setMapLoc($(".mod-map .clicked"),n[0],n[1])}i.showPopup(e,t)})),this.map.getView().on("propertychange",function(e){if("resolution"===e.key){var t=this.getZoom();$('input[name="item[map_zoom_level]"]').val(t)}}),$(".mod-map .add-marker").on("click",(e=this,function(){return e.clonePointForm(),!1})),$(".mod-map .clear-marker").on("click",(n=this,function(e){var t;return t=e.target,n.clearPointForm($(t).closest("dd.marker")),!1})),$(".mod-map .set-marker").on("click",(r=this,function(e){var t;return t=e.target,r.createMarker($(t).closest("dd.marker")),!1})),$(".mod-map .marker-name").on("keypress",function(e){if(13===e.which)return!1}),$(".mod-map .marker-loc-input").on("keypress",function(e){if(13===e.which)return $(this).closest("dd.marker").find(".set-marker").trigger("click"),!1}),$(".mod-map .marker-loc-input").on("focus",(t=this,function(){var e;if(t.clickMarkerId)return e=t.getMarker(t.clickMarkerId),t.markerLayer.getSource().removeFeature(e),t.clickMarkerId=null,$(".mod-map .clicked").val("")})),$(".location-search").hide()},e.prototype.clonePointForm=function(){var e,t,n,i;$(".mod-map dd.marker").length<this.maxPointForm&&((e=$(".mod-map dd.marker:last").clone(!1).insertAfter($(".mod-map dd.marker:last"))).attr("data-id",this.dataID),this.dataID+=1,e.find("input,textarea").val(""),e.find(".marker-name").val(""),e.find(".clear-marker").on("click",(i=this,function(){return i.clearPointForm(e)})),e.find(".set-marker").on("click",(n=this,function(){return n.createMarker(e)})),e.find(".marker-name").on("keypress",function(e){if(13===e.which)return!1}),e.find(".marker-loc-input").on("keypress",function(e){if(13===e.which)return $(e.target).closest("dd.marker").find(".set-marker").trigger("click"),!1}),e.find(".marker-loc-input").on("focus",(t=this,function(){var e;if(t.clickMarkerId)return e=t.getMarker(t.clickMarkerId),t.markerLayer.getSource().removeFeature(e),t.clickMarkerId=null,$(".mod-map .clicked").val("")}))),$(".mod-map dd.marker").length===this.maxPointForm&&$(".mod-map dd .add-marker").parent().hide()},e.prototype.createMarker=function(e){var t,n;if(n=null,""!==$(".mod-map .clicked").val()?n=$(".mod-map .clicked").val():""!==e.find(".marker-loc-input").val()&&(Map_Form.validateLoc(e.find(".marker-loc-input"))?n=e.find(".marker-loc-input").val():alert("\u6b63\u3057\u3044\u5ea7\u6a19\u3092\u30ab\u30f3\u30de(,)\u533a\u5207\u308a\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u4f8b\uff0933.8957612,133.6806607")),n)return e.find(".marker-loc").val(n),e.find(".marker-loc-input").val(n),t=parseInt(e.attr("data-id")),this.removeMarker(t),this.setMarker(this.getMapLoc(e.find(".marker-loc")),{id:t})},e.prototype.clearPointForm=function(e){var t;""!==e.find(".marker-loc").val()?confirm(this.deleteMessage)&&(t=parseInt(e.attr("data-id")),this.removeMarker(t),e.find("input,textarea").val(""),1<$(".mod-map dd.marker").length&&e.remove()):(t=parseInt(e.attr("data-id")),this.removeMarker(t),e.find("input,textarea").val(""),1<$(".mod-map dd.marker").length&&e.remove()),$(".mod-map dd .add-marker").parent().show()},e.prototype.resize=function(){if(this.markerLayer){var e=this.markerLayer.getSource().getExtent();this.map.getView().fit(e,this.map.getSize()),this.map.getView().getZoom()>this.opts.zoom&&this.map.getView().setZoom(this.opts.zoom)}},e}(),this.Openlayers_Facility_Search=function(){function e(){}return e.render=function(e,t){var n,a,r,o;return null==t&&(t={}),o=function(e){var t,n,i;return t=e.offset().top,n=e.closest("#map-sidebar").offset().top,i=e.closest("#map-sidebar").scrollTop(),e.closest("#map-sidebar").animate({scrollTop:t-n+i},"fast")},n=$(e)[0],a=new Openlayers_Map(n,t),r=a.showPopup,a.showPopup=function(e,t){var n,i;return r.call(a,e,t),$("#map-sidebar .column").removeClass("current"),i=e.get("markerId"),(n=$('#map-sidebar .column[data-id="'+i+'"]')).addClass("current"),o(n)},$("#map-sidebar .column .click-marker").on("click",function(){var e,t,n;return t=parseInt($(this).closest(".column").attr("data-id")),$("#map-sidebar .column").removeClass("current"),(n=a.getMarker(t))&&(e=n.getGeometry().getCoordinates(),a.showPopup(n,e)),!1}),$(".filters a").on("click",function(){var o,e;return $(this).hasClass("clicked")?$(this).removeClass("clicked"):$(this).addClass("clicked"),o=[],$(".filters a.clicked").each(function(){return o.push(parseInt($(this).attr("data-id")))}),e=a.getMarkers(),$.each(e,function(){var e,t,n,i,r;return r=!1,e=this.get("category"),$.each(o,function(){if(0<=$.inArray(parseInt(this),e))return!(r=!0)}),t=this.get("markerId"),$('#map-sidebar .column[data-id="'+t+'"]'),a.popup.hide(),r?(n=this.get("iconSrc"),i=a.createMarkerStyle(n)):i=new ol.style.Style({}),this.setStyle(i)}),!1}),$(".filters .focus").on("change",function(){var i;return(i=$(this)).find("option:selected").each(function(){var e,t,n;return""!==$(this).val()&&(e=$(this).val().split(","),n=$(this).attr("data-zoom-level"),t=[parseFloat(e[1]),parseFloat(e[0])],a.setCenter(t),n&&a.setZoom(parseInt(n)),i.val(""))})})},e}(),this.Openlayers_Member_Photo_Form=function(){function e(e,t){null==t&&(t={}),this.canvas=e,this.opts=t,this.markerFeature=null,this.markerLayer=null,this.popup=null,this.maxPointForm=10,this.deleteMessage="\u30de\u30fc\u30ab\u30fc\u3092\u524a\u9664\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f",this.setExifMessage="\u753b\u50cf\u306b\u4f4d\u7f6e\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u4f4d\u7f6e\u60c5\u5831\u3092\u5730\u56f3\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u304b\uff1f",this.dataID=0,this.markerIcon="/assets/img/map-marker.png",this.clickIcon="/assets/img/map-marker-click.png",this.clickMarkerId=null,this.render()}return e.prototype.getMapLoc=function(e){var t;return t=e.val().split(","),[parseFloat(t[0]),parseFloat(t[1])]},e.prototype.setMapLoc=function(e,t,n){t=Math.ceil(t*Math.pow(10,6))/Math.pow(10,6),n=Math.ceil(n*Math.pow(10,6))/Math.pow(10,6),e.val(t.toFixed(6)+","+n.toFixed(6))},e.prototype.render=function(){return this.initMap(),this.renderMarkers(),this.resize(),this.renderEvents()},e.prototype.createLayers=function(e){var t,n,i,r,o,a,s,l;for(i=[],t=0,r=e.length;t<r;t++)s=(o=e[t]).source,l=o.url,a=o.projection,n=new ol.layer.Tile({source:new ol.source[s]({url:l,projection:a})}),i.push(n);return i},e.prototype.initMap=function(){var e,t;return e=this.opts.center||[138.252924,36.204824],(t=this.opts.layers)||(t=[{source:"XYZ",url:"http://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",projection:"EPSG:3857"}]),this.map=new ol.Map({target:this.canvas,renderer:["canvas","dom"],layers:this.createLayers(t),controls:ol.control.defaults({attributionOptions:{collapsible:!1}}),view:new ol.View({projection:"EPSG:3857",center:ol.proj.transform(e,"EPSG:4326","EPSG:3857"),maxZoom:18,zoom:this.opts.zoom||10}),logo:!1})},e.prototype.setCenter=function(e){var t;return t=[e[1],e[0]],this.map.getView().setCenter(ol.proj.transform(t,"EPSG:4326","EPSG:3857"))},e.prototype.renderMarkers=function(){return $(".mod-map .marker").each((i=this,function(e,t){var n;return $(t).attr("data-id",i.dataID),""!==$(t).find(".marker-loc").val()&&(n=i.getMapLoc($(t).find(".marker-loc")),i.setMarker(n,{id:parseInt(i.dataID)})),i.dataID+=1}));var i},e.prototype.setMarker=function(e,t){var n,i,r,o,a,s,l;return null==t&&(t={}),s=this.markerIcon,t.image&&(s=t.image),l=new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],anchorXUnits:"fraction",anchorYUnits:"fraction",src:s})}),i=[e[1],e[0]],(n=new ol.Feature({geometry:new ol.geom.Point(ol.proj.transform(i,"EPSG:4326","EPSG:3857")),markerId:null!=(r=t.id)?r:null,markerHtml:null!=(o=t.html)?o:null,category:null!=(a=t.category)?a:null})).setStyle(l),this.markerLayer?(console.log(this.markerLayer.getSource()),this.markerLayer.getSource().addFeature(n)):(this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[n]})}),this.map.addLayer(this.markerLayer)),n},e.prototype.getMarker=function(t){var n;return n=null,this.markerLayer&&this.markerLayer.getSource().forEachFeature(function(e){if(e.get("markerId")===t)return n=e}),n},e.prototype.removeMarker=function(e){var t;return!!(t=this.getMarker(e))&&(this.markerLayer.getSource().removeFeature(t),!0)},e.prototype.renderEvents=function(){var n,e;return this.map.on("click",(n=this,function(e){var t;for(n.map.forEachFeatureAtPixel(e.pixel,function(e){return e}),t=ol.proj.transform(e.coordinate,"EPSG:3857","EPSG:4326");t[0]<180;)t[0]+=360;for(;180<t[0];)t[0]-=360;return t.reverse(),n.setMapLoc($(".mod-map .clicked"),t[0],t[1]),n.setMapLoc($(".mod-map .marker-loc"),t[0],t[1]),n.createMarker($(".mod-map .marker-loc"))})),this.map.getView().on("propertychange",function(e){if("resolution"===e.key){var t=this.getZoom();$('input[name="item[map_zoom_level]"]').val(t)}}),$(".mod-map .clear-marker").on("click",(e=this,function(){return e.clearMarker($(".mod-map .marker-loc")),!1}))},e.prototype.createMarker=function(e){var t;return t=0,this.removeMarker(t),this.setMarker(this.getMapLoc(e),{id:t})},e.prototype.clearMarker=function(e){var t;t=0,""!==e.val()?confirm(this.deleteMessage)&&(this.removeMarker(t),e.val("")):this.removeMarker(t)},e.prototype.setExifLatLng=function(e){return $(e).change((t=this,function(e){var r;if(e.target.files[0])return r=t,EXIF.getData(e.target.files[0],function(){var e,t,n,i;return e=EXIF.getTag(this,"GPSLatitude"),n=EXIF.getTag(this,"GPSLongitude"),t=EXIF.getTag(this,"GPSLatitudeRef")||"N",i=EXIF.getTag(this,"GPSLongitudeRef")||"W",!(!e||!n)&&!!confirm(r.setExifMessage)&&(t="N"===t?1:-1,i="W"===i?-1:1,e=(e[0]+e[1]/60+e[2]/3600)*t,n=(n[0]+n[1]/60+n[2]/3600)*i,$(".mod-map .clicked").val([e,n].join()),$(".mod-map .marker-loc").val([e,n].join()),r.createMarker($(".mod-map .marker-loc")),r.setCenter([e,n]))})}));var t},e.prototype.resize=function(){var e;this.markerLayer&&(e=this.markerLayer.getSource().getExtent(),this.map.getView().setCenter(ol.extent.getCenter(e)))},e}(),this.Webmail_Mail_Navi=function(){function e(){}return e.render=function(){return $(".webmail-navi-mailboxes .reload").click(function(){return e.reloadMailbox()}),$(".webmail-navi-quota .reload").click(function(){return e.reloadQuota()}),$(".webmail-select-account").on("change",function(){return location.href=$(this).val()})},e.reloadMailbox=function(o){var a,s;return null==o&&(o={}),s=$(".webmail-navi-mailboxes"),(a=s.find(".reload")).hasClass("disabled")||$.ajax({url:a.attr("href"),beforeSend:function(){return a.addClass("disabled"),s.find(".unseen").remove()},success:function(e){var t,n,i,r;for(n in r=e.mailboxes)t=" <span class='unseen count"+(i=r[n]).unseen+"'>("+i.unseen+")</span>",s.find("a[data-name='"+i.name+"']").append(t);return e.notice&&-1!==o.notice&&SS.notice(e.notice),s.find("a[data-name='INBOX']").data("uidnext")!=e.inbox.uidnext&&location.pathname===e.inbox.url&&(location.href=e.inbox.url),a.removeClass("disabled")}}),!1},e.reloadQuota=function(){var t,n,i;return i=$(".webmail-navi-quota"),n=i.find(".reload"),t=$(".webmail-quota-alert"),n.hasClass("disabled")||$.ajax({url:n.attr("href"),beforeSend:function(){return n.addClass("disabled"),i.find(".label").html("--/--"),i.find(".usage").css("width",0)},success:function(e){return i.find(".label").html(e.label),i.find(".usage").css("width",e.percentage+"%"),n.removeClass("disabled"),e.over_threshold?(i.find(".usage").addClass("over-threshold"),t.text(e.threshold_label),t.show()):(i.find(".usage").removeClass("over-threshold"),t.hide())}}),!1},e}(),this.Webmail_Mail_List=function(){function s(){}return s.render=function(){return this.renderListStars(),$(".list-head .search").on("click",function(){return $(".webmail-mail-search").animate({height:"toggle"},"fast")}),$(".webmail-mail-search .reset").on("click",function(){return $(".webmail-mail-search input[type=text]").val(""),$(".webmail-mail-search input[type=checkbox]").prop("checked",!1),$(".webmail-mail-search .search").click()}),$(".list-head .move-all, .list-head .copy-all").each(function(){var e,t;return t=$(this).data("href"),(e=$("#webmail-mailboxes-list .dropdown-menu").clone()).find("a").click(function(){var e;return 0!==(e=s.findCheckedUids()).length&&($(".dropdown-menu").removeClass("active"),s.updateMails(t,{ids:e,dst:$(this).data("name")}))}),$(this).after(e)}),$(".list-head .update-all").on("click",function(){var t;return 0===(t=s.findCheckedUids()).length||($(".dropdown-menu").removeClass("active"),$.ajax({url:$(this).attr("href"),method:"POST",dataType:"json",data:{_method:"put",authenticity_token:$('meta[name="csrf-token"]').attr("content"),ids:t},success:function(e){return s.renderListFlags(t,e.action),SS.notice(e.notice)}})),!1}),$(".list-head .delete-all").on("click",function(){return confirm("\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u7a7a\u306b\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f")&&($(".dropdown-menu").removeClass("active"),$.ajax({url:$(this).attr("href"),method:"POST",dataType:"json",data:{_method:"delete",authenticity_token:$('meta[name="csrf-token"]').attr("content")},success:function(e){return $(".webmail-mails .list-item").remove(),$(".pagination").remove(),SS.notice(e.notice)}})),!1}),$(".list-head .set-seen-all, .list-head .unset-seen-all").on("click",function(){var t;return 0===(t=s.findCheckedUids()).length||($(".dropdown-menu").removeClass("active"),$.ajax({url:$(this).data("href"),method:"POST",dataType:"json",data:{_method:"put",authenticity_token:$('meta[name="csrf-token"]').attr("content"),ids:t},success:function(e){return s.renderListFlags(t,e.action),SS.notice(e.notice)}})),!1}),this.renderDropEvents()},s.findCheckedUids=function(){return $(".webmail-mails .list-item input:checkbox:checked").map(function(){return $(this).val()}).get()},s.findListItems=function(t){return null==t&&(t=[]),$(".webmail-mails .list-item").map(function(){var e;return e=$(this).data("uid"),-1===$.inArray(e+"",t)?null:$(this)})},s.renderListFlags=function(e,t){var n;switch(n=s.findListItems(e),t){case"set_star":n.each(function(){return $(this).find(".icon-star").removeClass("off").addClass("on")});break;case"unset_star":n.each(function(){return $(this).find(".icon-star").removeClass("on").addClass("off")});break;case"set_seen":Webmail_Mail_Navi.reloadMailbox({notice:-1}),n.each(function(){return $(this).removeClass("unseen").addClass("seen")});break;case"unset_seen":Webmail_Mail_Navi.reloadMailbox({notice:-1}),n.each(function(){return $(this).removeClass("seen").addClass("unseen")})}return!1},s.renderListStars=function(){return $(".icon-star a").on("click",function(){var e,t;return e=(t=$(this).parent()).hasClass("on")?$(this).attr("href")+"/unset_star":$(this).attr("href")+"/set_star",$.ajax({url:e,method:"POST",dataType:"json",data:{_method:"put"},success:function(e){return"set_star"===e.action?t.removeClass("off").addClass("on"):t.removeClass("on").addClass("off")}}),!1})},s.renderDropEvents=function(){return $(".webmail-mails.list-items .mail-draggable").draggable({revert:"invalid",revertDuration:50,zIndex:110,opacity:.5,cursor:"pointer",helper:function(){var t;return $(".tap-menu").hide(),$(this).find('[type="checkbox"]').prop("checked")||($(".webmail-mails.list-items .mail-draggable").find('[type="checkbox"]').prop("checked",!1),$(this).find('[type="checkbox"]').prop("checked",!0)),t=$("<ul></ul>"),$(".webmail-mails.list-items .mail-draggable").each(function(){var e;if($(this).find('[type="checkbox"]').prop("checked")&&$(t).find("li").length<4)return(e=$(this).clone()).find('[type="checkbox"]').prop("checked",!0),e.removeClass("mail-draggable"),t.append(e)}),t}}),$(".webmail-navi-mailboxes .mailbox-draggable").draggable({revert:"invalid",revertDuration:50,zIndex:110,opacity:.5,cursor:"pointer",start:function(){return $(".tap-menu").hide()}}),$(".webmail-navi-mailboxes .mailbox-droppable").droppable({accept:".mail-draggable,.mailbox-draggable",hoverClass:"droppable-hover",tolerance:"pointer",drop:function(e,t){var n,i,r,o,a;return $(".webmail-navi-mailboxes .mailbox-droppable").on("click.dragging",function(){return!1}),i=e.target,t.draggable.hasClass("mail-draggable")?(n=$(i).attr("data-name"),o=[],$(".webmail-mails.list-items .mail-draggable").each(function(){if($(this).find('[type="checkbox"]').prop("checked"))return o.push($(this).attr("data-uid")),$(this).hide()}),a=$(".webmail-mails-head .move-all").attr("data-href"),s.updateMails(a,{ids:o,dst:n})):(r=t.draggable.attr("data-name"),n=$(i).attr("data-name")+"."+t.draggable.attr("data-basename"),a=$(".webmail-mails-head .rename-mailbox").attr("data-href"),$(t.draggable).hide(),s.updateMailbox(a,{src:r,dst:n}))}})},s.updateMails=function(e,t){var n,i,r,o,a,s;if(null==t&&(t={}),s=$('meta[name="csrf-token"]').attr("content"),(n=$("<form/>",{action:e,method:"post"})).append($("<input/>",{type:"hidden",name:"_method",value:"put"})),n.append($("<input/>",{type:"hidden",name:"authenticity_token",value:s})),t.redirect&&n.append($("<input/>",{type:"hidden",name:"redirect",value:t.redirect})),t.dst&&n.append($("<input/>",{type:"hidden",name:"dst",value:t.dst})),t.ids)for(r=0,o=(a=t.ids).length;r<o;r++)i=a[r],n.append($("<input/>",{name:"ids[]",value:i,type:"hidden"}));return n.appendTo(document.body).submit(),!1},s.updateMailbox=function(e,t){var n,i;return null==t&&(t={}),i=$('meta[name="csrf-token"]').attr("content"),(n=$("<form/>",{action:e,method:"post"})).append($("<input/>",{type:"hidden",name:"_method",value:"put"})),n.append($("<input/>",{type:"hidden",name:"authenticity_token",value:i})),t.redirect&&n.append($("<input/>",{type:"hidden",name:"redirect",value:t.redirect})),t.src&&n.append($("<input/>",{type:"hidden",name:"src",value:t.src})),t.dst&&n.append($("<input/>",{type:"hidden",name:"dst",value:t.dst})),n.appendTo(document.body).submit(),!1},s}(),this.Webmail_Mail_Detail=function(){function t(){}return t.render=function(){var e;return(e=$(".webmail-mail .body--html")).find("img[data-url]").length&&(e.find("img[data-url][height]").each(function(){return $(this).css("height",$(this).attr("height")+"px")}),e.before('<a class="show-image" href="#">\u753b\u50cf\u306e\u8868\u793a</a>'),$(".show-image").click(function(){return $(this).hide(),t.loadImages(),!1})),$(".update-mail").on("click",function(){return $(".dropdown-menu").removeClass("active"),$.ajax({url:$(this).attr("href"),method:"POST",dataType:"json",data:{_method:"put",authenticity_token:$('meta[name="csrf-token"]').attr("content")},success:function(e){return"set_star"===e.action?$(".icon-star").removeClass("off").addClass("on"):"unset_star"===e.action&&$(".icon-star").removeClass("on").addClass("off"),SS.notice(e.notice)}}),!1}),$(".send-mdn,.ignore-mdn").on("click",function(){return!$(this).hasClass("disabled")&&$.ajax({url:$(this).attr("href"),method:"POST",dataType:"json",data:{_method:"put",authenticity_token:$('meta[name="csrf-token"]').attr("content")},beforeSend:function(){return $(".send-mdn,.ignore-mdn").addClass("disabled")},success:function(e){return SS.notice(e.notice),$(".request-mdn-notice").remove()}})})},t.loadImages=function(){return $("img[data-url]").each(function(){var e;return(e=$(this).data("url")).match(/^parts\//)&&(e=location.pathname+"/"+e),$(this).attr("src",e),$(this).css("height","auto"),$(this).removeAttr("data-url")})},t}(),this.Webmail_Mail_Address=function(){function e(){}return e.render=function(e){var r,o;return r=e.lang,o=e.urls,$(".address-item").each(function(){var e,t,n,i;return(e=$(this)).addClass("clickable"),i=e.data("name"),t=e.data("email"),n=e.find(".dropdown-menu"),t?(e.find(".address-name").prepend('<i class="material-icons md-14">&#xE7FD;</i>'),n.append('<li class="dropdown-menu-item disabled">'+t+"</li>"),n.append('<li><a href="#" class="addr-send">'+r.send+"</a></li>"),n.append('<li><a href="#" class="addr-entry">'+r.entry+"</a></li>"),n.append('<li><a href="#" class="addr-copy">'+r.copy+"</a></li>"),$(this).find(".addr-send").click(function(){return location.href=o.send+"?"+$.param({item:{to:i+"<"+t+">"}}),!1}),$(this).find(".addr-entry").click(function(){return location.href=o.add+"?"+$.param({item:{name:i,email:t}}),!1}),$(this).find(".addr-copy").click(function(){return SS_Clipboard.copy(t),$(".dropdown, .dropdown-menu").removeClass("active"),!1})):(e.removeClass("dropdown"),n.remove(),!0)})},e}(),this.Webmail_Mail_Form=function(){function e(){}return e.render=function(){return $(".js-autosize").autosize(),$(".cc-bcc-label").click(function(){return $(".webmail-mail-form-address.cc-bcc").animate({height:"toggle"},"fast"),!1}),$("#item_format").change(function(){return e.renderBodyForm($(this).val())}),e.renderBodyForm($("#item_format").val()),$("#item_signature").change(function(){if(""!==$(this).val())return"html"===$("#item_format").val()?CKEDITOR.instances.item_html.insertText($(this).val()):e.insertText($("#item_text"),$(this).val()),$(this).val("")}),$(".js-send").click(function(){return $('input[name="item[to][]"][value!=""]').length?$("#item_to_text").attr("required",!1):$("#item_to_text").attr("required",!0)}),$(".js-save").click(function(){return $("#item_to_text").attr("required",!1)})},e.renderBodyForm=function(e){return"html"===e?($(".body-text").hide(),$(".body-html").show()):($(".body-html").hide(),$(".body-text").show())},e.insertText=function(e,t){var n,i,r,o;return e.focus(),navigator.userAgent.match(/MSIE/)?((r=document.selection.createRange()).text=t,r.select()):(o=e.val(),n=(i=e.get(0).selectionStart)+t.length,e.val(o.substr(0,i)+t+o.substr(i)),e.get(0).setSelectionRange(n,n))},e}(),this.Webmail_Mail_Form_Address=function(){function e(){}return e.select=function(e){var t,n,i,r,o,a,s,l;if(a=this,t=e.closest("[data-id]"),n=a.anchorAjaxBox.closest(".webmail-mail-form-address"),i=$(n).find(".autocomplete"),r=t.data("email"),l=t.data("address"),o=n.find(".selected-address"),""!==r)return s=Webmail_Address_Autocomplete.createSelectedElement(i.attr("data-name"),l,r),o.append(s)},e}(),Webmail_Address_Autocomplete.createSelectedElement=function(e,t,n){var i=$('<i class="material-icons md-18 md-inactive deselect">close</i>');i.on("click",function(){return $(this).closest("span").remove()});var r=$('<input type="hidden" name="'+e+'" value="'+n+'">'),o=$("<span></span>").text(n);return Webmail_Address_Autocomplete.validateEmail(t)||o.addClass("invalid-address"),o.append(i),o.append(r),o},Webmail_Address_Autocomplete.validateEmail=function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},Webmail_Address_Autocomplete.render=function(e,t){null==t&&(t={});var n=$(e).find(".autocomplete"),r=t.names||[],o=t.labels||r,a=t.values;0<r.length&&$(n).autocomplete({source:function(e,t){var n,i;return n=new RegExp($.ui.autocomplete.escapeRegex(e.term),"i"),i=[],$.each(r,function(e,t){if(t=t.label||t.value||t,n.test(t))return i.push(o[e])}),t(i)}}),$(n).on("keypress",function(e){if(13!==e.which)return!0;var t=$(this).val(),n=a&&a[t]?a[t]:t,i=$(this).closest(".webmail-mail-form-address").find(".selected-address");if(!t)return!1;var r=Webmail_Address_Autocomplete.createSelectedElement($(this).attr("data-name"),n,t);return i.append(r),$(this).val(""),!1}),$(e).find(".selected-address").sortable({connectWith:".selected-address",placeholder:"placeholder",dropOnEmpty:!0,cursor:"pointer",receive:function(e,t){var n;return $(this).closest(".webmail-mail-form-address").find(".selected-address"),n=$(t.item).closest(".webmail-mail-form-address").find(".autocomplete").attr("data-name"),$(t.item).find("input").attr("name",n)}}),$(e).find(".selected-address .deselect").each(function(){$(this).on("click",function(){$(this).closest("span").remove()})})},function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Cropper=t()}(this,function(){"use strict";function t(e){return ae.call(e).slice(8,-1).toLowerCase()}function x(e){return"number"==typeof e&&!isNaN(e)}function o(e){return void 0===e}function r(e){return"object"===(void 0===e?"undefined":G(e))&&null!==e}function T(e){if(!r(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&se.call(n,"isPrototypeOf")}catch(e){return!1}}function d(e){
  return"function"===t(e)}function a(e){return Array.isArray?Array.isArray(e):"array"===t(e)}function s(e){return"string"==typeof e&&(e=e.trim?e.trim():e.replace(te,"$1")),e}function _(t,n){if(t&&d(n)){var e=void 0;if(a(t)||x(t.length)){var i=t.length;for(e=0;e<i&&!1!==n.call(t,t[e],e,t);e++);}else r(t)&&Object.keys(t).forEach(function(e){n.call(t,t[e],e,t)})}return t}function f(n){for(var e=arguments.length,t=Array(1<e?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];if(r(n)&&0<t.length){if(Object.assign)return Object.assign.apply(Object,[n].concat(t));t.forEach(function(t){r(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})})}return n}function l(i,r){for(var e=arguments.length,o=Array(2<e?e-2:0),t=2;t<e;t++)o[t-2]=arguments[t];return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(r,o.concat(t))}}function m(e,t){var n=e.style;_(t,function(e,t){ee.test(t)&&x(e)&&(e+="px"),n[t]=e})}function n(e,t){return e.classList?e.classList.contains(t):-1<e.className.indexOf(t)}function h(e,t){if(t){if(x(e.length))return void _(e,function(e){h(e,t)});if(e.classList)return void e.classList.add(t);var n=s(e.className);n?n.indexOf(t)<0&&(e.className=n+" "+t):e.className=t}}function C(e,t){if(t)return x(e.length)?void _(e,function(e){C(e,t)}):e.classList?void e.classList.remove(t):void(0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function c(e,t,n){if(t)return x(e.length)?void _(e,function(e){c(e,t,n)}):void(n?h(e,t):C(e,t))}function i(e){return e.replace(K,"$1-$2").toLowerCase()}function g(e,t){return r(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-"+i(t))}function p(e,t,n){r(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-"+i(t),n)}function u(e,t){if(r(e[t]))delete e[t];else if(e.dataset)try{delete e.dataset[t]}catch(o){e.dataset[t]=null}else e.removeAttribute("data-"+i(t))}function v(t,e,n){var i=s(e).split(Z);return 1<i.length?void _(i,function(e){v(t,e,n)}):void(t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n))}function y(i,r,o,e){var t=s(r).split(Z),a=o;return 1<t.length?void _(t,function(e){y(i,e,o)}):(e&&(o=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return v(i,r,o),a.apply(i,t)}),void(i.addEventListener?i.addEventListener(r,o,!1):i.attachEvent&&i.attachEvent("on"+r,o)))}function b(e,t,n){if(e.dispatchEvent){var i=void 0;return d(Event)&&d(CustomEvent)?i=o(n)?new Event(t,{bubbles:!0,cancelable:!0}):new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):o(n)?(i=document.createEvent("Event")).initEvent(t,!0,!0):(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(i)}return!e.fireEvent||e.fireEvent("on"+t)}function w(e){var t=e||window.event;if(t.target||(t.target=t.srcElement||document),!x(t.pageX)&&x(t.clientX)){var n=e.target.ownerDocument||document,i=n.documentElement,r=n.body;t.pageX=t.clientX+((i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0)),t.pageY=t.clientY+((i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0))}return t}function S(e){var t=document.documentElement,n=e.getBoundingClientRect();return{left:n.left+((window.scrollX||t&&t.scrollLeft||0)-(t&&t.clientLeft||0)),top:n.top+((window.scrollY||t&&t.scrollTop||0)-(t&&t.clientTop||0))}}function k(e,t){return e.getElementsByTagName(t)}function $(e,t){return e.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t)}function M(e){return document.createElement(e)}function D(e,t){e.appendChild(t)}function E(e){e.parentNode&&e.parentNode.removeChild(e)}function I(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function P(e){var t=e.match(Q);return t&&(t[1]!==location.protocol||t[2]!==location.hostname||t[3]!==location.port)}function L(e){var t="timestamp="+(new Date).getTime();return e+(-1===e.indexOf("?")?"?":"&")+t}function O(e,t){if(!e.naturalWidth||re){var n=M("img");n.onload=function(){t(this.width,this.height)},n.src=e.src}else t(e.naturalWidth,e.naturalHeight)}function F(e){var t=[],n=e.translateX,i=e.translateY,r=e.rotate,o=e.scaleX,a=e.scaleY;x(n)&&0!==n&&t.push("translateX("+n+"px)"),x(i)&&0!==i&&t.push("translateY("+i+"px)"),x(r)&&0!==r&&t.push("rotate("+r+"deg)"),x(o)&&1!==o&&t.push("scaleX("+o+")"),x(a)&&1!==a&&t.push("scaleY("+a+")");var s=t.length?t.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function j(e,t){var n=Math.abs(e.degree)%180,i=(90<n?180-n:n)*Math.PI/180,r=Math.sin(i),o=Math.cos(i),a=e.width,s=e.height,l=e.aspectRatio,c=void 0,u=void 0;return t?u=(c=a/(o+r/l))/l:(c=a*o+s*r,u=a*r+s*o),{width:c,height:u}}function A(e,t,n){var i=M("canvas"),r=i.getContext("2d"),o=0,a=0,s=t.naturalWidth,l=t.naturalHeight,c=t.rotate,u=t.scaleX,d=t.scaleY,h=x(u)&&x(d)&&(1!==u||1!==d),p=x(c)&&0!==c,f=p||h,m=s*Math.abs(u||1),g=l*Math.abs(d||1),v=void 0,y=void 0,b=void 0;return h&&(v=m/2,y=g/2),p&&(v=(m=(b=j({width:m,height:g,degree:c})).width)/2,y=(g=b.height)/2),i.width=m,i.height=g,n.fillColor&&(r.fillStyle=n.fillColor,r.fillRect(0,0,m,g)),f&&(o=-s/2,a=-l/2,r.save(),r.translate(v,y)),p&&r.rotate(c*Math.PI/180),h&&r.scale(u,d),r.imageSmoothingEnabled=!!n.imageSmoothingEnabled,n.imageSmoothingQuality&&(r.imageSmoothingQuality=n.imageSmoothingQuality),r.drawImage(e,Math.floor(o),Math.floor(a),Math.floor(s),Math.floor(l)),f&&r.restore(),i}function N(e,t,n){var i="",r=t;for(n+=t;r<n;r++)i+=le(e.getUint8(r));return i}function W(e){var t=new DataView(e),n=t.byteLength,i=void 0,r=void 0,o=void 0,a=void 0,s=void 0,l=void 0,c=void 0,u=void 0,d=void 0;if(255===t.getUint8(0)&&216===t.getUint8(1))for(u=2;u<n;){if(255===t.getUint8(u)&&225===t.getUint8(u+1)){l=u;break}u++}if(l&&(r=l+10,"Exif"===N(t,l+4,4)&&(((a=18761===(s=t.getUint16(r)))||19789===s)&&42===t.getUint16(r+2,a)&&(8<=(o=t.getUint32(r+4,a))&&(c=r+o)))),c)for(n=t.getUint16(c,a),d=0;d<n;d++)if(u=c+12*d+2,274===t.getUint16(u,a)){u+=8,i=t.getUint16(u,a),re&&t.setUint16(u,1,a);break}return i}function H(e){var t=e.replace(J,""),n=atob(t),i=n.length,r=new ArrayBuffer(i),o=new Uint8Array(r),a=void 0;for(a=0;a<i;a++)o[a]=n.charCodeAt(a);return r}function z(e){var t=new Uint8Array(e),n=t.length,i="",r=void 0;for(r=0;r<n;r++)i+=le(t[r]);return"data:image/jpeg;base64,"+btoa(i)}function B(e,t){var n=e.pageX,i=e.pageY,r={endX:n,endY:i};return t?r:f({startX:n,startY:i},r)}function R(e){var t=f({},e),l=[];return _(e,function(s,e){delete t[e],_(t,function(e){var t=Math.abs(s.startX-e.startX),n=Math.abs(s.startY-e.startY),i=Math.abs(s.endX-e.endX),r=Math.abs(s.endY-e.endY),o=Math.sqrt(t*t+n*n),a=(Math.sqrt(i*i+r*r)-o)/o;l.push(a)})}),l.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),l[0]}function q(e){var i=0,r=0,o=0;return _(e,function(e){var t=e.startX,n=e.startY;i+=t,r+=n,o+=1}),{pageX:i/=o,pageY:r/=o}}var U={viewMode:0,dragMode:"crop",aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Y='<div class="cropper-container"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-action="e"></span><span class="cropper-line line-n" data-action="n"></span><span class="cropper-line line-w" data-action="w"></span><span class="cropper-line line-s" data-action="s"></span><span class="cropper-point point-e" data-action="e"></span><span class="cropper-point point-n" data-action="n"></span><span class="cropper-point point-w" data-action="w"></span><span class="cropper-point point-s" data-action="s"></span><span class="cropper-point point-ne" data-action="ne"></span><span class="cropper-point point-nw" data-action="nw"></span><span class="cropper-point point-sw" data-action="sw"></span><span class="cropper-point point-se" data-action="se"></span></div></div>',G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),V=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},J=/^data:.*,/,K=/([a-z\d])([A-Z])/g,Q=/^(https?:)\/\/([^:\/?#]+):?(\d*)/i,Z=/\s+/,ee=/^(width|height|left|top|marginLeft|marginTop)$/,te=/^\s+(.*)\s+$/,ne=/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i,ie="undefined"!=typeof window?window.navigator:null,re=ie&&ne.test(ie.userAgent),oe=Object.prototype,ae=oe.toString,se=oe.hasOwnProperty,le=(Array.prototype.slice,String.fromCharCode),ce={render:function(){var e=this;e.initContainer(),e.initCanvas(),e.initCropBox(),e.renderCanvas(),e.cropped&&e.renderCropBox()},initContainer:function(){var e=this,t=e.options,n=e.element,i=e.container,r=e.cropper,o="cropper-hidden",a=void 0;h(r,o),C(n,o),e.containerData=a={width:Math.max(i.offsetWidth,Number(t.minContainerWidth)||200),height:Math.max(i.offsetHeight,Number(t.minContainerHeight)||100)},m(r,{width:a.width,height:a.height}),h(n,o),C(r,o)},initCanvas:function(){var e=this,t=e.options.viewMode,n=e.containerData,i=e.imageData,r=Math.abs(i.rotate)%180==90,o=r?i.naturalHeight:i.naturalWidth,a=r?i.naturalWidth:i.naturalHeight,s=o/a,l=n.width,c=n.height;n.height*s>n.width?3===t?l=n.height*s:c=n.width/s:3===t?c=n.width/s:l=n.height*s;var u={naturalWidth:o,naturalHeight:a,aspectRatio:s,width:l,height:c};u.oldLeft=u.left=(n.width-l)/2,u.oldTop=u.top=(n.height-c)/2,e.canvasData=u,e.limited=1===t||2===t,e.limitCanvas(!0,!0),e.initialImageData=f({},i),e.initialCanvasData=f({},u)},limitCanvas:function(e,t){var n=this,i=n.options,r=i.viewMode,o=n.containerData,a=n.canvasData,s=a.aspectRatio,l=n.cropBoxData,c=n.cropped&&l;if(e){var u=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;1<r?(u=Math.max(u,o.width),d=Math.max(d,o.height),3===r&&(u<d*s?u=d*s:d=u/s)):0<r&&(u?u=Math.max(u,c?l.width:0):d?d=Math.max(d,c?l.height:0):c&&((u=l.width)<(d=l.height)*s?u=d*s:d=u/s)),u&&d?u<d*s?d=u/s:u=d*s:u?d=u/s:d&&(u=d*s),a.minWidth=u,a.minHeight=d,a.maxWidth=1/0,a.maxHeight=1/0}if(t)if(r){var h=o.width-a.width,p=o.height-a.height;a.minLeft=Math.min(0,h),a.minTop=Math.min(0,p),a.maxLeft=Math.max(0,h),a.maxTop=Math.max(0,p),c&&n.limited&&(a.minLeft=Math.min(l.left,l.left+(l.width-a.width)),a.minTop=Math.min(l.top,l.top+(l.height-a.height)),a.maxLeft=l.left,a.maxTop=l.top,2===r&&(a.width>=o.width&&(a.minLeft=Math.min(0,h),a.maxLeft=Math.max(0,h)),a.height>=o.height&&(a.minTop=Math.min(0,p),a.maxTop=Math.max(0,p))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=o.width,a.maxTop=o.height},renderCanvas:function(e){var t=this,n=t.canvasData,i=t.imageData,r=i.rotate;if(t.rotated){t.rotated=!1;var o=j({width:i.width,height:i.height,degree:r}),a=o.width/o.height,s=1===i.aspectRatio;if(s||a!==n.aspectRatio){if(n.left-=(o.width-n.width)/2,n.top-=(o.height-n.height)/2,n.width=o.width,n.height=o.height,n.aspectRatio=a,n.naturalWidth=i.naturalWidth,n.naturalHeight=i.naturalHeight,s&&r%90||r%180){var l=j({width:i.naturalWidth,height:i.naturalHeight,degree:r});n.naturalWidth=l.width,n.naturalHeight=l.height}t.limitCanvas(!0,!1)}}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),t.limitCanvas(!1,!0),n.oldLeft=n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.oldTop=n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),m(t.canvas,f({width:n.width,height:n.height},F({translateX:n.left,translateY:n.top}))),t.renderImage(),t.cropped&&t.limited&&t.limitCropBox(!0,!0),e&&t.output()},renderImage:function(e){var t=this,n=t.canvasData,i=t.imageData,r=void 0,o=void 0,a=void 0,s=void 0;i.rotate&&(r={width:a=(o=j({width:n.width,height:n.height,degree:i.rotate,aspectRatio:i.aspectRatio},!0)).width,height:s=o.height,left:(n.width-a)/2,top:(n.height-s)/2}),f(i,r||{width:n.width,height:n.height,left:0,top:0}),m(t.image,f({width:i.width,height:i.height},F(f({translateX:i.left,translateY:i.top},i)))),e&&t.output()},initCropBox:function(){var e=this,t=e.options,n=t.aspectRatio,i=Number(t.autoCropArea)||.8,r=e.canvasData,o={width:r.width,height:r.height};n&&(r.height*n>r.width?o.height=o.width/n:o.width=o.height*n),e.cropBoxData=o,e.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*i),o.height=Math.max(o.minHeight,o.height*i),o.oldLeft=o.left=r.left+(r.width-o.width)/2,o.oldTop=o.top=r.top+(r.height-o.height)/2,e.initialCropBoxData=f({},o)},limitCropBox:function(e,t){var n=this,i=n.options,r=i.aspectRatio,o=n.containerData,a=n.canvasData,s=n.cropBoxData,l=n.limited;if(e){var c=Number(i.minCropBoxWidth)||0,u=Number(i.minCropBoxHeight)||0,d=Math.min(o.width,l?a.width:o.width),h=Math.min(o.height,l?a.height:o.height);c=Math.min(c,o.width),u=Math.min(u,o.height),r&&(c&&u?c<u*r?u=c/r:c=u*r:c?u=c/r:u&&(c=u*r),d<h*r?h=d/r:d=h*r),s.minWidth=Math.min(c,d),s.minHeight=Math.min(u,h),s.maxWidth=d,s.maxHeight=h}t&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(o.width,a.left+a.width)-s.width,s.maxTop=Math.min(o.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=o.width-s.width,s.maxTop=o.height-s.height))},renderCropBox:function(){var e=this,t=e.options,n=e.containerData,i=e.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),e.limitCropBox(!1,!0),i.oldLeft=i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.oldTop=i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),t.movable&&t.cropBoxMovable&&p(e.face,"action",i.width===n.width&&i.height===n.height?"move":"all"),m(e.cropBox,f({width:i.width,height:i.height},F({translateX:i.left,translateY:i.top}))),e.cropped&&e.limited&&e.limitCanvas(!0,!0),e.disabled||e.output()},output:function(){var e=this;e.preview(),e.complete&&b(e.element,"crop",e.getData())}},ue="preview",de={initPreview:function(){var e=this,t=e.options.preview,n=M("img"),i=e.crossOrigin,r=i?e.crossOriginUrl:e.url;if(i&&(n.crossOrigin=i),n.src=r,D(e.viewBox,n),e.image2=n,t){var o=t.querySelector?[t]:document.querySelectorAll(t);_(e.previews=o,function(e){var t=M("img");p(e,ue,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),i&&(t.crossOrigin=i),t.src=r,t.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',I(e),D(e,t)})}},resetPreview:function(){_(this.previews,function(e){var t=g(e,ue);m(e,{width:t.width,height:t.height}),e.innerHTML=t.html,u(e,ue)})},preview:function(){var e=this,s=e.imageData,t=e.canvasData,n=e.cropBoxData,l=n.width,c=n.height,u=s.width,d=s.height,h=n.left-t.left-s.left,p=n.top-t.top-s.top;e.cropped&&!e.disabled&&(m(e.image2,f({width:u,height:d},F(f({translateX:-h,translateY:-p},s)))),_(e.previews,function(e){var t=g(e,ue),n=t.width,i=t.height,r=n,o=i,a=1;l&&(o=c*(a=n/l)),c&&i<o&&(r=l*(a=i/c),o=i),m(e,{width:r,height:o}),m(k(e,"img")[0],f({width:u*a,height:d*a},F(f({translateX:-h*a,translateY:-p*a},s))))}))}},he="undefined"!=typeof window?window.PointerEvent:null,pe=he?"pointerdown":"touchstart mousedown",fe=he?"pointermove":"touchmove mousemove",me=he?" pointerup pointercancel":"touchend touchcancel mouseup",ge="wheel mousewheel DOMMouseScroll",ve="dblclick",ye="resize",be="cropstart",xe="cropmove",we="cropend",ke="crop",_e="zoom",Ce={bind:function(){var e=this,t=e.options,n=e.element,i=e.cropper;d(t.cropstart)&&y(n,be,t.cropstart),d(t.cropmove)&&y(n,xe,t.cropmove),d(t.cropend)&&y(n,we,t.cropend),d(t.crop)&&y(n,ke,t.crop),d(t.zoom)&&y(n,_e,t.zoom),y(i,pe,e.onCropStart=l(e.cropStart,e)),t.zoomable&&t.zoomOnWheel&&y(i,ge,e.onWheel=l(e.wheel,e)),t.toggleDragModeOnDblclick&&y(i,ve,e.onDblclick=l(e.dblclick,e)),y(document,fe,e.onCropMove=l(e.cropMove,e)),y(document,me,e.onCropEnd=l(e.cropEnd,e)),t.responsive&&y(window,ye,e.onResize=l(e.resize,e))},unbind:function(){var e=this,t=e.options,n=e.element,i=e.cropper;d(t.cropstart)&&v(n,be,t.cropstart),d(t.cropmove)&&v(n,xe,t.cropmove),d(t.cropend)&&v(n,we,t.cropend),d(t.crop)&&v(n,ke,t.crop),d(t.zoom)&&v(n,_e,t.zoom),v(i,pe,e.onCropStart),t.zoomable&&t.zoomOnWheel&&v(i,ge,e.onWheel),t.toggleDragModeOnDblclick&&v(i,ve,e.onDblclick),v(document,fe,e.onCropMove),v(document,me,e.onCropEnd),t.responsive&&v(window,ye,e.onResize)}},Se=/^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/,$e={resize:function(){var n,i,e=this,t=e.options,r=e.container,o=e.containerData,a=Number(t.minContainerWidth)||200,s=Number(t.minContainerHeight)||100;if(!e.disabled&&o.width!==a&&o.height!==s){var l=r.offsetWidth/o.width;1===l&&r.offsetHeight===o.height||(i=n=void 0,t.restore&&(n=e.getCanvasData(),i=e.getCropBoxData()),e.render(),t.restore&&(e.setCanvasData(_(n,function(e,t){n[t]=e*l})),e.setCropBoxData(_(i,function(e,t){i[t]=e*l}))))}},dblclick:function(){var e=this;e.disabled||"none"===e.options.dragMode||e.setDragMode(n(e.dragBox,"cropper-crop")?"move":"crop")},wheel:function(e){var t=this,n=w(e),i=Number(t.options.wheelZoomRatio)||.1,r=1;t.disabled||(n.preventDefault(),t.wheeling||(t.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),n.deltaY?r=0<n.deltaY?1:-1:n.wheelDelta?r=-n.wheelDelta/120:n.detail&&(r=0<n.detail?1:-1),t.zoom(-r*i,n)))},cropStart:function(e){var t=this;if(!t.disabled){var n=t.options,i=t.pointers,r=w(e),o=void 0;r.changedTouches?_(r.changedTouches,function(e){i[e.identifier]=B(e)}):i[r.pointerId||0]=B(r),o=1<Object.keys(i).length&&n.zoomable&&n.zoomOnTouch?"zoom":g(r.target,"action"),Se.test(o)&&!1!==b(t.element,"cropstart",{originalEvent:r,action:o})&&(r.preventDefault(),t.action=o,t.cropping=!1,"crop"===o&&(t.cropping=!0,h(t.dragBox,"cropper-modal")))}},cropMove:function(e){var t=this,n=t.action;if(!t.disabled&&n){var i=t.pointers,r=w(e);r.preventDefault(),!1!==b(t.element,"cropmove",{originalEvent:r,action:n})&&(r.changedTouches?_(r.changedTouches,function(e){f(i[e.identifier],B(e,!0))}):f(i[r.pointerId||0],B(r,!0)),t.change(r))}},cropEnd:function(e){var t=this;if(!t.disabled){var n=t.action,i=t.pointers,r=w(e);r.changedTouches?_(r.changedTouches,function(e){delete i[e.identifier]}):delete i[r.pointerId||0],n&&(r.preventDefault(),Object.keys(i).length||(t.action=""),t.cropping&&(t.cropping=!1,c(t.dragBox,"cropper-modal",t.cropped&&this.options.modal)),b(t.element,"cropend",{originalEvent:r,action:n}))}}},Te="e",Me="w",De="s",Ee="n",Ie="se",Pe="sw",Le="ne",Oe="nw",Fe={change:function(e){var t=this,n=t.options,i=t.containerData,r=t.canvasData,o=t.cropBoxData,a=n.aspectRatio,s=t.action,l=o.width,c=o.height,u=o.left,d=o.top,h=u+l,p=d+c,f=0,m=0,g=i.width,v=i.height,y=!0,b=void 0;!a&&e.shiftKey&&(a=l&&c?l/c:1),t.limited&&(f=o.minLeft,m=o.minTop,g=f+Math.min(i.width,r.width,r.left+r.width),v=m+Math.min(i.height,r.height,r.top+r.height));var x=t.pointers,w=x[Object.keys(x)[0]],k={x:w.endX-w.startX,y:w.endY-w.startY};switch(a&&(k.X=k.y*a,k.Y=k.x/a),s){case"all":u+=k.x,d+=k.y;break;case Te:if(0<=k.x&&(g<=h||a&&(d<=m||v<=p))){y=!1;break}l+=k.x,a&&(c=l/a,d-=k.Y/2),l<0&&(s=Me,l=0);break;case Ee:if(k.y<=0&&(d<=m||a&&(u<=f||g<=h))){y=!1;break}c-=k.y,d+=k.y,a&&(l=c*a,u+=k.X/2),c<0&&(s=De,c=0);break;case Me:if(k.x<=0&&(u<=f||a&&(d<=m||v<=p))){y=!1;break}l-=k.x,u+=k.x,a&&(c=l/a,d+=k.Y/2),l<0&&(s=Te,l=0);break;case De:if(0<=k.y&&(v<=p||a&&(u<=f||g<=h))){y=!1;break}c+=k.y,a&&(l=c*a,u-=k.X/2),c<0&&(s=Ee,c=0);break;case Le:if(a){if(k.y<=0&&(d<=m||g<=h)){y=!1;break}c-=k.y,d+=k.y,l=c*a}else 0<=k.x?h<g?l+=k.x:k.y<=0&&d<=m&&(y=!1):l+=k.x,k.y<=0?m<d&&(c-=k.y,d+=k.y):(c-=k.y,d+=k.y);l<0&&c<0?(s=Pe,l=c=0):l<0?(s=Oe,l=0):c<0&&(s=Ie,c=0);break;case Oe:if(a){if(k.y<=0&&(d<=m||u<=f)){y=!1;break}c-=k.y,d+=k.y,l=c*a,u+=k.X}else k.x<=0?f<u?(l-=k.x,u+=k.x):k.y<=0&&d<=m&&(y=!1):(l-=k.x,u+=k.x),k.y<=0?m<d&&(c-=k.y,d+=k.y):(c-=k.y,d+=k.y);l<0&&c<0?(s=Ie,l=c=0):l<0?(s=Le,l=0):c<0&&(s=Pe,c=0);break;case Pe:if(a){if(k.x<=0&&(u<=f||v<=p)){y=!1;break}l-=k.x,u+=k.x,c=l/a}else k.x<=0?f<u?(l-=k.x,u+=k.x):0<=k.y&&v<=p&&(y=!1):(l-=k.x,u+=k.x),0<=k.y?p<v&&(c+=k.y):c+=k.y;l<0&&c<0?(s=Le,l=c=0):l<0?(s=Ie,l=0):c<0&&(s=Oe,c=0);break;case Ie:if(a){if(0<=k.x&&(g<=h||v<=p)){y=!1;break}c=(l+=k.x)/a}else 0<=k.x?h<g?l+=k.x:0<=k.y&&v<=p&&(y=!1):l+=k.x,0<=k.y?p<v&&(c+=k.y):c+=k.y;l<0&&c<0?(s=Oe,l=c=0):l<0?(s=Pe,l=0):c<0&&(s=Le,c=0);break;case"move":t.move(k.x,k.y),y=!1;break;case"zoom":t.zoom(R(x),e),y=!1;break;case"crop":if(!k.x||!k.y){y=!1;break}b=S(t.cropper),u=w.startX-b.left,d=w.startY-b.top,l=o.minWidth,c=o.minHeight,0<k.x?s=0<k.y?Ie:Le:k.x<0&&(u-=l,s=0<k.y?Pe:Oe),k.y<0&&(d-=c),t.cropped||(C(t.cropBox,"cropper-hidden"),t.cropped=!0,t.limited&&t.limitCropBox(!0,!0))}y&&(o.width=l,o.height=c,o.left=u,o.top=d,t.action=s,t.renderCropBox()),_(x,function(e){e.startX=e.endX,e.startY=e.endY})}},je={crop:function(){var e=this;return e.ready&&!e.disabled&&(e.cropped||(e.cropped=!0,e.limitCropBox(!0,!0),e.options.modal&&h(e.dragBox,"cropper-modal"),C(e.cropBox,"cropper-hidden")),e.setCropBoxData(e.initialCropBoxData)),e},reset:function(){var e=this;return e.ready&&!e.disabled&&(e.imageData=f({},e.initialImageData),e.canvasData=f({},e.initialCanvasData),e.cropBoxData=f({},e.initialCropBoxData),e.renderCanvas(),e.cropped&&e.renderCropBox()),e},clear:function(){var e=this;return e.cropped&&!e.disabled&&(f(e.cropBoxData,{left:0,top:0,width:0,height:0}),e.cropped=!1,e.renderCropBox(),e.limitCanvas(),e.renderCanvas(),C(e.dragBox,"cropper-modal"),h(e.cropBox,"cropper-hidden")),e},replace:function(t,e){var n=this;return!n.disabled&&t&&(n.isImg&&(n.element.src=t),e?(n.url=t,n.image.src=t,n.ready&&(n.image2.src=t,_(n.previews,function(e){k(e,"img")[0].src=t}))):(n.isImg&&(n.replaced=!0),n.options.data=null,n.load(t))),n},enable:function(){var e=this;return e.ready&&(e.disabled=!1,C(e.cropper,"cropper-disabled")),e},disable:function(){var e=this;return e.ready&&(e.disabled=!0,h(e.cropper,"cropper-disabled")),e},destroy:function(){var e=this,t=e.element,n=e.image;return e.loaded?(e.isImg&&e.replaced&&(t.src=e.originalUrl),e.unbuild(),C(t,"cropper-hidden")):e.isImg?v(t,"load",e.onStart):n&&E(n),u(t,"cropper"),e},move:function(e,t){var n=this,i=n.canvasData;return n.moveTo(o(e)?e:i.left+Number(e),o(t)?t:i.top+Number(t))},moveTo:function(e,t){var n=this,i=n.canvasData,r=!1;return o(t)&&(t=e),e=Number(e),t=Number(t),n.ready&&!n.disabled&&n.options.movable&&(x(e)&&(i.left=e,r=!0),x(t)&&(i.top=t,r=!0),r&&n.renderCanvas(!0)),n},zoom:function(e,t){var n=this,i=n.canvasData;return e=(e=Number(e))<0?1/(1-e):1+e,n.zoomTo(i.width*e/i.naturalWidth,t)},zoomTo:function(e,t){var n=this,i=n.options,r=n.canvasData,o=r.width,a=r.height,s=r.naturalWidth,l=r.naturalHeight;if(0<=(e=Number(e))&&n.ready&&!n.disabled&&i.zoomable){var c=s*e,u=l*e;if(!1===b(n.element,"zoom",{originalEvent:t,oldRatio:o/s,ratio:c/s}))return n;if(t){var d=n.pointers,h=S(n.cropper),p=d&&Object.keys(d).length?q(d):{pageX:t.pageX,pageY:t.pageY};r.left-=(c-o)*((p.pageX-h.left-r.left)/o),r.top-=(u-a)*((p.pageY-h.top-r.top)/a)}else r.left-=(c-o)/2,r.top-=(u-a)/2;r.width=c,r.height=u,n.renderCanvas(!0)}return n},rotate:function(e){var t=this;return t.rotateTo((t.imageData.rotate||0)+Number(e))},rotateTo:function(e){var t=this;return x(e=Number(e))&&t.ready&&!t.disabled&&t.options.rotatable&&(t.imageData.rotate=e%360,t.rotated=!0,t.renderCanvas(!0)),t},scale:function(e,t){var n=this,i=n.imageData,r=!1;return o(t)&&(t=e),e=Number(e),t=Number(t),n.ready&&!n.disabled&&n.options.scalable&&(x(e)&&(i.scaleX=e,r=!0),x(t)&&(i.scaleY=t,r=!0),r&&n.renderImage(!0)),n},scaleX:function(e){var t=this,n=t.imageData.scaleY;return t.scale(e,x(n)?n:1)},scaleY:function(e){var t=this,n=t.imageData.scaleX;return t.scale(x(n)?n:1,e)},getData:function(n){var e=this,t=e.options,i=e.imageData,r=e.canvasData,o=e.cropBoxData,a=void 0,s=void 0;return e.ready&&e.cropped?(s={x:o.left-r.left,y:o.top-r.top,width:o.width,height:o.height},a=i.width/i.naturalWidth,_(s,function(e,t){e/=a,s[t]=n?Math.round(e):e})):s={x:0,y:0,width:0,height:0},t.rotatable&&(s.rotate=i.rotate||0),t.scalable&&(s.scaleX=i.scaleX||1,s.scaleY=i.scaleY||1),s},setData:function(e){var t=this,n=t.options,i=t.imageData,r=t.canvasData,o={},a=void 0,s=void 0,l=void 0;return d(e)&&(e=e.call(t.element)),t.ready&&!t.disabled&&T(e)&&(n.rotatable&&x(e.rotate)&&e.rotate!==i.rotate&&(i.rotate=e.rotate,t.rotated=a=!0),n.scalable&&(x(e.scaleX)&&e.scaleX!==i.scaleX&&(i.scaleX=e.scaleX,s=!0),x(e.scaleY)&&e.scaleY!==i.scaleY&&(i.scaleY=e.scaleY,s=!0)),a?t.renderCanvas():s&&t.renderImage(),l=i.width/i.naturalWidth,x(e.x)&&(o.left=e.x*l+r.left),x(e.y)&&(o.top=e.y*l+r.top),x(e.width)&&(o.width=e.width*l),x(e.height)&&(o.height=e.height*l),t.setCropBoxData(o)),t},getContainerData:function(){var e=this;return e.ready?e.containerData:{}},getImageData:function(){var e=this;return e.loaded?e.imageData:{}},getCanvasData:function(){var e=this,t=e.canvasData,n={};return e.ready&&_(["left","top","width","height","naturalWidth","naturalHeight"],function(e){n[e]=t[e]}),n},setCanvasData:function(e){var t=this,n=t.canvasData,i=n.aspectRatio;return d(e)&&(e=e.call(t.element)),t.ready&&!t.disabled&&T(e)&&(x(e.left)&&(n.left=e.left),x(e.top)&&(n.top=e.top),x(e.width)?(n.width=e.width,n.height=e.width/i):x(e.height)&&(n.height=e.height,n.width=e.height*i),t.renderCanvas(!0)),t},getCropBoxData:function(){var e=this,t=e.cropBoxData,n=void 0;return e.ready&&e.cropped&&(n={left:t.left,top:t.top,width:t.width,height:t.height}),n||{}},setCropBoxData:function(e){var t=this,n=t.cropBoxData,i=t.options.aspectRatio,r=void 0,o=void 0;return d(e)&&(e=e.call(t.element)),t.ready&&t.cropped&&!t.disabled&&T(e)&&(x(e.left)&&(n.left=e.left),x(e.top)&&(n.top=e.top),x(e.width)&&e.width!==n.width&&(r=!0,n.width=e.width),x(e.height)&&e.height!==n.height&&(o=!0,n.height=e.height),i&&(r?n.height=n.width/i:o&&(n.width=n.height*i)),t.renderCropBox()),t},getCroppedCanvas:function(e){var t=this;if(!t.ready||!window.HTMLCanvasElement)return null;if(T(e)||(e={}),!t.cropped)return A(t.image,t.imageData,e);var n=t.getData(),i=n.width,r=n.height,o=i/r,a=void 0,s=void 0,l=void 0;T(e)&&(a=e.width,s=e.height,a?(s=a/o,l=a/i):s&&(a=s*o,l=s/r));var c=Math.floor(a||i),u=Math.floor(s||r),d=M("canvas"),h=d.getContext("2d");d.width=c,d.height=u,e.fillColor&&(h.fillStyle=e.fillColor,h.fillRect(0,0,c,u));var p,f,m,g,v,y,b,x,w,k,_,C,S,$=(p=A(t.image,t.imageData,e),f=p.width,m=p.height,g=t.canvasData,v=[p],y=n.x+g.naturalWidth*(Math.abs(n.scaleX||1)-1)/2,b=n.y+g.naturalHeight*(Math.abs(n.scaleY||1)-1)/2,S=C=_=k=w=x=void 0,y<=-i||f<y?y=x=k=C=0:y<=0?(k=-y,y=0,x=C=Math.min(f,i+y)):y<=f&&(k=0,x=C=Math.min(i,f-y)),x<=0||b<=-r||m<b?b=w=_=S=0:b<=0?(_=-b,b=0,w=S=Math.min(m,r+b)):b<=m&&(_=0,w=S=Math.min(r,m-b)),v.push(Math.floor(y),Math.floor(b),Math.floor(x),Math.floor(w)),l&&(k*=l,_*=l,C*=l,S*=l),0<C&&0<S&&v.push(Math.floor(k),Math.floor(_),Math.floor(C),Math.floor(S)),v);return h.imageSmoothingEnabled=!!e.imageSmoothingEnabled,e.imageSmoothingQuality&&(h.imageSmoothingQuality=e.imageSmoothingQuality),h.drawImage.apply(h,V($)),d},setAspectRatio:function(e){var t=this,n=t.options;return t.disabled||o(e)||(n.aspectRatio=Math.max(0,e)||NaN,t.ready&&(t.initCropBox(),t.cropped&&t.renderCropBox())),t},setDragMode:function(e){var t=this,n=t.options,i=t.dragBox,r=t.face,o=void 0,a=void 0;return t.loaded&&!t.disabled&&(o="crop"===e,a=n.movable&&"move"===e,p(i,"action",e=o||a?e:"none"),c(i,"cropper-crop",o),c(i,"cropper-move",a),n.cropBoxMovable||(p(r,"action",e),c(r,"cropper-crop",o),c(r,"cropper-move",a))),t}},Ae="cropper",Ne=Ae+"-hidden",We="error",He="load",ze="ready",Be="crop",Re=/^data:/,qe=/^data:image\/jpeg;base64,/,Ue=void 0,Ye=function(){function i(e,t){X(this,i);var n=this;n.element=e,n.options=f({},U,T(t)&&t),n.loaded=!1,n.ready=!1,n.complete=!1,n.rotated=!1,n.cropped=!1,n.disabled=!1,n.replaced=!1,n.limited=!1,n.wheeling=!1,n.isImg=!1,n.originalUrl="",n.canvasData=null,n.cropBoxData=null,n.previews=null,n.pointers={},n.init()}return e(i,[{key:"init",value:function(){var e=this,t=e.element,n=t.tagName.toLowerCase(),i=void 0;if(!g(t,Ae)){if(p(t,Ae,e),"img"===n){if(e.isImg=!0,e.originalUrl=i=t.getAttribute("src"),!i)return;i=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(i=t.toDataURL());e.load(i)}}},{key:"load",value:function(e){var t=this,n=t.options,i=t.element;if(e){if(t.url=e,t.imageData={},!n.checkOrientation||!window.ArrayBuffer)return void t.clone();if(Re.test(e))return void(qe.test(e)?t.read(H(e)):t.clone());var r=new XMLHttpRequest;r.onerror=r.onabort=function(){t.clone()},r.onload=function(){t.read(r.response)},n.checkCrossOrigin&&P(e)&&i.crossOrigin&&(e=L(e)),r.open("get",e),r.responseType="arraybuffer",r.withCredentials="use-credentials"===i.crossOrigin,r.send()}}},{key:"read",value:function(e){var t=this,n=t.options,i=W(e),r=t.imageData,o=0,a=1,s=1;if(1<i)switch(t.url=z(e),i){case 2:a=-1;break;case 3:o=-180;break;case 4:s=-1;break;case 5:o=90,s=-1;break;case 6:o=90;break;case 7:o=90,a=-1;break;case 8:o=-90}n.rotatable&&(r.rotate=o),n.scalable&&(r.scaleX=a,r.scaleY=s),t.clone()}},{key:"clone",value:function(){var e=this,t=e.element,n=e.url,i=void 0,r=void 0,o=void 0,a=void 0;e.options.checkCrossOrigin&&P(n)&&((i=t.crossOrigin)?r=n:(i="anonymous",r=L(n))),e.crossOrigin=i,e.crossOriginUrl=r;var s=M("img");i&&(s.crossOrigin=i),s.src=r||n,e.image=s,e.onStart=o=l(e.start,e),e.onStop=a=l(e.stop,e),e.isImg?t.complete?e.start():y(t,He,o):(y(s,He,o),y(s,We,a),h(s,"cropper-hide"),t.parentNode.insertBefore(s,t.nextSibling))}},{key:"start",value:function(e){var n=this,t=n.isImg?n.element:n.image;e&&(v(t,He,n.onStart),v(t,We,n.onStop)),O(t,function(e,t){f(n.imageData,{naturalWidth:e,naturalHeight:t,aspectRatio:e/t}),n.loaded=!0,n.build()})}},{key:"stop",value:function(){var e=this,t=e.image;v(t,He,e.onStart),v(t,We,e.onStop),E(t),e.image=null}},{key:"build",value:function(){var e=this,t=e.options,n=e.element,i=e.image,r=void 0,o=void 0,a=void 0,s=void 0,l=void 0,c=void 0;if(e.loaded){e.ready&&e.unbuild();var u=M("div");u.innerHTML=Y,e.container=r=n.parentNode,e.cropper=o=$(u,"cropper-container")[0],e.canvas=a=$(o,"cropper-canvas")[0],e.dragBox=s=$(o,"cropper-drag-box")[0],e.cropBox=l=$(o,"cropper-crop-box")[0],e.viewBox=$(o,"cropper-view-box")[0],e.face=c=$(l,"cropper-face")[0],D(a,i),h(n,Ne),r.insertBefore(o,n.nextSibling),e.isImg||C(i,"cropper-hide"),e.initPreview(),e.bind(),t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,e.cropped=t.autoCrop,t.autoCrop?t.modal&&h(s,"cropper-modal"):h(l,Ne),t.guides||h($(l,"cropper-dashed"),Ne),t.center||h($(l,"cropper-center"),Ne),t.background&&h(o,"cropper-bg"),t.highlight||h(c,"cropper-invisible"),t.cropBoxMovable&&(h(c,"cropper-move"),p(c,"action","all")),t.cropBoxResizable||(h($(l,"cropper-line"),Ne),h($(l,"cropper-point"),Ne)),e.setDragMode(t.dragMode),e.render(),e.ready=!0,e.setData(t.data),e.completing=setTimeout(function(){d(t.ready)&&y(n,ze,t.ready,!0),b(n,ze),b(n,Be,e.getData()),e.complete=!0},0)}}},{key:"unbuild",value:function(){var e=this;e.ready&&(e.complete||clearTimeout(e.completing),e.ready=!1,e.complete=!1,e.initialImageData=null,e.initialCanvasData=null,e.initialCropBoxData=null,e.containerData=null,e.canvasData=null,e.cropBoxData=null,e.unbind(),e.resetPreview(),e.previews=null,e.viewBox=null,e.cropBox=null,e.dragBox=null,e.canvas=null,e.container=null,E(e.cropper),e.cropper=null)}}],[{key:"noConflict",value:function(){return window.Cropper=Ue,i}},{key:"setDefaults",value:function(e){f(U,T(e)&&e)}}]),i}();return f(Ye.prototype,ce),f(Ye.prototype,de),f(Ye.prototype,
  Ce),f(Ye.prototype,$e),f(Ye.prototype,Fe),f(Ye.prototype,je),"undefined"!=typeof window&&(Ue=window.Cropper,window.Cropper=Ye),Ye}),Service_Quota.prototype.render=function(){var e=this;this.reloadButton.click(function(){e.reloadQuota()})},Service_Quota.prototype.reloadQuota=function(){var t=this;$.ajax({url:t.reloadButton.data("href"),method:"post",data:{_method:"PUT"},beforeSend:function(){t.reloadButton.prop("disabled",!0),t.el.find(".base-quota-used").text("..."),t.el.find(".cms-quota-used").text("..."),t.el.find(".gws-quota-used").text("..."),t.el.find(".webmail-quota-used").text("...")},success:function(e){t.reloadButton.prop("disabled",!1),t.el.find(".base-quota-used").text(e.base_quota_used_size),t.el.find(".cms-quota-used").text(e.cms_quota_used_size),t.el.find(".gws-quota-used").text(e.gws_quota_used_size),t.el.find(".webmail-quota-used").text(e.webmail_quota_used_size)}})},function(){var e,t;window.flexibility={},Array.prototype.forEach||(Array.prototype.forEach=function(e,t){if(null==this)throw new TypeError(this+"is not an object");if(!(e instanceof Function))throw new TypeError(e+" is not a function");for(var n=Object(this),i=t,r=n instanceof String?n.split(""):n,o=Math.max(Math.min(r.length,9007199254740991),0)||0,a=-1;++a<o;)a in r&&e.call(i,r[a],a,n)}),e=flexibility,t=function(){var t=function(){function t(e){if((!e.layout||e.isDirty)&&(e.layout={width:void 0,height:void 0,top:0,left:0,right:0,bottom:0}),e.style||(e.style={}),e.children||(e.children=[]),e.style.measure&&e.children&&e.children.length)throw new Error("Using custom measure function is supported only for leaf nodes.");return e.children.forEach(t),e}function ke(e){return void 0===e}function _e(e){return e===et||e===tt}function n(e){return e===nt||e===it}function Ce(e,t){if(void 0!==e.style.marginStart&&_e(t))return e.style.marginStart;var n=null;switch(t){case"row":n=e.style.marginLeft;break;case"row-reverse":n=e.style.marginRight;break;case"column":n=e.style.marginTop;break;case"column-reverse":n=e.style.marginBottom}return void 0!==n?n:void 0!==e.style.margin?e.style.margin:0}function Se(e,t){if(void 0!==e.style.marginEnd&&_e(t))return e.style.marginEnd;var n=null;switch(t){case"row":n=e.style.marginRight;break;case"row-reverse":n=e.style.marginLeft;break;case"column":n=e.style.marginBottom;break;case"column-reverse":n=e.style.marginTop}return null!=n?n:void 0!==e.style.margin?e.style.margin:0}function i(e,t){if(void 0!==e.style.paddingStart&&0<=e.style.paddingStart&&_e(t))return e.style.paddingStart;var n=null;switch(t){case"row":n=e.style.paddingLeft;break;case"row-reverse":n=e.style.paddingRight;break;case"column":n=e.style.paddingTop;break;case"column-reverse":n=e.style.paddingBottom}return null!=n&&0<=n?n:void 0!==e.style.padding&&0<=e.style.padding?e.style.padding:0}function r(e,t){if(void 0!==e.style.paddingEnd&&0<=e.style.paddingEnd&&_e(t))return e.style.paddingEnd;var n=null;switch(t){case"row":n=e.style.paddingRight;break;case"row-reverse":n=e.style.paddingLeft;break;case"column":n=e.style.paddingBottom;break;case"column-reverse":n=e.style.paddingTop}return null!=n&&0<=n?n:void 0!==e.style.padding&&0<=e.style.padding?e.style.padding:0}function $e(e,t){if(void 0!==e.style.borderStartWidth&&0<=e.style.borderStartWidth&&_e(t))return e.style.borderStartWidth;var n=null;switch(t){case"row":n=e.style.borderLeftWidth;break;case"row-reverse":n=e.style.borderRightWidth;break;case"column":n=e.style.borderTopWidth;break;case"column-reverse":n=e.style.borderBottomWidth}return null!=n&&0<=n?n:void 0!==e.style.borderWidth&&0<=e.style.borderWidth?e.style.borderWidth:0}function o(e,t){if(void 0!==e.style.borderEndWidth&&0<=e.style.borderEndWidth&&_e(t))return e.style.borderEndWidth;var n=null;switch(t){case"row":n=e.style.borderRightWidth;break;case"row-reverse":n=e.style.borderLeftWidth;break;case"column":n=e.style.borderBottomWidth;break;case"column-reverse":n=e.style.borderTopWidth}return null!=n&&0<=n?n:void 0!==e.style.borderWidth&&0<=e.style.borderWidth?e.style.borderWidth:0}function Te(e,t){return i(e,t)+$e(e,t)}function Me(e,t){return r(e,t)+o(e,t)}function De(e,t){return $e(e,t)+o(e,t)}function Ee(e,t){return Ce(e,t)+Se(e,t)}function Ie(e,t){return Te(e,t)+Me(e,t)}function Pe(e){return e.style.justifyContent?e.style.justifyContent:"flex-start"}function Le(e){return e.style.alignContent?e.style.alignContent:"flex-start"}function Oe(e,t){return t.style.alignSelf?t.style.alignSelf:e.style.alignItems?e.style.alignItems:"stretch"}function Fe(e,t){if(t===c){if(e===et)return tt;if(e===tt)return et}return e}function je(e,t){var n;return(n=e.style.direction?e.style.direction:s)===s&&(n=void 0===t?l:t),n}function Ae(e){return e.style.flexDirection?e.style.flexDirection:nt}function Ne(e,t){return n(e)?Fe(et,t):nt}function We(e){return e.style.position?e.style.position:"relative"}function He(e){return We(e)===pt&&0<e.style.flex}function ze(e){return"wrap"===e.style.flexWrap}function Be(e,t){return e.layout[yt[t]]+Ee(e,t)}function Re(e,t){return void 0!==e.style[yt[t]]&&0<=e.style[yt[t]]}function qe(e,t){return void 0!==e.style[t]}function Ue(e){return void 0!==e.style.measure}function Ye(e,t){return void 0!==e.style[t]?e.style[t]:0}function Ge(e,t,n){var i={row:e.style.minWidth,"row-reverse":e.style.minWidth,column:e.style.minHeight,"column-reverse":e.style.minHeight}[t],r={row:e.style.maxWidth,"row-reverse":e.style.maxWidth,column:e.style.maxHeight,"column-reverse":e.style.maxHeight}[t],o=n;return void 0!==r&&0<=r&&r<o&&(o=r),void 0!==i&&0<=i&&o<i&&(o=i),o}function Xe(e,t){return t<e?e:t}function Ve(e,t){void 0===e.layout[yt[t]]&&Re(e,t)&&(e.layout[yt[t]]=Xe(Ge(e,t,e.style[yt[t]]),Ie(e,t)))}function Je(e,t,n){t.layout[gt[n]]=e.layout[yt[n]]-t.layout[yt[n]]-t.layout[vt[n]]}function Ke(e,t){return void 0!==e.style[mt[t]]?Ye(e,mt[t]):-Ye(e,gt[t])}function a(e,t,n,i){var r=je(e,i),o=Fe(Ae(e),r),a=Ne(o,r),s=Fe(et,r);Ve(e,o),Ve(e,a),e.layout.direction=r,e.layout[mt[o]]+=Ce(e,o)+Ke(e,o),e.layout[gt[o]]+=Se(e,o)+Ke(e,o),e.layout[mt[a]]+=Ce(e,a)+Ke(e,a),e.layout[gt[a]]+=Se(e,a)+Ke(e,a);var l=e.children.length,c=Ie(e,s),u=Ie(e,nt);if(Ue(e)){var d=!ke(e.layout[yt[s]]),h=Ze;h=Re(e,s)?e.style.width:d?e.layout[yt[s]]:t-Ee(e,s),h-=c;var p=Ze;p=Re(e,nt)?e.style.height:ke(e.layout[yt[nt]])?n-Ee(e,s):e.layout[yt[nt]],p-=Ie(e,nt);var f=!Re(e,s)&&!d,m=!Re(e,nt)&&ke(e.layout[yt[nt]]);if(f||m){var g=e.style.measure(h,p);f&&(e.layout.width=g.width+c),m&&(e.layout.height=g.height+u)}if(0===l)return}var v,y,b,x,w=ze(e),k=Pe(e),_=Te(e,o),C=Te(e,a),S=Ie(e,o),$=Ie(e,a),T=!ke(e.layout[yt[o]]),M=!ke(e.layout[yt[a]]),D=_e(o),E=null,I=null,P=Ze;T&&(P=e.layout[yt[o]]-S);for(var L=0,O=0,F=0,j=0,A=0,N=0;O<l;){var W,H,z=0,B=0,R=0,q=0,U=T&&k===rt||!T&&k!==ot,Y=U?l:L,G=!0,X=l,V=null,J=null,K=_,Q=0;for(v=L;v<l;++v){if((b=e.children[v]).lineIndex=N,b.nextAbsoluteChild=null,b.nextFlexChild=null,(se=Oe(e,b))===ht&&We(b)===pt&&M&&!Re(b,a))b.layout[yt[a]]=Xe(Ge(b,a,e.layout[yt[a]]-$-Ee(b,a)),Ie(b,a));else if(We(b)===ft)for(null===E&&(E=b),null!==I&&(I.nextAbsoluteChild=b),I=b,y=0;y<2;y++)x=0!==y?et:nt,!ke(e.layout[yt[x]])&&!Re(b,x)&&qe(b,mt[x])&&qe(b,gt[x])&&(b.layout[yt[x]]=Xe(Ge(b,x,e.layout[yt[x]]-Ie(e,x)-Ee(b,x)-Ye(b,mt[x])-Ye(b,gt[x])),Ie(b,x)));var Z=0;if(T&&He(b)?(B++,R+=b.style.flex,null===V&&(V=b),null!==J&&(J.nextFlexChild=b),Z=Ie(J=b,o)+Ee(b,o)):(H=W=Ze,D?H=Re(e,nt)?e.layout[yt[nt]]-u:n-Ee(e,nt)-u:W=Re(e,s)?e.layout[yt[s]]-c:t-Ee(e,s)-c,0===F&&Qe(b,W,H,r),We(b)===pt&&(q++,Z=Be(b,o))),w&&T&&P<z+Z&&v!==L){q--,F=1;break}U&&(We(b)!==pt||He(b))&&(U=!1,Y=v),G&&(We(b)!==pt||se!==ht&&se!==ct||ke(b.layout[yt[a]]))&&(G=!1,X=v),U&&(b.layout[vt[o]]+=K,T&&Je(e,b,o),K+=Be(b,o),Q=Xe(Q,Ge(b,a,Be(b,a)))),G&&(b.layout[vt[a]]+=j+C,M&&Je(e,b,a)),F=0,z+=Z,O=v+1}var ee=0,te=0,ne=0;if(ne=T?P-z:Xe(z,0)-z,0!==B){var ie,re,oe=ne/R;for(J=V;null!==J;)(ie=oe*J.style.flex+Ie(J,o))!==(re=Ge(J,o,ie))&&(ne-=re,R-=J.style.flex),J=J.nextFlexChild;for((oe=ne/R)<0&&(oe=0),J=V;null!==J;)J.layout[yt[o]]=Ge(J,o,oe*J.style.flex+Ie(J,o)),W=Ze,Re(e,s)?W=e.layout[yt[s]]-c:D||(W=t-Ee(e,s)-c),H=Ze,Re(e,nt)?H=e.layout[yt[nt]]-u:D&&(H=n-Ee(e,nt)-u),Qe(J,W,H,r),J=(b=J).nextFlexChild,b.nextFlexChild=null}else k!==rt&&(k===ot?ee=ne/2:k===at?ee=ne:k===st?(ne=Xe(ne,0),te=B+q-1!=0?ne/(B+q-1):0):k===lt&&(ee=(te=ne/(B+q))/2));for(K+=ee,v=Y;v<O;++v)We(b=e.children[v])===ft&&qe(b,mt[o])?b.layout[vt[o]]=Ye(b,mt[o])+$e(e,o)+Ce(b,o):(b.layout[vt[o]]+=K,T&&Je(e,b,o),We(b)===pt&&(K+=te+Be(b,o),Q=Xe(Q,Ge(b,a,Be(b,a)))));var ae=e.layout[yt[a]];for(M||(ae=Xe(Ge(e,a,Q+$),$)),v=X;v<O;++v)if(We(b=e.children[v])===ft&&qe(b,mt[a]))b.layout[vt[a]]=Ye(b,mt[a])+$e(e,a)+Ce(b,a);else{var se,le=C;if(We(b)===pt)if((se=Oe(e,b))===ht)ke(b.layout[yt[a]])&&(b.layout[yt[a]]=Xe(Ge(b,a,ae-$-Ee(b,a)),Ie(b,a)));else if(se!==ct){var ce=ae-$-Be(b,a);le+=se===ut?ce/2:ce}b.layout[vt[a]]+=j+le,M&&Je(e,b,a)}j+=Q,A=Xe(A,K),N+=1,L=O}if(1<N&&M){var ue=e.layout[yt[a]]-$,de=ue-j,he=0,pe=C,fe=Le(e);fe===dt?pe+=de:fe===ut?pe+=de/2:fe===ht&&j<ue&&(he=de/N);var me=0;for(v=0;v<N;++v){var ge=me,ve=0;for(y=ge;y<l;++y)if(We(b=e.children[y])===pt){if(b.lineIndex!==v)break;ke(b.layout[yt[a]])||(ve=Xe(ve,b.layout[yt[a]]+Ee(b,a)))}for(me=y,ve+=he,y=ge;y<me;++y)if(We(b=e.children[y])===pt){var ye=Oe(e,b);if(ye===ct)b.layout[vt[a]]=pe+Ce(b,a);else if(ye===dt)b.layout[vt[a]]=pe+ve-Se(b,a)-b.layout[yt[a]];else if(ye===ut){var be=b.layout[yt[a]];b.layout[vt[a]]=pe+(ve-be)/2}else ye===ht&&(b.layout[vt[a]]=pe+Ce(b,a))}pe+=ve}}var xe=!1,we=!1;if(T||(e.layout[yt[o]]=Xe(Ge(e,o,A+Me(e,o)),S),(o===tt||o===it)&&(xe=!0)),M||(e.layout[yt[a]]=Xe(Ge(e,a,j+$),$),(a===tt||a===it)&&(we=!0)),xe||we)for(v=0;v<l;++v)b=e.children[v],xe&&Je(e,b,o),we&&Je(e,b,a);for(I=E;null!==I;){for(y=0;y<2;y++)x=0!==y?et:nt,!ke(e.layout[yt[x]])&&!Re(I,x)&&qe(I,mt[x])&&qe(I,gt[x])&&(I.layout[yt[x]]=Xe(Ge(I,x,e.layout[yt[x]]-De(e,x)-Ee(I,x)-Ye(I,mt[x])-Ye(I,gt[x])),Ie(I,x))),qe(I,gt[x])&&!qe(I,mt[x])&&(I.layout[mt[x]]=e.layout[yt[x]]-I.layout[yt[x]]-Ye(I,gt[x]));I=(b=I).nextAbsoluteChild,b.nextAbsoluteChild=null}}function Qe(e,t,n,i){e.shouldUpdate=!0;var r=e.style.direction||l;!e.isDirty&&e.lastLayout&&e.lastLayout.requestedHeight===e.layout.height&&e.lastLayout.requestedWidth===e.layout.width&&e.lastLayout.parentMaxWidth===t&&e.lastLayout.parentMaxHeight===n&&e.lastLayout.direction===r?(e.layout.width=e.lastLayout.width,e.layout.height=e.lastLayout.height,e.layout.top=e.lastLayout.top,e.layout.left=e.lastLayout.left):(e.lastLayout||(e.lastLayout={}),e.lastLayout.requestedWidth=e.layout.width,e.lastLayout.requestedHeight=e.layout.height,e.lastLayout.parentMaxWidth=t,e.lastLayout.parentMaxHeight=n,e.lastLayout.direction=r,e.children.forEach(function(e){e.layout.width=void 0,e.layout.height=void 0,e.layout.top=0,e.layout.left=0}),a(e,t,n,i),e.lastLayout.width=e.layout.width,e.lastLayout.height=e.layout.height,e.lastLayout.top=e.layout.top,e.lastLayout.left=e.layout.left)}var Ze,s="inherit",l="ltr",c="rtl",et="row",tt="row-reverse",nt="column",it="column-reverse",rt="flex-start",ot="center",at="flex-end",st="space-between",lt="space-around",ct="flex-start",ut="center",dt="flex-end",ht="stretch",pt="relative",ft="absolute",mt={row:"left","row-reverse":"right",column:"top","column-reverse":"bottom"},gt={row:"right","row-reverse":"left",column:"bottom","column-reverse":"top"},vt={row:"left","row-reverse":"right",column:"top","column-reverse":"bottom"},yt={row:"width","row-reverse":"width",column:"height","column-reverse":"height"};return{layoutNodeImpl:a,computeLayout:Qe,fillNodes:t}}();return"object"==typeof exports&&(module.exports=t),function(e){t.fillNodes(e),t.computeLayout(e)}},"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.computeLayout=t(),!window.addEventListener&&window.attachEvent&&(Window.prototype.addEventListener=HTMLDocument.prototype.addEventListener=Element.prototype.addEventListener=function(e,t){this.attachEvent("on"+e,t)},Window.prototype.removeEventListener=HTMLDocument.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,t){this.detachEvent("on"+e,t)}),flexibility.detect=function(){var e=document.createElement("p");try{return(e.style.display="flex")===e.style.display}catch(i){return!1}},!flexibility.detect()&&document.attachEvent&&document.documentElement.currentStyle&&document.attachEvent("onreadystatechange",function(){flexibility.onresize({target:document.documentElement})}),flexibility.init=function(e){var t=e.onlayoutcomplete;return t||(t=e.onlayoutcomplete={node:e,style:{},children:[]}),t.style.display=e.currentStyle["-js-display"]||e.currentStyle.display,t};var n,i=1e3,r=15,o=document.documentElement,a=0,s=0;flexibility.onresize=function(e){if(o.clientWidth!==a||o.clientHeight!==s){a=o.clientWidth,s=o.clientHeight,clearTimeout(n),window.removeEventListener("resize",flexibility.onresize);var t=e.target&&1===e.target.nodeType?e.target:document.documentElement;flexibility.walk(t),n=setTimeout(function(){window.addEventListener("resize",flexibility.onresize)},i/r)}};var c={alignContent:{initial:"stretch",valid:/^(flex-start|flex-end|center|space-between|space-around|stretch)/},alignItems:{initial:"stretch",valid:/^(flex-start|flex-end|center|baseline|stretch)$/},boxSizing:{initial:"content-box",valid:/^(border-box|content-box)$/},flexDirection:{initial:"row",valid:/^(row|row-reverse|column|column-reverse)$/},flexWrap:{initial:"nowrap",valid:/^(nowrap|wrap|wrap-reverse)$/},justifyContent:{initial:"flex-start",valid:/^(flex-start|flex-end|center|space-between|space-around)$/}};flexibility.updateFlexContainerCache=function(e){var t=e.style,n=e.node.currentStyle,i=e.node.style,r={};for(var o in(n["flex-flow"]||i["flex-flow"]||"").replace(/^(row|row-reverse|column|column-reverse)\s+(nowrap|wrap|wrap-reverse)$/i,function(e,t,n){r.flexDirection=t,r.flexWrap=n}),c){var a=o.replace(/[A-Z]/g,"-$&").toLowerCase(),s=c[o],l=n[a]||i[a];t[o]=s.valid.test(l)?l:r[o]||s.initial}};var u={alignSelf:{initial:"auto",valid:/^(auto|flex-start|flex-end|center|baseline|stretch)$/},boxSizing:{initial:"content-box",valid:/^(border-box|content-box)$/},flexBasis:{initial:"auto",valid:/^((?:[-+]?0|[-+]?[0-9]*\.?[0-9]+(?:%|ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmax|vmin|vw))|auto|fill|max-content|min-content|fit-content|content)$/},flexGrow:{initial:0,valid:/^\+?(0|[1-9][0-9]*)$/},flexShrink:{initial:0,valid:/^\+?(0|[1-9][0-9]*)$/},order:{initial:0,valid:/^([-+]?[0-9]+)$/}};flexibility.updateFlexItemCache=function(e){var t=e.style,n=e.node.currentStyle,i=e.node.style,r={};for(var o in(n.flex||i.flex||"").replace(/^\+?(0|[1-9][0-9]*)/,function(e){r.flexGrow=e}),u){var a=o.replace(/[A-Z]/g,"-$&").toLowerCase(),s=u[o],l=n[a]||i[a];t[o]=s.valid.test(l)?l:r[o]||s.initial,"number"==typeof s.initial&&(t[o]=parseFloat(t[o]))}};var h="border:0 solid;clip:rect(0 0 0 0);display:inline-block;font:0/0 serif;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;overflow:hidden;padding:0;position:absolute;width:1em;",p={medium:4,none:0,thick:6,thin:2},f={borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,height:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxHeight:0,maxWidth:0,minHeight:0,minWidth:0,width:0},m=/^([-+]?0|[-+]?[0-9]*\.?[0-9]+)/,g=100;flexibility.updateLengthCache=function(e){var t,n,i,r=e.node,o=e.style,a=r.parentNode,s=document.createElement("_"),l=s.runtimeStyle,c=r.currentStyle;for(var u in l.cssText=h+"font-size:"+c.fontSize,a.insertBefore(s,r.nextSibling),o.fontSize=s.offsetWidth,l.fontSize=o.fontSize+"px",f){var d=c[u];m.test(d)||"auto"===d&&!/(width|height)/i.test(u)?/%$/.test(d)?(/^(bottom|height|top)$/.test(u)?(n||(n=a.offsetHeight),i=n):(t||(t=a.offsetWidth),i=t),o[u]=parseFloat(d)*i/g):(l.width=d,o[u]=s.offsetWidth):/^border/.test(u)&&d in p?o[u]=p[d]:delete o[u]}a.removeChild(s),"none"===c.borderTopStyle&&(o.borderTopWidth=0),"none"===c.borderRightStyle&&(o.borderRightWidth=0),"none"===c.borderBottomStyle&&(o.borderBottomWidth=0),"none"===c.borderLeftStyle&&(o.borderLeftWidth=0),o.width||o.minWidth||(/flex/.test(o.display)?o.width=r.offsetWidth:o.minWidth=r.offsetWidth),o.height||o.minHeight||/flex/.test(o.display)||(o.minHeight=r.offsetHeight)},flexibility.walk=function(e){var r=flexibility.init(e),o=r.style,t=o.display;if("none"===t)return{};var a=t.match(/^(inline)?flex$/);if(a&&(flexibility.updateFlexContainerCache(r),e.runtimeStyle.cssText="display:"+(a[1]?"inline-block":"block"),r.children=[]),Array.prototype.forEach.call(e.childNodes,function(e,t){if(1===e.nodeType){var n=flexibility.walk(e),i=n.style;n.index=t,a&&(flexibility.updateFlexItemCache(n),"auto"===i.alignSelf&&(i.alignSelf=o.alignItems),i.flex=i.flexGrow,e.runtimeStyle.cssText="display:inline-block",r.children.push(n))}}),a){r.children.forEach(function(e){flexibility.updateLengthCache(e)}),r.children.sort(function(e,t){return e.style.order-t.style.order||e.index-t.index}),/-reverse$/.test(o.flexDirection)&&(r.children.reverse(),o.flexDirection=o.flexDirection.replace(/-reverse$/,""),"flex-start"===o.justifyContent?o.justifyContent="flex-end":"flex-end"===o.justifyContent&&(o.justifyContent="flex-start")),flexibility.updateLengthCache(r),delete r.lastLayout,delete r.layout;var n=o.borderTopWidth,i=o.borderBottomWidth;o.borderTopWidth=0,o.borderBottomWidth=0,o.borderLeftWidth=0,"column"===o.flexDirection&&(o.width-=o.borderRightWidth),flexibility.computeLayout(r),e.runtimeStyle.cssText="box-sizing:border-box;display:block;position:relative;width:"+(r.layout.width+o.borderRightWidth)+"px;height:"+(r.layout.height+n+i)+"px";var s=[],l=1,c="column"===o.flexDirection?"width":"height";r.children.forEach(function(e){s[e.lineIndex]=Math.max(s[e.lineIndex]||0,e.layout[c]),l=Math.max(l,e.lineIndex+1)}),r.children.forEach(function(e){var t=e.layout;"stretch"===e.style.alignSelf&&(t[c]=s[e.lineIndex]),e.node.runtimeStyle.cssText="box-sizing:border-box;display:block;position:absolute;margin:0;width:"+t.width+"px;height:"+t.height+"px;top:"+t.top+"px;left:"+t.left+"px"})}return r}}(),Cms_ReadableSetting.prototype.render=function(){var e=this;this.el.find(".buttons input").change(function(){"select"==$(this).val()?e.showSelectForm():e.hideSelectForm()}),"select"==this.el.find(".buttons input:checked").val()?this.el.find(".cms-addon-readable-setting-select").show():this.el.find(".cms-addon-readable-setting-select").hide()},Cms_ReadableSetting.prototype.showSelectForm=function(){this.el.find(".cms-addon-readable-setting-select").slideDown("fast")},Cms_ReadableSetting.prototype.hideSelectForm=function(){this.el.find(".cms-addon-readable-setting-select").slideUp("fast")},function(U){var Y={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0}};U.fn.bxSlider=function(t){if(0===this.length)return this;if(1<this.length)return this.each(function(){U(this).bxSlider(t)}),this;var u={},d=this,n=U(window).width(),r=U(window).height();if(!U(d).data("bxSlider")){var o=function(){U(d).data("bxSlider")||(u.settings=U.extend({},Y,t),u.settings.slideWidth=parseInt(u.settings.slideWidth),u.children=d.children(u.settings.slideSelector),u.children.length<u.settings.minSlides&&(u.settings.minSlides=u.children.length),u.children.length<u.settings.maxSlides&&(u.settings.maxSlides=u.children.length),u.settings.randomStart&&(u.settings.startSlide=Math.floor(Math.random()*u.children.length)),u.active={index:u.settings.startSlide},u.carousel=1<u.settings.minSlides||1<u.settings.maxSlides,u.carousel&&(u.settings.preloadImages="all"),u.minThreshold=u.settings.minSlides*u.settings.slideWidth+(u.settings.minSlides-1)*u.settings.slideMargin,u.maxThreshold=u.settings.maxSlides*u.settings.slideWidth+(u.settings.maxSlides-1)*u.settings.slideMargin,u.working=!1,u.controls={},u.interval=null,u.animProp="vertical"===u.settings.mode?"top":"left",u.usingCSS=u.settings.useCSS&&"fade"!==u.settings.mode&&function(){for(var e=document.createElement("div"),t=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],n=0;n<t.length;n++)if(e.style[t[n]]!==undefined)return u.cssPrefix=t[n].replace("Perspective","").toLowerCase(),u.animProp="-"+u.cssPrefix+"-transform",!0;return!1}(),"vertical"===u.settings.mode&&(u.settings.maxSlides=u.settings.minSlides),d.data("origStyle",d.attr("style")),d.children(u.settings.slideSelector).each(function(){U(this).data("origStyle",U(this).attr("style"))}),e())},e=function(){var e=u.children.eq(u.settings.startSlide);d.wrap('<div class="'+u.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),u.viewport=d.parent(),u.settings.ariaLive&&!u.settings.ticker&&u.viewport.attr("aria-live","polite"),u.loader=U('<div class="bx-loading" />'),u.viewport.prepend(u.loader),d.css({width:"horizontal"===u.settings.mode?1e3*u.children.length+215+"%":"auto",position:"relative"}),u.usingCSS&&u.settings.easing?d.css("-"+u.cssPrefix+"-transition-timing-function",u.settings.easing):u.settings.easing||(u.settings.easing="swing"),u.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),u.viewport.parent().css({maxWidth:l()}),u.settings.pager||u.settings.controls||u.viewport.parent().css({margin:"0 auto 0px"}),u.children.css({"float":"horizontal"===u.settings.mode?"left":"none",listStyle:"none",position:"relative"}),u.children.css("width",c()),"horizontal"===u.settings.mode&&0<u.settings.slideMargin&&u.children.css("marginRight",u.settings.slideMargin),"vertical"===u.settings.mode&&0<u.settings.slideMargin&&u.children.css("marginBottom",u.settings.slideMargin),"fade"===u.settings.mode&&(u.children.css({position:"absolute",zIndex:0,display:"none"}),u.children.eq(u.settings.startSlide).css({zIndex:u.settings.slideZIndex,display:"block"})),u.controls.el=U('<div class="bx-controls" />'),u.settings.captions&&k(),u.active.last=u.settings.startSlide===f()-1,u.settings.video&&d.fitVids(),("all"===u.settings.preloadImages||u.settings.ticker)&&(e=u.children),u.settings.ticker?u.settings.pager=!1:(u.settings.controls&&x(),u.settings.auto&&u.settings.autoControls&&w(),u.settings.pager&&b(),(u.settings.controls||u.settings.autoControls||u.settings.pager)&&u.viewport.after(u.controls.el)),a(e,s)},a=function(e,t){var n=e.find('img:not([src=""]), iframe').length,i=0;0!==n?e.find('img:not([src=""]), iframe').each(function(){U(this).one("load error",function(){++i===n&&t()}).each(function(){this.complete&&U(this).load()})}):t()},s=function(){if(u.settings.infiniteLoop&&"fade"!==u.settings.mode&&!u.settings.ticker){var e="vertical"===u.settings.mode?u.settings.minSlides:u.settings.maxSlides,t=u.children.slice(0,e).clone(!0).addClass("bx-clone"),n=u.children.slice(-e).clone(!0).addClass("bx-clone");u.settings.ariaHidden&&(t.attr("aria-hidden",!0),n.attr("aria-hidden",!0)),d.append(t).prepend(n)}u.loader.remove(),g(),"vertical"===u.settings.mode&&(u.settings.adaptiveHeight=!0),u.viewport.height(h()),d.redrawSlider(),u.settings.onSliderLoad.call(d,u.active.index),u.initialized=!0,u.settings.responsive&&U(window).bind("resize",B),u.settings.auto&&u.settings.autoStart&&(1<f()||u.settings.autoSlideForOnePage)&&P(),u.settings.ticker&&L(),u.settings.pager&&M(u.settings.startSlide),u.settings.controls&&I(),u.settings.touchEnabled&&!u.settings.ticker&&A(),u.settings.keyboardEnabled&&!u.settings.ticker&&U(document).keydown(j)},h=function(){var e=0,t=U();if("vertical"===u.settings.mode||u.settings.adaptiveHeight)if(u.carousel){var n=1===u.settings.moveSlides?u.active.index:u.active.index*m();for(t=u.children.eq(n),i=1;i<=u.settings.maxSlides-1;i++)t=n+i>=u.children.length?t.add(u.children.eq(i-1)):t.add(u.children.eq(n+i))}else t=u.children.eq(u.active.index);else t=u.children;return"vertical"===u.settings.mode?(t.each(function(){e+=U(this).outerHeight()}),0<u.settings.slideMargin&&(e+=u.settings.slideMargin*(u.settings.minSlides-1))):e=Math.max.apply(Math,t.map(function(){return U(this).outerHeight(!1)}).get()),"border-box"===u.viewport.css("box-sizing")?e+=parseFloat(u.viewport.css("padding-top"))+parseFloat(u.viewport.css("padding-bottom"))+parseFloat(u.viewport.css("border-top-width"))+parseFloat(u.viewport.css("border-bottom-width")):"padding-box"===u.viewport.css("box-sizing")&&(e+=parseFloat(u.viewport.css("padding-top"))+parseFloat(u.viewport.css("padding-bottom"))),e},l=function(){var e="100%";return 0<u.settings.slideWidth&&(e="horizontal"===u.settings.mode?u.settings.maxSlides*u.settings.slideWidth+(u.settings.maxSlides-1)*u.settings.slideMargin:u.settings.slideWidth),e},c=function(){var e=u.settings.slideWidth,t=u.viewport.width();if(0===u.settings.slideWidth||u.settings.slideWidth>t&&!u.carousel||"vertical"===u.settings.mode)e=t;else if(1<u.settings.maxSlides&&"horizontal"===u.settings.mode){if(t>u.maxThreshold)return e;t<u.minThreshold?e=(t-u.settings.slideMargin*(u.settings.minSlides-1))/u.settings.minSlides:u.settings.shrinkItems&&(e=Math.floor((t+u.settings.slideMargin)/Math.ceil((t+u.settings.slideMargin)/(e+u.settings.slideMargin))-u.settings.slideMargin))}return e},p=function(){var e=1,t=null;return"horizontal"===u.settings.mode&&0<u.settings.slideWidth?u.viewport.width()<u.minThreshold?e=u.settings.minSlides:u.viewport.width()>u.maxThreshold?e=u.settings.maxSlides:(t=u.children.first().width()+u.settings.slideMargin,e=Math.floor((u.viewport.width()+u.settings.slideMargin)/t)):"vertical"===u.settings.mode&&(e=u.settings.minSlides),e},f=function(){var e=0,t=0,n=0;if(0<u.settings.moveSlides)if(u.settings.infiniteLoop)e=Math.ceil(u.children.length/m());else for(;t<u.children.length;)++e,t=n+p(),n+=u.settings.moveSlides<=p()?u.settings.moveSlides:p();else e=Math.ceil(u.children.length/p());return e},m=function(){return 0<u.settings.moveSlides&&u.settings.moveSlides<=p()?u.settings.moveSlides:p()},g=function(){var e,t,n;u.children.length>u.settings.maxSlides&&u.active.last&&!u.settings.infiniteLoop?"horizontal"===u.settings.mode?(e=(t=u.children.last()).position(),v(-(e.left-(u.viewport.width()-t.outerWidth())),"reset",0)):"vertical"===u.settings.mode&&(n=u.children.length-u.settings.minSlides,e=u.children.eq(n).position(),v(-e.top,"reset",0)):(e=u.children.eq(u.active.index*m()).position(),u.active.index===f()-1&&(u.active.last=!0),e!==undefined&&("horizontal"===u.settings.mode?v(-e.left,"reset",0):"vertical"===u.settings.mode&&v(-e.top,"reset",0)))},v=function(e,t,n,i){var r,o;u.usingCSS?(o="vertical"===u.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)",d.css("-"+u.cssPrefix+"-transition-duration",n/1e3+"s"),"slide"===t?(d.css(u.animProp,o),0!==n?d.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){U(e.target).is(d)&&(d.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),D())}):D()):"reset"===t?d.css(u.animProp,o):"ticker"===t&&(d.css("-"+u.cssPrefix+"-transition-timing-function","linear"),d.css(u.animProp,o),0!==n?d.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){U(e.target).is(d)&&(d.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),v(i.resetValue,"reset",0),O())}):(v(i.resetValue,"reset",0),O()))):((r={})[u.animProp]=e,"slide"===t?d.animate(r,n,u.settings.easing,function(){D()}):"reset"===t?d.css(u.animProp,e):"ticker"===t&&d.animate(r,n,"linear",function(){v(i.resetValue,"reset",0),O()}))},y=function(){for(var e="",t="",n=f(),i=0;i<n;i++)t="",u.settings.buildPager&&U.isFunction(u.settings.buildPager)||u.settings.pagerCustom?(t=u.settings.buildPager(i),u.pagerEl.addClass("bx-custom-pager")):(t=i+1,u.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+i+'" class="bx-pager-link">'+t+"</a></div>";u.pagerEl.html(e)},b=function(){u.settings.pagerCustom?u.pagerEl=U(u.settings.pagerCustom):(u.pagerEl=U('<div class="bx-pager" />'),u.settings.pagerSelector?U(u.settings.pagerSelector).html(u.pagerEl):u.controls.el.addClass("bx-has-pager").append(u.pagerEl),y()),u.pagerEl.on("click touchend","a",T)},x=function(){u.controls.next=U('<a class="bx-next" href="">'+u.settings.nextText+"</a>"),u.controls.prev=U('<a class="bx-prev" href="">'+u.settings.prevText+"</a>"),u.controls.next.bind("click touchend",_),u.controls.prev.bind("click touchend",C),u.settings.nextSelector&&U(u.settings.nextSelector).append(u.controls.next),u.settings.prevSelector&&U(u.settings.prevSelector).append(u.controls.prev),u.settings.nextSelector||u.settings.prevSelector||(u.controls.directionEl=U('<div class="bx-controls-direction" />'),u.controls.directionEl.append(u.controls.prev).append(u.controls.next),u.controls.el.addClass("bx-has-controls-direction").append(u.controls.directionEl))},w=function(){u.controls.start=U('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+u.settings.startText+"</a></div>"),u.controls.stop=U('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+u.settings.stopText+"</a></div>"),u.controls.autoEl=U('<div class="bx-controls-auto" />'),u.controls.autoEl.on("click",".bx-start",S),u.controls.autoEl.on("click",".bx-stop",$),u.settings.autoControlsCombine?u.controls.autoEl.append(u.controls.start):u.controls.autoEl.append(u.controls.start).append(u.controls.stop),u.settings.autoControlsSelector?U(u.settings.autoControlsSelector).html(u.controls.autoEl):u.controls.el.addClass("bx-has-controls-auto").append(u.controls.autoEl),E(u.settings.autoStart?"stop":"start")},k=function(){u.children.each(function(){var e=U(this).find("img:first").attr("title");e!==undefined&&(""+e).length&&U(this).append('<div class="bx-caption"><span>'+e+"</span></div>")})},_=function(e){e.preventDefault(),u.controls.el.hasClass("disabled")||(u.settings.auto&&u.settings.stopAutoOnClick&&d.stopAuto(),d.goToNextSlide())},C=function(e){e.preventDefault(),u.controls.el.hasClass("disabled")||(u.settings.auto&&u.settings.stopAutoOnClick&&d.stopAuto(),d.goToPrevSlide())},S=function(e){d.startAuto(),e.preventDefault()},$=function(e){d.stopAuto(),e.preventDefault()},T=function(e){var t,n;e.preventDefault(),u.controls.el.hasClass("disabled")||(u.settings.auto&&u.settings.stopAutoOnClick&&d.stopAuto(),(t=U(e.currentTarget)).attr("data-slide-index")!==undefined&&(n=parseInt(t.attr("data-slide-index")))!==u.active.index&&d.goToSlide(n))},M=function(n){var e=u.children.length;if("short"===u.settings.pagerType)return 1<u.settings.maxSlides&&(e=Math.ceil(u.children.length/u.settings.maxSlides)),void u.pagerEl.html(n+1+u.settings.pagerShortSeparator+e);u.pagerEl.find("a").removeClass("active"),u.pagerEl.each(function(e,t){U(t).find("a").eq(n).addClass("active")})},D=function(){if(u.settings.infiniteLoop){var e="";0===u.active.index?e=u.children.eq(0).position():u.active.index===f()-1&&u.carousel?e=u.children.eq((f()-1)*m()).position():u.active.index===u.children.length-1&&(e=u.children.eq(u.children.length-1).position()),e&&("horizontal"===u.settings.mode?v(-e.left,"reset",0):"vertical"===u.settings.mode&&v(-e.top,"reset",0))}u.working=!1,u.settings.onSlideAfter.call(d,u.children.eq(u.active.index),u.oldIndex,u.active.index)},E=function(e){u.settings.autoControlsCombine?u.controls.autoEl.html(u.controls[e]):(u.controls.autoEl.find("a").removeClass("active"),u.controls.autoEl.find("a:not(.bx-"+e+")").addClass("active"))},I=function(){1===f()?(u.controls.prev.addClass("disabled"),u.controls.next.addClass("disabled")):!u.settings.infiniteLoop&&u.settings.hideControlOnEnd&&(0===u.active.index?(u.controls.prev.addClass("disabled"),u.controls.next.removeClass("disabled")):u.active.index===f()-1?(u.controls.next.addClass("disabled"),u.controls.prev.removeClass("disabled")):(u.controls.prev.removeClass("disabled"),u.controls.next.removeClass("disabled")))},P=function(){if(0<u.settings.autoDelay)setTimeout(d.startAuto,u.settings.autoDelay
  );else d.startAuto(),U(window).focus(function(){d.startAuto()}).blur(function(){d.stopAuto()});u.settings.autoHover&&d.hover(function(){u.interval&&(d.stopAuto(!0),u.autoPaused=!0)},function(){u.autoPaused&&(d.startAuto(!0),u.autoPaused=null)})},L=function(){var e,t,n,i,r,o,a,s,l=0;"next"===u.settings.autoDirection?d.append(u.children.clone().addClass("bx-clone")):(d.prepend(u.children.clone().addClass("bx-clone")),e=u.children.first().position(),l="horizontal"===u.settings.mode?-e.left:-e.top),v(l,"reset",0),u.settings.pager=!1,u.settings.controls=!1,u.settings.autoControls=!1,u.settings.tickerHover&&(u.usingCSS?(i="horizontal"===u.settings.mode?4:5,u.viewport.hover(function(){t=d.css("-"+u.cssPrefix+"-transform"),n=parseFloat(t.split(",")[i]),v(n,"reset",0)},function(){s=0,u.children.each(function(){s+="horizontal"===u.settings.mode?U(this).outerWidth(!0):U(this).outerHeight(!0)}),r=u.settings.speed/s,o="horizontal"===u.settings.mode?"left":"top",a=r*(s-Math.abs(parseInt(n))),O(a)})):u.viewport.hover(function(){d.stop()},function(){s=0,u.children.each(function(){s+="horizontal"===u.settings.mode?U(this).outerWidth(!0):U(this).outerHeight(!0)}),r=u.settings.speed/s,o="horizontal"===u.settings.mode?"left":"top",a=r*(s-Math.abs(parseInt(d.css(o)))),O(a)})),O()},O=function(e){var t,n,i=e||u.settings.speed,r={left:0,top:0},o={left:0,top:0};"next"===u.settings.autoDirection?r=d.find(".bx-clone").first().position():o=u.children.first().position(),t="horizontal"===u.settings.mode?-r.left:-r.top,n="horizontal"===u.settings.mode?-o.left:-o.top,v(t,"ticker",i,{resetValue:n})},F=function(e){var t=U(window),n={top:t.scrollTop(),left:t.scrollLeft()},i=e.offset();return n.right=n.left+t.width(),n.bottom=n.top+t.height(),i.right=i.left+e.outerWidth(),i.bottom=i.top+e.outerHeight(),!(n.right<i.left||n.left>i.right||n.bottom<i.top||n.top>i.bottom)},j=function(e){var t=document.activeElement.tagName.toLowerCase(),n="input|textarea";if(null==new RegExp(t,["i"]).exec(n)&&F(d)){if(39===e.keyCode)return _(e),!1;if(37===e.keyCode)return C(e),!1}},A=function(){u.touch={start:{x:0,y:0},end:{x:0,y:0}},u.viewport.bind("touchstart MSPointerDown pointerdown",N),u.viewport.on("click",".bxslider a",function(e){u.viewport.hasClass("click-disabled")&&(e.preventDefault(),u.viewport.removeClass("click-disabled"))})},N=function(e){if(u.controls.el.addClass("disabled"),u.working)e.preventDefault(),u.controls.el.removeClass("disabled");else{u.touch.originalPos=d.position();var t=e.originalEvent,n="undefined"!=typeof t.changedTouches?t.changedTouches:[t];u.touch.start.x=n[0].pageX,u.touch.start.y=n[0].pageY,u.viewport.get(0).setPointerCapture&&(u.pointerId=t.pointerId,u.viewport.get(0).setPointerCapture(u.pointerId)),u.viewport.bind("touchmove MSPointerMove pointermove",H),u.viewport.bind("touchend MSPointerUp pointerup",z),u.viewport.bind("MSPointerCancel pointercancel",W)}},W=function(){v(u.touch.originalPos.left,"reset",0),u.controls.el.removeClass("disabled"),u.viewport.unbind("MSPointerCancel pointercancel",W),u.viewport.unbind("touchmove MSPointerMove pointermove",H),u.viewport.unbind("touchend MSPointerUp pointerup",z),u.viewport.get(0).releasePointerCapture&&u.viewport.get(0).releasePointerCapture(u.pointerId)},H=function(e){var t=e.originalEvent,n="undefined"!=typeof t.changedTouches?t.changedTouches:[t],i=Math.abs(n[0].pageX-u.touch.start.x),r=Math.abs(n[0].pageY-u.touch.start.y),o=0,a=0;r<3*i&&u.settings.preventDefaultSwipeX?e.preventDefault():i<3*r&&u.settings.preventDefaultSwipeY&&e.preventDefault(),"fade"!==u.settings.mode&&u.settings.oneToOneTouch&&("horizontal"===u.settings.mode?(a=n[0].pageX-u.touch.start.x,o=u.touch.originalPos.left+a):(a=n[0].pageY-u.touch.start.y,o=u.touch.originalPos.top+a),v(o,"reset",0))},z=function(e){u.viewport.unbind("touchmove MSPointerMove pointermove",H),u.controls.el.removeClass("disabled");var t=e.originalEvent,n="undefined"!=typeof t.changedTouches?t.changedTouches:[t],i=0,r=0;u.touch.end.x=n[0].pageX,u.touch.end.y=n[0].pageY,"fade"===u.settings.mode?(r=Math.abs(u.touch.start.x-u.touch.end.x))>=u.settings.swipeThreshold&&(u.touch.start.x>u.touch.end.x?d.goToNextSlide():d.goToPrevSlide(),d.stopAuto()):("horizontal"===u.settings.mode?(r=u.touch.end.x-u.touch.start.x,i=u.touch.originalPos.left):(r=u.touch.end.y-u.touch.start.y,i=u.touch.originalPos.top),!u.settings.infiniteLoop&&(0===u.active.index&&0<r||u.active.last&&r<0)?v(i,"reset",200):Math.abs(r)>=u.settings.swipeThreshold?(r<0?d.goToNextSlide():d.goToPrevSlide(),d.stopAuto()):v(i,"reset",200)),u.viewport.unbind("touchend MSPointerUp pointerup",z),u.viewport.get(0).releasePointerCapture&&u.viewport.get(0).releasePointerCapture(u.pointerId)},B=function(){if(u.initialized)if(u.working)window.setTimeout(B,10);else{var e=U(window).width(),t=U(window).height();n===e&&r===t||(n=e,r=t,d.redrawSlider(),u.settings.onSliderResize.call(d,u.active.index))}},R=function(e){var t=p();u.settings.ariaHidden&&!u.settings.ticker&&(u.children.attr("aria-hidden","true"),u.children.slice(e,e+t).attr("aria-hidden","false"))},q=function(e){return e<0?u.settings.infiniteLoop?f()-1:u.active.index:e>=f()?u.settings.infiniteLoop?0:u.active.index:e};return d.goToSlide=function(e,t){var n,i,r,o,a=!0,s=0,l={left:0,top:0},c=null;if(u.oldIndex=u.active.index,u.active.index=q(e),!u.working&&u.active.index!==u.oldIndex){if(u.working=!0,void 0!==(a=u.settings.onSlideBefore.call(d,u.children.eq(u.active.index),u.oldIndex,u.active.index))&&!a)return u.active.index=u.oldIndex,void(u.working=!1);"next"===t?u.settings.onSlideNext.call(d,u.children.eq(u.active.index),u.oldIndex,u.active.index)||(a=!1):"prev"===t&&(u.settings.onSlidePrev.call(d,u.children.eq(u.active.index),u.oldIndex,u.active.index)||(a=!1)),u.active.last=u.active.index>=f()-1,(u.settings.pager||u.settings.pagerCustom)&&M(u.active.index),u.settings.controls&&I(),"fade"===u.settings.mode?(u.settings.adaptiveHeight&&u.viewport.height()!==h()&&u.viewport.animate({height:h()},u.settings.adaptiveHeightSpeed),u.children.filter(":visible").fadeOut(u.settings.speed).css({zIndex:0}),u.children.eq(u.active.index).css("zIndex",u.settings.slideZIndex+1).fadeIn(u.settings.speed,function(){U(this).css("zIndex",u.settings.slideZIndex),D()})):(u.settings.adaptiveHeight&&u.viewport.height()!==h()&&u.viewport.animate({height:h()},u.settings.adaptiveHeightSpeed),!u.settings.infiniteLoop&&u.carousel&&u.active.last?"horizontal"===u.settings.mode?(l=(c=u.children.eq(u.children.length-1)).position(),s=u.viewport.width()-c.outerWidth()):(n=u.children.length-u.settings.minSlides,l=u.children.eq(n).position()):u.carousel&&u.active.last&&"prev"===t?(i=1===u.settings.moveSlides?u.settings.maxSlides-m():(f()-1)*m()-(u.children.length-u.settings.maxSlides),l=(c=d.children(".bx-clone").eq(i)).position()):"next"===t&&0===u.active.index?(l=d.find("> .bx-clone").eq(u.settings.maxSlides).position(),u.active.last=!1):0<=e&&(o=e*parseInt(m()),l=u.children.eq(o).position()),void 0!==l?(r="horizontal"===u.settings.mode?-(l.left-s):-l.top,v(r,"slide",u.settings.speed)):u.working=!1),u.settings.ariaHidden&&R(u.active.index*m())}},d.goToNextSlide=function(){if(u.settings.infiniteLoop||!u.active.last){var e=parseInt(u.active.index)+1;d.goToSlide(e,"next")}},d.goToPrevSlide=function(){if(u.settings.infiniteLoop||0!==u.active.index){var e=parseInt(u.active.index)-1;d.goToSlide(e,"prev")}},d.startAuto=function(e){u.interval||(u.interval=setInterval(function(){"next"===u.settings.autoDirection?d.goToNextSlide():d.goToPrevSlide()},u.settings.pause),u.settings.autoControls&&!0!==e&&E("stop"))},d.stopAuto=function(e){u.interval&&(clearInterval(u.interval),u.interval=null,u.settings.autoControls&&!0!==e&&E("start"))},d.getCurrentSlide=function(){return u.active.index},d.getCurrentSlideElement=function(){return u.children.eq(u.active.index)},d.getSlideElement=function(e){return u.children.eq(e)},d.getSlideCount=function(){return u.children.length},d.isWorking=function(){return u.working},d.redrawSlider=function(){u.children.add(d.find(".bx-clone")).outerWidth(c()),u.viewport.css("height",h()),u.settings.ticker||g(),u.active.last&&(u.active.index=f()-1),u.active.index>=f()&&(u.active.last=!0),u.settings.pager&&!u.settings.pagerCustom&&(y(),M(u.active.index)),u.settings.ariaHidden&&R(u.active.index*m())},d.destroySlider=function(){u.initialized&&(u.initialized=!1,U(".bx-clone",this).remove(),u.children.each(function(){U(this).data("origStyle")!==undefined?U(this).attr("style",U(this).data("origStyle")):U(this).removeAttr("style")}),U(this).data("origStyle")!==undefined?this.attr("style",U(this).data("origStyle")):U(this).removeAttr("style"),U(this).unwrap().unwrap(),u.controls.el&&u.controls.el.remove(),u.controls.next&&u.controls.next.remove(),u.controls.prev&&u.controls.prev.remove(),u.pagerEl&&u.settings.controls&&!u.settings.pagerCustom&&u.pagerEl.remove(),U(".bx-caption",this).remove(),u.controls.autoEl&&u.controls.autoEl.remove(),clearInterval(u.interval),u.settings.responsive&&U(window).unbind("resize",B),u.settings.keyboardEnabled&&U(document).unbind("keydown",j),U(this).removeData("bxSlider"))},d.reloadSlider=function(e){e!==undefined&&(t=e),d.destroySlider(),o(),U(d).data("bxSlider",this)},o(),U(d).data("bxSlider",this),this}}}(jQuery),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,t,n,i,r){return jQuery.easing[jQuery.easing.def](e,t,n,i,r)},easeInQuad:function(e,t,n,i,r){return i*(t/=r)*t+n},easeOutQuad:function(e,t,n,i,r){return-i*(t/=r)*(t-2)+n},easeInOutQuad:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t+n:-i/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,i,r){return i*(t/=r)*t*t+n},easeOutCubic:function(e,t,n,i,r){return i*((t=t/r-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t*t+n:i/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,i,r){return i*(t/=r)*t*t*t+n},easeOutQuart:function(e,t,n,i,r){return-i*((t=t/r-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t*t*t+n:-i/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,i,r){return i*(t/=r)*t*t*t*t+n},easeOutQuint:function(e,t,n,i,r){return i*((t=t/r-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,i,r){return(t/=r/2)<1?i/2*t*t*t*t*t+n:i/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,i,r){return-i*Math.cos(t/r*(Math.PI/2))+i+n},easeOutSine:function(e,t,n,i,r){return i*Math.sin(t/r*(Math.PI/2))+n},easeInOutSine:function(e,t,n,i,r){return-i/2*(Math.cos(Math.PI*t/r)-1)+n},easeInExpo:function(e,t,n,i,r){return 0==t?n:i*Math.pow(2,10*(t/r-1))+n},easeOutExpo:function(e,t,n,i,r){return t==r?n+i:i*(1-Math.pow(2,-10*t/r))+n},easeInOutExpo:function(e,t,n,i,r){return 0==t?n:t==r?n+i:(t/=r/2)<1?i/2*Math.pow(2,10*(t-1))+n:i/2*(2-Math.pow(2,-10*--t))+n},easeInCirc:function(e,t,n,i,r){return-i*(Math.sqrt(1-(t/=r)*t)-1)+n},easeOutCirc:function(e,t,n,i,r){return i*Math.sqrt(1-(t=t/r-1)*t)+n},easeInOutCirc:function(e,t,n,i,r){return(t/=r/2)<1?-i/2*(Math.sqrt(1-t*t)-1)+n:i/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,i,r){var o=1.70158,a=0,s=i;if(0==t)return n;if(1==(t/=r))return n+i;if(a||(a=.3*r),s<Math.abs(i)){s=i;o=a/4}else o=a/(2*Math.PI)*Math.asin(i/s);return-s*Math.pow(2,10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)+n},easeOutElastic:function(e,t,n,i,r){var o=1.70158,a=0,s=i;if(0==t)return n;if(1==(t/=r))return n+i;if(a||(a=.3*r),s<Math.abs(i)){s=i;o=a/4}else o=a/(2*Math.PI)*Math.asin(i/s);return s*Math.pow(2,-10*t)*Math.sin((t*r-o)*(2*Math.PI)/a)+i+n},easeInOutElastic:function(e,t,n,i,r){var o=1.70158,a=0,s=i;if(0==t)return n;if(2==(t/=r/2))return n+i;if(a||(a=r*(.3*1.5)),s<Math.abs(i)){s=i;o=a/4}else o=a/(2*Math.PI)*Math.asin(i/s);return t<1?s*Math.pow(2,10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)*-.5+n:s*Math.pow(2,-10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)*.5+i+n},easeInBack:function(e,t,n,i,r,o){return o==undefined&&(o=1.70158),i*(t/=r)*t*((o+1)*t-o)+n},easeOutBack:function(e,t,n,i,r,o){return o==undefined&&(o=1.70158),i*((t=t/r-1)*t*((o+1)*t+o)+1)+n},easeInOutBack:function(e,t,n,i,r,o){return o==undefined&&(o=1.70158),(t/=r/2)<1?i/2*(t*t*((1+(o*=1.525))*t-o))+n:i/2*((t-=2)*t*((1+(o*=1.525))*t+o)+2)+n},easeInBounce:function(e,t,n,i,r){return i-jQuery.easing.easeOutBounce(e,r-t,0,i,r)+n},easeOutBounce:function(e,t,n,i,r){return(t/=r)<1/2.75?i*(7.5625*t*t)+n:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+n:i*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeInOutBounce:function(e,t,n,i,r){return t<r/2?.5*jQuery.easing.easeInBounce(e,2*t,0,i,r)+n:.5*jQuery.easing.easeOutBounce(e,2*t-r,0,i,r)+.5*i+n}}),function(r){"use strict";r.fn.fitVids=function(e){var t={customSelector:null},n=document.createElement("div"),i=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];return n.className="fit-vids-style",n.innerHTML="&shy;<style>               .fluid-width-video-wrapper {                 width: 100%;                              position: relative;                       padding: 0;                            }                                                                                   .fluid-width-video-wrapper iframe,        .fluid-width-video-wrapper object,        .fluid-width-video-wrapper embed {           position: absolute;                       top: 0;                                   left: 0;                                  width: 100%;                              height: 100%;                          }                                       </style>",i.parentNode.insertBefore(n,i),e&&r.extend(t,e),this.each(function(){var e=["iframe[src*='player.vimeo.com']","iframe[src*='www.youtube.com']","iframe[src*='www.kickstarter.com']","object","embed"];t.customSelector&&e.push(t.customSelector),r(this).find(e.join(",")).each(function(){var e=r(this);if(!("embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){var t=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("id")){var n="fitvid"+Math.floor(999999*Math.random());e.attr("id",n)}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*t+"%"),e.removeAttr("height").removeAttr("width")}})})}}(jQuery);