53 lines
899 KiB
JavaScript
53 lines
899 KiB
JavaScript
/*
|
|
* innorix-wp9 1.0.0
|
|
* INNORIX Transfer solution
|
|
* Wed, 18 May 2022 09:39:57 GMT
|
|
*
|
|
* Copyright (C) INNORIX / innorix-dev-team, http://innorix.com
|
|
*/
|
|
|
|
// 라이선스 유형 : INNORIX WP 91일 체험 (만료 2022-09-30)
|
|
/*var INNORIX_LICENSE = "WEiCgfGkBpqQN/Zw0Ae0YQDFQoK5vit/hNZK/8gGNUm+mtjwAJr4dLSFCiLgiY9BOWSg925hgOfaW1olUgUTccrrl6Y=";*/
|
|
// 라이선스 유형 : INNORIX WP 91일 체험 (만료 2022-12-31)
|
|
//var INNORIX_LICENSE = "SQeXVJiPNj/2u6W8BXoc1pX1l1D0Dc1azbDxUT+BQPLxsV86kF62+FUvIaofOXnArJTjp9kn/ZtUA+Ps0JFla2QGiu0=";
|
|
// 라이선스 유형 : INNORIX WP 30일 체험 (만료 2023-05-05)
|
|
//var INNORIX_LICENSE = "3v0AzGS0JgwSdFHLQQxxtUkUhisBNnaQemUNZDGw/tswnXPMQE446fqMs3uzb/EOWHvJhjRifBmG2cB2twGldoZzpkI=";
|
|
// 운영라이선스 적용
|
|
var INNORIX_LICENSE = "FXA8KvVU99M9Ubbr3Yrz91zCNqyXdWCqUQ/OO1f7lj3nifVZZjuLqJIlHXjosrbPynCFJat5fwEgP/RVXftvXSsXmAHSnTVLYciyf8XmbxH8SLfUdCIEnFo+zL8=";
|
|
|
|
var INNORIX_VERSION = '1.1.3.458';
|
|
var INNORIX_WIN_VERSION = '1.1.3.458';
|
|
var INNORIX_MAC_VERSION = '1.1.3.458';
|
|
var INNORIX_LINUX_VERSION = '1.1.3.458';
|
|
|
|
var innorix_install_retry_count = 3;
|
|
|
|
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e=!!t&&"length"in t&&t.length,i=pt.type(t);return"function"!==i&&!pt.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t,e,i){if(pt.isFunction(e))return pt.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return pt.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(St.test(e))return pt.filter(e,t,i);e=pt.filter(e,t)}return pt.grep(t,function(t){return pt.inArray(t,e)>-1!==i})}function o(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function r(t){var e={};return pt.each(t.match(Et)||[],function(t,i){e[i]=!0}),e}function s(){nt.addEventListener?(nt.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a)):(nt.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(nt.addEventListener||"load"===t.event.type||"complete"===nt.readyState)&&(s(),pt.ready())}function l(t,e,i){if(void 0===i&&1===t.nodeType){var n="data-"+e.replace(Nt,"-$1").toLowerCase();if("string"==typeof(i=t.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:Ot.test(i)?pt.parseJSON(i):i)}catch(ot){}pt.data(t,e,i)}else i=void 0}return i}function h(t){var e;for(e in t)if(("data"!==e||!pt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,i,n){if(Rt(t)){var o,r,s=pt.expando,a=t.nodeType,l=a?pt.cache:t,h=a?t[s]:t[s]&&s;if(h&&l[h]&&(n||l[h].data)||void 0!==i||"string"!=typeof e)return h||(h=a?t[s]=it.pop()||pt.guid++:s),l[h]||(l[h]=a?{}:{toJSON:pt.noop}),"object"!=typeof e&&"function"!=typeof e||(n?l[h]=pt.extend(l[h],e):l[h].data=pt.extend(l[h].data,e)),r=l[h],n||(r.data||(r.data={}),r=r.data),void 0!==i&&(r[pt.camelCase(e)]=i),"string"==typeof e?null==(o=r[e])&&(o=r[pt.camelCase(e)]):o=r,o}}function u(t,e,i){if(Rt(t)){var n,o,r=t.nodeType,s=r?pt.cache:t,a=r?t[pt.expando]:pt.expando;if(s[a]){if(e&&(n=i?s[a]:s[a].data)){pt.isArray(e)?e=e.concat(pt.map(e,pt.camelCase)):e in n?e=[e]:(e=pt.camelCase(e),e=e in n?[e]:e.split(" ")),o=e.length;for(;o--;)delete n[e[o]];if(i?!h(n):!pt.isEmptyObject(n))return}(i||(delete s[a].data,h(s[a])))&&(r?pt.cleanData([t],!0):ut.deleteExpando||s!=s.window?delete s[a]:s[a]=void 0)}}}function d(t,e,i,n){var o,r=1,s=20,a=n?function(){return n.cur()}:function(){return pt.css(t,e,"")},l=a(),h=i&&i[3]||(pt.cssNumber[e]?"":"px"),c=(pt.cssNumber[e]||"px"!==h&&+l)&&Ft.exec(pt.css(t,e));if(c&&c[3]!==h){h=h||c[3],i=i||[],c=+l||1;do{r=r||".5",c/=r,pt.style(t,e,c+h)}while(r!==(r=a()/l)&&1!==r&&--s)}return i&&(c=+c||+l||0,o=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=h,n.start=c,n.end=o)),o}function p(t){var e=Vt.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function f(t,e){var i,n,o=0,r="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!r)for(r=[],i=t.childNodes||t;null!=(n=i[o]);o++)!e||pt.nodeName(n,e)?r.push(n):pt.merge(r,f(n,e));return void 0===e||e&&pt.nodeName(t,e)?pt.merge([t],r):r}function g(t,e){for(var i,n=0;null!=(i=t[n]);n++)pt._data(i,"globalEval",!e||pt._data(e[n],"globalEval"))}function m(t){Ht.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e,i,n,o){for(var r,s,a,l,h,c,u,d=t.length,v=p(e),_=[],x=0;d>x;x++)if((s=t[x])||0===s)if("object"===pt.type(s))pt.merge(_,s.nodeType?[s]:s);else if(jt.test(s)){for(l=l||v.appendChild(e.createElement("div")),h=(Wt.exec(s)||["",""])[1].toLowerCase(),u=$t[h]||$t._default,l.innerHTML=u[1]+pt.htmlPrefilter(s)+u[2],r=u[0];r--;)l=l.lastChild;if(!ut.leadingWhitespace&&Ut.test(s)&&_.push(e.createTextNode(Ut.exec(s)[0])),!ut.tbody)for(s="table"!==h||qt.test(s)?"<table>"!==u[1]||qt.test(s)?0:l:l.firstChild,r=s&&s.childNodes.length;r--;)pt.nodeName(c=s.childNodes[r],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(pt.merge(_,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else _.push(e.createTextNode(s));for(l&&v.removeChild(l),ut.appendChecked||pt.grep(f(_,"input"),m),x=0;s=_[x++];)if(n&&pt.inArray(s,n)>-1)o&&o.push(s);else if(a=pt.contains(s.ownerDocument,s),l=f(v.appendChild(s),"script"),a&&g(l),i)for(r=0;s=l[r++];)zt.test(s.type||"")&&i.push(s);return l=null,v}function _(){return!0}function x(){return!1}function y(){try{return nt.activeElement}catch(t){}}function b(t,e,i,n,o,r){var s,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=void 0);for(a in e)b(t,a,i,n,e[a],r);return t}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),!1===o)o=x;else if(!o)return t;return 1===r&&(s=o,o=function(t){return pt().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=pt.guid++)),t.each(function(){pt.event.add(this,e,o,n,i)})}function w(t,e){return pt.nodeName(t,"table")&&pt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function S(t){return t.type=(null!==pt.find.attr(t,"type"))+"/"+t.type,t}function C(t){var e=ne.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function T(t,e){if(1===e.nodeType&&pt.hasData(t)){var i,n,o,r=pt._data(t),s=pt._data(e,r),a=r.events;if(a){delete s.handle,s.events={};for(i in a)for(n=0,o=a[i].length;o>n;n++)pt.event.add(e,i,a[i][n])}s.data&&(s.data=pt.extend({},s.data))}}function k(t,e){var i,n,o;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!ut.noCloneEvent&&e[pt.expando]){o=pt._data(e);for(n in o.events)pt.removeEvent(e,n,o.handle);e.removeAttribute(pt.expando)}"script"===i&&e.text!==t.text?(S(e).text=t.text,C(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),ut.html5Clone&&t.innerHTML&&!pt.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&Ht.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}}function D(t,e,i,n){e=rt.apply([],e);var o,r,s,a,l,h,c=0,u=t.length,d=u-1,p=e[0],g=pt.isFunction(p);if(g||u>1&&"string"==typeof p&&!ut.checkClone&&ie.test(p))return t.each(function(o){var r=t.eq(o);g&&(e[0]=p.call(this,o,r.html())),D(r,e,i,n)});if(u&&(h=v(e,t[0].ownerDocument,!1,t,n),o=h.firstChild,1===h.childNodes.length&&(h=o),o||n)){for(a=pt.map(f(h,"script"),S),s=a.length;u>c;c++)r=h,c!==d&&(r=pt.clone(r,!0,!0),s&&pt.merge(a,f(r,"script"))),i.call(t[c],r,c);if(s)for(l=a[a.length-1].ownerDocument,pt.map(a,C),c=0;s>c;c++)r=a[c],zt.test(r.type||"")&&!pt._data(r,"globalEval")&&pt.contains(l,r)&&(r.src?pt._evalUrl&&pt._evalUrl(r.src):pt.globalEval((r.text||r.textContent||r.innerHTML||"").replace(oe,"")));h=o=null}return t}function E(t,e,i){for(var n,o=e?pt.filter(e,t):t,r=0;null!=(n=o[r]);r++)i||1!==n.nodeType||pt.cleanData(f(n)),n.parentNode&&(i&&pt.contains(n.ownerDocument,n)&&g(f(n,"script")),n.parentNode.removeChild(n));return t}function I(t,e){var i=pt(e.createElement(t)).appendTo(e.body),n=pt.css(i[0],"display");return i.detach(),n}function A(t){var e=nt,i=le[t];return i||(i=I(t,e),"none"!==i&&i||(ae=(ae||pt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(ae[0].contentWindow||ae[0].contentDocument).document,e.write(),e.close(),i=I(t,e),ae.detach()),le[t]=i),i}function R(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function O(t){if(t in Se)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),i=we.length;i--;)if((t=we[i]+e)in Se)return t}function N(t,e){for(var i,n,o,r=[],s=0,a=t.length;a>s;s++)n=t[s],n.style&&(r[s]=pt._data(n,"olddisplay"),i=n.style.display,e?(r[s]||"none"!==i||(n.style.display=""),""===n.style.display&&Mt(n)&&(r[s]=pt._data(n,"olddisplay",A(n.nodeName)))):(o=Mt(n),(i&&"none"!==i||!o)&&pt._data(n,"olddisplay",o?i:pt.css(n,"display"))));for(s=0;a>s;s++)n=t[s],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?r[s]||"":"none"));return t}function P(t,e,i){var n=xe.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function F(t,e,i,n,o){for(var r=i===(n?"border":"content")?4:"width"===e?1:0,s=0;4>r;r+=2)"margin"===i&&(s+=pt.css(t,i+Lt[r],!0,o)),n?("content"===i&&(s-=pt.css(t,"padding"+Lt[r],!0,o)),"margin"!==i&&(s-=pt.css(t,"border"+Lt[r]+"Width",!0,o))):(s+=pt.css(t,"padding"+Lt[r],!0,o),"padding"!==i&&(s+=pt.css(t,"border"+Lt[r]+"Width",!0,o)));return s}function L(t,e,i){var n=!0,o="width"===e?t.offsetWidth:t.offsetHeight,r=pe(t),s=ut.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,r);if(0>=o||null==o){if(o=fe(t,e,r),(0>o||null==o)&&(o=t.style[e]),ce.test(o))return o;n=s&&(ut.boxSizingReliable()||o===t.style[e]),o=parseFloat(o)||0}return o+F(t,e,i||(s?"border":"content"),n,r)+"px"}function M(t,e,i,n,o){return new M.prototype.init(t,e,i,n,o)}function B(){return t.setTimeout(function(){Ce=void 0}),Ce=pt.now()}function H(t,e){var i,n={height:t},o=0;for(e=e?1:0;4>o;o+=2-e)i=Lt[o],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function W(t,e,i){for(var n,o=(V.tweeners[e]||[]).concat(V.tweeners["*"]),r=0,s=o.length;s>r;r++)if(n=o[r].call(i,e,t))return n}function z(t,e,i){var n,o,r,s,a,l,h,c=this,u={},d=t.style,p=t.nodeType&&Mt(t),f=pt._data(t,"fxshow");i.queue||(a=pt._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,pt.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],h=pt.css(t,"display"),"inline"===("none"===h?pt._data(t,"olddisplay")||A(t.nodeName):h)&&"none"===pt.css(t,"float")&&(ut.inlineBlockNeedsLayout&&"inline"!==A(t.nodeName)?d.zoom=1:d.display="inline-block")),i.overflow&&(d.overflow="hidden",ut.shrinkWrapBlocks()||c.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]}));for(n in e)if(o=e[n],ke.exec(o)){if(delete e[n],r=r||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||!f||void 0===f[n])continue;p=!0}u[n]=f&&f[n]||pt.style(t,n)}else h=void 0;if(pt.isEmptyObject(u))"inline"===("none"===h?A(t.nodeName):h)&&(d.display=h);else{f?"hidden"in f&&(p=f.hidden):f=pt._data(t,"fxshow",{}),r&&(f.hidden=!p),p?pt(t).show():c.done(function(){pt(t).hide()}),c.done(function(){var e;pt._removeData(t,"fxshow");for(e in u)pt.style(t,e,u[e])});for(n in u)s=W(p?f[n]:0,n,c),n in f||(f[n]=s.start,p&&(s.end=s.start,s.start="width"===n||"height"===n?1:0))}}function U(t,e){var i,n,o,r,s;for(i in t)if(n=pt.camelCase(i),o=e[n],r=t[i],pt.isArray(r)&&(o=r[1],r=t[i]=r[0]),i!==n&&(t[n]=r,delete t[i]),(s=pt.cssHooks[n])&&"expand"in s){r=s.expand(r),delete t[n];for(i in r)i in t||(t[i]=r[i],e[i]=o)}else e[n]=o}function V(t,e,i){var n,o,r=0,s=V.prefilters.length,a=pt.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=Ce||B(),i=Math.max(0,h.startTime+h.duration-e),n=i/h.duration||0,r=1-n,s=0,l=h.tweens.length;l>s;s++)h.tweens[s].run(r);return a.notifyWith(t,[h,r,i]),1>r&&l?i:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:pt.extend({},e),opts:pt.extend(!0,{specialEasing:{},easing:pt.easing._default},i),originalProperties:e,originalOptions:i,startTime:Ce||B(),duration:i.duration,tweens:[],createTween:function(e,i){var n=pt.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(o)return this;for(o=!0;n>i;i++)h.tweens[i].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),c=h.props;for(U(c,h.opts.specialEasing);s>r;r++)if(n=V.prefilters[r].call(h,t,c,h.opts))return pt.isFunction(n.stop)&&(pt._queueHooks(h.elem,h.opts.queue).stop=pt.proxy(n.stop,n)),n;return pt.map(c,W,h),pt.isFunction(h.opts.start)&&h.opts.start.call(t,h),pt.fx.timer(pt.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function $(t){return pt.attr(t,"class")||""}function j(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,o=0,r=e.toLowerCase().match(Et)||[];if(pt.isFunction(i))for(;n=r[o++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function q(t,e,i,n){function o(a){var l;return r[a]=!0,pt.each(t[a]||[],function(t,a){var h=a(e,i,n);return"string"!=typeof h||s||r[h]?s?!(l=h):void 0:(e.dataTypes.unshift(h),o(h),!1)}),l}var r={},s=t===Je;return o(e.dataTypes[0])||!r["*"]&&o("*")}function G(t,e){var i,n,o=pt.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&pt.extend(!0,t,i),t}function Y(t,e,i){for(var n,o,r,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(s in a)if(a[s]&&a[s].test(o)){l.unshift(s);break}if(l[0]in i)r=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){r=s;break}n||(n=s)}r=r||n}return r?(r!==l[0]&&l.unshift(r),i[r]):void 0}function X(t,e,i,n){var o,r,s,a,l,h={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)h[s.toLowerCase()]=t.converters[s];for(r=c.shift();r;)if(t.responseFields[r]&&(i[t.responseFields[r]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=h[l+" "+r]||h["* "+r]))for(o in h)if(a=o.split(" "),a[1]===r&&(s=h[l+" "+a[0]]||h["* "+a[0]])){!0===s?s=h[o]:!0!==h[o]&&(r=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(ut){return{state:"parsererror",error:s?ut:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}function K(t){return t.style&&t.style.display||pt.css(t,"display")}function J(t){if(!pt.contains(t.ownerDocument||nt,t))return!0;for(;t&&1===t.nodeType;){if("none"===K(t)||"hidden"===t.type)return!0;t=t.parentNode}return!1}function Q(t,e,i,n){var o;if(pt.isArray(e))pt.each(e,function(e,o){i||ii.test(t)?n(t,o):Q(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,i,n)});else if(i||"object"!==pt.type(e))n(t,e);else for(o in e)Q(t+"["+o+"]",e[o],i,n)}function Z(){try{return new t.XMLHttpRequest}catch(e){}}function tt(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function et(t){return pt.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}var it=[],nt=t.document,ot=it.slice,rt=it.concat,st=it.push,at=it.indexOf,lt={},ht=lt.toString,ct=lt.hasOwnProperty,ut={},dt="1.12.4",pt=function(t,e){return new pt.fn.init(t,e)},ft=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,gt=/^-ms-/,mt=/-([\da-z])/gi,vt=function(t,e){return e.toUpperCase()};pt.fn=pt.prototype={jquery:dt,constructor:pt,selector:"",length:0,toArray:function(){return ot.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:ot.call(this)},pushStack:function(t){var e=pt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return pt.each(this,t)},map:function(t){return this.pushStack(pt.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:st,sort:it.sort,splice:it.splice},pt.extend=pt.fn.extend=function(){var t,e,i,n,o,r,s=arguments[0]||{},a=1,l=arguments.length,h=!1;for("boolean"==typeof s&&(h=s,s=arguments[a]||{},a++),"object"==typeof s||pt.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(o=arguments[a]))for(n in o)t=s[n],i=o[n],s!==i&&(h&&i&&(pt.isPlainObject(i)||(e=pt.isArray(i)))?(e?(e=!1,r=t&&pt.isArray(t)?t:[]):r=t&&pt.isPlainObject(t)?t:{},s[n]=pt.extend(h,r,i)):void 0!==i&&(s[n]=i));return s},pt.extend({expando:"jQuery"+(dt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===pt.type(t)},isArray:Array.isArray||function(t){return"array"===pt.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){var e=t&&t.toString();return!pt.isArray(t)&&e-parseFloat(e)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==pt.type(t)||t.nodeType||pt.isWindow(t))return!1;try{if(t.constructor&&!ct.call(t,"constructor")&&!ct.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(it){return!1}if(!ut.ownFirst)for(e in t)return ct.call(t,e);for(e in t);return void 0===e||ct.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?lt[ht.call(t)]||"object":typeof t},globalEval:function(e){e&&pt.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(gt,"ms-").replace(mt,vt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,o=0;if(i(t))for(n=t.length;n>o&&!1!==e.call(t[o],o,t[o]);o++);else for(o in t)if(!1===e.call(t[o],o,t[o]))break;return t},trim:function(t){return null==t?"":(t+"").replace(ft,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?pt.merge(n,"string"==typeof t?[t]:t):st.call(n,t)),n},inArray:function(t,e,i){var n;if(e){if(at)return at.call(e,t,i);for(n=e.length,i=i?0>i?Math.max(0,n+i):i:0;n>i;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,e){for(var i=+e.length,n=0,o=t.length;i>n;)t[o++]=e[n++];if(i!==i)for(;void 0!==e[n];)t[o++]=e[n++];return t.length=o,t},grep:function(t,e,i){for(var n=[],o=0,r=t.length,s=!i;r>o;o++)!e(t[o],o)!==s&&n.push(t[o]);return n},map:function(t,e,n){var o,r,s=0,a=[];if(i(t))for(o=t.length;o>s;s++)null!=(r=e(t[s],s,n))&&a.push(r);else for(s in t)null!=(r=e(t[s],s,n))&&a.push(r);return rt.apply([],a)},guid:1,proxy:function(t,e){var i,n,o;return"string"==typeof e&&(o=t[e],e=t,t=o),pt.isFunction(t)?(i=ot.call(arguments,2),n=function(){return t.apply(e||this,i.concat(ot.call(arguments)))},n.guid=t.guid=t.guid||pt.guid++,n):void 0},now:function(){return+new Date},support:ut}),"function"==typeof Symbol&&(pt.fn[Symbol.iterator]=it[Symbol.iterator]),pt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){lt["[object "+e+"]"]=e.toLowerCase()});var _t=function(t){function e(t,e,i,n){var o,r,s,a,h,u,d,p,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!n&&((e?e.ownerDocument||e:B)!==A&&I(e),e=e||A,O)){if(11!==g&&(u=gt.exec(t)))if(o=u[1]){if(9===g){if(!(s=e.getElementById(o)))return i;if(s.id===o)return i.push(s),i}else if(f&&(s=f.getElementById(o))&&L(e,s)&&s.id===o)return i.push(s),i}else{if(u[2])return K.apply(i,e.getElementsByTagName(t)),i;if((o=u[3])&&x.getElementsByClassName&&e.getElementsByClassName)return K.apply(i,e.getElementsByClassName(o)),i}if(x.qsa&&!V[t+" "]&&(!N||!N.test(t))){if(1!==g)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(vt,"\\$&"):e.setAttribute("id",a=M),d=S(t),r=d.length,h=ct.test(a)?"#"+a:"[id='"+a+"']";r--;)d[r]=h+" "+c(d[r]);p=d.join(","),f=mt.test(t)&&l(e.parentNode)||e}if(p)try{return K.apply(i,f.querySelectorAll(p)),i}catch(z){}finally{a===M&&e.removeAttribute("id")}}}return T(t.replace(rt,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>y.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[M]=!0,t}function o(t){var e=A.createElement("div");try{return!!t(e)}catch(x){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var i=t.split("|"),n=i.length;n--;)y.attrHandle[i[n]]=e}function s(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||j)-(~t.sourceIndex||j);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return n(function(e){return e=+e,n(function(i,n){for(var o,r=t([],i.length,e),s=r.length;s--;)i[o=r[s]]&&(i[o]=!(n[o]=i[o]))})})}function l(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function h(){}function c(t){for(var e=0,i=t.length,n="";i>e;e++)n+=t[e].value;return n}function u(t,e,i){var n=e.dir,o=i&&"parentNode"===n,r=W++;return e.first?function(e,i,r){for(;e=e[n];)if(1===e.nodeType||o)return t(e,i,r)}:function(e,i,s){var a,l,h,c=[H,r];if(s){for(;e=e[n];)if((1===e.nodeType||o)&&t(e,i,s))return!0}else for(;e=e[n];)if(1===e.nodeType||o){if(h=e[M]||(e[M]={}),l=h[e.uniqueID]||(h[e.uniqueID]={}),(a=l[n])&&a[0]===H&&a[1]===r)return c[2]=a[2];if(l[n]=c,c[2]=t(e,i,s))return!0}}}function d(t){return t.length>1?function(e,i,n){for(var o=t.length;o--;)if(!t[o](e,i,n))return!1;return!0}:t[0]}function p(t,i,n){for(var o=0,r=i.length;r>o;o++)e(t,i[o],n);return n}function f(t,e,i,n,o){for(var r,s=[],a=0,l=t.length,h=null!=e;l>a;a++)(r=t[a])&&(i&&!i(r,n,o)||(s.push(r),h&&e.push(a)));return s}function g(t,e,i,o,r,s){return o&&!o[M]&&(o=g(o)),r&&!r[M]&&(r=g(r,s)),n(function(n,s,a,l){var h,c,u,d=[],g=[],m=s.length,v=n||p(e||"*",a.nodeType?[a]:a,[]),_=!t||!n&&e?v:f(v,d,t,a,l),x=i?r||(n?t:m||o)?[]:s:_;if(i&&i(_,x,a,l),o)for(h=f(x,g),o(h,[],a,l),c=h.length;c--;)(u=h[c])&&(x[g[c]]=!(_[g[c]]=u));if(n){if(r||t){if(r){for(h=[],c=x.length;c--;)(u=x[c])&&h.push(_[c]=u);r(null,x=[],h,l)}for(c=x.length;c--;)(u=x[c])&&(h=r?Q(n,u):d[c])>-1&&(n[h]=!(s[h]=u))}}else x=f(x===s?x.splice(m,x.length):x),r?r(null,s,x,l):K.apply(s,x)})}function m(t){for(var e,i,n,o=t.length,r=y.relative[t[0].type],s=r||y.relative[" "],a=r?1:0,l=u(function(t){return t===e},s,!0),h=u(function(t){return Q(e,t)>-1},s,!0),p=[function(t,i,n){var o=!r&&(n||i!==k)||((e=i).nodeType?l(t,i,n):h(t,i,n));return e=null,o}];o>a;a++)if(i=y.relative[t[a].type])p=[u(d(p),i)];else{if(i=y.filter[t[a].type].apply(null,t[a].matches),i[M]){for(n=++a;o>n&&!y.relative[t[n].type];n++);return g(a>1&&d(p),a>1&&c(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(rt,"$1"),i,n>a&&m(t.slice(a,n)),o>n&&m(t=t.slice(n)),o>n&&c(t))}p.push(i)}return d(p)}function v(t,i){var o=i.length>0,r=t.length>0,s=function(n,s,a,l,h){var c,u,d,p=0,g="0",m=n&&[],v=[],_=k,x=n||r&&y.find.TAG("*",h),b=H+=null==_?1:Math.random()||.1,w=x.length;for(h&&(k=s===A||s||h);g!==w&&null!=(c=x[g]);g++){if(r&&c){for(u=0,s||c.ownerDocument===A||(I(c),a=!O);d=t[u++];)if(d(c,s||A,a)){l.push(c);break}h&&(H=b)}o&&((c=!d&&c)&&p--,n&&m.push(c))}if(p+=g,o&&g!==p){for(u=0;d=i[u++];)d(m,v,s,a);if(n){if(p>0)for(;g--;)m[g]||v[g]||(v[g]=Y.call(l));v=f(v)}K.apply(l,v),h&&!n&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return h&&(H=b,k=_),m};return o?n(s):s}var _,x,y,b,w,S,C,T,k,D,E,I,A,R,O,N,P,F,L,M="sizzle"+1*new Date,B=t.document,H=0,W=0,z=i(),U=i(),V=i(),$=function(t,e){return t===e&&(E=!0),0},j=1<<31,q={}.hasOwnProperty,G=[],Y=G.pop,X=G.push,K=G.push,J=G.slice,Q=function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",tt="[\\x20\\t\\r\\n\\f]",et="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",it="\\["+tt+"*("+et+")(?:"+tt+"*([*^$|!~]?=)"+tt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+et+"))|)"+tt+"*\\]",nt=":("+et+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+it+")*)|.*)\\)|)",ot=new RegExp(tt+"+","g"),rt=new RegExp("^"+tt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+tt+"+$","g"),st=new RegExp("^"+tt+"*,"+tt+"*"),at=new RegExp("^"+tt+"*([>+~]|"+tt+")"+tt+"*"),lt=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ht=new RegExp(nt),ct=new RegExp("^"+et+"$"),ut={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+nt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},dt=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,ft=/^[^{]+\{\s*\[native \w/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/[+~]/,vt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),xt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},yt=function(){I()};try{K.apply(G=J.call(B.childNodes),B.childNodes),G[B.childNodes.length].nodeType}catch(f){K={apply:G.length?function(t,e){X.apply(t,J.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}x=e.support={},w=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},I=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:B;return n!==A&&9===n.nodeType&&n.documentElement?(A=n,R=A.documentElement,O=!w(A),(i=A.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",yt,!1):i.attachEvent&&i.attachEvent("onunload",yt)),x.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=o(function(t){return t.appendChild(A.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=ft.test(A.getElementsByClassName),x.getById=o(function(t){return R.appendChild(t).id=M,!A.getElementsByName||!A.getElementsByName(M).length}),x.getById?(y.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&O){var i=e.getElementById(t);return i?[i]:[]}},y.filter.ID=function(t){var e=t.replace(_t,xt);return function(t){return t.getAttribute("id")===e}}):(delete y.find.ID,y.filter.ID=function(t){var e=t.replace(_t,xt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),y.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},y.find.CLASS=x.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&O?e.getElementsByClassName(t):void 0},P=[],N=[],(x.qsa=ft.test(A.querySelectorAll))&&(o(function(t){R.appendChild(t).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&N.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||N.push("\\["+tt+"*(?:value|"+Z+")"),t.querySelectorAll("[id~="+M+"-]").length||N.push("~="),t.querySelectorAll(":checked").length||N.push(":checked"),t.querySelectorAll("a#"+M+"+*").length||N.push(".#.+[+~]")}),o(function(t){var e=A.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&N.push("name"+tt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||N.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),N.push(",.*:")})),(x.matchesSelector=ft.test(F=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&o(function(t){x.disconnectedMatch=F.call(t,"div"),F.call(t,"[s!='']:x"),P.push("!=",nt)}),N=N.length&&new RegExp(N.join("|")),P=P.length&&new RegExp(P.join("|")),e=ft.test(R.compareDocumentPosition),L=e||ft.test(R.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},$=e?function(t,e){if(t===e)return E=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!x.sortDetached&&e.compareDocumentPosition(t)===i?t===A||t.ownerDocument===B&&L(B,t)?-1:e===A||e.ownerDocument===B&&L(B,e)?1:D?Q(D,t)-Q(D,e):0:4&i?-1:1)}:function(t,e){if(t===e)return E=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,a=[t],l=[e];if(!o||!r)return t===A?-1:e===A?1:o?-1:r?1:D?Q(D,t)-Q(D,e):0;if(o===r)return s(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===B?-1:l[n]===B?1:0},A):A},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==A&&I(t),i=i.replace(lt,"='$1']"),x.matchesSelector&&O&&!V[i+" "]&&(!P||!P.test(i))&&(!N||!N.test(i)))try{var n=F.call(t,i);if(n||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(b){}return e(i,A,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==A&&I(t),L(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==A&&I(t);var i=y.attrHandle[e.toLowerCase()],n=i&&q.call(y.attrHandle,e.toLowerCase())?i(t,e,!O):void 0;return void 0!==n?n:x.attributes||!O?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,o=0;if(E=!x.detectDuplicates,D=!x.sortStable&&t.slice(0),t.sort($),E){for(;e=t[o++];)e===t[o]&&(n=i.push(o));for(;n--;)t.splice(i[n],1)}return D=null,t},b=e.getText=function(t){var e,i="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=b(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=b(e);return i},y=e.selectors={cacheLength:50,createPseudo:n,match:ut,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,xt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,xt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return ut.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ht.test(i)&&(e=S(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,xt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=z[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&z(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(o){var r=e.attr(o,t);return null==r?"!="===i:!i||(r+="","="===i?r===n:"!="===i?r!==n:"^="===i?n&&0===r.indexOf(n):"*="===i?n&&r.indexOf(n)>-1:"$="===i?n&&r.slice(-n.length)===n:"~="===i?(" "+r.replace(ot," ")+" ").indexOf(n)>-1:"|="===i&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===o?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,d,p,f,g=r!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),_=!l&&!a,x=!1;if(m){if(r){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&_){for(d=m,u=d[M]||(d[M]={}),c=u[d.uniqueID]||(u[d.uniqueID]={}),h=c[t]||[],p=h[0]===H&&h[1],x=p&&h[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||f.pop();)if(1===d.nodeType&&++x&&d===e){c[t]=[H,p,x];break}}else if(_&&(d=e,u=d[M]||(d[M]={}),c=u[d.uniqueID]||(u[d.uniqueID]={}),h=c[t]||[],p=h[0]===H&&h[1],x=p),
|
|
!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(_&&(u=d[M]||(d[M]={}),c=u[d.uniqueID]||(u[d.uniqueID]={}),c[t]=[H,x]),d!==e)););return(x-=o)===n||x%n==0&&x/n>=0}}},PSEUDO:function(t,i){var o,r=y.pseudos[t]||y.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[M]?r(i):r.length>1?(o=[t,t,"",i],y.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,o=r(t,i),s=o.length;s--;)n=Q(t,o[s]),t[n]=!(e[n]=o[s])}):function(t){return r(t,0,o)}):r}},pseudos:{not:n(function(t){var e=[],i=[],o=C(t.replace(rt,"$1"));return o[M]?n(function(t,e,i,n){for(var r,s=o(t,null,n,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,n,r){return e[0]=t,o(e,null,r,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(_t,xt),function(e){return(e.textContent||e.innerText||b(e)).indexOf(t)>-1}}),lang:n(function(t){return ct.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,xt).toLowerCase(),function(e){var i;do{if(i=O?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===R},focus:function(t){return t===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!y.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:a(function(){return[0]}),last:a(function(t,e){return[e-1]}),eq:a(function(t,e,i){return[0>i?i+e:i]}),even:a(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:a(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:a(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:a(function(t,e,i){for(var n=0>i?i+e:i;++n<e;)t.push(n);return t})}},y.pseudos.nth=y.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})y.pseudos[_]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(_);for(_ in{submit:!0,reset:!0})y.pseudos[_]=function(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}(_);return h.prototype=y.filters=y.pseudos,y.setFilters=new h,S=e.tokenize=function(t,i){var n,o,r,s,a,l,h,c=U[t+" "];if(c)return i?0:c.slice(0);for(a=t,l=[],h=y.preFilter;a;){n&&!(o=st.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=at.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(rt," ")}),a=a.slice(n.length));for(s in y.filter)!(o=ut[s].exec(a))||h[s]&&!(o=h[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return i?a.length:a?e.error(t):U(t,l).slice(0)},C=e.compile=function(t,e){var i,n=[],o=[],r=V[t+" "];if(!r){for(e||(e=S(t)),i=e.length;i--;)r=m(e[i]),r[M]?n.push(r):o.push(r);r=V(t,v(o,n)),r.selector=t}return r},T=e.select=function(t,e,i,n){var o,r,s,a,h,u="function"==typeof t&&t,d=!n&&S(t=u.selector||t);if(i=i||[],1===d.length){if(r=d[0]=d[0].slice(0),r.length>2&&"ID"===(s=r[0]).type&&x.getById&&9===e.nodeType&&O&&y.relative[r[1].type]){if(!(e=(y.find.ID(s.matches[0].replace(_t,xt),e)||[])[0]))return i;u&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=ut.needsContext.test(t)?0:r.length;o--&&(s=r[o],!y.relative[a=s.type]);)if((h=y.find[a])&&(n=h(s.matches[0].replace(_t,xt),mt.test(r[0].type)&&l(e.parentNode)||e))){if(r.splice(o,1),!(t=n.length&&c(r)))return K.apply(i,n),i;break}}return(u||C(t,d))(n,e,!O,i,!e||mt.test(t)&&l(e.parentNode)||e),i},x.sortStable=M.split("").sort($).join("")===M,x.detectDuplicates=!!E,I(),x.sortDetached=o(function(t){return 1&t.compareDocumentPosition(A.createElement("div"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r(Z,function(t,e,i){var n;return i?void 0:!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(t);pt.find=_t,pt.expr=_t.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=_t.uniqueSort,pt.text=_t.getText,pt.isXMLDoc=_t.isXML,pt.contains=_t.contains;var xt=function(t,e,i){for(var n=[],o=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&pt(t).is(i))break;n.push(t)}return n},yt=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},bt=pt.expr.match.needsContext,wt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,St=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?pt.find.matchesSelector(n,t)?[n]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,i=[],n=this,o=n.length;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;o>e;e++)if(pt.contains(n[e],this))return!0}));for(e=0;o>e;e++)pt.find(t,n[e],i);return i=this.pushStack(o>1?pt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(n(this,t||[],!1))},not:function(t){return this.pushStack(n(this,t||[],!0))},is:function(t){return!!n(this,"string"==typeof t&&bt.test(t)?pt(t):t||[],!1).length}});var Ct,Tt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(pt.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||Ct,"string"==typeof t){if(!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Tt.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:nt,!0)),wt.test(n[1])&&pt.isPlainObject(e))for(n in e)pt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if((o=nt.getElementById(n[2]))&&o.parentNode){if(o.id!==n[2])return Ct.find(t);this.length=1,this[0]=o}return this.context=nt,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):pt.isFunction(t)?"undefined"!=typeof i.ready?i.ready(t):t(pt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),pt.makeArray(t,this))}).prototype=pt.fn,Ct=pt(nt);var kt=/^(?:parents|prev(?:Until|All))/,Dt={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e,i=pt(t,this),n=i.length;return this.filter(function(){for(e=0;n>e;e++)if(pt.contains(this,i[e]))return!0})},closest:function(t,e){for(var i,n=0,o=this.length,r=[],s=bt.test(t)||"string"!=typeof t?pt(t,e||this.context):0;o>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&pt.find.matchesSelector(i,t))){r.push(i);break}return this.pushStack(r.length>1?pt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?pt.inArray(this[0],pt(t)):pt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return xt(t,"parentNode")},parentsUntil:function(t,e,i){return xt(t,"parentNode",i)},next:function(t){return o(t,"nextSibling")},prev:function(t){return o(t,"previousSibling")},nextAll:function(t){return xt(t,"nextSibling")},prevAll:function(t){return xt(t,"previousSibling")},nextUntil:function(t,e,i){return xt(t,"nextSibling",i)},prevUntil:function(t,e,i){return xt(t,"previousSibling",i)},siblings:function(t){return yt((t.parentNode||{}).firstChild,t)},children:function(t){return yt(t.firstChild)},contents:function(t){return pt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:pt.merge([],t.childNodes)}},function(t,e){pt.fn[t]=function(i,n){var o=pt.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=pt.filter(n,o)),this.length>1&&(Dt[t]||(o=pt.uniqueSort(o)),kt.test(t)&&(o=o.reverse())),this.pushStack(o)}});var Et=/\S+/g;pt.Callbacks=function(t){t="string"==typeof t?r(t):pt.extend({},t);var e,i,n,o,s=[],a=[],l=-1,h=function(){for(o=t.once,n=e=!0;a.length;l=-1)for(i=a.shift();++l<s.length;)!1===s[l].apply(i[0],i[1])&&t.stopOnFalse&&(l=s.length,i=!1);t.memory||(i=!1),e=!1,o&&(s=i?[]:"")},c={add:function(){return s&&(i&&!e&&(l=s.length-1,a.push(i)),function n(e){pt.each(e,function(e,i){pt.isFunction(i)?t.unique&&c.has(i)||s.push(i):i&&i.length&&"string"!==pt.type(i)&&n(i)})}(arguments),i&&!e&&h()),this},remove:function(){return pt.each(arguments,function(t,e){for(var i;(i=pt.inArray(e,s,i))>-1;)s.splice(i,1),l>=i&&l--}),this},has:function(t){return t?pt.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=!0,i||c.disable(),this},locked:function(){return!!o},fireWith:function(t,i){return o||(i=i||[],i=[t,i.slice?i.slice():i],a.push(i),e||h()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},pt.extend({Deferred:function(t){var e=[["resolve","done",pt.Callbacks("once memory"),"resolved"],["reject","fail",pt.Callbacks("once memory"),"rejected"],["notify","progress",pt.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return pt.Deferred(function(i){pt.each(e,function(e,r){var s=pt.isFunction(t[e])&&t[e];o[r[1]](function(){var t=s&&s.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[r[0]+"With"](this===n?i.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?pt.extend(t,n):n}},o={};return n.pipe=n.then,pt.each(e,function(t,r){var s=r[2],a=r[3];n[r[1]]=s.add,a&&s.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?n:this,arguments),this},o[r[0]+"With"]=s.fireWith}),n.promise(o),t&&t.call(o,o),o},when:function(t){var e,i,n,o=0,r=ot.call(arguments),s=r.length,a=1!==s||t&&pt.isFunction(t.promise)?s:0,l=1===a?t:pt.Deferred(),h=function(t,i,n){return function(o){i[t]=this,n[t]=arguments.length>1?ot.call(arguments):o,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(e=new Array(s),i=new Array(s),n=new Array(s);s>o;o++)r[o]&&pt.isFunction(r[o].promise)?r[o].promise().progress(h(o,i,e)).done(h(o,n,r)).fail(l.reject):--a;return a||l.resolveWith(n,r),l.promise()}});var It;pt.fn.ready=function(t){return pt.ready.promise().done(t),this},pt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?pt.readyWait++:pt.ready(!0)},ready:function(t){(!0===t?--pt.readyWait:pt.isReady)||(pt.isReady=!0,!0!==t&&--pt.readyWait>0||(It.resolveWith(nt,[pt]),pt.fn.triggerHandler&&(pt(nt).triggerHandler("ready"),pt(nt).off("ready"))))}}),pt.ready.promise=function(e){if(!It)if(It=pt.Deferred(),"complete"===nt.readyState||"loading"!==nt.readyState&&!nt.documentElement.doScroll)t.setTimeout(pt.ready);else if(nt.addEventListener)nt.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a);else{nt.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var i=!1;try{i=null==t.frameElement&&nt.documentElement}catch(ot){}i&&i.doScroll&&function n(){if(!pt.isReady){try{i.doScroll("left")}catch(e){return t.setTimeout(n,50)}s(),pt.ready()}}()}return It.promise(e)},pt.ready.promise();var At;for(At in pt(ut))break;ut.ownFirst="0"===At,ut.inlineBlockNeedsLayout=!1,pt(function(){var t,e,i,n;(i=nt.getElementsByTagName("body")[0])&&i.style&&(e=nt.createElement("div"),n=nt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ut.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(i.style.zoom=1)),i.removeChild(n))}),function(){var t=nt.createElement("div");ut.deleteExpando=!0;try{delete t.test}catch(e){ut.deleteExpando=!1}t=null}();var Rt=function(t){var e=pt.noData[(t.nodeName+" ").toLowerCase()],i=+t.nodeType||1;return(1===i||9===i)&&(!e||!0!==e&&t.getAttribute("classid")===e)},Ot=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Nt=/([A-Z])/g;pt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?pt.cache[t[pt.expando]]:t[pt.expando])&&!h(t)},data:function(t,e,i){return c(t,e,i)},removeData:function(t,e){return u(t,e)},_data:function(t,e,i){return c(t,e,i,!0)},_removeData:function(t,e){return u(t,e,!0)}}),pt.fn.extend({data:function(t,e){var i,n,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=pt.data(r),1===r.nodeType&&!pt._data(r,"parsedAttrs"))){for(i=s.length;i--;)s[i]&&(n=s[i].name,0===n.indexOf("data-")&&(n=pt.camelCase(n.slice(5)),l(r,n,o[n])));pt._data(r,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){pt.data(this,t)}):arguments.length>1?this.each(function(){pt.data(this,t,e)}):r?l(r,t,pt.data(r,t)):void 0},removeData:function(t){return this.each(function(){pt.removeData(this,t)})}}),pt.extend({queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=pt._data(t,e),i&&(!n||pt.isArray(i)?n=pt._data(t,e,pt.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=pt.queue(t,e),n=i.length,o=i.shift(),r=pt._queueHooks(t,e),s=function(){pt.dequeue(t,e)};"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===e&&i.unshift("inprogress"),delete r.stop,o.call(t,s,r)),!n&&r&&r.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return pt._data(t,i)||pt._data(t,i,{empty:pt.Callbacks("once memory").add(function(){pt._removeData(t,e+"queue"),pt._removeData(t,i)})})}}),pt.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?pt.queue(this[0],t):void 0===e?this:this.each(function(){var i=pt.queue(this,t,e);pt._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&pt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){pt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,o=pt.Deferred(),r=this,s=this.length,a=function(){--n||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(i=pt._data(r[s],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),o.promise(e)}}),function(){var t;ut.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,i,n;return i=nt.getElementsByTagName("body")[0],i&&i.style?(e=nt.createElement("div"),n=nt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.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(nt.createElement("div")).style.width="5px",t=3!==e.offsetWidth),i.removeChild(n),t):void 0}}();var Pt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ft=new RegExp("^(?:([+-])=|)("+Pt+")([a-z%]*)$","i"),Lt=["Top","Right","Bottom","Left"],Mt=function(t,e){return t=e||t,"none"===pt.css(t,"display")||!pt.contains(t.ownerDocument,t)},Bt=function(t,e,i,n,o,r,s){var a=0,l=t.length,h=null==i;if("object"===pt.type(i)){o=!0;for(a in i)Bt(t,e,a,i[a],!0,r,s)}else if(void 0!==n&&(o=!0,pt.isFunction(n)||(s=!0),h&&(s?(e.call(t,n),e=null):(h=e,e=function(t,e,i){return h.call(pt(t),i)})),e))for(;l>a;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return o?t:h?e.call(t):l?e(t[0],i):r},Ht=/^(?:checkbox|radio)$/i,Wt=/<([\w:-]+)/,zt=/^$|\/(?:java|ecma)script/i,Ut=/^\s+/,Vt="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";!function(){var t=nt.createElement("div"),e=nt.createDocumentFragment(),i=nt.createElement("input");t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ut.leadingWhitespace=3===t.firstChild.nodeType,ut.tbody=!t.getElementsByTagName("tbody").length,ut.htmlSerialize=!!t.getElementsByTagName("link").length,ut.html5Clone="<:nav></:nav>"!==nt.createElement("nav").cloneNode(!0).outerHTML,i.type="checkbox",i.checked=!0,e.appendChild(i),ut.appendChecked=i.checked,t.innerHTML="<textarea>x</textarea>",ut.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),i=nt.createElement("input"),i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),ut.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ut.noCloneEvent=!!t.addEventListener,t[pt.expando]=1,ut.attributes=!t.getAttribute(pt.expando)}();var $t={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:ut.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};$t.optgroup=$t.option,$t.tbody=$t.tfoot=$t.colgroup=$t.caption=$t.thead,$t.th=$t.td;var jt=/<|&#?\w+;/,qt=/<tbody/i;!function(){var e,i,n=nt.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})i="on"+e,(ut[e]=i in t)||(n.setAttribute(i,"t"),ut[e]=!1===n.attributes[i].expando);n=null}();var Gt=/^(?:input|select|textarea)$/i,Yt=/^key/,Xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Kt=/^(?:focusinfocus|focusoutblur)$/,Jt=/^([^.]*)(?:\.(.+)|)/;pt.event={global:{},add:function(t,e,i,n,o){var r,s,a,l,h,c,u,d,p,f,g,m=pt._data(t);if(m){for(i.handler&&(l=i,i=l.handler,o=l.selector),i.guid||(i.guid=pt.guid++),(s=m.events)||(s=m.events={}),(c=m.handle)||(c=m.handle=function(t){return void 0===pt||t&&pt.event.triggered===t.type?void 0:pt.event.dispatch.apply(c.elem,arguments)},c.elem=t),e=(e||"").match(Et)||[""],a=e.length;a--;)r=Jt.exec(e[a])||[],p=g=r[1],f=(r[2]||"").split(".").sort(),p&&(h=pt.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=pt.event.special[p]||{},u=pt.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&pt.expr.match.needsContext.test(o),namespace:f.join(".")},l),(d=s[p])||(d=s[p]=[],d.delegateCount=0,h.setup&&!1!==h.setup.call(t,n,f,c)||(t.addEventListener?t.addEventListener(p,c,!1):t.attachEvent&&t.attachEvent("on"+p,c))),h.add&&(h.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),pt.event.global[p]=!0);t=null}},remove:function(t,e,i,n,o){var r,s,a,l,h,c,u,d,p,f,g,m=pt.hasData(t)&&pt._data(t);if(m&&(c=m.events)){for(e=(e||"").match(Et)||[""],h=e.length;h--;)if(a=Jt.exec(e[h])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p){for(u=pt.event.special[p]||{},p=(n?u.delegateType:u.bindType)||p,d=c[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=d.length;r--;)s=d[r],!o&&g!==s.origType||i&&i.guid!==s.guid||a&&!a.test(s.namespace)||n&&n!==s.selector&&("**"!==n||!s.selector)||(d.splice(r,1),s.selector&&d.delegateCount--,u.remove&&u.remove.call(t,s));l&&!d.length&&(u.teardown&&!1!==u.teardown.call(t,f,m.handle)||pt.removeEvent(t,p,m.handle),delete c[p])}else for(p in c)pt.event.remove(t,p+e[h],i,n,!0);pt.isEmptyObject(c)&&(delete m.handle,pt._removeData(t,"events"))}},trigger:function(e,i,n,o){var r,s,a,l,h,c,u,d=[n||nt],p=ct.call(e,"type")?e.type:e,f=ct.call(e,"namespace")?e.namespace.split("."):[];if(a=c=n=n||nt,3!==n.nodeType&&8!==n.nodeType&&!Kt.test(p+pt.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:pt.makeArray(i,[e]),h=pt.event.special[p]||{},o||!h.trigger||!1!==h.trigger.apply(n,i))){if(!o&&!h.noBubble&&!pt.isWindow(n)){for(l=h.delegateType||p,Kt.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),c=a;c===(n.ownerDocument||nt)&&d.push(c.defaultView||c.parentWindow||t)}for(u=0;(a=d[u++])&&!e.isPropagationStopped();)e.type=u>1?l:h.bindType||p,r=(pt._data(a,"events")||{})[e.type]&&pt._data(a,"handle"),r&&r.apply(a,i),(r=s&&a[s])&&r.apply&&Rt(a)&&(e.result=r.apply(a,i),!1===e.result&&e.preventDefault());if(e.type=p,!o&&!e.isDefaultPrevented()&&(!h._default||!1===h._default.apply(d.pop(),i))&&Rt(n)&&s&&n[p]&&!pt.isWindow(n)){c=n[s],c&&(n[s]=null),pt.event.triggered=p;try{n[p]()}catch(i){}pt.event.triggered=void 0,c&&(n[s]=c)}return e.result}},dispatch:function(t){t=pt.event.fix(t);var e,i,n,o,r,s=[],a=ot.call(arguments),l=(pt._data(this,"events")||{})[t.type]||[],h=pt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,t)){for(s=pt.event.handlers.call(this,t,l),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(r.namespace)||(t.handleObj=r,t.data=r.data,void 0!==(n=((pt.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,o,r,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(n=[],i=0;a>i;i++)r=e[i],o=r.selector+" ",void 0===n[o]&&(n[o]=r.needsContext?pt(o,this).index(l)>-1:pt.find(o,this,null,[l]).length),n[o]&&n.push(r);n.length&&s.push({elem:l,handlers:n})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},fix:function(t){if(t[pt.expando])return t;var e,i,n,o=t.type,r=t,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=Xt.test(o)?this.mouseHooks:Yt.test(o)?this.keyHooks:{}),n=s.props?this.props.concat(s.props):this.props,t=new pt.Event(r),e=n.length;e--;)i=n[e],t[i]=r[i];return t.target||(t.target=r.srcElement||nt),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,s.filter?s.filter(t,r):t},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(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,n,o,r=e.button,s=e.fromElement;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||nt,o=n.documentElement,i=n.body,t.pageX=e.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),t.pageY=e.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)),!t.relatedTarget&&s&&(t.relatedTarget=s===t.target?e.toElement:s),t.which||void 0===r||(t.which=1&r?1:2&r?3:4&r?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==y()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){return this===y()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return pt.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(t){return pt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,i){var n=pt.extend(new pt.Event,i,{type:t,isSimulated:!0});pt.event.trigger(n,null,e),n.isDefaultPrevented()&&i.preventDefault()}},pt.removeEvent=nt.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)}:function(t,e,i){var n="on"+e;t.detachEvent&&("undefined"==typeof t[n]&&(t[n]=null),t.detachEvent(n,i))},pt.Event=function(t,e){return this instanceof pt.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?_:x):this.type=t,e&&pt.extend(this,e),this.timeStamp=t&&t.timeStamp||pt.now(),void(this[pt.expando]=!0)):new pt.Event(t,e)},pt.Event.prototype={constructor:pt.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=_,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=_,t&&!this.isSimulated&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=_,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},pt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){pt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===n||pt.contains(n,o))||(t.type=r.origType,i=r.handler.apply(this,arguments),t.type=e),i}}}),ut.submit||(pt.event.special.submit={setup:function(){return!pt.nodeName(this,"form")&&void pt.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,i=pt.nodeName(e,"input")||pt.nodeName(e,"button")?pt.prop(e,"form"):void 0;i&&!pt._data(i,"submit")&&(pt.event.add(i,"submit._submit",function(t){t._submitBubble=!0}),pt._data(i,"submit",!0))})},postDispatch:function(t){t._submitBubble&&(delete t._submitBubble,this.parentNode&&!t.isTrigger&&pt.event.simulate("submit",this.parentNode,t))},teardown:function(){return!pt.nodeName(this,"form")&&void pt.event.remove(this,"._submit")}}),ut.change||(pt.event.special.change={setup:function(){return Gt.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(pt.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._justChanged=!0)}),pt.event.add(this,"click._change",function(t){this._justChanged&&!t.isTrigger&&(this._justChanged=!1),pt.event.simulate("change",this,t)})),!1):void pt.event.add(this,"beforeactivate._change",function(t){var e=t.target;Gt.test(e.nodeName)&&!pt._data(e,"change")&&(pt.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||pt.event.simulate("change",this.parentNode,t)}),pt._data(e,"change",!0))})},handle:function(t){var e=t.target;return this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type?t.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return pt.event.remove(this,"._change"),!Gt.test(this.nodeName)}}),ut.focusin||pt.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){pt.event.simulate(e,t.target,pt.event.fix(t))};pt.event.special[e]={setup:function(){var n=this.ownerDocument||this,o=pt._data(n,e);o||n.addEventListener(t,i,!0),pt._data(n,e,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=pt._data(n,e)-1;o?pt._data(n,e,o):(n.removeEventListener(t,i,!0),pt._removeData(n,e))}}}),pt.fn.extend({on:function(t,e,i,n){return b(this,t,e,i,n)},one:function(t,e,i,n){return b(this,t,e,i,n,1)},off:function(t,e,i){var n,o;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,pt(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=x),this.each(function(){pt.event.remove(this,t,i,e)})},trigger:function(t,e){return this.each(function(){pt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];return i?pt.event.trigger(t,e,i,!0):void 0}});var Qt=/ jQuery\d+="(?:null|\d+)"/g,Zt=new RegExp("<(?:"+Vt+")[\\s/>]","i"),te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ee=/<script|<style|<link/i,ie=/checked\s*(?:[^=]|=\s*.checked.)/i,ne=/^true\/(.*)/,oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,re=p(nt),se=re.appendChild(nt.createElement("div"));pt.extend({htmlPrefilter:function(t){return t.replace(te,"<$1></$2>")},clone:function(t,e,i){var n,o,r,s,a,l=pt.contains(t.ownerDocument,t);if(ut.html5Clone||pt.isXMLDoc(t)||!Zt.test("<"+t.nodeName+">")?r=t.cloneNode(!0):(se.innerHTML=t.outerHTML,se.removeChild(r=se.firstChild)),!(ut.noCloneEvent&&ut.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(n=f(r),a=f(t),s=0;null!=(o=a[s]);++s)n[s]&&k(o,n[s]);if(e)if(i)for(a=a||f(t),n=n||f(r),s=0;null!=(o=a[s]);s++)T(o,n[s]);else T(t,r);return n=f(r,"script"),n.length>0&&g(n,!l&&f(t,"script")),n=a=o=null,r},cleanData:function(t,e){for(var i,n,o,r,s=0,a=pt.expando,l=pt.cache,h=ut.attributes,c=pt.event.special;null!=(i=t[s]);s++)if((e||Rt(i))&&(o=i[a],r=o&&l[o])){if(r.events)for(n in r.events)c[n]?pt.event.remove(i,n):pt.removeEvent(i,n,r.handle);l[o]&&(delete l[o],h||"undefined"==typeof i.removeAttribute?i[a]=void 0:i.removeAttribute(a),it.push(o))}}}),pt.fn.extend({domManip:D,detach:function(t){return E(this,t,!0)},remove:function(t){return E(this,t)},text:function(t){return Bt(this,function(t){return void 0===t?pt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||nt).createTextNode(t))},null,t,arguments.length)},append:function(){return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){w(this,t).appendChild(t)}})},prepend:function(){return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=w(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&pt.cleanData(f(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&pt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return Bt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Qt,""):void 0;if("string"==typeof t&&!ee.test(t)&&(ut.htmlSerialize||!Zt.test(t))&&(ut.leadingWhitespace||!Ut.test(t))&&!$t[(Wt.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;n>i;i++)e=this[i]||{},1===e.nodeType&&(pt.cleanData(f(e,!1)),e.innerHTML=t);e=0}catch(ot){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return D(this,arguments,function(e){var i=this.parentNode;pt.inArray(this,t)<0&&(pt.cleanData(f(this)),
|
|
i&&i.replaceChild(e,this))},t)}}),pt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){pt.fn[t]=function(t){for(var i,n=0,o=[],r=pt(t),s=r.length-1;s>=n;n++)i=n===s?this:this.clone(!0),pt(r[n])[e](i),st.apply(o,i.get());return this.pushStack(o)}});var ae,le={HTML:"block",BODY:"block"},he=/^margin/,ce=new RegExp("^("+Pt+")(?!px)[a-z%]+$","i"),ue=function(t,e,i,n){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];o=i.apply(t,n||[]);for(r in e)t.style[r]=s[r];return o},de=nt.documentElement;!function(){function e(){var e,c,u=nt.documentElement;u.appendChild(l),h.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=a=!1,n=s=!0,t.getComputedStyle&&(c=t.getComputedStyle(h),i="1%"!==(c||{}).top,a="2px"===(c||{}).marginLeft,o="4px"===(c||{width:"4px"}).width,h.style.marginRight="50%",n="4px"===(c||{marginRight:"4px"}).marginRight,e=h.appendChild(nt.createElement("div")),e.style.cssText=h.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",h.style.width="1px",s=!parseFloat((t.getComputedStyle(e)||{}).marginRight),h.removeChild(e)),h.style.display="none",r=0===h.getClientRects().length,r&&(h.style.display="",h.innerHTML="<table><tr><td></td><td>t</td></tr></table>",h.childNodes[0].style.borderCollapse="separate",e=h.getElementsByTagName("td"),e[0].style.cssText="margin:0;border:0;padding:0;display:none",(r=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",r=0===e[0].offsetHeight)),u.removeChild(l)}var i,n,o,r,s,a,l=nt.createElement("div"),h=nt.createElement("div");h.style&&(h.style.cssText="float:left;opacity:.5",ut.opacity="0.5"===h.style.opacity,ut.cssFloat=!!h.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",ut.clearCloneStyle="content-box"===h.style.backgroundClip,l=nt.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.innerHTML="",l.appendChild(h),ut.boxSizing=""===h.style.boxSizing||""===h.style.MozBoxSizing||""===h.style.WebkitBoxSizing,pt.extend(ut,{reliableHiddenOffsets:function(){return null==i&&e(),r},boxSizingReliable:function(){return null==i&&e(),o},pixelMarginRight:function(){return null==i&&e(),n},pixelPosition:function(){return null==i&&e(),i},reliableMarginRight:function(){return null==i&&e(),s},reliableMarginLeft:function(){return null==i&&e(),a}}))}();var pe,fe,ge=/^(top|right|bottom|left)$/;t.getComputedStyle?(pe=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},fe=function(t,e,i){var n,o,r,s,a=t.style;return i=i||pe(t),s=i?i.getPropertyValue(e)||i[e]:void 0,""!==s&&void 0!==s||pt.contains(t.ownerDocument,t)||(s=pt.style(t,e)),i&&!ut.pixelMarginRight()&&ce.test(s)&&he.test(e)&&(n=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=o,a.maxWidth=r),void 0===s?s:s+""}):de.currentStyle&&(pe=function(t){return t.currentStyle},fe=function(t,e,i){var n,o,r,s,a=t.style;return i=i||pe(t),s=i?i[e]:void 0,null==s&&a&&a[e]&&(s=a[e]),ce.test(s)&&!ge.test(e)&&(n=a.left,o=t.runtimeStyle,r=o&&o.left,r&&(o.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=n,r&&(o.left=r)),void 0===s?s:s+""||"auto"});var me=/alpha\([^)]*\)/i,ve=/opacity\s*=\s*([^)]*)/i,_e=/^(none|table(?!-c[ea]).+)/,xe=new RegExp("^("+Pt+")(.*)$","i"),ye={position:"absolute",visibility:"hidden",display:"block"},be={letterSpacing:"0",fontWeight:"400"},we=["Webkit","O","Moz","ms"],Se=nt.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=fe(t,"opacity");return""===i?"1":i}}}},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":ut.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=pt.camelCase(e),l=t.style;if(e=pt.cssProps[a]||(pt.cssProps[a]=O(a)||a),s=pt.cssHooks[e]||pt.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(o=s.get(t,!1,n))?o:l[e];if(r=typeof i,"string"===r&&(o=Ft.exec(i))&&o[1]&&(i=d(t,e,o),r="number"),null!=i&&i===i&&("number"===r&&(i+=o&&o[3]||(pt.cssNumber[a]?"":"px")),ut.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&void 0===(i=s.set(t,i,n)))))try{l[e]=i}catch(ht){}}},css:function(t,e,i,n){var o,r,s,a=pt.camelCase(e);return e=pt.cssProps[a]||(pt.cssProps[a]=O(a)||a),s=pt.cssHooks[e]||pt.cssHooks[a],s&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=fe(t,e,n)),"normal"===r&&e in be&&(r=be[e]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),pt.each(["height","width"],function(t,e){pt.cssHooks[e]={get:function(t,i,n){return i?_e.test(pt.css(t,"display"))&&0===t.offsetWidth?ue(t,ye,function(){return L(t,e,n)}):L(t,e,n):void 0},set:function(t,i,n){var o=n&&pe(t);return P(t,i,n?F(t,e,n,ut.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,o),o):0)}}}),ut.opacity||(pt.cssHooks.opacity={get:function(t,e){return ve.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,o=pt.isNumeric(e)?"alpha(opacity="+100*e+")":"",r=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===pt.trim(r.replace(me,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=me.test(r)?r.replace(me,o):r+" "+o)}}),pt.cssHooks.marginRight=R(ut.reliableMarginRight,function(t,e){return e?ue(t,{display:"inline-block"},fe,[t,"marginRight"]):void 0}),pt.cssHooks.marginLeft=R(ut.reliableMarginLeft,function(t,e){return e?(parseFloat(fe(t,"marginLeft"))||(pt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-ue(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px":void 0}),pt.each({margin:"",padding:"",border:"Width"},function(t,e){pt.cssHooks[t+e]={expand:function(i){for(var n=0,o={},r="string"==typeof i?i.split(" "):[i];4>n;n++)o[t+Lt[n]+e]=r[n]||r[n-2]||r[0];return o}},he.test(t)||(pt.cssHooks[t+e].set=P)}),pt.fn.extend({css:function(t,e){return Bt(this,function(t,e,i){var n,o,r={},s=0;if(pt.isArray(e)){for(n=pe(t),o=e.length;o>s;s++)r[e[s]]=pt.css(t,e[s],!1,n);return r}return void 0!==i?pt.style(t,e,i):pt.css(t,e)},t,e,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Mt(this)?pt(this).show():pt(this).hide()})}}),pt.Tween=M,M.prototype={constructor:M,init:function(t,e,i,n,o,r){this.elem=t,this.prop=i,this.easing=o||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=r||(pt.cssNumber[i]?"":"px")},cur:function(){var t=M.propHooks[this.prop];return t&&t.get?t.get(this):M.propHooks._default.get(this)},run:function(t){var e,i=M.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=M.prototype.init,pt.fx.step={};var Ce,Te,ke=/^(?:toggle|show|hide)$/,De=/queueHooks$/;pt.Animation=pt.extend(V,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return d(i.elem,t,Ft.exec(e),i),i}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(Et);for(var i,n=0,o=t.length;o>n;n++)i=t[n],V.tweeners[i]=V.tweeners[i]||[],V.tweeners[i].unshift(e)},prefilters:[z],prefilter:function(t,e){e?V.prefilters.unshift(t):V.prefilters.push(t)}}),pt.speed=function(t,e,i){var n=t&&"object"==typeof t?pt.extend({},t):{complete:i||!i&&e||pt.isFunction(t)&&t,duration:t,easing:i&&e||e&&!pt.isFunction(e)&&e};return n.duration=pt.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in pt.fx.speeds?pt.fx.speeds[n.duration]:pt.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){pt.isFunction(n.old)&&n.old.call(this),n.queue&&pt.dequeue(this,n.queue)},n},pt.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Mt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var o=pt.isEmptyObject(t),r=pt.speed(e,i,n),s=function(){var e=V(this,pt.extend({},t),r);(o||pt._data(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",r=pt.timers,s=pt._data(this);if(o)s[o]&&s[o].stop&&n(s[o]);else for(o in s)s[o]&&s[o].stop&&De.test(o)&&n(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(i),e=!1,r.splice(o,1));!e&&i||pt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=pt._data(this),n=i[t+"queue"],o=i[t+"queueHooks"],r=pt.timers,s=n?n.length:0;for(i.finish=!0,pt.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;s>e;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),pt.each(["toggle","show","hide"],function(t,e){var i=pt.fn[e];pt.fn[e]=function(t,n,o){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(H(e,!0),t,n,o)}}),pt.each({slideDown:H("show"),slideUp:H("hide"),slideToggle:H("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){pt.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),pt.timers=[],pt.fx.tick=function(){var t,e=pt.timers,i=0;for(Ce=pt.now();i<e.length;i++)(t=e[i])()||e[i]!==t||e.splice(i--,1);e.length||pt.fx.stop(),Ce=void 0},pt.fx.timer=function(t){pt.timers.push(t),t()?pt.fx.start():pt.timers.pop()},pt.fx.interval=13,pt.fx.start=function(){Te||(Te=t.setInterval(pt.fx.tick,pt.fx.interval))},pt.fx.stop=function(){t.clearInterval(Te),Te=null},pt.fx.speeds={slow:600,fast:200,_default:400},pt.fn.delay=function(e,i){return e=pt.fx?pt.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,n){var o=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(o)}})},function(){var t,e=nt.createElement("input"),i=nt.createElement("div"),n=nt.createElement("select"),o=n.appendChild(nt.createElement("option"));i=nt.createElement("div"),i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",t=i.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),i.appendChild(e),t=i.getElementsByTagName("a")[0],t.style.cssText="top:1px",ut.getSetAttribute="t"!==i.className,ut.style=/top/.test(t.getAttribute("style")),ut.hrefNormalized="/a"===t.getAttribute("href"),ut.checkOn=!!e.value,ut.optSelected=o.selected,ut.enctype=!!nt.createElement("form").enctype,n.disabled=!0,ut.optDisabled=!o.disabled,e=nt.createElement("input"),e.setAttribute("value",""),ut.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ut.radioValue="t"===e.value}();var Ee=/\r/g,Ie=/[\x20\t\r\n\f]+/g;pt.fn.extend({val:function(t){var e,i,n,o=this[0];return arguments.length?(n=pt.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=n?t.call(this,i,pt(this).val()):t,null==o?o="":"number"==typeof o?o+="":pt.isArray(o)&&(o=pt.map(o,function(t){return null==t?"":t+""})),(e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=pt.valHooks[o.type]||pt.valHooks[o.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:(i=o.value,"string"==typeof i?i.replace(Ee,""):null==i?"":i)):void 0}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:pt.trim(pt.text(t)).replace(Ie," ")}},select:{get:function(t){for(var e,i,n=t.options,o=t.selectedIndex,r="select-one"===t.type||0>o,s=r?null:[],a=r?o+1:n.length,l=0>o?a:r?o:0;a>l;l++)if(i=n[l],(i.selected||l===o)&&(ut.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!pt.nodeName(i.parentNode,"optgroup"))){if(e=pt(i).val(),r)return e;s.push(e)}return s},set:function(t,e){for(var i,n,o=t.options,r=pt.makeArray(e),s=o.length;s--;)if(n=o[s],pt.inArray(pt.valHooks.option.get(n),r)>-1)try{n.selected=i=!0}catch(at){n.scrollHeight}else n.selected=!1;return i||(t.selectedIndex=-1),o}}}}),pt.each(["radio","checkbox"],function(){pt.valHooks[this]={set:function(t,e){return pt.isArray(e)?t.checked=pt.inArray(pt(t).val(),e)>-1:void 0}},ut.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ae,Re,Oe=pt.expr.attrHandle,Ne=/^(?:checked|selected)$/i,Pe=ut.getSetAttribute,Fe=ut.input;pt.fn.extend({attr:function(t,e){return Bt(this,pt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){pt.removeAttr(this,t)})}}),pt.extend({attr:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof t.getAttribute?pt.prop(t,e,i):(1===r&&pt.isXMLDoc(t)||(e=e.toLowerCase(),o=pt.attrHooks[e]||(pt.expr.match.bool.test(e)?Re:Ae)),void 0!==i?null===i?void pt.removeAttr(t,e):o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:(t.setAttribute(e,i+""),i):o&&"get"in o&&null!==(n=o.get(t,e))?n:(n=pt.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!ut.radioValue&&"radio"===e&&pt.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n,o=0,r=e&&e.match(Et);if(r&&1===t.nodeType)for(;i=r[o++];)n=pt.propFix[i]||i,pt.expr.match.bool.test(i)?Fe&&Pe||!Ne.test(i)?t[n]=!1:t[pt.camelCase("default-"+i)]=t[n]=!1:pt.attr(t,i,""),t.removeAttribute(Pe?i:n)}}),Re={set:function(t,e,i){return!1===e?pt.removeAttr(t,i):Fe&&Pe||!Ne.test(i)?t.setAttribute(!Pe&&pt.propFix[i]||i,i):t[pt.camelCase("default-"+i)]=t[i]=!0,i}},pt.each(pt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=Oe[e]||pt.find.attr;Fe&&Pe||!Ne.test(e)?Oe[e]=function(t,e,n){var o,r;return n||(r=Oe[e],Oe[e]=o,o=null!=i(t,e,n)?e.toLowerCase():null,Oe[e]=r),o}:Oe[e]=function(t,e,i){return i?void 0:t[pt.camelCase("default-"+e)]?e.toLowerCase():null}}),Fe&&Pe||(pt.attrHooks.value={set:function(t,e,i){return pt.nodeName(t,"input")?void(t.defaultValue=e):Ae&&Ae.set(t,e,i)}}),Pe||(Ae={set:function(t,e,i){var n=t.getAttributeNode(i);return n||t.setAttributeNode(n=t.ownerDocument.createAttribute(i)),n.value=e+="","value"===i||e===t.getAttribute(i)?e:void 0}},Oe.id=Oe.name=Oe.coords=function(t,e,i){var n;return i?void 0:(n=t.getAttributeNode(e))&&""!==n.value?n.value:null},pt.valHooks.button={get:function(t,e){var i=t.getAttributeNode(e);return i&&i.specified?i.value:void 0},set:Ae.set},pt.attrHooks.contenteditable={set:function(t,e,i){Ae.set(t,""!==e&&e,i)}},pt.each(["width","height"],function(t,e){pt.attrHooks[e]={set:function(t,i){return""===i?(t.setAttribute(e,"auto"),i):void 0}}})),ut.style||(pt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Le=/^(?:input|select|textarea|button|object)$/i,Me=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return Bt(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=pt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),pt.extend({prop:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,o=pt.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):Le.test(t.nodeName)||Me.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ut.hrefNormalized||pt.each(["href","src"],function(t,e){pt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ut.optSelected||(pt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pt.propFix[this.toLowerCase()]=this}),ut.enctype||(pt.propFix.enctype="encoding");var Be=/[\t\r\n\f]/g;pt.fn.extend({addClass:function(t){var e,i,n,o,r,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).addClass(t.call(this,e,$(this)))});if("string"==typeof t&&t)for(e=t.match(Et)||[];i=this[l++];)if(o=$(i),n=1===i.nodeType&&(" "+o+" ").replace(Be," ")){for(s=0;r=e[s++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");a=pt.trim(n),o!==a&&pt.attr(i,"class",a)}return this},removeClass:function(t){var e,i,n,o,r,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).removeClass(t.call(this,e,$(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Et)||[];i=this[l++];)if(o=$(i),n=1===i.nodeType&&(" "+o+" ").replace(Be," ")){for(s=0;r=e[s++];)for(;n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");a=pt.trim(n),o!==a&&pt.attr(i,"class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each(function(i){pt(this).toggleClass(t.call(this,i,$(this),e),e)}):this.each(function(){var e,n,o,r;if("string"===i)for(n=0,o=pt(this),r=t.match(Et)||[];e=r[n++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==i||(e=$(this),e&&pt._data(this,"__className__",e),pt.attr(this,"class",e||!1===t?"":pt._data(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+$(i)+" ").replace(Be," ").indexOf(e)>-1)return!0;return!1}}),pt.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(t,e){pt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var He=t.location,We=pt.now(),ze=/\?/,Ue=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pt.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var i,n=null,o=pt.trim(e+"");return o&&!pt.trim(o.replace(Ue,function(t,e,o,r){return i&&e&&(n=0),0===n?t:(i=o||e,n+=!r-!o,"")}))?Function("return "+o)():pt.error("Invalid JSON: "+e)},pt.parseXML=function(e){var i,n;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(n=new t.DOMParser,i=n.parseFromString(e,"text/xml")):(i=new t.ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(e))}catch(ot){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),i};var Ve=/#.*$/,$e=/([?&])_=[^&]*/,je=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,qe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ge=/^(?:GET|HEAD)$/,Ye=/^\/\//,Xe=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ke={},Je={},Qe="*/".concat("*"),Ze=He.href,ti=Xe.exec(Ze.toLowerCase())||[];pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ze,type:"GET",isLocal:qe.test(ti[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qe,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":pt.parseJSON,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?G(G(t,pt.ajaxSettings),e):G(pt.ajaxSettings,t)},ajaxPrefilter:j(Ke),ajaxTransport:j(Je),ajax:function(e,i){function n(e,i,n,o){var r,u,_,x,b,S=i;2!==y&&(y=2,l&&t.clearTimeout(l),c=void 0,a=o||"",w.readyState=e>0?4:0,r=e>=200&&300>e||304===e,n&&(x=Y(d,w,n)),x=X(d,x,w,r),r?(d.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(pt.lastModified[s]=b),(b=w.getResponseHeader("etag"))&&(pt.etag[s]=b)),204===e||"HEAD"===d.type?S="nocontent":304===e?S="notmodified":(S=x.state,u=x.data,_=x.error,r=!_)):(_=S,!e&&S||(S="error",0>e&&(e=0))),w.status=e,w.statusText=(i||S)+"",r?g.resolveWith(p,[u,S,w]):g.rejectWith(p,[w,S,_]),w.statusCode(v),v=void 0,h&&f.trigger(r?"ajaxSuccess":"ajaxError",[w,d,r?u:_]),m.fireWith(p,[w,S]),h&&(f.trigger("ajaxComplete",[w,d]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var o,r,s,a,l,h,c,u,d=pt.ajaxSetup({},i),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?pt(p):pt.event,g=pt.Deferred(),m=pt.Callbacks("once memory"),v=d.statusCode||{},_={},x={},y=0,b="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===y){if(!u)for(u={};e=je.exec(a);)u[e[1].toLowerCase()]=e[2];e=u[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return y||(t=x[i]=x[i]||t,_[t]=e),this},overrideMimeType:function(t){return y||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>y)for(e in t)v[e]=[v[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||b;return c&&c.abort(e),n(0,e),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,d.url=((e||d.url||Ze)+"").replace(Ve,"").replace(Ye,ti[1]+"//"),d.type=i.method||i.type||d.method||d.type,d.dataTypes=pt.trim(d.dataType||"*").toLowerCase().match(Et)||[""],null==d.crossDomain&&(o=Xe.exec(d.url.toLowerCase()),d.crossDomain=!(!o||o[1]===ti[1]&&o[2]===ti[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(ti[3]||("http:"===ti[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pt.param(d.data,d.traditional)),q(Ke,d,i,w),2===y)return w;h=pt.event&&d.global,h&&0==pt.active++&&pt.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ge.test(d.type),s=d.url,d.hasContent||(d.data&&(s=d.url+=(ze.test(s)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=$e.test(s)?s.replace($e,"$1_="+We++):s+(ze.test(s)?"&":"?")+"_="+We++)),d.ifModified&&(pt.lastModified[s]&&w.setRequestHeader("If-Modified-Since",pt.lastModified[s]),pt.etag[s]&&w.setRequestHeader("If-None-Match",pt.etag[s])),(d.data&&d.hasContent&&!1!==d.contentType||i.contentType)&&w.setRequestHeader("Content-Type",d.contentType),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Qe+"; q=0.01":""):d.accepts["*"]);for(r in d.headers)w.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(!1===d.beforeSend.call(p,w,d)||2===y))return w.abort();b="abort";for(r in{success:1,error:1,complete:1})w[r](d[r]);if(c=q(Je,d,i,w)){if(w.readyState=1,h&&f.trigger("ajaxSend",[w,d]),2===y)return w;d.async&&d.timeout>0&&(l=t.setTimeout(function(){w.abort("timeout")},d.timeout));try{y=1,c.send(_,n)}catch(wt){if(!(2>y))throw wt;n(-1,wt)}}else n(-1,"No Transport");return w},getJSON:function(t,e,i){return pt.get(t,e,i,"json")},getScript:function(t,e){return pt.get(t,void 0,e,"script")}}),pt.each(["get","post"],function(t,e){pt[e]=function(t,i,n,o){return pt.isFunction(i)&&(o=o||n,n=i,i=void 0),pt.ajax(pt.extend({url:t,type:e,dataType:o,data:i,success:n},pt.isPlainObject(t)&&t))}}),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pt.fn.extend({wrapAll:function(t){if(pt.isFunction(t))return this.each(function(e){pt(this).wrapAll(t.call(this,e))});if(this[0]){var e=pt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return pt.isFunction(t)?this.each(function(e){pt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=pt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=pt.isFunction(t);return this.each(function(i){pt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){pt.nodeName(this,"body")||pt(this).replaceWith(this.childNodes)}).end()}}),pt.expr.filters.hidden=function(t){return ut.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:J(t)},pt.expr.filters.visible=function(t){return!pt.expr.filters.hidden(t)};var ei=/%20/g,ii=/\[\]$/,ni=/\r?\n/g,oi=/^(?:submit|button|image|reset|file)$/i,ri=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var i,n=[],o=function(t,e){e=pt.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=pt.ajaxSettings&&pt.ajaxSettings.traditional),pt.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,function(){o(this.name,this.value)});else for(i in t)Q(i,t[i],e,o);return n.join("&").replace(ei,"+")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&ri.test(this.nodeName)&&!oi.test(t)&&(this.checked||!Ht.test(t))}).map(function(t,e){var i=pt(this).val();return null==i?null:pt.isArray(i)?pt.map(i,function(t){return{name:e.name,value:t.replace(ni,"\r\n")}}):{name:e.name,value:i.replace(ni,"\r\n")}}).get()}}),pt.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return this.isLocal?tt():nt.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||tt()}:Z;var si=0,ai={},li=pt.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in ai)ai[t](void 0,!0)}),ut.cors=!!li&&"withCredentials"in li,(li=ut.ajax=!!li)&&pt.ajaxTransport(function(e){if(!e.crossDomain||ut.cors){var i;return{send:function(n,o){var r,s=e.xhr(),a=++si;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)s[r]=e.xhrFields[r];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&s.setRequestHeader(r,n[r]+"");s.send(e.hasContent&&e.data||null),i=function(t,n){var r,l,h;if(i&&(n||4===s.readyState))if(delete ai[a],i=void 0,s.onreadystatechange=pt.noop,n)4!==s.readyState&&s.abort();else{h={},r=s.status,"string"==typeof s.responseText&&(h.text=s.responseText);try{l=s.statusText}catch(ct){l=""}r||!e.isLocal||e.crossDomain?1223===r&&(r=204):r=h.text?200:404}h&&o(r,l,h,s.getAllResponseHeaders())},e.async?4===s.readyState?t.setTimeout(i):s.onreadystatechange=ai[a]=i:i()},abort:function(){i&&i(void 0,!0)}}}}),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),pt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i=nt.head||pt("head")[0]||nt.documentElement;return{send:function(n,o){e=nt.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||o(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var hi=[],ci=/(=)\?(?=&|$)|\?\?/;pt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=hi.pop()||pt.expando+"_"+We++;return this[t]=!0,t}}),pt.ajaxPrefilter("json jsonp",function(e,i,n){var o,r,s,a=!1!==e.jsonp&&(ci.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ci.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(o=e.jsonpCallback=pt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(ci,"$1"+o):!1!==e.jsonp&&(e.url+=(ze.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||pt.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},n.always(function(){void 0===r?pt(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=i.jsonpCallback,hi.push(o)),s&&pt.isFunction(r)&&r(s[0]),s=r=void 0}),"script"):void 0}),pt.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||nt;var n=wt.exec(t),o=!i&&[];return n?[e.createElement(n[1])]:(n=v([t],e,o),o&&o.length&&pt(o).remove(),pt.merge([],n.childNodes))};var ui=pt.fn.load;pt.fn.load=function(t,e,i){if("string"!=typeof t&&ui)return ui.apply(this,arguments);var n,o,r,s=this,a=t.indexOf(" ");return a>-1&&(n=pt.trim(t.slice(a,t.length)),t=t.slice(0,a)),pt.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&pt.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(n?pt("<div>").append(pt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,r||[t.responseText,e,t])})}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){pt.fn[e]=function(t){return this.on(e,t)}}),pt.expr.filters.animated=function(t){return pt.grep(pt.timers,function(e){return t===e.elem}).length},pt.offset={setOffset:function(t,e,i){var n,o,r,s,a,l,h,c=pt.css(t,"position"),u=pt(t),d={};"static"===c&&(t.style.position="relative"),a=u.offset(),r=pt.css(t,"top"),l=pt.css(t,"left"),h=("absolute"===c||"fixed"===c)&&pt.inArray("auto",[r,l])>-1,h?(n=u.position(),s=n.top,o=n.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),pt.isFunction(e)&&(e=e.call(t,i,pt.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+o),"using"in e?e.using.call(t,d):u.css(d)}},pt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){pt.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},o=this[0],r=o&&o.ownerDocument;return r?(e=r.documentElement,pt.contains(e,o)?("undefined"!=typeof o.getBoundingClientRect&&(n=o.getBoundingClientRect()),i=et(r),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n):void 0},position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===pt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),pt.nodeName(t[0],"html")||(i=t.offset()),i.top+=pt.css(t[0],"borderTopWidth",!0),i.left+=pt.css(t[0],"borderLeftWidth",!0)),{
|
|
top:e.top-i.top-pt.css(n,"marginTop",!0),left:e.left-i.left-pt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!pt.nodeName(t,"html")&&"static"===pt.css(t,"position");)t=t.offsetParent;return t||de})}}),pt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i=/Y/.test(e);pt.fn[t]=function(n){return Bt(this,function(t,n,o){var r=et(t);return void 0===o?r?e in r?r[e]:r.document.documentElement[n]:t[n]:void(r?r.scrollTo(i?pt(r).scrollLeft():o,i?o:pt(r).scrollTop()):t[n]=o)},t,n,arguments.length,null)}}),pt.each(["top","left"],function(t,e){pt.cssHooks[e]=R(ut.pixelPosition,function(t,i){return i?(i=fe(t,e),ce.test(i)?pt(t).position()[e]+"px":i):void 0})}),pt.each({Height:"height",Width:"width"},function(t,e){pt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){pt.fn[n]=function(n,o){var r=arguments.length&&(i||"boolean"!=typeof n),s=i||(!0===n||!0===o?"margin":"border");return Bt(this,function(e,i,n){var o;return pt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===n?pt.css(e,i,s):pt.style(e,i,n,s)},e,r?n:void 0,r,null)}})}),pt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),pt.fn.size=function(){return this.length},pt.fn.andSelf=pt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pt});var di=t.jQuery,pi=t.$;return pt.noConflict=function(e){return t.$===pt&&(t.$=pi),e&&t.jQuery===pt&&(t.jQuery=di),pt},e||(t.jQuery=t.$=pt),pt}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=o(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,r)}function r(){t.datepicker._isDisabledDatepicker(p.inline?p.dpDiv.parent()[0]:p.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function s(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}function a(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var l=0,h=Array.prototype.slice;t.cleanData=function(e){return function(i){var n,o,r;for(r=0;null!=(o=i[r]);r++)try{(n=t._data(o,"events"))&&n.remove&&t(o).triggerHandler("remove")}catch(s){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var o,r,s,a={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return n||(n=i,i=t.Widget),t.isArray(n)&&(n=t.extend.apply(null,[{}].concat(n))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},o=t[l][e],r=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),s=new i,s.options=t.widget.extend({},s.options),t.each(n,function(e,n){return t.isFunction(n)?void(a[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,r=this._superApply;return this._super=t,this._superApply=o,e=n.apply(this,arguments),this._super=i,this._superApply=r,e}}()):void(a[e]=n)}),r.prototype=t.widget.extend(s,{widgetEventPrefix:o?s.widgetEventPrefix||e:e},a,{constructor:r,namespace:l,widgetName:e,widgetFullName:h}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var i,n,o=h.call(arguments,1),r=0,s=o.length;s>r;r++)for(i in o[r])n=o[r][i],o[r].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var r="string"==typeof o,s=h.call(arguments,1),a=this;return r?this.length||"instance"!==o?this.each(function(){var i,r=t.data(this,n);return"instance"===o?(a=r,!1):r?t.isFunction(r[o])&&"_"!==o.charAt(0)?(i=r[o].apply(r,s),i!==r&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):a=void 0:(s.length&&(o=t.widget.extend.apply(null,[o].concat(s))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.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:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,o,r,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},n=e.split("."),e=n.shift(),n.length){for(o=s[e]=t.widget.extend({},this.options[e]),r=0;n.length-1>r;r++)o[n[r]]=o[n[r]]||{},o=o[n[r]];if(e=n.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=i}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,n,o;for(i in e)o=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&o&&o.length&&(n=t(o.get()),this._removeClass(o,i),n.addClass(this._classes({element:n,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(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(e){function i(i,r){var s,a;for(a=0;i.length>a;a++)s=o.classesElementLookup[i[a]]||t(),s=t(e.add?t.unique(s.get().concat(e.element.get())):s.not(e.element).get()),o.classesElementLookup[i[a]]=s,n.push(i[a]),r&&e.classes[i[a]]&&n.push(e.classes[i[a]])}var n=[],o=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(n,o){-1!==t.inArray(e.target,o)&&(i.classesElementLookup[n]=t(o.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){n="boolean"==typeof n?n:i;var o="string"==typeof t||null===t,r={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n};return r.element.toggleClass(this._classes(r),n),this},_on:function(e,i,n){var o,r=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=o=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,o=this.widget()),t.each(n,function(n,s){function a(){return e||!0!==r.options.disabled&&!t(this).hasClass("ui-state-disabled")?("string"==typeof s?r[s]:s).apply(r,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+r.eventNamespace,c=l[2];c?o.on(h,c,a):i.on(h,a)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,n){var o,r,s=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(o in r)o in i||(i[o]=r[o]);return this.element.trigger(i,n),!(t.isFunction(s)&&!1===s.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,o,r){"string"==typeof o&&(o={effect:o});var s,a=o?!0===o||"number"==typeof o?i:o.effect||i:e;o=o||{},"number"==typeof o&&(o={duration:o}),s=!t.isEmptyObject(o),o.complete=r,o.delay&&n.delay(o.delay),s&&t.effects&&t.effects.effect[a]?n[e](o):a!==e&&n[a]?n[a](o.duration,o.easing,r):n.queue(function(i){t(this)[e](),r&&r.call(n[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var o,r=Math.max,s=Math.abs,a=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,i,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=n.children()[0];return t("body").append(n),e=r.offsetWidth,n.css("overflow","scroll"),i=r.offsetWidth,e===i&&(i=n[0].clientWidth),n.remove(),o=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:o,offset:n||o?{left:0,top:0}:t(e).offset(),scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(o){if(!o||!o.of)return d.apply(this,arguments);o=t.extend({},o);var u,p,f,g,m,v,_=t(o.of),x=t.position.getWithinInfo(o.within),y=t.position.getScrollInfo(x),b=(o.collision||"flip").split(" "),w={};return v=n(_),_[0].preventDefault&&(o.at="left top"),p=v.width,f=v.height,g=v.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(o[this]||"").split(" ");1===i.length&&(i=a.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=a.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],o[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===o.at[0]?m.left+=p:"center"===o.at[0]&&(m.left+=p/2),"bottom"===o.at[1]?m.top+=f:"center"===o.at[1]&&(m.top+=f/2),u=e(w.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var n,a,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),v=i(this,"marginTop"),S=h+d+i(this,"marginRight")+y.width,C=c+v+i(this,"marginBottom")+y.height,T=t.extend({},m),k=e(w.my,l.outerWidth(),l.outerHeight());"right"===o.my[0]?T.left-=h:"center"===o.my[0]&&(T.left-=h/2),"bottom"===o.my[1]?T.top-=c:"center"===o.my[1]&&(T.top-=c/2),T.left+=k[0],T.top+=k[1],n={marginLeft:d,marginTop:v},t.each(["left","top"],function(e,i){t.ui.position[b[e]]&&t.ui.position[b[e]][i](T,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:n,collisionWidth:S,collisionHeight:C,offset:[u[0]+k[0],u[1]+k[1]],my:o.my,at:o.at,within:x,elem:l})}),o.using&&(a=function(t){var e=g.left-T.left,i=e+p-h,n=g.top-T.top,a=n+f-c,u={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:T.left,top:T.top,width:h,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};h>p&&p>s(e+i)&&(u.horizontal="center"),c>f&&f>s(n+a)&&(u.vertical="middle"),u.important=r(s(e),s(i))>r(s(n),s(a))?"horizontal":"vertical",o.using.call(this,t,u)}),l.offset(t.extend(T,{using:a}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,a=t.left-e.collisionPosition.marginLeft,l=o-a,h=a+e.collisionWidth-s-o;e.collisionWidth>s?l>0&&0>=h?(i=t.left+l+e.collisionWidth-s-o,t.left+=l-i):t.left=h>0&&0>=l?o:l>h?o+s-e.collisionWidth:o:l>0?t.left+=l:h>0?t.left-=h:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollTop:n.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,l=o-a,h=a+e.collisionHeight-s-o;e.collisionHeight>s?l>0&&0>=h?(i=t.top+l+e.collisionHeight-s-o,t.top+=l-i):t.top=h>0&&0>=l?o:l>h?o+s-e.collisionHeight:o:l>0?t.top+=l:h>0?t.top-=h:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,o=e.within,r=o.offset.left+o.scrollLeft,a=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-a-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(0>(i=t.left+d+p+f+e.collisionWidth-a-r)||s(c)>i)&&(t.left+=d+p+f):u>0&&((n=t.left-e.collisionPosition.marginLeft+d+p+f-l)>0||u>s(n))&&(t.left+=d+p+f)},top:function(t,e){var i,n,o=e.within,r=o.offset.top+o.scrollTop,a=o.height,l=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-a-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(0>(n=t.top+p+f+g+e.collisionHeight-a-r)||s(c)>n)&&(t.top+=p+f+g):u>0&&((i=t.top-e.collisionPosition.marginTop+p+f+g-l)>0||u>s(i))&&(t.top+=p+f+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,n){var o,r,s,a,l,h=i.nodeName.toLowerCase();return"area"===h?(o=i.parentNode,r=o.name,!(!i.href||!r||"map"!==o.nodeName.toLowerCase())&&(s=t("img[usemap='#"+r+"']"),s.length>0&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(h)?(a=!i.disabled)&&(l=t(i).closest("fieldset")[0])&&(a=!l.disabled):a="a"===h?i.href||n:n,a&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function n(e,i,n,r){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===i?["Left","Right"]:["Top","Bottom"],r=i.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?s["inner"+i].call(this):this.each(function(){t(this).css(r,n(this,e)+"px")})},t.fn["outer"+i]=function(e,o){return"number"!=typeof e?s["outer"+i].call(this,e):this.each(function(){t(this).css(r,n(this,e,!0,o)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.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},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,n,o,r;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(o=this.eq(0).parents("label"),n=this.attr("id"),n&&(e=this.eq(0).parents().last(),r=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",o=o.add(r.find(i).addBack(i))),this.pushStack(o))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var e=t(this);return(!n||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&r.length?r:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),n=null!=i;return(!n||i>=0)&&t.ui.focusable(e,n)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var c=!1;t(document).on("mouseup",function(){c=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),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(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!o&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!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&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,c=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,n){var o,r=t.ui[e].prototype;for(o in n)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([i,n[o]])},call:function(t,e,i,n){var o,r=t.plugins[e];if(r&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;r.length>o;o++)t.options[r[o][0]]&&r[o][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.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(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<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 i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.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=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){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:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new t.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",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.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||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",e)&&i._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(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 i=this.options,n=t.isFunction(i.helper),o=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_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(" ")),t.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(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.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 t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?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,i,n,o=this.options,r=this.document[0];return this.relativeContainer=null,o.containment?"window"===o.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===o.containment?void(this.containment=[0,0,t(r).width()-this.helperProportions.width-this.margins.left,(t(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):o.containment.constructor===Array?void(this.containment=o.containment):("parent"===o.containment&&(o.containment=this.helper[0].parentNode),i=t(o.containment),void((n=i[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,o,r,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),s.grid&&(o=s.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,h=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-s.grid[1]:o+s.grid[1]:o,r=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-s.grid[0]:r+s.grid[0]:r),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?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:a?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,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var o=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i,n){var o=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))})},drag:function(e,i,n){t.each(n.sortables,function(){var o=!1,r=this;r.positionAbs=n.positionAbs,r.helperProportions=n.helperProportions,r.offset.click=n.offset.click,r._intersectsWith(r.containerCache)&&(o=!0,t.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&t.contains(r.element[0],this.element[0])&&(o=!1),o})),o?(r.isOver||(r.isOver=1,n._parent=i.helper.parent(),r.currentItem=i.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return i.helper[0]},e.target=r.currentItem[0],r._mouseCapture(e,!0),r._mouseStart(e,!0,!0),r.offset.click.top=n.offset.click.top,r.offset.click.left=n.offset.click.left,r.offset.parent.left-=n.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=n.offset.parent.top-r.offset.parent.top,n._trigger("toSortable",e),n.dropped=r.element,t.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,r.fromOutside=n),r.currentItem&&(r._mouseDrag(e),i.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",e,r._uiHash(r)),r._mouseStop(e,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var o=t("body"),r=n.options;o.css("cursor")&&(r._cursor=o.css("cursor")),o.css("cursor",r.cursor)},stop:function(e,i,n){var o=n.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var o=t(i.helper),r=n.options;o.css("opacity")&&(r._opacity=o.css("opacity")),o.css("opacity",r.opacity)},stop:function(e,i,n){var o=n.options;o._opacity&&t(i.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var o=n.options,r=!1,s=n.scrollParentNotHidden[0],a=n.document[0];s!==a&&"HTML"!==s.tagName?(o.axis&&"x"===o.axis||(n.overflowOffset.top+s.offsetHeight-e.pageY<o.scrollSensitivity?s.scrollTop=r=s.scrollTop+o.scrollSpeed:e.pageY-n.overflowOffset.top<o.scrollSensitivity&&(s.scrollTop=r=s.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(n.overflowOffset.left+s.offsetWidth-e.pageX<o.scrollSensitivity?s.scrollLeft=r=s.scrollLeft+o.scrollSpeed:e.pageX-n.overflowOffset.left<o.scrollSensitivity&&(s.scrollLeft=r=s.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(a).scrollTop()<o.scrollSensitivity?r=t(a).scrollTop(t(a).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<o.scrollSensitivity&&(r=t(a).scrollTop(t(a).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(a).scrollLeft()<o.scrollSensitivity?r=t(a).scrollLeft(t(a).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<o.scrollSensitivity&&(r=t(a).scrollLeft(t(a).scrollLeft()+o.scrollSpeed)))),!1!==r&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var o=n.options;n.snapElements=[],t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each(function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,n){var o,r,s,a,l,h,c,u,d,p,f=n.options,g=f.snapTolerance,m=i.offset.left,v=m+n.helperProportions.width,_=i.offset.top,x=_+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,h=l+n.snapElements[d].width,c=n.snapElements[d].top-n.margins.top,u=c+n.snapElements[d].height,l-g>v||m>h+g||c-g>x||_>u+g||!t.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,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(o=g>=Math.abs(c-x),r=g>=Math.abs(u-_),s=g>=Math.abs(l-v),a=g>=Math.abs(h-m),o&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h}).left)),p=o||r||s||a,"outer"!==f.snapMode&&(o=g>=Math.abs(c-_),r=g>=Math.abs(u-x),s=g>=Math.abs(l-m),a=g>=Math.abs(h-v),o&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(o||r||s||a||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=o||r||s||a||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var o,r=n.options,s=t.makeArray(t(r.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(o=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(e){t(this).css("zIndex",o+e)}),this.css("zIndex",o+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var o=t(i.helper),r=n.options;o.css("zIndex")&&(r._zIndex=o.css("zIndex")),o.css("zIndex",r.zIndex)},stop:function(e,i,n){var o=n.options;o._zIndex&&t(i.helper).css("zIndex",o._zIndex)}}),t.ui.draggable,t.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 e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,o=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&u(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(o=!0,!1):void 0}),!o&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(n)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.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 u=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,n,o){if(!i.offset)return!1;var r=(e.positionAbs||e.position.absolute).left+e.margins.left,s=(e.positionAbs||e.position.absolute).top+e.margins.top,a=r+e.helperProportions.width,l=s+e.helperProportions.height,h=i.offset.left,c=i.offset.top,u=h+i.proportions().width,d=c+i.proportions().height;switch(n){case"fit":return r>=h&&u>=a&&s>=c&&d>=l;case"intersect":return r+e.helperProportions.width/2>h&&u>a-e.helperProportions.width/2&&s+e.helperProportions.height/2>c&&d>l-e.helperProportions.height/2;case"pointer":return t(o.pageY,c,i.proportions().height)&&t(o.pageX,h,i.proportions().width);case"touch":return(s>=c&&d>=s||l>=c&&d>=l||c>s&&l>d)&&(r>=h&&u>=r||a>=h&&u>=a||h>r&&a>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var n,o,r=t.ui.ddmanager.droppables[e.options.scope]||[],s=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;r.length>n;n++)if(!(r[n].options.disabled||e&&!r[n].accept.call(r[n].element[0],e.currentItem||e.element))){for(o=0;a.length>o;o++)if(a[o]===r[n].element[0]){r[n].proportions().height=0;continue t}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===s&&r[n]._activate.call(r[n],i),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,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&u(e,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||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,i)))}),n},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,o,r,s=u(e,this,this.options.tolerance,i),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(o=this.options.scope,r=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===o}),r.length&&(n=t(r[0]).droppable("instance"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.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)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",o=!1;return e[n]>0||(e[n]=1,o=e[n]>0,e[n]=0,o)},_create:function(){var e,i=this.options,n=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,n,o,r,s=this.options,a=this;if(this.handles=s.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;n.length>i;i++)e=t.trim(n[i]),o="ui-resizable-"+e,r=t("<div>"),this._addClass(r,"ui-resizable-handle "+o),r.css({zIndex:s.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(r);this._renderAxis=function(e){var i,n,o,r;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=t(this.handles[i],this.element),r=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(o,r),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=r&&r[1]?r[1]:"se")}),s.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,n,o=!1;for(i in this.handles)((n=t(this.handles[i])[0])===e.target||t.contains(n,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(e){var i,n,o,r=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),r.containment&&(i+=t(r.containment).scrollLeft()||0,n+=t(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,o=this.originalMousePosition,r=this.axis,s=e.pageX-o.left||0,a=e.pageY-o.top||0,l=this._change[r];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,s,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,o,r,s,a,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),o=n&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,r=n?0:c.sizeDiff.width,s={width:c.helper.width()-r,height:c.helper.height()-o},a=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(s,{top:l,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,o,r,s=this.options;r={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,n=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),n>r.minHeight&&(r.minHeight=n),r.maxWidth>i&&(r.maxWidth=i),r.maxHeight>o&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,r=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,s=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return r&&(t.width=e.minWidth),s&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),r&&h&&(t.left=a-e.minWidth),n&&h&&(t.left=a-e.maxWidth),s&&c&&(t.top=l-e.minHeight),o&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),n=i.options,o=i._proportionallyResizeElements,r=o.length&&/textarea/i.test(o[0].nodeName),s=r&&i._hasScroll(o[0],"left")?0:i.sizeDiff.height,a=r?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-s},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};o&&o.length&&t(o[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,o,r,s,a,l=t(this).resizable("instance"),h=l.options,c=l.element,u=h.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u
|
|
;d&&(l.containerElement=t(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){i[t]=l._num(e.css("padding"+n))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=l.containerOffset,o=l.containerSize.height,r=l.containerSize.width,s=l._hasScroll(d,"left")?d.scrollWidth:r,a=l._hasScroll(d)?d.scrollHeight:o,l.parentData={element:d,left:n.left,top:n.top,width:s,height:a}))},resize:function(e){var i,n,o,r,s=t(this).resizable("instance"),a=s.options,l=s.containerOffset,h=s.position,c=s._aspectRatio||e.shiftKey,u={top:0,left:0},d=s.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-u.left),c&&(s.size.height=s.size.width/s.aspectRatio,p=!1),s.position.left=a.helper?l.left:0),h.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),c&&(s.size.width=s.size.height*s.aspectRatio,p=!1),s.position.top=s._helper?l.top:0),o=s.containerElement.get(0)===s.element.parent().get(0),r=/relative|absolute/.test(s.containerElement.css("position")),o&&r?(s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top):(s.offset.left=s.element.offset().left,s.offset.top=s.element.offset().top),i=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-u.left:s.offset.left-l.left)),n=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-u.top:s.offset.top-l.top)),i+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-i,c&&(s.size.height=s.size.width/s.aspectRatio,p=!1)),n+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-n,c&&(s.size.width=s.size.height*s.aspectRatio,p=!1)),p||(s.position.left=s.prevPosition.left,s.position.top=s.prevPosition.top,s.size.width=s.prevSize.width,s.size.height=s.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,n=e.containerOffset,o=e.containerPosition,r=e.containerElement,s=t(e.helper),a=s.offset(),l=s.outerWidth()-e.sizeDiff.width,h=s.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(r.css("position"))&&t(this).css({left:a.left-o.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(r.css("position"))&&t(this).css({left:a.left-o.left-n.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var n=t(this).resizable("instance"),o=n.options,r=n.originalSize,s=n.originalPosition,a={height:n.size.height-r.height||0,width:n.size.width-r.width||0,top:n.position.top-s.top||0,left:n.position.left-s.left||0};t(o.alsoResize).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},r=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(r,function(t,e){var i=(n[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),n=i.options,o=i.size,r=i.originalSize,s=i.originalPosition,a=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,h=l[0]||1,c=l[1]||1,u=Math.round((o.width-r.width)/h)*h,d=Math.round((o.height-r.height)/c)*c,p=r.width+u,f=r.height+d,g=n.maxWidth&&p>n.maxWidth,m=n.maxHeight&&f>n.maxHeight,v=n.minWidth&&n.minWidth>p,_=n.minHeight&&n.minHeight>f;n.grid=l,v&&(p+=h),_&&(f+=c),g&&(p-=h),m&&(f-=c),/^(se|s|e)$/.test(a)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.top=s.top-d):/^(sw)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.left=s.left-u):((0>=f-c||0>=p-h)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=s.top-d):(f=c-e.height,i.size.height=f,i.position.top=s.top+r.height-f),p-h>0?(i.size.width=p,i.position.left=s.left-u):(p=h-e.width,i.size.width=p,i.position.left=s.left+r.width-p))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),n=i.offset(),o={left:n.left-e.elementPos.left,top:n.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:o.left,top:o.top,right:o.left+i.outerWidth(),bottom:o.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,o=t.data(this,"selectable-item");return o?(n=!e.metaKey&&!e.ctrlKey||!o.$element.hasClass("ui-selected"),i._removeClass(o.$element,n?"ui-unselecting":"ui-selected")._addClass(o.$element,n?"ui-selecting":"ui-unselecting"),o.unselecting=!n,o.selecting=n,o.selected=n,n?i._trigger("selecting",e,{selecting:o.element}):i._trigger("unselecting",e,{unselecting:o.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,o=this.options,r=this.opos[0],s=this.opos[1],a=e.pageX,l=e.pageY;return r>a&&(i=a,a=r,r=i),s>l&&(i=l,l=s,s=i),this.helper.css({left:r,top:s,width:a-r,height:l-s}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1,c={};i&&i.element!==n.element[0]&&(c.left=i.left+n.elementPos.left,c.right=i.right+n.elementPos.left,c.top=i.top+n.elementPos.top,c.bottom=i.bottom+n.elementPos.top,"touch"===o.tolerance?h=!(c.left>a||r>c.right||c.top>l||s>c.bottom):"fit"===o.tolerance&&(h=c.left>r&&a>c.right&&c.top>s&&l>c.bottom),h?(i.selected&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(n._addClass(i.$element,"ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,n._addClass(i.$element,"ui-selected"),i.selected=!0):(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-selecting")._addClass(n.$element,"ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.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(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.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(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.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 t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var n=null,o=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,r.widgetName+"-item")===r?(n=t(this),!1):void 0}),t.data(e.target,r.widgetName+"-item")===r&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(o=!0)}),!o))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var o,r,s=this.options;if(this.currentContainer=this,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},t.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,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(r)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.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(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,o,r,s=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<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),e.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!s.dropBehaviour&&t.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"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],o=n.item[0],(r=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&o!==this.currentItem[0]&&this.placeholder[1===r?"next":"prev"]()[0]!==o&&!t.contains(this.placeholder[0],o)&&("semi-dynamic"!==this.options.type||!t.contains(this.element[0],o))){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),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,o=this.placeholder.offset(),r=this.options.axis,s={};r&&"x"!==r||(s.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(s.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.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;e>=0;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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,r=t.left,s=r+t.width,a=t.top,l=a+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||n+h>a&&l>n+h,d="y"===this.options.axis||e+c>r&&s>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>r&&s>i-this.helperProportions.width/2&&n+this.helperProportions.height/2>a&&l>o-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!n||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,o,r,s,a=[],l=[],h=this._connectWith();if(h&&e)for(n=h.length-1;n>=0;n--)for(r=t(h[n],this.document[0]),o=r.length-1;o>=0;o--)(s=t.data(r[o],this.widgetFullName))&&s!==this&&!s.options.disabled&&l.push([t.isFunction(s.options.items)?s.options.items.call(s.element):t(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,o,r,s,a,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(o=t(d[i],this.document[0]),n=o.length-1;n>=0;n--)(r=t.data(o[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&(u.push([t.isFunction(r.options.items)?r.options.items.call(r.element[0],e,{item:this.currentItem}):t(r.options.items,r.element),r]),this.containers.push(r));for(i=u.length-1;i>=0;i--)for(s=u[i][1],a=u[i][0],n=0,h=a.length;h>n;n++)l=t(a[n]),l.data(this.widgetName+"-item",s),c.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,o,r;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=o.outerWidth(),n.height=o.outerHeight()),r=o.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(i=this.containers.length-1;i>=0;i--)r=this.containers[i].element.offset(),this.containers[i].containerCache.left=r.left,this.containers[i].containerCache.top=r.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+n+">",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===n?e._createTrPlaceholder(e.currentItem,o):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){(!i||n.forcePlaceholderSize)&&(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each(function(){t("<td> </td>",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,n,o,r,s,a,l,h,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(o=1e4,r=null,c=d.floating||this._isFloating(this.currentItem),s=c?"left":"top",a=c?"width":"height",u=c?"pageX":"pageY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[s],h=!1,e[u]-l>this.items[n][a]/2&&(h=!0),o>Math.abs(e[u]-l)&&(o=Math.abs(e[u]-l),r=this.items[n],this.direction=h?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.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||i.forceHelperSize)&&n.width(this.currentItem.width()),(!n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.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]&&t.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()&&t.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 t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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,i,n,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),("document"===o.containment||"window"===o.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.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(o.containment)||(e=t(o.containment)[0],i=t(o.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())*n}},_generatePosition:function(e){var i,n,o=this.options,r=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(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]&&(s=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]&&(s=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((s-this.originalPageY)/o.grid[1])*o.grid[1],s=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.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-o.grid[0]:n+o.grid[0]:n)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)("auto"===this._storedCSS[n]||"static"===this._storedCSS[n])&&(this._storedCSS[n]="")
|
|
;this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&o.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(o.push(function(t){this._trigger("remove",t,this._uiHash())}),o.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||o.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(o.push(i("out",this,this.containers[n])),this.containers[n].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,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;o.length>n;n++)o[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,n=this.options.icons;n&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),void("icons"===t&&(this._destroyIcons(),e&&this._createIcons())))},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,o=this.headers.index(e.target),r=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(o+1)%n];break;case i.LEFT:case i.UP:r=this.headers[(o-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[n-1]}r&&(t(e.target).attr("tabIndex",-1),t(r).attr("tabIndex",0),t(r).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,n=i.heightStyle,o=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),n=e.next(),o=n.uniqueId().attr("id");e.attr("aria-controls",o),n.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(e=o.height(),this.element.siblings(":visible").each(function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,n,o=this.options,r=this.active,s=t(e.currentTarget),a=s[0]===r[0],l=a&&o.collapsible,h=l?t():s.next(),c=r.next(),u={oldHeader:r,oldPanel:c,newHeader:l?t():s,newPanel:h};e.preventDefault(),a&&!o.collapsible||!1===this._trigger("beforeActivate",e,u)||(o.active=!l&&this.headers.index(s),this.active=a?t():s,this._toggle(u),this._removeClass(r,"ui-accordion-header-active","ui-state-active"),o.icons&&(i=r.children(".ui-accordion-header-icon"),this._removeClass(i,null,o.icons.activeHeader)._addClass(i,null,o.icons.header)),a||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),o.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,o.icons.header)._addClass(n,null,o.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var n,o,r,s=this,a=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=h&&c.down||c,d=function(){s._toggleComplete(i)};return"number"==typeof u&&(r=u),"string"==typeof u&&(o=u),o=o||u.easing||c.easing,r=r||u.duration||c.duration,e.length?t.length?(n=t.show().outerHeight(),e.animate(this.hideProps,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:r,easing:o,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(a+=i.now):"content"!==s.options.heightStyle&&(i.now=Math.round(n-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,r,o,d):t.animate(this.showProps,r,o,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.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(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.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 i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget);i[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(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.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(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,n,o,r,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,n=this.previousFilter||"",r=!1,o=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),o===n?r=!0:o=n+o,i=this._filterMenuItems(o),i=r&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(o=String.fromCharCode(e.keyCode),i=this._filterMenuItems(o)),i.length?(this.focus(e,i),this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n,o,r,s=this,a=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),n=t("<span>").data("ui-menu-submenu-caret",!0);s._addClass(n,"ui-menu-icon","ui-icon "+a),i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);s._isDivider(e)&&s._addClass(e,"ui-menu-divider","ui-widget-content")}),o=i.not(".ui-menu-item, .ui-menu-divider"),r=o.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(o,"ui-menu-item")._addClass(r,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,o;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,o,r,s,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-i-n,r=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.outerHeight(),0>o?this.activeMenu.scrollTop(r+o):o+a>s&&this.activeMenu.scrollTop(r+o-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.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(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},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(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,o;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-n-o}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,o;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+o>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.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 e,i,n,o=this.element[0].nodeName.toLowerCase(),r="textarea"===o,s="input"===o;this.isMultiLine=r||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[r||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var r=t.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:e=!0,this._move("previousPage",o);break;case r.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case r.UP:e=!0,this._keyEvent("previous",o);break;case r.DOWN:e=!0,this._keyEvent("next",o);break;case r.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault());if(!i){var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<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]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var n,o;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(o=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:o})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(o.value),void((n=i.item.attr("aria-label")||o.value)&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),o=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=o,this._delay(function(){this.previous=o,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=t("<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(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(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 e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,o){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){o(t)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!n)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),--this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var d=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(n,o){var r,s={};return o?"controlgroupLabel"===n?(r=e.element.find(o),r.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(r,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(r.get()))):void(t.fn[n]&&(s=e["_"+n+"Options"]?e["_"+n+"Options"]("middle"):{classes:{}},e.element.find(o).each(function(){var o=t(this),r=o[n]("instance"),a=t.widget.extend({},s);if("button"!==n||!o.parent(".ui-spinner").length){r||(r=o[n]()[n]("instance")),r&&(a.classes=e._resolveClassesValues(a.classes,r)),o[n](a);var l=o[n]("widget");t.data(l[0],"ui-controlgroup-data",r||o[n]("instance")),i.push(l[0])}}))):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),n=i.data("ui-controlgroup-data");n&&n[e]&&n[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var n={};return t.each(e,function(o){var r=i.options.classes[o]||"";r=t.trim(r.replace(d,"")),n[o]=(r+" "+e[o]).replace(/\s+/g," ")}),n},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?void this._callChildMethod(e?"disable":"enable"):void this.refresh()},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,n){var o=e[n]().data("ui-controlgroup-data");if(o&&i["_"+o.widgetName+"Options"]){var r=i["_"+o.widgetName+"Options"](1===e.length?"only":n);r.classes=i._resolveClassesValues(r.classes,o),o.element[o.widgetName](r)}else i._updateCornerClass(e[n](),n)}),
|
|
this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,n=this,o=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(o.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(o.disabled=e),o},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,n="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(n):t(n).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e)):void this.refresh()):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var n="iconPosition"!==e,o=n?this.options.iconPosition:i,r="top"===o||"bottom"===o;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,i),this._attachIcon(o),r?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(o))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?void this._super("showLabel",e):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var p;t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return s(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,o,r;n=e.nodeName.toLowerCase(),o="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),r=this._newInst(t(e),o),r.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,r):o&&this._inlineDatepicker(e,r)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?o(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,o,r,s=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),s&&(i.append=t("<span class='"+this._appendClass+"'>"+s+"</span>"),e[a?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&e.on("focus",this._showDatepicker),("button"===n||"both"===n)&&(o=this._get(i,"buttonText"),r=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:r,alt:o,title:o}):t("<button type='button'></button>").addClass(this._triggerClass).html(r?t("<img/>").attr({src:r,alt:o,title:o}):o)),e[a?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,o,r=new Date(2009,11,20),s=this._get(t,"dateFormat");s.match(/[DM]/)&&(e=function(t){for(i=0,n=0,o=0;t.length>o;o++)t[o].length>i&&(i=t[o].length,n=o);return n},r.setMonth(e(this._get(t,s.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(e(this._get(t,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),t.input.attr("size",this._formatDate(t,r).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,o,r){var a,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),s(d.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty(),p===o&&(p=null))},_enableDatepicker:function(e){var i,n,o=t(e),r=t.data(e,"datepicker");o.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=o.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,o=t(e),r=t.data(e,"datepicker");o.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=o.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,n){var o,r,a,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(o=i||{},"string"==typeof i&&(o={},o[i]=n),void(h&&(this._curInst===h&&this._hideDatepicker(),r=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),s(h.settings,o),null!==a&&void 0!==o.dateFormat&&void 0===o.minDate&&(h.settings.minDate=this._formatDate(h,a)),null!==l&&void 0!==o.dateFormat&&void 0===o.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in o&&(o.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,r),this._updateAlternate(h),this._updateDatepicker(h))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,o,r=t.datepicker._getInst(e.target),s=!0,a=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),s=!1;break;case 13:return o=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",r.dpDiv),o[0]&&t.datepicker._selectDay(e.target,r.selectedMonth,r.selectedYear,o[0]),i=t.datepicker._get(r,"onSelect"),i?(n=t.datepicker._formatDate(r),i.apply(r.input?r.input[0]:null,[n,r])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(r,"stepBigMonths"):-t.datepicker._get(r,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(r,"stepBigMonths"):+t.datepicker._get(r,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(r,"stepBigMonths"):-t.datepicker._get(r,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(r,"stepBigMonths"):+t.datepicker._get(r,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,o=t.datepicker._getInst(e.target);return t.datepicker._get(o,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(o){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var n,o,r,a,l,h,c;n=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),o=t.datepicker._get(n,"beforeShow"),!1!==(r=o?o.apply(e,[e,n]):{})&&(s(n.settings,r),n.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(n),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return!(a|="fixed"===t(this).css("position"))}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(n),l=t.datepicker._checkOffset(n,l,a),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),n.inline||(h=t.datepicker._get(n,"showAnim"),c=t.datepicker._get(n,"duration"),n.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?n.dpDiv.show(h,t.datepicker._get(n,"showOptions"),c):n.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),t.datepicker._curInst=n))}},_updateDatepicker:function(e){this.maxRows=4,p=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,n=this._getNumberOfMonths(e),o=n[1],s=e.dpDiv.find("."+this._dayOverClass+" a");s.length>0&&r.apply(s.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",17*o+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var o=e.dpDiv.outerWidth(),r=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?o-s:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+o>l&&l>o?Math.abs(i.left+o-l):0),i.top-=Math.min(i.top,i.top+r>h&&h>r?Math.abs(r+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),o=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[o?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,o,r,s=this._curInst;!s||e&&s!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(s,"showAnim"),n=this._get(s,"duration"),o=function(){t.datepicker._tidyDialog(s)},t.effects&&(t.effects.effect[i]||t.effects[i])?s.dpDiv.hide(i,t.datepicker._get(s,"showOptions"),n,o):s.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,o),i||o(),this._datepickerShowing=!1,r=this._get(s,"onClose"),r&&r.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==n)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var o=t(e),r=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(r,i+("M"===n?this._get(r,"showCurrentAtPos"):0),n),this._updateDatepicker(r))},_gotoToday:function(e){var i,n=t(e),o=this._getInst(n[0]);this._get(o,"gotoCurrent")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(i=new Date,o.selectedDay=i.getDate(),o.drawMonth=o.selectedMonth=i.getMonth(),o.drawYear=o.selectedYear=i.getFullYear()),this._notifyChange(o),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var o=t(e),r=this._getInst(o[0]);r["selected"+("M"===n?"Month":"Year")]=r["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(o)},_selectDay:function(e,i,n,o){var r,s=t(e);t(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(r=this._getInst(s[0]),r.selectedDay=r.currentDay=t("a",o).html(),r.selectedMonth=r.currentMonth=i,r.selectedYear=r.currentYear=n,this._selectDate(e,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,o=t(e),r=this._getInst(o[0]);i=null!=i?i:this._formatDate(r),r.input&&r.input.val(i),this._updateAlternate(r),n=this._get(r,"onSelect"),n?n.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,n,o,r=this._get(e,"altField");r&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),o=this.formatDate(i,n,this._getFormatConfig(e)),t(r).val(o))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?""+i:i+""))return null;var o,r,s,a,l=0,h=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,_=-1,x=!1,y=function(t){var i=e.length>o+1&&e.charAt(o+1)===t;return i&&o++,i},b=function(t){var e=y(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,o="y"===t?n:1,r=RegExp("^\\d{"+o+","+n+"}"),s=i.substring(l).match(r);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},w=function(e,n,o){var r=-1,s=t.map(y(e)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(s,function(t,e){var n=e[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=e[0],l+=n.length,!1):void 0}),-1!==r)return r+1;throw"Unknown name at position "+l},S=function(){if(i.charAt(l)!==e.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;e.length>o;o++)if(x)"'"!==e.charAt(o)||y("'")?S():x=!1;else switch(e.charAt(o)){case"d":v=b("d");break;case"D":w("D",u,d);break;case"o":_=b("o");break;case"m":m=b("m");break;case"M":m=w("M",p,f);break;case"y":g=b("y");break;case"@":a=new Date(b("@")),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((b("!")-this._ticksTo1970)/1e4),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"'":y("'")?S():x=!0;break;default:S()}if(i.length>l&&(s=i.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),_>-1)for(m=1,v=_;!((r=this._getDaysInMonth(g,m-1))>=v);)m++,v-=r;if(a=this._daylightSavingAdjust(new Date(g,m-1,v)),a.getFullYear()!==g||a.getMonth()+1!==m||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var n,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,s=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},h=function(t,e,i){var n=""+e;if(l(t))for(;i>n.length;)n="0"+n;return n},c=function(t,e,i,n){return l(t)?n[e]:i[e]},u="",d=!1;if(e)for(n=0;t.length>n;n++)if(d)"'"!==t.charAt(n)||l("'")?u+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),o,r);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),s,a);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(n)}return u},_possibleChars:function(t){var e,i="",n=!1,o=function(i){var n=t.length>e+1&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;t.length>e;e++)if(n)"'"!==t.charAt(e)||o("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":o("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,o=this._getDefaultDate(t),r=o,s=this._getFormatConfig(t);try{r=this.parseDate(i,n,s)||o}catch(a){n=e?"":n}t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),t.currentDay=n?r.getDate():0,t.currentMonth=n?r.getMonth():0,t.currentYear=n?r.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var o=null==i||""===i?n:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(n){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),r=n.getMonth(),s=n.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=a.exec(i);l;){switch(l[2]||"d"){case"d":case"D":s+=parseInt(l[1],10);break;case"w":case"W":s+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(o,r));break;case"y":case"Y":o+=parseInt(l[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(o,r))}l=a.exec(i)}return new Date(o,r,s)}(i):"number"==typeof i?isNaN(i)?n:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?n:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,o=t.selectedMonth,r=t.selectedYear,s=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=s.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=s.getMonth(),t.drawYear=t.selectedYear=t.currentYear=s.getFullYear(),o===t.selectedMonth&&r===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},
|
|
next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,o,r,s,a,l,h,c,u,d,p,f,g,m,v,_,x,y,b,w,S,C,T,k,D,E,I,A,R,O,N,P,F,L,M,B,H,W=new Date,z=this._daylightSavingAdjust(new Date(W.getFullYear(),W.getMonth(),W.getDate())),U=this._get(t,"isRTL"),V=this._get(t,"showButtonPanel"),$=this._get(t,"hideIfNoPrevNext"),j=this._get(t,"navigationAsDateFormat"),q=this._getNumberOfMonths(t),G=this._get(t,"showCurrentAtPos"),Y=this._get(t,"stepMonths"),X=1!==q[0]||1!==q[1],K=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-G,tt=t.drawYear;if(0>Z&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-q[0]*q[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)0>--Z&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=j?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-Y,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"e":"w")+"'>"+i+"</span></a>":$?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"e":"w")+"'>"+i+"</span></a>",o=this._get(t,"nextText"),o=j?this.formatDate(o,this._daylightSavingAdjust(new Date(tt,Z+Y,1)),this._getFormatConfig(t)):o,r=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"w":"e")+"'>"+o+"</span></a>":$?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"w":"e")+"'>"+o+"</span></a>",s=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?K:z,s=j?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=V?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(U?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(U?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),x=this._getDefaultDate(t),y="",w=0;q[0]>w;w++){for(S="",this.maxRows=4,C=0;q[1]>C;C++){if(T=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),k=" ui-corner-all",D="",X){if(D+="<div class='ui-datepicker-group",q[1]>1)switch(C){case 0:D+=" ui-datepicker-group-first",k=" ui-corner-"+(U?"right":"left");break;case q[1]-1:D+=" ui-datepicker-group-last",k=" ui-corner-"+(U?"left":"right");break;default:D+=" ui-datepicker-group-middle",k=""}D+="'>"}for(D+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+k+"'>"+(/all|left/.test(k)&&0===w?U?r:n:"")+(/all|right/.test(k)&&0===w?U?n:r:"")+this._generateMonthYearHeader(t,Z,tt,J,Q,w>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",E=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",b=0;7>b;b++)I=(b+c)%7,E+="<th scope='col'"+((b+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[I]+"'>"+p[I]+"</span></th>";for(D+=E+"</tr></thead><tbody>",A=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,A)),R=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,O=Math.ceil((R+A)/7),N=X&&this.maxRows>O?this.maxRows:O,this.maxRows=N,P=this._daylightSavingAdjust(new Date(tt,Z,1-R)),F=0;N>F;F++){for(D+="<tr>",L=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(P)+"</td>":"",b=0;7>b;b++)M=m?m.apply(t.input?t.input[0]:null,[P]):[!0,""],B=P.getMonth()!==Z,H=B&&!_||!M[0]||J&&J>P||Q&&P>Q,L+="<td class='"+((b+c+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(P.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||x.getTime()===P.getTime()&&x.getTime()===T.getTime()?" "+this._dayOverClass:"")+(H?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!v?"":" "+M[1]+(P.getTime()===K.getTime()?" "+this._currentClass:"")+(P.getTime()===z.getTime()?" ui-datepicker-today":""))+"'"+(B&&!v||!M[2]?"":" title='"+M[2].replace(/'/g,"'")+"'")+(H?"":" data-handler='selectDay' data-event='click' data-month='"+P.getMonth()+"' data-year='"+P.getFullYear()+"'")+">"+(B&&!v?" ":H?"<span class='ui-state-default'>"+P.getDate()+"</span>":"<a class='ui-state-default"+(P.getTime()===z.getTime()?" ui-state-highlight":"")+(P.getTime()===K.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+"' href='#'>"+P.getDate()+"</a>")+"</td>",P.setDate(P.getDate()+1),P=this._daylightSavingAdjust(P);D+=L+"</tr>"}Z++,Z>11&&(Z=0,tt++),D+="</tbody></table>"+(X?"</div>"+(q[0]>0&&C===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),S+=D}y+=S}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,n,o,r,s,a){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),x="<div class='ui-datepicker-title'>",y="";if(r||!m)y+="<span class='ui-datepicker-month'>"+s[e]+"</span>";else{for(l=n&&n.getFullYear()===i,h=o&&o.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!h||o.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+a[c]+"</option>");y+="</select>"}if(_||(x+=y+(!r&&m&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",r||!v)x+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=n?Math.max(f,n.getFullYear()):f,g=o?Math.min(g,o.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",x+=t.yearshtml,t.yearshtml=null}return x+=this._get(t,"yearSuffix"),_&&(x+=(!r&&m&&v?"":" ")+y),x+="</div>"},_adjustInstDate:function(t,e,i){var n=t.selectedYear+("Y"===i?e:0),o=t.selectedMonth+("M"===i?e:0),r=Math.min(t.selectedDay,this._getDaysInMonth(n,o))+("D"===i?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,o,r)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),o=i&&i>e?i:e;return n&&o>n?n:o},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var o=this._getNumberOfMonths(t),r=this._daylightSavingAdjust(new Date(i,n+(0>e?e:o[0]*o[1]),1));return 0>e&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(t,r)},_isInRange:function(t,e){var i,n,o=this._getMinMaxDate(t,"min"),r=this._getMinMaxDate(t,"max"),s=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),s=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(s+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!o||e.getTime()>=o.getTime())&&(!r||e.getTime()<=r.getTime())&&(!s||e.getFullYear()>=s)&&(!a||a>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var o=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),o,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var n=!1,o=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),r=Math.max.apply(null,o);return r>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",r+1),n=!0),n&&!i&&this._trigger("focus",e),n},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),o=i.filter(":last");e.target!==o[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){o.trigger("focus")}),e.preventDefault()):(this._delay(function(){n.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(t.each(i,function(i,n){var o,r;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),o=n.click,r={icon:n.icon,iconPosition:n.iconPosition,showLabel:n.showLabel,icons:n.icons,text:n.text},delete n.click,delete n.icon,delete n.iconPosition,delete n.showLabel,delete n.icons,"boolean"==typeof n.text&&delete n.text,t("<button></button>",n).button(r).appendTo(e.uiButtonSet).on("click",function(){o.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,o){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(o))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(o,r){var s=r.offset.left-i.document.scrollLeft(),a=r.offset.top-i.document.scrollTop();n.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(a>=0?"+":"")+a,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",o,e(r))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,o=n.resizable,r=this.uiDialog.css("position"),s="string"==typeof o?o:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:s,start:function(n,o){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(o))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(o,r){var s=i.uiDialog.offset(),a=s.left-i.document.scrollLeft(),l=s.top-i.document.scrollTop();n.height=i.uiDialog.height(),n.width=i.uiDialog.width(),n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",o,e(r))}}).css("position",r)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,n=!1,o={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(o[t]=e)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(e,i){var n,o,r=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(n=r.is(":data(ui-draggable)"),n&&!i&&r.draggable("destroy"),!n&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(o=r.is(":data(ui-resizable)"),o&&!i&&r.resizable("destroy"),o&&"string"==typeof i&&r.resizable("option","handles",i),o||!1===i||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var n=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&n.index!==e.focusIndex&&(e._trigger("focus",t,{item:n}),e.isOpen||e._select(n,t)),e.focusIndex=n.index,e.button.attr("aria-activedescendant",e.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var n=this,o="";t.each(i,function(i,r){var s;r.optgroup!==o&&(s=t("<li>",{text:r.optgroup}),n._addClass(s,"ui-selectmenu-optgroup","ui-menu-divider"+(r.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),s.appendTo(e),o=r.optgroup),n._renderItemData(e,r)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var n=t("<li>"),o=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(o,i.label),n.append(o).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,n,o=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),o+=":not(.ui-state-disabled)"),n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](o).eq(-1):i[t+"All"](o).eq(0),n.length&&this.menuInstance.focus(e,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){
|
|
var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(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},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return!1===t?void this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),void this.button.outerWidth(t))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,n=[];e.each(function(e,o){n.push(i._parseOption(t(o),e))}),this.items=n},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,o=this.element.find(".ui-slider-handle"),r=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),e=o.length;i>e;e++)r.push("<span tabindex='0'></span>");this.handles=o.add(t(r.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,n,o,r,s,a,l,h=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-h.values(e));(o>i||o===i&&(e===h._lastChangedValue||h.values(e)===c.min))&&(o=i,r=t(this),s=e)}),!1!==this._start(e,s)&&(this._mouseSliding=!0,this._handleIndex=s,this._addClass(r,null,"ui-state-active"),r.trigger("focus"),a=r.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-a.left-r.width()/2,top:e.pageY-a.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,s,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,o,r;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),o=this._valueMax()-this._valueMin(),r=this._valueMin()+n*o,this._trimAlignValue(r)},_uiHash:function(t,e,i){var n={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==e?e:this.values(t),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var n,o=this.value(),r=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(n,i):Math.max(n,i)),r[e]=i),i!==o&&!1!==this._trigger("slide",t,this._uiHash(e,i,r))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,o,r;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,o=arguments[0],r=0;n.length>r;r+=1)n[r]=this._trimAlignValue(o[r]),this._change(null,r);this._refreshValue()},_setOption:function(e,i){var n,o=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(o=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=o-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;i.length>n;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;t=Math.round((t-e)/i)*i+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,n,o,r,s=this.options.range,a=this.options,l=this,h=!this._animateOff&&a.animate,c={};this._hasMultipleValues()?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,a.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),o=this._valueMin(),r=this._valueMax(),i=r!==o?(n-o)/(r-o)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},a.animate),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(e){var i,n,o,r=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,r)))return}switch(o=this.options.step,i=n=this._hasMultipleValues()?this.values(r):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-o)}this._slide(e,r,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,n){var o=i.attr(n);null!=o&&o.length&&(e[n]=o)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&n.min>t?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,n,o;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i))):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,e.up),o=this.buttons.last().find(".ui-icon"),this._removeClass(o,null,this.options.icons.down),this._addClass(o,null,e.down)),void this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:a(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:a(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:a(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:a(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:a(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void a(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,n;i=e.href.replace(t,""),n=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(o){}try{n=decodeURIComponent(n)}catch(o){}return e.hash.length>1&&i===n}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=!1!==this.options.active&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,o){return t(o).attr("aria-controls")===n?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),o=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){for(var n=this.tabs.length-1;-1!==t.inArray(function(){return e>n&&(e=0),0>e&&(e=n),e}(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?void this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,n=this.anchors,o=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,n){var o,r,s,a=t(n).uniqueId().attr("id"),l=t(n).closest("li"),h=l.attr("aria-controls");e._isLocal(n)?(o=n.hash,s=o.substring(1),r=e.element.find(e._sanitizeSelector(o))):(s=l.attr("aria-controls")||t({}).uniqueId()[0].id,o="#"+s,r=e.element.find(o),r.length||(r=e._createPanel(s),r.insertAfter(e.panels[i-1]||e.tablist)),r.attr("aria-live","polite")),r.length&&(e.panels=e.panels.add(r)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":s,"aria-labelledby":a}),r.attr("aria-labelledby",a)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(o.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,n,o;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),o=0;n=this.tabs[o];o++)i=t(n),!0===e||-1!==t.inArray(o,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,o=t(e.currentTarget),r=o.closest("li"),s=r[0]===n[0],a=s&&i.collapsible,l=a?t():this._getPanelForTab(r),h=n.length?this._getPanelForTab(n):t(),c={oldTab:n,oldPanel:h,newTab:a?t():r,newPanel:l};e.preventDefault(),r.hasClass("ui-state-disabled")||r.hasClass("ui-tabs-loading")||this.running||s&&!i.collapsible||!1===this._trigger("beforeActivate",e,c)||(i.active=!a&&this.tabs.index(r),this.active=s?t():r,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(r),e),this._toggle(e,c))},_toggle:function(e,i){function n(){r.running=!1,r._trigger("activate",e,i)}function o(){r._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&r.options.show?r._show(s,r.options.show,n):(s.show(),n())}var r=this,s=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){r._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a.hide(),o()),a.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&a.length?i.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),r=o.find(".ui-tabs-anchor"),s=this._getPanelForTab(o),a={tab:o,panel:s},l=function(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(o,"ui-tabs-loading"),s.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr};this._isLocal(r[0])||(this.xhr=t.ajax(this._ajaxSettings(r,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(o,"ui-tabs-loading"),s.attr("aria-busy","true"),this.xhr.done(function(t,e,o){setTimeout(function(){s.html(t),n._trigger("load",i,a),l(o,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,n){var o=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,r){return o._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:r},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))},_removeDescribedBy:function(e){
|
|
var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),o=t.inArray(i,n);-1!==o&&n.splice(o,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var n=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var o=t.Event("blur");o.target=o.currentTarget=n.element[0],e.close(o,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,o=this,r=e?e.type:null;return"string"==typeof n||n.nodeType||n.jquery?this._open(e,t,n):void((i=n.call(t[0],function(i){o._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=r),this._open(e,t,i))})}))&&this._open(e,t,i))},_open:function(e,i,n){function o(t){h.of=t,s.is(":hidden")||s.position(h)}var r,s,a,l,h=t.extend({},this.options.position);if(n){if(r=this._find(i))return void r.tooltip.find(".ui-tooltip-content").html(n);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),r=this._tooltip(i),s=r.tooltip,this._addDescribedBy(i,s.attr("id")),s.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),l=t("<div>").html(s.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:o}),o(e)):s.position(t.extend({of:i},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){s.is(":visible")&&(o(h.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:s})}},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,o=t(e?e.currentTarget:this.element),r=this._find(o);return r?(i=r.tooltip,void(r.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&!o.attr("title")&&o.attr("title",o.data("ui-tooltip-title")),this._removeDescribedBy(o),r.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(t(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),r.closing=!0,this._trigger("close",e,{tooltip:i}),r.hiding||(r.closing=!1)))):void o.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),n=t("<div>").appendTo(i),o=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[o]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var o=t.Event("blur"),r=n.element;o.target=o.currentTarget=r[0],e.close(o,!0),t("#"+i).remove(),r.data("ui-tooltip-title")&&(r.attr("title")||r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip;var f="ui-effects-",g="ui-effects-style",m="ui-effects-animated",v=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var n=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:t>n.max?n.max:t)}function n(i){var n=l(),o=n._rgba=[];return i=i.toLowerCase(),p(a,function(t,r){var s,a=r.re.exec(i),l=a&&r.parse(a),c=r.space||"rgba";return l?(s=n[c](l),n[h[c].cache]=s[h[c].cache],o=n._rgba=s._rgba,!1):e}),o.length?("0,0,0,0"===o.join()&&t.extend(o,r.transparent),n):r[i]}function o(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var r,s=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,n,o){return new t.Color.fn.parse(e,i,n,o)},h={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},u=l.support={},d=t("<p>")[0],p=t.each;d.style.cssText="background-color:rgba(1,1,1,.5)",u.rgba=d.style.backgroundColor.indexOf("rgba")>-1,p(h,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(o,s,a,c){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(s),s=e);var u=this,d=t.type(o),f=this._rgba=[];return s!==e&&(o=[o,s,a,c],d="array"),"string"===d?this.parse(n(o)||r._default):"array"===d?(p(h.rgba.props,function(t,e){f[e.idx]=i(o[e.idx],e)}),this):"object"===d?(o instanceof l?p(h,function(t,e){o[e.cache]&&(u[e.cache]=o[e.cache].slice())}):p(h,function(e,n){var r=n.cache;p(n.props,function(t,e){if(!u[r]&&n.to){if("alpha"===t||null==o[t])return;u[r]=n.to(u._rgba)}u[r][e.idx]=i(o[t],e,!0)}),u[r]&&0>t.inArray(null,u[r].slice(0,3))&&(u[r][3]=1,n.from&&(u._rgba=n.from(u[r])))}),this):e},is:function(t){var i=l(t),n=!0,o=this;return p(h,function(t,r){var s,a=i[r.cache];return a&&(s=o[r.cache]||r.to&&r.to(o._rgba)||[],p(r.props,function(t,i){return null!=a[i.idx]?n=a[i.idx]===s[i.idx]:e})),n}),n},_space:function(){var t=[],e=this;return p(h,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=l(t),o=n._space(),r=h[o],s=0===this.alpha()?l("transparent"):this,a=s[r.cache]||r.to(s._rgba),u=a.slice();return n=n[r.cache],p(r.props,function(t,o){var r=o.idx,s=a[r],l=n[r],h=c[o.type]||{};null!==l&&(null===s?u[r]=l:(h.mod&&(l-s>h.mod/2?s+=h.mod:s-l>h.mod/2&&(s-=h.mod)),u[r]=i((l-s)*e+s,o)))}),this[o](u)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),o=l(e)._rgba;return l(t.map(i,function(t,e){return(1-n)*o[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,h.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,o=t[1]/255,r=t[2]/255,s=t[3],a=Math.max(n,o,r),l=Math.min(n,o,r),h=a-l,c=a+l,u=.5*c;return e=l===a?0:n===a?60*(o-r)/h+360:o===a?60*(r-n)/h+120:60*(n-o)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==s?1:s]},h.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],r=t[3],s=.5>=n?n*(1+i):n+i-n*i,a=2*n-s;return[Math.round(255*o(a,s,e+1/3)),Math.round(255*o(a,s,e)),Math.round(255*o(a,s,e-1/3)),r]},p(h,function(n,o){var r=o.props,a=o.cache,h=o.to,c=o.from;l.fn[n]=function(n){if(h&&!this[a]&&(this[a]=h(this._rgba)),n===e)return this[a].slice();var o,s=t.type(n),u="array"===s||"object"===s?n:arguments,d=this[a].slice();return p(r,function(t,e){var n=u["object"===s?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)}),c?(o=l(c(d)),o[a]=d,o):l(d)},p(r,function(e,i){l.fn[e]||(l.fn[e]=function(o){var r,a=t.type(o),l="alpha"===e?this._hsla?"hsla":"rgba":n,h=this[l](),c=h[i.idx];return"undefined"===a?c:("function"===a&&(o=o.call(this,c),a=t.type(o)),null==o&&i.empty?this:("string"===a&&(r=s.exec(o))&&(o=c+parseFloat(r[2])*("+"===r[1]?1:-1)),h[i.idx]=o,this[l](h)))})})}),l.hook=function(e){var i=e.split(" ");p(i,function(e,i){t.cssHooks[i]={set:function(e,o){var r,s,a="";if("transparent"!==o&&("string"!==t.type(o)||(r=n(o)))){if(o=l(r||o),!u.rgba&&1!==o._rgba[3]){for(s="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}o=o.blend(a&&"transparent"!==a?a:"_default")}o=o.toRgbaString()}try{e.style[i]=o}catch(a){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},r=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(v),function(){function e(e){var i,n,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,r={};if(o&&o.length&&o[0]&&o[o[0]])for(n=o.length;n--;)i=o[n],"string"==typeof o[i]&&(r[t.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(r[i]=o[i]);return r}function i(e,i){var n,r,s={};for(n in i)r=i[n],e[n]!==r&&(o[n]||(t.fx.step[n]||!isNaN(parseFloat(r)))&&(s[n]=r));return s}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(v.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,r,s,a){var l=t.speed(r,s,a);return this.queue(function(){var r,s=t(this),a=s.attr("class")||"",h=l.children?s.find("*").addBack():s;h=h.map(function(){return{el:t(this),start:e(this)}}),r=function(){t.each(n,function(t,e){o[e]&&s[e+"Class"](o[e])})},r(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),s.attr("class",a),h=h.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,h.get()).done(function(){r(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:function(e){return function(i,n,o,r){return n?t.effects.animateClass.call(this,{add:i},n,o,r):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,o,r){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,o,r):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,o,r,s){return"boolean"==typeof n||void 0===n?o?t.effects.animateClass.call(this,n?{add:i}:{remove:i},o,r,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,o,r)}}(t.fn.toggleClass),switchClass:function(e,i,n,o,r){return t.effects.animateClass.call(this,{add:i,remove:e},n,o,r)}})}(),function(){function e(e,i,n,o){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(o=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(o=n,n=i,i={}),t.isFunction(n)&&(o=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=o||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function n(t,e){var i=e.outerWidth(),n=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,r=o.exec(t)||["",0,i,n,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?i:parseFloat(r[2]),bottom:"auto"===r[3]?n:parseFloat(r[3]),left:parseFloat(r[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(m)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,n=e.length;n>i;i++)null!==e[i]&&t.data(f+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,o=e.length;o>n;n++)null!==e[n]&&(i=t.data(f+e[n]),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},r=document.activeElement;try{r.id}catch(s){r=document.body}return e.wrap(n),(e[0]===r||t.contains(e[0],r))&&t(r).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*n,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(g,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(g)||"",t.removeData(g)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),o=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(f+"placeholder",i)),e.css({position:n,left:o.left,top:o.top}),i},removePlaceholder:function(t){var e=f+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,o){return o=o||{},t.each(i,function(t,i){var r=e.cssUnit(i);r[0]>0&&(o[i]=r[0]*n+r[1])}),o}}),t.fn.extend({effect:function(){function i(e){function i(){a.removeData(m),t.effects.cleanUp(a),"hide"===n.mode&&a.hide(),s()}function s(){t.isFunction(l)&&l.call(a[0]),t.isFunction(e)&&e()}var a=t(this);n.mode=c.shift(),!1===t.uiBackCompat||r?"none"===n.mode?(a[h](),s()):o.call(a[0],n,i):(a.is(":hidden")?"hide"===h:"show"===h)?(a[h](),s()):o.call(a[0],n,s)}var n=e.apply(this,arguments),o=t.effects.effect[n.effect],r=o.mode,s=n.queue,a=s||"fx",l=n.complete,h=n.mode,c=[],u=function(e){var i=t(this),n=t.effects.mode(i,h)||r;i.data(m,!0),c.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!o?h?this[h](n.duration,l):this.each(function(){l&&l.call(this)}):!1===s?this.each(u).each(i):this.queue(a,u).queue(a,i)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):n(this.css("clip"),this)},transfer:function(e,i){var n=t(this),o=t(e.to),r="fixed"===o.css("position"),s=t("body"),a=r?s.scrollTop():0,l=r?s.scrollLeft():0,h=o.offset(),c={top:h.top-a,left:h.left-l,height:o.innerHeight(),width:o.innerWidth()},u=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-a,left:u.left-l,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=n(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();t.effects;t.effects.define("blind","hide",function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=t(this),r=e.direction||"up",s=o.cssClip(),a={clip:t.extend({},s)},l=t.effects.createPlaceholder(o);a.clip[n[r][0]]=a.clip[n[r][1]],"show"===e.mode&&(o.cssClip(a.clip),l&&l.css(t.effects.clipToBox(a)),a.clip=s),l&&l.animate(t.effects.clipToBox(a),e.duration,e.easing),o.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var n,o,r,s=t(this),a=e.mode,l="hide"===a,h="show"===a,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(h||l?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,_=0,x=s.queue().length;for(t.effects.createPlaceholder(s),r=s.css(m),u||(u=s["top"===m?"outerHeight":"outerWidth"]()/3),h&&(o={opacity:1},o[m]=r,s.css("opacity",0).css(m,v?2*-u:2*u).animate(o,f,g)),l&&(u/=Math.pow(2,d-1)),o={},o[m]=r;d>_;_++)n={},n[m]=(v?"-=":"+=")+u,s.animate(n,f,g).animate(o,f,g),u=l?2*u:u/2;l&&(n={opacity:0},n[m]=(v?"-=":"+=")+u,s.animate(n,f,g)),s.queue(i),t.effects.unshift(s,x,p+1)}),t.effects.define("clip","hide",function(e,i){var n,o={},r=t(this),s=e.direction||"vertical",a="both"===s,l=a||"horizontal"===s,h=a||"vertical"===s;n=r.cssClip(),o.clip={top:h?(n.bottom-n.top)/2:n.top,right:l?(n.right-n.left)/2:n.right,bottom:h?(n.bottom-n.top)/2:n.bottom,left:l?(n.right-n.left)/2:n.left},t.effects.createPlaceholder(r),"show"===e.mode&&(r.cssClip(o.clip),o.clip=n),r.animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var n,o=t(this),r=e.mode,s="show"===r,a=e.direction||"left",l="up"===a||"down"===a?"top":"left",h="up"===a||"left"===a?"-=":"+=",c="+="===h?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(o),n=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0)/2,u[l]=h+n,s&&(o.css(u),u[l]=c+n,u.opacity=1),o.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function n(){x.push(this),x.length===u*d&&o()}function o(){p.css({visibility:"visible"}),t(x).remove(),i()}var r,s,a,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),x=[];for(r=0;u>r;r++)for(l=m.top+r*_,c=r-(u-1)/2,s=0;d>s;s++)a=m.left+s*v,h=s-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*v,top:-r*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:a+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:a+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,n)}),t.effects.define("fade","toggle",function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var n=t(this),o=e.mode,r="show"===o,s="hide"===o,a=e.size||15,l=/([0-9]+)%/.exec(a),h=!!e.horizFirst,c=h?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(n),p=n.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],v=n.queue().length;l&&(a=parseInt(l[1],10)/100*m[s?0:1]),f.clip[c[0]]=a,g.clip[c[0]]=a,g.clip[c[1]]=0,r&&(n.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),n.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(n,v,4)}),t.effects.define("highlight","show",function(e,i){var n=t(this),o={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var n,o,r,s=t(this),a=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=s.css("position"),g=s.position(),m=t.effects.scaledDimensions(s),v=e.from||m,_=e.to||t.effects.scaledDimensions(s,0);t.effects.createPlaceholder(s),"show"===c&&(r=v,v=_,_=r),o={from:{y:v.height/m.height,x:v.width/m.width},to:{y:_.height/m.height,x:_.width/m.width}},("box"===d||"both"===d)&&(o.from.y!==o.to.y&&(v=t.effects.setTransition(s,l,o.from.y,v),_=t.effects.setTransition(s,l,o.to.y,_)),o.from.x!==o.to.x&&(v=t.effects.setTransition(s,h,o.from.x,v),_=t.effects.setTransition(s,h,o.to.x,_))),("content"===d||"both"===d)&&o.from.y!==o.to.y&&(v=t.effects.setTransition(s,a,o.from.y,v),_=t.effects.setTransition(s,a,o.to.y,_)),p&&(n=t.effects.getBaseline(p,m),v.top=(m.outerHeight-v.outerHeight)*n.y+g.top,v.left=(m.outerWidth-v.outerWidth)*n.x+g.left,_.top=(m.outerHeight-_.outerHeight)*n.y+g.top,_.left=(m.outerWidth-_.outerWidth)*n.x+g.left),s.css(v),("content"===d||"both"===d)&&(l=l.concat(["marginTop","marginBottom"]).concat(a),h=h.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var i=t(this),n=t.effects.scaledDimensions(i),r={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},s={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x};o.from.y!==o.to.y&&(r=t.effects.setTransition(i,l,o.from.y,r),s=t.effects.setTransition(i,l,o.to.y,s)),o.from.x!==o.to.x&&(r=t.effects.setTransition(i,h,o.from.x,r),s=t.effects.setTransition(i,h,o.to.x,s)),u&&t.effects.saveStyle(i),i.css(r),i.animate(s,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),s.animate(_,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=s.offset();0===_.opacity&&s.css("opacity",v.opacity),u||(s.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(s)),i()}})}),t.effects.define("scale",function(e,i){var n=t(this),o=e.mode,r=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==o?0:100),s=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,r,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(s.from.opacity=1,s.to.opacity=0),t.effects.effect.size.call(this,s,i)}),t.effects.define("puff","hide",function(e,i){var n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)}),t.effects.define("pulsate","show",function(e,i){var n=t(this),o=e.mode,r="show"===o,s="hide"===o,a=r||s,l=2*(e.times||5)+(a?1:0),h=e.duration/l,c=0,u=1,d=n.queue().length;for((r||!n.is(":visible"))&&(n.css("opacity",0).show(),c=1);l>u;u++)n.animate({opacity:c},h,e.easing),c=1-c;n.animate({opacity:c},h,e.easing),n.queue(i),t.effects.unshift(n,d,l+1)}),t.effects.define("shake",function(e,i){var n=1,o=t(this),r=e.direction||"left",s=e.distance||20,a=e.times||3,l=2*a+1,h=Math.round(e.duration/l),c="up"===r||"down"===r?"top":"left",u="up"===r||"left"===r,d={},p={},f={},g=o.queue().length;for(t.effects.createPlaceholder(o),d[c]=(u?"-=":"+=")+s,p[c]=(u?"+=":"-=")+2*s,f[c]=(u?"-=":"+=")+2*s,o.animate(d,h,e.easing);a>n;n++)o.animate(p,h,e.easing).animate(f,h,e.easing);o.animate(p,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(o,g,l+1)}),t.effects.define("slide","show",function(e,i){var n,o,r=t(this),s={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u=e.distance||r["top"===h?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(r),n=r.cssClip(),o=r.position()[h],d[h]=(c?-1:1)*u+o,d.clip=r.cssClip(),d.clip[s[l][1]]=d.clip[s[l][0]],"show"===a&&(r.cssClip(d.clip),r.css(h,d[h]),d.clip=n,d[h]=o),r.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});!1!==t.uiBackCompat&&t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Chart=t()}}(function(){return function t(e,i,n){function o(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(r)return r(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[s]={exports:{}};e[s][0].call(c.exports,function(t){var i=e[s][1][t];return o(i||t)},c,c.exports,t,e,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,i){},{}],2:[function(t,e,i){function n(t){if(t){var e=/^#([a-fA-F0-9]{3})$/,i=/^#([a-fA-F0-9]{6})$/,n=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,r=/(\w+)/,s=[0,0,0],a=1,l=t.match(e);if(l){l=l[1];for(var h=0;h<s.length;h++)s[h]=parseInt(l[h]+l[h],16)}else if(l=t.match(i)){l=l[1];for(var h=0;h<s.length;h++)s[h]=parseInt(l.slice(2*h,2*h+2),16)}else if(l=t.match(n)){for(var h=0;h<s.length;h++)s[h]=parseInt(l[h+1]);a=parseFloat(l[4])}else if(l=t.match(o)){for(var h=0;h<s.length;h++)s[h]=Math.round(2.55*parseFloat(l[h+1]));a=parseFloat(l[4])}else if(l=t.match(r)){if("transparent"==l[1])return[0,0,0,0];if(!(s=y[l[1]]))return}for(var h=0;h<s.length;h++)s[h]=_(s[h],0,255);return a=a||0==a?_(a,0,1):1,s[3]=a,s}}function o(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[_(parseInt(i[1]),0,360),_(parseFloat(i[2]),0,100),_(parseFloat(i[3]),0,100),_(isNaN(n)?1:n,0,1)]}}}function r(t){if(t){
|
|
var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var n=parseFloat(i[4]);return[_(parseInt(i[1]),0,360),_(parseFloat(i[2]),0,100),_(parseFloat(i[3]),0,100),_(isNaN(n)?1:n,0,1)]}}}function s(t){var e=n(t);return e&&e.slice(0,3)}function a(t){var e=o(t);return e&&e.slice(0,3)}function l(t){var e=n(t);return e?e[3]:(e=o(t))?e[3]:(e=r(t))?e[3]:void 0}function h(t){return"#"+x(t[0])+x(t[1])+x(t[2])}function c(t,e){return e<1||t[3]&&t[3]<1?u(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function d(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"}function p(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function f(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function v(t){return b[t.slice(0,3)]}function _(t,e,i){return Math.min(Math.max(e,t),i)}function x(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y=t(6);e.exports={getRgba:n,getHsla:o,getRgb:s,getHsl:a,getHwb:r,getAlpha:l,hexString:h,rgbString:c,rgbaString:u,percentString:d,percentaString:p,hslString:f,hslaString:g,hwbString:m,keyword:v};var b={};for(var w in y)b[y[w]]=w},{6:6}],3:[function(t,e,i){var n=t(5),o=t(2),r=function(t){if(t instanceof r)return t;if(!(this instanceof r))return new r(t);this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;if("string"==typeof t)if(e=o.getRgba(t))this.setValues("rgb",e);else if(e=o.getHsla(t))this.setValues("hsl",e);else{if(!(e=o.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}else if("object"==typeof t)if(e=t,void 0!==e.r||void 0!==e.red)this.setValues("rgb",e);else if(void 0!==e.l||void 0!==e.lightness)this.setValues("hsl",e);else if(void 0!==e.v||void 0!==e.value)this.setValues("hsv",e);else if(void 0!==e.w||void 0!==e.whiteness)this.setValues("hwb",e);else{if(void 0===e.c&&void 0===e.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(t));this.setValues("cmyk",e)}};r.prototype={rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t%=360,t=t<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return o.hexString(this.values.rgb)},rgbString:function(){return o.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return o.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return o.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return o.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return o.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return o.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return o.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,o=void 0===e?.5:e,r=2*o-1,s=i.alpha()-n.alpha(),a=((r*s==-1?r:(r+s)/(1+r*s))+1)/2,l=1-a;return this.rgb(a*i.red()+l*n.red(),a*i.green()+l*n.green(),a*i.blue()+l*n.blue()).alpha(i.alpha()*o+n.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new r,n=this.values,o=i.values;for(var s in n)n.hasOwnProperty(s)&&(t=n[s],e={}.toString.call(t),"[object Array]"===e?o[s]=t.slice(0):"[object Number]"===e?o[s]=t:console.error("unexpected color value:",t));return i}},r.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},r.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},r.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},r.prototype.setValues=function(t,e){var i,o=this.values,r=this.spaces,s=this.maxes,a=1;if("alpha"===t)a=e;else if(e.length)o[t]=e.slice(0,t.length),a=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)o[t][i]=e[t.charAt(i)];a=e.a}else if(void 0!==e[r[t][0]]){var l=r[t];for(i=0;i<t.length;i++)o[t][i]=e[l[i]];a=e.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===a?o.alpha:a)),"alpha"===t)return!1;var h;for(i=0;i<t.length;i++)h=Math.max(0,Math.min(s[t][i],o[t][i])),o[t][i]=Math.round(h);for(var c in r)c!==t&&(o[c]=n[t][c](o[t]));return!0},r.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},r.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=r),e.exports=r},{2:2,5:5}],4:[function(t,e,i){function n(t){var e,i,n,o=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(o,r,s),l=Math.max(o,r,s),h=l-a;return l==a?e=0:o==l?e=(r-s)/h:r==l?e=2+(s-o)/h:s==l&&(e=4+(o-r)/h),e=Math.min(60*e,360),e<0&&(e+=360),n=(a+l)/2,i=l==a?0:n<=.5?h/(l+a):h/(2-l-a),[e,100*i,100*n]}function o(t){var e,i,n,o=t[0],r=t[1],s=t[2],a=Math.min(o,r,s),l=Math.max(o,r,s),h=l-a;return i=0==l?0:h/l*1e3/10,l==a?e=0:o==l?e=(r-s)/h:r==l?e=2+(s-o)/h:s==l&&(e=4+(o-r)/h),e=Math.min(60*e,360),e<0&&(e+=360),n=l/255*1e3/10,[e,i,n]}function s(t){var e=t[0],i=t[1],o=t[2],r=n(t)[0],s=1/255*Math.min(e,Math.min(i,o)),o=1-1/255*Math.max(e,Math.max(i,o));return[r,100*s,100*o]}function a(t){var e,i,n,o,r=t[0]/255,s=t[1]/255,a=t[2]/255;return o=Math.min(1-r,1-s,1-a),e=(1-r-o)/(1-o)||0,i=(1-s-o)/(1-o)||0,n=(1-a-o)/(1-o)||0,[100*e,100*i,100*n,100*o]}function l(t){return J[JSON.stringify(t)]}function h(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function c(t){var e,i,n,o=h(t),r=o[0],s=o[1],a=o[2];return r/=95.047,s/=100,a/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,e=116*s-16,i=500*(r-s),n=200*(s-a),[e,i,n]}function u(t){return B(c(t))}function d(t){var e,i,n,o,r,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0==a)return r=255*l,[r,r,r];i=l<.5?l*(1+a):l+a-l*a,e=2*l-i,o=[0,0,0];for(var h=0;h<3;h++)n=s+1/3*-(h-1),n<0&&n++,n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,o[h]=255*r;return o}function p(t){var e,i,n=t[0],o=t[1]/100,r=t[2]/100;return 0===r?[0,0,0]:(r*=2,o*=r<=1?r:2-r,i=(r+o)/2,e=2*o/(r+o),[n,100*e,100*i])}function f(t){return s(d(t))}function m(t){return a(d(t))}function v(t){return l(d(t))}function _(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,o=Math.floor(e)%6,r=e-Math.floor(e),s=255*n*(1-i),a=255*n*(1-i*r),l=255*n*(1-i*(1-r)),n=255*n;switch(o){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}}function x(t){var e,i,n=t[0],o=t[1]/100,r=t[2]/100;return i=(2-o)*r,e=o*r,e/=i<=1?i:2-i,e=e||0,i/=2,[n,100*e,100*i]}function y(t){return s(_(t))}function w(t){return a(_(t))}function S(t){return l(_(t))}function C(t){var e,i,n,o,s=t[0]/360,a=t[1]/100,l=t[2]/100,h=a+l;switch(h>1&&(a/=h,l/=h),e=Math.floor(6*s),i=1-l,n=6*s-e,0!=(1&e)&&(n=1-n),o=a+n*(i-a),e){default:case 6:case 0:r=i,g=o,b=a;break;case 1:r=o,g=i,b=a;break;case 2:r=a,g=i,b=o;break;case 3:r=a,g=o,b=i;break;case 4:r=o,g=a,b=i;break;case 5:r=i,g=a,b=o}return[255*r,255*g,255*b]}function T(t){return n(C(t))}function k(t){return o(C(t))}function D(t){return a(C(t))}function E(t){return l(C(t))}function I(t){var e,i,n,o=t[0]/100,r=t[1]/100,s=t[2]/100,a=t[3]/100;return e=1-Math.min(1,o*(1-a)+a),i=1-Math.min(1,r*(1-a)+a),n=1-Math.min(1,s*(1-a)+a),[255*e,255*i,255*n]}function A(t){return n(I(t))}function R(t){return o(I(t))}function O(t){return s(I(t))}function N(t){return l(I(t))}function P(t){var e,i,n,o=t[0]/100,r=t[1]/100,s=t[2]/100;return e=3.2406*o+-1.5372*r+-.4986*s,i=-.9689*o+1.8758*r+.0415*s,n=.0557*o+-.204*r+1.057*s,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),[255*e,255*i,255*n]}function F(t){var e,i,n,o=t[0],r=t[1],s=t[2];return o/=95.047,r/=100,s/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,e=116*r-16,i=500*(o-r),n=200*(r-s),[e,i,n]}function L(t){return B(F(t))}function M(t){var e,i,n,o,r=t[0],s=t[1],a=t[2];return r<=8?(i=100*r/903.3,o=i/100*7.787+16/116):(i=100*Math.pow((r+16)/116,3),o=Math.pow(i/100,1/3)),e=e/95.047<=.008856?e=95.047*(s/500+o-16/116)/7.787:95.047*Math.pow(s/500+o,3),n=n/108.883<=.008859?n=108.883*(o-a/200-16/116)/7.787:108.883*Math.pow(o-a/200,3),[e,i,n]}function B(t){var e,i,n,o=t[0],r=t[1],s=t[2];return e=Math.atan2(s,r),i=360*e/2/Math.PI,i<0&&(i+=360),n=Math.sqrt(r*r+s*s),[o,n,i]}function H(t){return P(M(t))}function W(t){var e,i,n,o=t[0],r=t[1];return n=t[2]/360*2*Math.PI,e=r*Math.cos(n),i=r*Math.sin(n),[o,e,i]}function z(t){return M(W(t))}function U(t){return H(W(t))}function V(t){return K[t]}function $(t){return n(V(t))}function j(t){return o(V(t))}function q(t){return s(V(t))}function G(t){return a(V(t))}function Y(t){return c(V(t))}function X(t){return h(V(t))}e.exports={rgb2hsl:n,rgb2hsv:o,rgb2hwb:s,rgb2cmyk:a,rgb2keyword:l,rgb2xyz:h,rgb2lab:c,rgb2lch:u,hsl2rgb:d,hsl2hsv:p,hsl2hwb:f,hsl2cmyk:m,hsl2keyword:v,hsv2rgb:_,hsv2hsl:x,hsv2hwb:y,hsv2cmyk:w,hsv2keyword:S,hwb2rgb:C,hwb2hsl:T,hwb2hsv:k,hwb2cmyk:D,hwb2keyword:E,cmyk2rgb:I,cmyk2hsl:A,cmyk2hsv:R,cmyk2hwb:O,cmyk2keyword:N,keyword2rgb:V,keyword2hsl:$,keyword2hsv:j,keyword2hwb:q,keyword2cmyk:G,keyword2lab:Y,keyword2xyz:X,xyz2rgb:P,xyz2lab:F,xyz2lch:L,lab2xyz:M,lab2rgb:H,lab2lch:B,lch2lab:W,lch2xyz:z,lch2rgb:U};var K={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},J={};for(var Q in K)J[JSON.stringify(K[Q])]=Q},{}],5:[function(t,e,i){var n=t(4),o=function(){return new h};for(var r in n){o[r+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(r);var s=/(\w+)2(\w+)/.exec(r),a=s[1],l=s[2];o[a]=o[a]||{},o[a][l]=o[r]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var o=0;o<i.length;o++)i[o]=Math.round(i[o]);return i}}(r)}var h=function(){this.convs={}};h.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},h.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},h.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=o[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){h.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=o},{4:4}],6:[function(t,e,i){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,i){var n=t(28)();t(26)(n),t(42)(n),t(22)(n),t(31)(n),t(25)(n),t(21)(n),t(23)(n),t(24)(n),t(29)(n),t(33)(n),t(34)(n),t(32)(n),t(35)(n),t(30)(n),t(27)(n),t(36)(n),t(37)(n),t(38)(n),t(39)(n),t(40)(n),t(45)(n),t(43)(n),t(44)(n),t(46)(n),t(47)(n),t(48)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n),window.Chart=e.exports=n},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,42:42,43:43,44:44,45:45,46:46,47:47,48:48,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){var e={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}};t.defaults.scatter=e,t.controllers.scatter=t.controllers.line,t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},t.controllers.bar=t.DatasetController.extend({dataElementType:t.elements.Rectangle,initialize:function(e,i){t.DatasetController.prototype.initialize.call(this,e,i);var n=this,o=n.getMeta(),r=n.getDataset();o.stack=r.stack,o.bar=!0},getStackCount:function(){var t=this,i=t.getMeta(),n=t.getScaleForId(i.yAxisID),o=[];return e.each(t.chart.data.datasets,function(e,i){var r=t.chart.getDatasetMeta(i);r.bar&&t.chart.isDatasetVisible(i)&&(!1===n.options.stacked||!0===n.options.stacked&&-1===o.indexOf(r.stack)||void 0===n.options.stacked&&(void 0===r.stack||-1===o.indexOf(r.stack)))&&o.push(r.stack)},t),o.length},update:function(t){var i=this;e.each(i.getMeta().data,function(e,n){i.updateElement(e,n,t)},i)},updateElement:function(t,i,n){var o=this,r=o.getMeta(),s=o.getScaleForId(r.xAxisID),a=o.getScaleForId(r.yAxisID),l=a.getBasePixel(),h=o.chart.options.elements.rectangle,c=t.custom||{},u=o.getDataset();t._xScale=s,t._yScale=a,t._datasetIndex=o.index,t._index=i;var d=o.getRuler(i);t._model={x:o.calculateBarX(i,o.index,d),y:n?l:o.calculateBarY(i,o.index),label:o.chart.data.labels[i],datasetLabel:u.label,horizontal:!1,base:n?l:o.calculateBarBase(o.index,i),width:o.calculateBarWidth(d),backgroundColor:c.backgroundColor?c.backgroundColor:e.getValueAtIndexOrDefault(u.backgroundColor,i,h.backgroundColor),borderSkipped:c.borderSkipped?c.borderSkipped:h.borderSkipped,borderColor:c.borderColor?c.borderColor:e.getValueAtIndexOrDefault(u.borderColor,i,h.borderColor),borderWidth:c.borderWidth?c.borderWidth:e.getValueAtIndexOrDefault(u.borderWidth,i,h.borderWidth)},t.pivot()},calculateBarBase:function(t,e){var i=this,n=i.getMeta(),o=i.getScaleForId(n.yAxisID),r=o.getBaseValue(),s=r;if(!0===o.options.stacked||void 0===o.options.stacked&&void 0!==n.stack){for(var a=i.chart,l=a.data.datasets,h=Number(l[t].data[e]),c=0;c<t;c++){var u=l[c],d=a.getDatasetMeta(c);if(d.bar&&d.yAxisID===o.id&&a.isDatasetVisible(c)&&n.stack===d.stack){var p=Number(u.data[e]);r+=h<0?Math.min(p,s):Math.max(p,s)}}return o.getPixelForValue(r)}return o.getBasePixel()},getRuler:function(){var t=this,e=t.getMeta(),i=t.getScaleForId(e.xAxisID),n=t.getStackCount(),o=i.width/i.ticks.length,r=o*i.options.categoryPercentage,s=(o-o*i.options.categoryPercentage)/2,a=r/n;return{stackCount:n,tickWidth:o,categoryWidth:r,categorySpacing:s,fullBarWidth:a,barWidth:a*i.options.barPercentage,barSpacing:a-a*i.options.barPercentage}},calculateBarWidth:function(t){var e=this,i=e.getMeta(),n=e.getScaleForId(i.xAxisID);return n.options.barThickness?n.options.barThickness:t.barWidth},getStackIndex:function(t){var e,i,n=this,o=n.chart.getDatasetMeta(t),r=n.getScaleForId(o.yAxisID),s=[o.stack];for(i=0;i<t;++i)e=this.chart.getDatasetMeta(i),e.bar&&this.chart.isDatasetVisible(i)&&(!1===r.options.stacked||!0===r.options.stacked&&-1===s.indexOf(e.stack)||void 0===r.options.stacked&&(void 0===e.stack||-1===s.indexOf(e.stack)))&&s.push(e.stack);return s.length-1},calculateBarX:function(t,e,i){var n=this,o=n.getMeta(),r=n.getScaleForId(o.xAxisID),s=n.getStackIndex(e),a=r.getPixelForValue(null,t,e,n.chart.isCombo);return(a-=n.chart.isCombo?i.tickWidth/2:0)+i.barWidth/2+i.categorySpacing+i.barWidth*s+i.barSpacing/2+i.barSpacing*s},calculateBarY:function(t,e){var i=this,n=i.getMeta(),o=i.getScaleForId(n.yAxisID),r=Number(i.getDataset().data[t]);if(o.options.stacked||void 0===o.options.stacked&&void 0!==n.stack){for(var s=o.getBaseValue(),a=s,l=s,h=0;h<e;h++){var c=i.chart.data.datasets[h],u=i.chart.getDatasetMeta(h);if(u.bar&&u.yAxisID===o.id&&i.chart.isDatasetVisible(h)&&n.stack===u.stack){var d=Number(c.data[t]);d<0?l+=d||0:a+=d||0}}return r<0?o.getPixelForValue(l+r):o.getPixelForValue(a+r)}return o.getPixelForValue(r)},draw:function(e){var i,n,o=this,r=e||1,s=o.getMeta().data,a=o.getDataset();for(t.canvasHelpers.clipArea(o.chart.chart.ctx,o.chart.chartArea),i=0,n=s.length;i<n;++i){var l=a.data[i];null===l||void 0===l||isNaN(l)||s[i].transition(r).draw()}t.canvasHelpers.unclipArea(o.chart.chart.ctx)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},r=t._model;r.backgroundColor=o.hoverBackgroundColor?o.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,n,e.getHoverColor(r.backgroundColor)),r.borderColor=o.hoverBorderColor?o.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,n,e.getHoverColor(r.borderColor)),r.borderWidth=o.hoverBorderWidth?o.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,n,r.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},r=t._model,s=this.chart.options.elements.rectangle;r.backgroundColor=o.backgroundColor?o.backgroundColor:e.getValueAtIndexOrDefault(i.backgroundColor,n,s.backgroundColor),r.borderColor=o.borderColor?o.borderColor:e.getValueAtIndexOrDefault(i.borderColor,n,s.borderColor),r.borderWidth=o.borderWidth?o.borderWidth:e.getValueAtIndexOrDefault(i.borderWidth,n,s.borderWidth)}}),t.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}}}},t.controllers.horizontalBar=t.controllers.bar.extend({getStackCount:function(){var t=this,i=t.getMeta(),n=t.getScaleForId(i.xAxisID),o=[];return e.each(t.chart.data.datasets,function(e,i){var r=t.chart.getDatasetMeta(i);r.bar&&t.chart.isDatasetVisible(i)&&(!1===n.options.stacked||!0===n.options.stacked&&-1===o.indexOf(r.stack)||void 0===n.options.stacked&&(void 0===r.stack||-1===o.indexOf(r.stack)))&&o.push(r.stack)},t),o.length},updateElement:function(t,i,n){var o=this,r=o.getMeta(),s=o.getScaleForId(r.xAxisID),a=o.getScaleForId(r.yAxisID),l=s.getBasePixel(),h=t.custom||{},c=o.getDataset(),u=o.chart.options.elements.rectangle;t._xScale=s,t._yScale=a,t._datasetIndex=o.index,t._index=i;var d=o.getRuler(i);t._model={x:n?l:o.calculateBarX(i,o.index),y:o.calculateBarY(i,o.index,d),label:o.chart.data.labels[i],datasetLabel:c.label,horizontal:!0,base:n?l:o.calculateBarBase(o.index,i),height:o.calculateBarHeight(d),backgroundColor:h.backgroundColor?h.backgroundColor:e.getValueAtIndexOrDefault(c.backgroundColor,i,u.backgroundColor),borderSkipped:h.borderSkipped?h.borderSkipped:u.borderSkipped,borderColor:h.borderColor?h.borderColor:e.getValueAtIndexOrDefault(c.borderColor,i,u.borderColor),borderWidth:h.borderWidth?h.borderWidth:e.getValueAtIndexOrDefault(c.borderWidth,i,u.borderWidth)},t.pivot()},calculateBarBase:function(t,e){var i=this,n=i.getMeta(),o=i.getScaleForId(n.xAxisID),r=o.getBaseValue(),s=r;if(o.options.stacked||void 0===o.options.stacked&&void 0!==n.stack){for(var a=i.chart,l=a.data.datasets,h=Number(l[t].data[e]),c=0;c<t;c++){var u=l[c],d=a.getDatasetMeta(c);if(d.bar&&d.xAxisID===o.id&&a.isDatasetVisible(c)&&n.stack===d.stack){var p=Number(u.data[e]);r+=h<0?Math.min(p,s):Math.max(p,s)}}return o.getPixelForValue(r)}return o.getBasePixel()},getRuler:function(){var t=this,e=t.getMeta(),i=t.getScaleForId(e.yAxisID),n=t.getStackCount(),o=i.height/i.ticks.length,r=o*i.options.categoryPercentage,s=(o-o*i.options.categoryPercentage)/2,a=r/n;return{stackCount:n,tickHeight:o,categoryHeight:r,categorySpacing:s,fullBarHeight:a,barHeight:a*i.options.barPercentage,barSpacing:a-a*i.options.barPercentage}},calculateBarHeight:function(t){var e=this,i=e.getMeta(),n=e.getScaleForId(i.yAxisID);return n.options.barThickness?n.options.barThickness:t.barHeight},getStackIndex:function(t){var e,i,n=this,o=n.chart.getDatasetMeta(t),r=n.getScaleForId(o.xAxisID),s=[o.stack];for(i=0;i<t;++i)e=this.chart.getDatasetMeta(i),e.bar&&this.chart.isDatasetVisible(i)&&(!1===r.options.stacked||!0===r.options.stacked&&-1===s.indexOf(e.stack)||void 0===r.options.stacked&&(void 0===e.stack||-1===s.indexOf(e.stack)))&&s.push(e.stack);return s.length-1},calculateBarX:function(t,e){var i=this,n=i.getMeta(),o=i.getScaleForId(n.xAxisID),r=Number(i.getDataset().data[t]);if(o.options.stacked||void 0===o.options.stacked&&void 0!==n.stack){for(var s=o.getBaseValue(),a=s,l=s,h=0;h<e;h++){var c=i.chart.data.datasets[h],u=i.chart.getDatasetMeta(h);if(u.bar&&u.xAxisID===o.id&&i.chart.isDatasetVisible(h)&&n.stack===u.stack){var d=Number(c.data[t]);d<0?l+=d||0:a+=d||0}}return r<0?o.getPixelForValue(l+r):o.getPixelForValue(a+r)}
|
|
return o.getPixelForValue(r)},calculateBarY:function(t,e,i){var n=this,o=n.getMeta(),r=n.getScaleForId(o.yAxisID),s=n.getStackIndex(e),a=r.getPixelForValue(null,t,e,n.chart.isCombo);return(a-=n.chart.isCombo?i.tickHeight/2:0)+i.barHeight/2+i.categorySpacing+i.barHeight*s+i.barSpacing/2+i.barSpacing*s}})}},{}],16:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}},t.controllers.bubble=t.DatasetController.extend({dataElementType:t.elements.Point,update:function(t){var i=this,n=i.getMeta(),o=n.data;e.each(o,function(e,n){i.updateElement(e,n,t)})},updateElement:function(i,n,o){var r=this,s=r.getMeta(),a=r.getScaleForId(s.xAxisID),l=r.getScaleForId(s.yAxisID),h=i.custom||{},c=r.getDataset(),u=c.data[n],d=r.chart.options.elements.point,p=r.index;e.extend(i,{_xScale:a,_yScale:l,_datasetIndex:p,_index:n,_model:{x:o?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof u?u:NaN,n,p,r.chart.isCombo),y:o?l.getBasePixel():l.getPixelForValue(u,n,p),radius:o?0:h.radius?h.radius:r.getRadius(u),hitRadius:h.hitRadius?h.hitRadius:e.getValueAtIndexOrDefault(c.hitRadius,n,d.hitRadius)}}),t.DatasetController.prototype.removeHoverStyle.call(r,i,d);var f=i._model;f.skip=h.skip?h.skip:isNaN(f.x)||isNaN(f.y),i.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},setHoverStyle:function(i){var n=this;t.DatasetController.prototype.setHoverStyle.call(n,i);var o=n.chart.data.datasets[i._datasetIndex],r=i._index,s=i.custom||{};i._model.radius=s.hoverRadius?s.hoverRadius:e.getValueAtIndexOrDefault(o.hoverRadius,r,n.chart.options.elements.point.hoverRadius)+n.getRadius(o.data[r])},removeHoverStyle:function(e){var i=this;t.DatasetController.prototype.removeHoverStyle.call(i,e,i.chart.options.elements.point);var n=i.chart.data.datasets[e._datasetIndex].data[e._index],o=e.custom||{};e._model.radius=o.radius?o.radius:i.getRadius(n)}})}},{}],17:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults;i.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var r=0;r<n[0].data.length;++r)e.push('<li><span style="background-color:'+n[0].backgroundColor[r]+'"></span>'),o[r]&&e.push(o[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,o){var r=t.getDatasetMeta(0),s=i.datasets[0],a=r.data[o],l=a&&a.custom||{},h=e.getValueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:h(s.backgroundColor,o,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:h(s.borderColor,o,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:h(s.borderWidth,o,c.borderWidth),hidden:isNaN(s.data[o])||r.data[o].hidden,index:o}}):[]}},onClick:function(t,e){var i,n,o,r=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)o=s.getDatasetMeta(i),o.data[r]&&(o.data[r].hidden=!o.data[r].hidden);s.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,i){var n=i.labels[t.index],o=": "+i.datasets[t.datasetIndex].data[t.index];return e.isArray(n)?(n=n.slice(),n[0]+=o):n+=o,n}}}},i.pie=e.clone(i.doughnut),e.extend(i.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var i=this,n=i.chart,o=n.chartArea,r=n.options,s=r.elements.arc,a=o.right-o.left-s.borderWidth,l=o.bottom-o.top-s.borderWidth,h=Math.min(a,l),c={x:0,y:0},u=i.getMeta(),d=r.cutoutPercentage,p=r.circumference;if(p<2*Math.PI){var f=r.rotation%(2*Math.PI);f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0);var g=f+p,m={x:Math.cos(f),y:Math.sin(f)},v={x:Math.cos(g),y:Math.sin(g)},_=f<=0&&0<=g||f<=2*Math.PI&&2*Math.PI<=g,x=f<=.5*Math.PI&&.5*Math.PI<=g||f<=2.5*Math.PI&&2.5*Math.PI<=g,y=f<=-Math.PI&&-Math.PI<=g||f<=Math.PI&&Math.PI<=g,b=f<=.5*-Math.PI&&.5*-Math.PI<=g||f<=1.5*Math.PI&&1.5*Math.PI<=g,w=d/100,S={x:y?-1:Math.min(m.x*(m.x<0?1:w),v.x*(v.x<0?1:w)),y:b?-1:Math.min(m.y*(m.y<0?1:w),v.y*(v.y<0?1:w))},C={x:_?1:Math.max(m.x*(m.x>0?1:w),v.x*(v.x>0?1:w)),y:x?1:Math.max(m.y*(m.y>0?1:w),v.y*(v.y>0?1:w))},T={width:.5*(C.x-S.x),height:.5*(C.y-S.y)};h=Math.min(a/T.width,l/T.height),c={x:-.5*(C.x+S.x),y:-.5*(C.y+S.y)}}n.borderWidth=i.getMaxBorderWidth(u.data),n.outerRadius=Math.max((h-n.borderWidth)/2,0),n.innerRadius=Math.max(d?n.outerRadius/100*d:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,u.total=i.calculateTotal(),i.outerRadius=n.outerRadius-n.radiusLength*i.getRingIndex(i.index),i.innerRadius=Math.max(i.outerRadius-n.radiusLength,0),e.each(u.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){var o=this,r=o.chart,s=r.chartArea,a=r.options,l=a.animation,h=(s.left+s.right)/2,c=(s.top+s.bottom)/2,u=a.rotation,d=a.rotation,p=o.getDataset(),f=n&&l.animateRotate?0:t.hidden?0:o.calculateCircumference(p.data[i])*(a.circumference/(2*Math.PI)),g=n&&l.animateScale?0:o.innerRadius,m=n&&l.animateScale?0:o.outerRadius,v=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:o.index,_index:i,_model:{x:h+r.offsetX,y:c+r.offsetY,startAngle:u,endAngle:d,circumference:f,outerRadius:m,innerRadius:g,label:v(p.label,i,r.data.labels[i])}});var _=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(_.startAngle=0===i?a.rotation:o.getMeta().data[i-1]._model.endAngle,_.endAngle=_.startAngle+_.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,i=this.getDataset(),n=this.getMeta(),o=0;return e.each(n.data,function(e,n){t=i.data[n],isNaN(t)||e.hidden||(o+=Math.abs(t))}),o},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,o=this.index,r=t.length,s=0;s<r;s++)e=t[s]._model?t[s]._model.borderWidth:0,i=t[s]._chart?t[s]._chart.config.data.datasets[o].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return i.getValueOrDefault(t.showLine,e.showLines)}var i=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,update:function(t){var n,o,r,s=this,a=s.getMeta(),l=a.dataset,h=a.data||[],c=s.chart.options,u=c.elements.line,d=s.getScaleForId(a.yAxisID),p=s.getDataset(),f=e(p,c);for(f&&(r=l.custom||{},void 0!==p.tension&&void 0===p.lineTension&&(p.lineTension=p.tension),l._scale=d,l._datasetIndex=s.index,l._children=h,l._model={spanGaps:p.spanGaps?p.spanGaps:c.spanGaps,tension:r.tension?r.tension:i.getValueOrDefault(p.lineTension,u.tension),backgroundColor:r.backgroundColor?r.backgroundColor:p.backgroundColor||u.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:p.borderWidth||u.borderWidth,borderColor:r.borderColor?r.borderColor:p.borderColor||u.borderColor,borderCapStyle:r.borderCapStyle?r.borderCapStyle:p.borderCapStyle||u.borderCapStyle,borderDash:r.borderDash?r.borderDash:p.borderDash||u.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:p.borderDashOffset||u.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:p.borderJoinStyle||u.borderJoinStyle,fill:r.fill?r.fill:void 0!==p.fill?p.fill:u.fill,steppedLine:r.steppedLine?r.steppedLine:i.getValueOrDefault(p.steppedLine,u.stepped),cubicInterpolationMode:r.cubicInterpolationMode?r.cubicInterpolationMode:i.getValueOrDefault(p.cubicInterpolationMode,u.cubicInterpolationMode),scaleTop:d.top,scaleBottom:d.bottom,scaleZero:d.getBasePixel()},l.pivot()),n=0,o=h.length;n<o;++n)s.updateElement(h[n],n,t);for(f&&0!==l._model.tension&&s.updateBezierControlPoints(),n=0,o=h.length;n<o;++n)h[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,o=this.getDataset(),r=t.custom||{};return r.backgroundColor?n=r.backgroundColor:o.pointBackgroundColor?n=i.getValueAtIndexOrDefault(o.pointBackgroundColor,e,n):o.backgroundColor&&(n=o.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,o=this.getDataset(),r=t.custom||{};return r.borderColor?n=r.borderColor:o.pointBorderColor?n=i.getValueAtIndexOrDefault(o.pointBorderColor,e,n):o.borderColor&&(n=o.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,o=this.getDataset(),r=t.custom||{};return isNaN(r.borderWidth)?isNaN(o.pointBorderWidth)?isNaN(o.borderWidth)||(n=o.borderWidth):n=i.getValueAtIndexOrDefault(o.pointBorderWidth,e,n):n=r.borderWidth,n},updateElement:function(t,e,n){var o,r,s=this,a=s.getMeta(),l=t.custom||{},h=s.getDataset(),c=s.index,u=h.data[e],d=s.getScaleForId(a.yAxisID),p=s.getScaleForId(a.xAxisID),f=s.chart.options.elements.point,g=s.chart.data.labels||[],m=1===g.length||1===h.data.length||s.chart.isCombo;void 0!==h.radius&&void 0===h.pointRadius&&(h.pointRadius=h.radius),void 0!==h.hitRadius&&void 0===h.pointHitRadius&&(h.pointHitRadius=h.hitRadius),o=p.getPixelForValue("object"==typeof u?u:NaN,e,c,m),r=n?d.getBasePixel():s.calculatePointY(u,e,c),t._xScale=p,t._yScale=d,t._datasetIndex=c,t._index=e,t._model={x:o,y:r,skip:l.skip||isNaN(o)||isNaN(r),radius:l.radius||i.getValueAtIndexOrDefault(h.pointRadius,e,f.radius),pointStyle:l.pointStyle||i.getValueAtIndexOrDefault(h.pointStyle,e,f.pointStyle),backgroundColor:s.getPointBackgroundColor(t,e),borderColor:s.getPointBorderColor(t,e),borderWidth:s.getPointBorderWidth(t,e),tension:a.dataset._model?a.dataset._model.tension:0,steppedLine:!!a.dataset._model&&a.dataset._model.steppedLine,hitRadius:l.hitRadius||i.getValueAtIndexOrDefault(h.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,i){var n,o,r,s=this,a=s.chart,l=s.getMeta(),h=s.getScaleForId(l.yAxisID),c=0,u=0;if(h.options.stacked){for(n=0;n<i;n++)if(o=a.data.datasets[n],r=a.getDatasetMeta(n),"line"===r.type&&r.yAxisID===h.id&&a.isDatasetVisible(n)){var d=Number(h.getRightValue(o.data[e]));d<0?u+=d||0:c+=d||0}var p=Number(h.getRightValue(t));return p<0?h.getPixelForValue(u+p):h.getPixelForValue(c+p)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,n,o,r,s,a=this,l=a.getMeta(),h=a.chart.chartArea,c=l.data||[];if(l.dataset._model.spanGaps&&(c=c.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)i.splineCurveMonotone(c);else for(e=0,n=c.length;e<n;++e)o=c[e],r=o._model,s=i.splineCurve(i.previousItem(c,e)._model,r,i.nextItem(c,e)._model,l.dataset._model.tension),r.controlPointPreviousX=s.previous.x,r.controlPointPreviousY=s.previous.y,r.controlPointNextX=s.next.x,r.controlPointNextY=s.next.y;if(a.chart.options.elements.line.capBezierPoints)for(e=0,n=c.length;e<n;++e)r=c[e]._model,r.controlPointPreviousX=t(r.controlPointPreviousX,h.left,h.right),r.controlPointPreviousY=t(r.controlPointPreviousY,h.top,h.bottom),r.controlPointNextX=t(r.controlPointNextX,h.left,h.right),r.controlPointNextY=t(r.controlPointNextY,h.top,h.bottom)},draw:function(i){var n,o,r=this,s=r.getMeta(),a=s.data||[],l=i||1;for(n=0,o=a.length;n<o;++n)a[n].transition(l);for(t.canvasHelpers.clipArea(r.chart.chart.ctx,r.chart.chartArea),e(r.getDataset(),r.chart.options)&&s.dataset.transition(l).draw(),t.canvasHelpers.unclipArea(r.chart.chart.ctx),n=0,o=a.length;n<o;++n)a[n].draw(r.chart.chartArea)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},r=t._model;r.radius=o.hoverRadius||i.getValueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),r.backgroundColor=o.hoverBackgroundColor||i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,n,i.getHoverColor(r.backgroundColor)),r.borderColor=o.hoverBorderColor||i.getValueAtIndexOrDefault(e.pointHoverBorderColor,n,i.getHoverColor(r.borderColor)),r.borderWidth=o.hoverBorderWidth||i.getValueAtIndexOrDefault(e.pointHoverBorderWidth,n,r.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],o=t._index,r=t.custom||{},s=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),s.radius=r.radius||i.getValueAtIndexOrDefault(n.pointRadius,o,e.chart.options.elements.point.radius),s.backgroundColor=e.getPointBackgroundColor(t,o),s.borderColor=e.getPointBorderColor(t,o),s.borderWidth=e.getPointBorderWidth(t,o)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var r=0;r<n[0].data.length;++r)e.push('<li><span style="background-color:'+n[0].backgroundColor[r]+'"></span>'),o[r]&&e.push(o[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,o){var r=t.getDatasetMeta(0),s=i.datasets[0],a=r.data[o],l=a.custom||{},h=e.getValueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:h(s.backgroundColor,o,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:h(s.borderColor,o,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:h(s.borderWidth,o,c.borderWidth),hidden:isNaN(s.data[o])||r.data[o].hidden,index:o}}):[]}},onClick:function(t,e){var i,n,o,r=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)o=s.getDatasetMeta(i),o.data[r].hidden=!o.data[r].hidden;s.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var i=this,n=i.chart,o=n.chartArea,r=i.getMeta(),s=n.options,a=s.elements.arc,l=Math.min(o.right-o.left,o.bottom-o.top);n.outerRadius=Math.max((l-a.borderWidth/2)/2,0),n.innerRadius=Math.max(s.cutoutPercentage?n.outerRadius/100*s.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),i.outerRadius=n.outerRadius-n.radiusLength*i.index,i.innerRadius=i.outerRadius-n.radiusLength,r.count=i.countVisibleElements(),e.each(r.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){for(var o=this,r=o.chart,s=o.getDataset(),a=r.options,l=a.animation,h=r.scale,c=e.getValueAtIndexOrDefault,u=r.data.labels,d=o.calculateCircumference(s.data[i]),p=h.xCenter,f=h.yCenter,g=0,m=o.getMeta(),v=0;v<i;++v)isNaN(s.data[v])||m.data[v].hidden||++g;var _=a.startAngle,x=t.hidden?0:h.getDistanceFromCenterForValue(s.data[i]),y=_+d*g,b=y+(t.hidden?0:d),w=l.animateScale?0:h.getDistanceFromCenterForValue(s.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:h,_model:{x:p,y:f,innerRadius:0,outerRadius:n?w:x,startAngle:n&&l.animateRotate?_:y,endAngle:n&&l.animateRotate?_:b,label:c(u,i,u[i])}}),o.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={aspectRatio:1,scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,update:function(t){var i=this,n=i.getMeta(),o=n.dataset,r=n.data,s=o.custom||{},a=i.getDataset(),l=i.chart.options.elements.line,h=i.chart.scale;void 0!==a.tension&&void 0===a.lineTension&&(a.lineTension=a.tension),e.extend(n.dataset,{_datasetIndex:i.index,_children:r,_loop:!0,_model:{tension:s.tension?s.tension:e.getValueOrDefault(a.lineTension,l.tension),backgroundColor:s.backgroundColor?s.backgroundColor:a.backgroundColor||l.backgroundColor,borderWidth:s.borderWidth?s.borderWidth:a.borderWidth||l.borderWidth,borderColor:s.borderColor?s.borderColor:a.borderColor||l.borderColor,fill:s.fill?s.fill:void 0!==a.fill?a.fill:l.fill,borderCapStyle:s.borderCapStyle?s.borderCapStyle:a.borderCapStyle||l.borderCapStyle,borderDash:s.borderDash?s.borderDash:a.borderDash||l.borderDash,borderDashOffset:s.borderDashOffset?s.borderDashOffset:a.borderDashOffset||l.borderDashOffset,borderJoinStyle:s.borderJoinStyle?s.borderJoinStyle:a.borderJoinStyle||l.borderJoinStyle,scaleTop:h.top,scaleBottom:h.bottom,scaleZero:h.getBasePosition()}}),n.dataset.pivot(),e.each(r,function(e,n){i.updateElement(e,n,t)},i),i.updateBezierControlPoints()},updateElement:function(t,i,n){var o=this,r=t.custom||{},s=o.getDataset(),a=o.chart.scale,l=o.chart.options.elements.point,h=a.getPointPositionForValue(i,s.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:a,_model:{x:n?a.xCenter:h.x,y:n?a.yCenter:h.y,tension:r.tension?r.tension:e.getValueOrDefault(s.lineTension,o.chart.options.elements.line.tension),radius:r.radius?r.radius:e.getValueAtIndexOrDefault(s.pointRadius,i,l.radius),backgroundColor:r.backgroundColor?r.backgroundColor:e.getValueAtIndexOrDefault(s.pointBackgroundColor,i,l.backgroundColor),borderColor:r.borderColor?r.borderColor:e.getValueAtIndexOrDefault(s.pointBorderColor,i,l.borderColor),borderWidth:r.borderWidth?r.borderWidth:e.getValueAtIndexOrDefault(s.pointBorderWidth,i,l.borderWidth),pointStyle:r.pointStyle?r.pointStyle:e.getValueAtIndexOrDefault(s.pointStyle,i,l.pointStyle),hitRadius:r.hitRadius?r.hitRadius:e.getValueAtIndexOrDefault(s.hitRadius,i,l.hitRadius)}}),t._model.skip=r.skip?r.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,i=this.getMeta();e.each(i.data,function(n,o){var r=n._model,s=e.splineCurve(e.previousItem(i.data,o,!0)._model,r,e.nextItem(i.data,o,!0)._model,r.tension);r.controlPointPreviousX=Math.max(Math.min(s.previous.x,t.right),t.left),r.controlPointPreviousY=Math.max(Math.min(s.previous.y,t.bottom),t.top),r.controlPointNextX=Math.max(Math.min(s.next.x,t.right),t.left),r.controlPointNextY=Math.max(Math.min(s.next.y,t.bottom),t.top),n.pivot()})},draw:function(t){var i=this.getMeta(),n=t||1;e.each(i.data,function(t){t.transition(n)}),i.dataset.transition(n).draw(),e.each(i.data,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,r=t._model;r.radius=n.hoverRadius?n.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,o,this.chart.options.elements.point.hoverRadius),r.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,o,e.getHoverColor(r.backgroundColor)),r.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,o,e.getHoverColor(r.borderColor)),r.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,o,r.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,r=t._model,s=this.chart.options.elements.point;r.radius=n.radius?n.radius:e.getValueAtIndexOrDefault(i.radius,o,s.radius),r.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(i.pointBackgroundColor,o,s.backgroundColor),r.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(i.pointBorderColor,o,s.borderColor),r.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(i.pointBorderWidth,o,s.borderWidth)}})}},{}],21:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var o=this;n||(t.animating=!0);for(var r=0;r<o.animations.length;++r)if(o.animations[r].chartInstance===t)return void(o.animations[r].animationObject=e);o.animations.push({chartInstance:t,animationObject:e}),1===o.animations.length&&o.requestAnimationFrame()},cancelAnimation:function(t){var i=e.findIndex(this.animations,function(e){return e.chartInstance===t});-1!==i&&(this.animations.splice(i,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=e.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1);for(var n=0;n<t.animations.length;)null===t.animations[n].animationObject.currentStep&&(t.animations[n].animationObject.currentStep=0),t.animations[n].animationObject.currentStep+=1+i,t.animations[n].animationObject.currentStep>t.animations[n].animationObject.numSteps&&(t.animations[n].animationObject.currentStep=t.animations[n].animationObject.numSteps),t.animations[n].animationObject.render(t.animations[n].chartInstance,t.animations[n].animationObject),t.animations[n].animationObject.onAnimationProgress&&t.animations[n].animationObject.onAnimationProgress.call&&t.animations[n].animationObject.onAnimationProgress.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].animationObject.currentStep===t.animations[n].animationObject.numSteps?(t.animations[n].animationObject.onAnimationComplete&&t.animations[n].animationObject.onAnimationComplete.call&&t.animations[n].animationObject.onAnimationComplete.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].chartInstance.animating=!1,t.animations.splice(n,1)):++n;var o=Date.now(),r=(o-e)/t.frameDuration;t.dropFrames+=r,t.animations.length>0&&t.requestAnimationFrame()}}}},{}],22:[function(t,e,i){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(e,i,n,o,r){var s,a,l,h,c,u;if("object"==typeof i&&("[object HTMLImageElement]"===(s=i.toString())||"[object HTMLCanvasElement]"===s))return void e.drawImage(i,o-i.width/2,r-i.height/2);if(!(isNaN(n)||n<=0)){switch(i){default:e.beginPath(),e.arc(o,r,n,0,2*Math.PI),e.closePath(),e.fill();break;case"triangle":e.beginPath(),a=3*n/Math.sqrt(3),c=a*Math.sqrt(3)/2,e.moveTo(o-a/2,r+c/3),e.lineTo(o+a/2,r+c/3),e.lineTo(o,r-2*c/3),e.closePath(),e.fill();break;case"rect":u=1/Math.SQRT2*n,e.beginPath(),e.fillRect(o-u,r-u,2*u,2*u),e.strokeRect(o-u,r-u,2*u,2*u);break;case"rectRounded":var d=n/Math.SQRT2,p=o-d,f=r-d,g=Math.SQRT2*n;t.helpers.drawRoundedRectangle(e,p,f,g,g,n/2),e.fill();break;case"rectRot":u=1/Math.SQRT2*n,e.beginPath(),e.moveTo(o-u,r),e.lineTo(o,r+u),e.lineTo(o+u,r),e.lineTo(o,r-u),e.closePath(),e.fill();break;case"cross":e.beginPath(),e.moveTo(o,r+n),e.lineTo(o,r-n),e.moveTo(o-n,r),e.lineTo(o+n,r),e.closePath();break;case"crossRot":e.beginPath(),l=Math.cos(Math.PI/4)*n,h=Math.sin(Math.PI/4)*n,e.moveTo(o-l,r-h),e.lineTo(o+l,r+h),e.moveTo(o-l,r+h),e.lineTo(o+l,r-h),e.closePath();break;case"star":e.beginPath(),e.moveTo(o,r+n),e.lineTo(o,r-n),e.moveTo(o-n,r),e.lineTo(o+n,r),l=Math.cos(Math.PI/4)*n,h=Math.sin(Math.PI/4)*n,e.moveTo(o-l,r-h),e.lineTo(o+l,r+h),e.moveTo(o-l,r+h),e.lineTo(o+l,r-h),e.closePath();break;case"line":e.beginPath(),e.moveTo(o-n,r),e.lineTo(o+n,r),e.closePath();break;case"dash":e.beginPath(),e.moveTo(o,r),e.lineTo(o+n,r),e.closePath()}e.stroke()}},e.clipArea=function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},e.unclipArea=function(t){t.restore()}}},{}],23:[function(t,e,i){"use strict";e.exports=function(t){function e(e){e=e||{};var i=e.data=e.data||{};return i.datasets=i.datasets||[],i.labels=i.labels||[],e.options=n.configMerge(t.defaults.global,t.defaults[e.type],e.options||{}),e}function i(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach(function(e){t.scales[e.id].options=e}),t.tooltip._options=e.tooltips}var n=t.helpers,o=t.plugins,r=t.platform;t.types={},t.instances={},t.controllers={},t.Controller=function(i,o,s){var a=this;o=e(o);var l=r.acquireContext(i,o),h=l&&l.canvas,c=h&&h.height,u=h&&h.width;return s.ctx=l,s.canvas=h,s.config=o,s.width=u,s.height=c,s.aspectRatio=c?u/c:null,a.id=n.uid(),a.chart=s,a.config=o,a.options=o.options,a._bufferedRender=!1,t.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data}}),l&&h?(a.initialize(),a.update(),a):(console.error("Failed to create chart: can't acquire context from the given item"),a)},n.extend(t.Controller.prototype,{initialize:function(){var t=this;return o.notify(t,"beforeInit"),n.retinaScale(t.chart),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),o.notify(t,"afterInit"),t},clear:function(){return n.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.chart,r=e.options,s=i.canvas,a=r.maintainAspectRatio&&i.aspectRatio||null,l=Math.floor(n.getMaximumWidth(s)),h=Math.floor(a?l/a:n.getMaximumHeight(s));if((i.width!==l||i.height!==h)&&(s.width=i.width=l,s.height=i.height=h,s.style.width=l+"px",s.style.height=h+"px",n.retinaScale(i),!t)){var c={width:l,height:h};o.notify(e,"resize",[c]),e.options.onResize&&e.options.onResize(e,c),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;n.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),n.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildScales:function(){var e=this,i=e.options,o=e.scales={},r=[];i.scales&&(r=r.concat((i.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category"}}),(i.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear"}}))),i.scale&&r.push({options:i.scale,dtype:"radialLinear",isDefault:!0}),n.each(r,function(i){var r=i.options,s=n.getValueOrDefault(r.type,i.dtype),a=t.scaleService.getScaleConstructor(s);if(a){var l=new a({id:r.id,options:r,ctx:e.chart.ctx,chart:e});o[l.id]=l,i.isDefault&&(e.scale=l)}}),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],o=[];if(n.each(e.data.datasets,function(n,r){var s=e.getDatasetMeta(r);s.type||(s.type=n.type||e.config.type),i.push(s.type),s.controller?s.controller.updateIndex(r):(s.controller=new t.controllers[s.type](e,r),o.push(s.controller))},e),i.length>1)for(var r=1;r<i.length;r++)if(i[r]!==i[r-1]){e.isCombo=!0;break}return o},resetElements:function(){var t=this;n.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t,e){var r=this;if(i(r),!1!==o.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var s=r.buildOrUpdateControllers();n.each(r.data.datasets,function(t,e){r.getDatasetMeta(e).controller.buildOrUpdateElements()},r),r.updateLayout(),n.each(s,function(t){t.reset()}),r.updateDatasets(),o.notify(r,"afterUpdate"),r._bufferedRender?r._bufferedRequest={lazy:e,duration:t}:r.render(t,e)}},updateLayout:function(){var e=this;!1!==o.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.chart.width,this.chart.height),o.notify(e,"afterScaleUpdate"),o.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==o.notify(t,"beforeDatasetsUpdate")){for(var e=0,i=t.data.datasets.length;e<i;++e)t.getDatasetMeta(e).controller.update();o.notify(t,"afterDatasetsUpdate")}},render:function(e,i){var r=this;if(!1!==o.notify(r,"beforeRender")){var s=r.options.animation,a=function(){o.notify(r,"afterRender");var t=s&&s.onComplete;t&&t.call&&t.call(r)};if(s&&(void 0!==e&&0!==e||void 0===e&&0!==s.duration)){var l=new t.Animation;l.numSteps=(e||s.duration)/16.66,l.easing=s.easing,l.render=function(t,e){var i=n.easingEffects[e.easing],o=e.currentStep/e.numSteps,r=i(o);t.draw(r,o,e.currentStep)},l.onAnimationProgress=s.onProgress,l.onAnimationComplete=a,t.animationService.addAnimation(r,l,e,i)}else r.draw(),a();return r}},draw:function(t){var e=this;e.clear(),void 0!==t&&null!==t||(t=1),!1!==o.notify(e,"beforeDraw",[t])&&(n.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e.tooltip.transition(t).draw(),o.notify(e,"afterDraw",[t]))},drawDatasets:function(t){var e=this;!1!==o.notify(e,"beforeDatasetsDraw",[t])&&(n.each(e.data.datasets,function(i,n){e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.draw(t)},e,!0),o.notify(e,"afterDatasetsDraw",[t]))},getElementAtEvent:function(e){return t.Interaction.modes.single(this,e)},getElementsAtEvent:function(e){return t.Interaction.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return t.Interaction.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,i,n){var o=t.Interaction.modes[i];return"function"==typeof o?o(this,e,n):[]},getDatasetAtEvent:function(e){return t.Interaction.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var e,i,s,a=this,l=a.chart.canvas;for(a.stop(),i=0,s=a.data.datasets.length;i<s;++i)e=a.getDatasetMeta(i),e.controller&&(e.controller.destroy(),e.controller=null);l&&(a.unbindEvents(),n.clear(a.chart),r.releaseContext(a.chart.ctx),a.chart.canvas=null,a.chart.ctx=null),o.notify(a,"destroy"),delete t.instances[a.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e.chart,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e),e.tooltip.initialize()},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};n.each(t.options.events,function(n){r.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},r.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,n.each(e,function(e,i){r.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,o,r,s=i?"setHoverStyle":"removeHoverStyle";for(o=0,r=t.length;o<r;++o)(n=t[o])&&this.getDatasetMeta(n._datasetIndex).controller[s](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==o.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,
|
|
e._bufferedRequest=null;var n=e.handleEvent(t);n|=i&&i.handleEvent(t),o.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r.duration,r.lazy):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,i=e.options||{},o=i.hover,r=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,o.mode,o),o.onHover&&o.onHover.call(e,t["native"],e.active),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(e,t["native"],e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,o.mode,!1),e.active.length&&o.mode&&e.updateHoverStyle(e.active,o.mode,!0),r=!n.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,r}})}},{}],24:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return t._chartjs?void t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),void o.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),r=o.apply(this,e);return n.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),r}})}))}function i(t,e){var i=t._chartjs;if(i){var n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(o.forEach(function(e){delete t[e]}),delete t._chartjs)}}var n=t.helpers,o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),o=i.getDataset().data||[],r=n.data;for(t=0,e=o.length;t<e;++t)r[t]=r[t]||i.createMetaData(t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,n=t.getDataset(),o=n.data||(n.data=[]);t._data!==o&&(t._data&&i(t._data,t),e(o,t),t._data=o),t.resyncElements()},update:n.noop,draw:function(t){var e,i,n=t||1,o=this.getMeta().data;for(e=0,i=o.length;e<i;++e)o[e].transition(n).draw()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],o=t._index,r=t.custom||{},s=n.getValueAtIndexOrDefault,a=t._model;a.backgroundColor=r.backgroundColor?r.backgroundColor:s(i.backgroundColor,o,e.backgroundColor),a.borderColor=r.borderColor?r.borderColor:s(i.borderColor,o,e.borderColor),a.borderWidth=r.borderWidth?r.borderWidth:s(i.borderWidth,o,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,o=t.custom||{},r=n.getValueAtIndexOrDefault,s=n.getHoverColor,a=t._model;a.backgroundColor=o.hoverBackgroundColor?o.hoverBackgroundColor:r(e.hoverBackgroundColor,i,s(a.backgroundColor)),a.borderColor=o.hoverBorderColor?o.hoverBorderColor:r(e.hoverBorderColor,i,s(a.borderColor)),a.borderWidth=o.hoverBorderWidth?o.hoverBorderWidth:r(e.hoverBorderWidth,i,a.borderWidth)},resyncElements:function(){var t=this,e=t.getMeta(),i=t.getDataset().data,n=e.data.length,o=i.length;o<n?e.data.splice(o,n-o):o>n&&t.insertElements(n,o-n)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=n.inherits}},{}],25:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.elements={},t.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=e.clone(t._model)),t._start=e.clone(t._view),t},transition:function(t){var i=this;return i._view||(i._view=e.clone(i._model)),1===t?(i._view=i._model,i._start=null,i):(i._start||i.pivot(),e.each(i._model,function(n,o){if("_"===o[0]);else if(i._view.hasOwnProperty(o))if(n===i._view[o]);else if("string"==typeof n)try{var r=e.color(i._model[o]).mix(e.color(i._start[o]),t);i._view[o]=r.rgbString()}catch(t){i._view[o]=n}else if("number"==typeof n){var s=void 0!==i._start[o]&&!1===isNaN(i._start[o])?i._start[o]:0;i._view[o]=(i._model[o]-s)*t+s}else i._view[o]=n;else"number"!=typeof n||isNaN(i._view[o])?i._view[o]=n:i._view[o]=n*t},i),i)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),t.Element.extend=e.inherits}},{}],26:[function(t,e,i){"use strict";var n=t(3);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function o(t,n,o){var r=document.defaultView,s=t.parentNode,a=r.getComputedStyle(t)[n],l=r.getComputedStyle(s)[n],h=i(a),c=i(l),u=Number.POSITIVE_INFINITY;return h||c?Math.min(h?e(a,t,o):u,c?e(l,s,o):u):"none"}var r=t.helpers={};r.each=function(t,e,i,n){var o,s;if(r.isArray(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if("object"==typeof t){var a=Object.keys(t);for(s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}},r.clone=function(t){var e={};return r.each(t,function(t,i){r.isArray(t)?e[i]=t.slice(0):e[i]="object"==typeof t&&null!==t?r.clone(t):t}),e},r.extend=function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;i<n;i++)r.each(arguments[i],e);return t},r.configMerge=function(e){var i=r.clone(e);return r.each(Array.prototype.slice.call(arguments,1),function(e){r.each(e,function(e,n){var o=i.hasOwnProperty(n),s=o?i[n]:{};"scales"===n?i[n]=r.scaleMerge(s,e):"scale"===n?i[n]=r.configMerge(s,t.scaleService.getScaleDefaults(e.type),e):!o||"object"!=typeof s||r.isArray(s)||null===s||"object"!=typeof e||r.isArray(e)?i[n]=e:i[n]=r.configMerge(s,e)})}),i},r.scaleMerge=function(e,i){var n=r.clone(e);return r.each(i,function(e,i){"xAxes"===i||"yAxes"===i?n.hasOwnProperty(i)?r.each(e,function(e,o){var s=r.getValueOrDefault(e.type,"xAxes"===i?"category":"linear"),a=t.scaleService.getScaleDefaults(s);o>=n[i].length||!n[i][o].type?n[i].push(r.configMerge(a,e)):e.type&&e.type!==n[i][o].type?n[i][o]=r.configMerge(n[i][o],a,e):n[i][o]=r.configMerge(n[i][o],e)}):(n[i]=[],r.each(e,function(e){var o=r.getValueOrDefault(e.type,"xAxes"===i?"category":"linear");n[i].push(r.configMerge(t.scaleService.getScaleDefaults(o),e))})):n.hasOwnProperty(i)&&"object"==typeof n[i]&&null!==n[i]&&"object"==typeof e?n[i]=r.configMerge(n[i],e):n[i]=e}),n},r.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:r.isArray(t)?e<t.length?t[e]:i:t},r.getValueOrDefault=function(t,e){return void 0===t?e:t},r.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;++i)if(t[i]===e)return i;return-1},r.where=function(t,e){if(r.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return r.each(t,function(t){e(t)&&i.push(t)}),i},r.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,o=t.length;n<o;++n)if(e.call(i,t[n],n,t))return n;return-1},r.findNextWhere=function(t,e,i){void 0!==i&&null!==i||(i=-1);for(var n=i+1;n<t.length;n++){var o=t[n];if(e(o))return o}},r.findPreviousWhere=function(t,e,i){void 0!==i&&null!==i||(i=t.length);for(var n=i-1;n>=0;n--){var o=t[n];if(e(o))return o}},r.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=r.inherits,t&&r.extend(i.prototype,t),i.__super__=e.prototype,i},r.noop=function(){},r.uid=function(){var t=0;return function(){return t++}}(),r.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},r.almostEquals=function(t,e,i){return Math.abs(t-e)<i},r.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},r.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},r.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},r.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},r.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},r.toRadians=function(t){return t*(Math.PI/180)},r.toDegrees=function(t){return t*(180/Math.PI)},r.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),r=Math.atan2(n,i);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:o}},r.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},r.aliasPixel=function(t){return t%2==0?0:.5},r.splineCurve=function(t,e,i,n){var o=t.skip?e:t,r=e,s=i.skip?e:i,a=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),l=Math.sqrt(Math.pow(s.x-r.x,2)+Math.pow(s.y-r.y,2)),h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;var u=n*h,d=n*c;return{previous:{x:r.x-u*(s.x-o.x),y:r.y-u*(s.y-o.y)},next:{x:r.x+d*(s.x-o.x),y:r.y+d*(s.y-o.y)}}},r.EPSILON=Number.EPSILON||1e-14,r.splineCurveMonotone=function(t){var e,i,n,o,s=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),a=s.length;for(e=0;e<a;++e)if(n=s[e],!n.model.skip){if(i=e>0?s[e-1]:null,(o=e<a-1?s[e+1]:null)&&!o.model.skip){var l=o.model.x-n.model.x;n.deltaK=0!==l?(o.model.y-n.model.y)/l:0}!i||i.model.skip?n.mK=n.deltaK:!o||o.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}var h,c,u,d;for(e=0;e<a-1;++e)n=s[e],o=s[e+1],n.model.skip||o.model.skip||(r.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=o.mK=0:(h=n.mK/n.deltaK,c=o.mK/n.deltaK,(d=Math.pow(h,2)+Math.pow(c,2))<=9||(u=3/Math.sqrt(d),n.mK=h*u*n.deltaK,o.mK=c*u*n.deltaK)));var p;for(e=0;e<a;++e)n=s[e],n.model.skip||(i=e>0?s[e-1]:null,o=e<a-1?s[e+1]:null,i&&!i.model.skip&&(p=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-p,n.model.controlPointPreviousY=n.model.y-p*n.mK),o&&!o.model.skip&&(p=(o.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+p,n.model.controlPointNextY=n.model.y+p*n.mK))},r.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},r.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},r.niceNum=function(t,e){var i=Math.floor(r.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)};var s=r.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(1-Math.pow(2,-10*t/1))},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((1*t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.3*1.5*1),n<Math.abs(1)?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-s.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t*1:t<2/2.75?1*(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return t<.5?.5*s.easeInBounce(2*t):.5*s.easeOutBounce(2*t-1)+.5}};r.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),r.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,s=t.currentTarget||t.srcElement,a=s.getBoundingClientRect(),l=o.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=o.clientX,n=o.clientY);var h=parseFloat(r.getStyle(s,"padding-left")),c=parseFloat(r.getStyle(s,"padding-top")),u=parseFloat(r.getStyle(s,"padding-right")),d=parseFloat(r.getStyle(s,"padding-bottom")),p=a.right-a.left-h-u,f=a.bottom-a.top-c-d;return i=Math.round((i-a.left-h)/p*s.width/e.currentDevicePixelRatio),n=Math.round((n-a.top-c)/f*s.height/e.currentDevicePixelRatio),{x:i,y:n}},r.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},r.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=r.noop},r.getConstraintWidth=function(t){return o(t,"max-width","clientWidth")},r.getConstraintHeight=function(t){return o(t,"max-height","clientHeight")},r.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(r.getStyle(e,"padding-left"),10),n=parseInt(r.getStyle(e,"padding-right"),10),o=e.clientWidth-i-n,s=r.getConstraintWidth(t);return isNaN(s)?o:Math.min(o,s)},r.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(r.getStyle(e,"padding-top"),10),n=parseInt(r.getStyle(e,"padding-bottom"),10),o=e.clientHeight-i-n,s=r.getConstraintHeight(t);return isNaN(s)?o:Math.min(o,s)},r.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},r.retinaScale=function(t){var e=t.currentDevicePixelRatio=window.devicePixelRatio||1;if(1!==e){var i=t.canvas,n=t.height,o=t.width;i.height=n*e,i.width=o*e,t.ctx.scale(e,e),i.style.height=n+"px",i.style.width=o+"px"}},r.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},r.fontString=function(t,e,i){return e+" "+t+"px "+i},r.longestText=function(t,e,i,n){n=n||{};var o=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.font=e;var a=0;r.each(i,function(e){void 0!==e&&null!==e&&!0!==r.isArray(e)?a=r.measureText(t,o,s,a,e):r.isArray(e)&&r.each(e,function(e){void 0===e||null===e||r.isArray(e)||(a=r.measureText(t,o,s,a,e))})});var l=s.length/2;if(l>i.length){for(var h=0;h<l;h++)delete o[s[h]];s.splice(0,l)}return a},r.measureText=function(t,e,i,n,o){var r=e[o];return r||(r=e[o]=t.measureText(o).width,i.push(o)),r>n&&(n=r),n},r.numberOfLabelLines=function(t){var e=1;return r.each(t,function(t){r.isArray(t)&&t.length>e&&(e=t.length)}),e},r.drawRoundedRectangle=function(t,e,i,n,o,r){t.beginPath(),t.moveTo(e+r,i),t.lineTo(e+n-r,i),t.quadraticCurveTo(e+n,i,e+n,i+r),t.lineTo(e+n,i+o-r),t.quadraticCurveTo(e+n,i+o,e+n-r,i+o),t.lineTo(e+r,i+o),t.quadraticCurveTo(e,i+o,e,i+o-r),t.lineTo(e,i+r),t.quadraticCurveTo(e,i,e+r,i),t.closePath()},r.color=function(e){return n?n(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.error("Color.js not found!"),e)},r.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r.arrayEquals=function(t,e){var i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o instanceof Array&&s instanceof Array){if(!r.arrayEquals(o,s))return!1}else if(o!==s)return!1;return!0},r.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)},r.getHoverColor=function(t){return t instanceof CanvasPattern?t:r.color(t).saturate(.5).darken(.1).rgbString()}}},{3:3}],27:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return t["native"]?{x:t.x,y:t.y}:s.getRelativePosition(t,e)}function i(t,e){var i,n,o,r,s,a=t.data.datasets;for(n=0,r=a.length;n<r;++n)if(t.isDatasetVisible(n))for(i=t.getDatasetMeta(n),o=0,s=i.data.length;o<s;++o){var l=i.data[o];l._view.skip||e(l)}}function n(t,e){var n=[];return i(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function o(t,e,n,o){var r=Number.POSITIVE_INFINITY,a=[];return o||(o=s.distanceBetweenPoints),i(t,function(t){if(!n||t.inRange(e.x,e.y)){var i=t.getCenterPoint(),s=o(e,i);s<r?(a=[t],r=s):s===r&&a.push(t)}}),a}function r(t,i,r){var s=e(i,t.chart),a=function(t,e){return Math.abs(t.x-e.x)},l=r.intersect?n(t,s):o(t,s,!1,a),h=[];return l.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i),o=n.data[l[0]._index];o&&!o._view.skip&&h.push(o)}}),h):[]}var s=t.helpers;t.Interaction={modes:{single:function(t,n){var o=e(n,t.chart),r=[];return i(t,function(t){if(t.inRange(o.x,o.y))return r.push(t),r}),r.slice(0,1)},label:r,index:r,dataset:function(t,i,r){var s=e(i,t.chart),a=r.intersect?n(t,s):o(t,s,!1);return a.length>0&&(a=t.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(t,e){return r(t,e,!0)},point:function(t,i){return n(t,e(i,t.chart))},nearest:function(t,i,n){var r=e(i,t.chart),s=o(t,r,n.intersect);return s.length>1&&s.sort(function(t,e){var i=t.getArea(),n=e.getArea(),o=i-n;return 0===o&&(o=t._datasetIndex-e._datasetIndex),o}),s.slice(0,1)},x:function(t,n,o){var r=e(n,t.chart),s=[],a=!1;return i(t,function(t){t.inXRange(r.x)&&s.push(t),t.inRange(r.x,r.y)&&(a=!0)}),o.intersect&&!a&&(s=[]),s},y:function(t,n,o){var r=e(n,t.chart),s=[],a=!1;return i(t,function(t){t.inYRange(r.y)&&s.push(t),t.inRange(r.x,r.y)&&(a=!0)}),o.intersect&&!a&&(s=[]),s}}}}},{}],28:[function(t,e,i){"use strict";e.exports=function(){var t=function(e,i){return this.controller=new t.Controller(e,i,this),this.controller};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}}},t.Chart=t,t}},{}],29:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),t.boxes.push(e)},removeBox:function(t,e){t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(t,i,n){function o(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?x:T,C),k-=e.height):(e=t.update(S,w),T-=e.width),D.push({horizontal:i,minSize:e,box:t})}function r(t){var i=e.findNextWhere(D,function(e){return e.box===t});if(i)if(t.isHorizontal()){var n={left:Math.max(O,E),right:Math.max(N,I),top:0,bottom:0};t.update(t.options.fullWidth?x:T,y/2,n)}else t.update(i.minSize.width,k)}function s(t){var i=e.findNextWhere(D,function(e){return e.box===t}),n={left:0,right:0,top:P,bottom:F};i&&t.update(i.minSize.width,k,n)}function a(t){t.isHorizontal()?(t.left=t.options.fullWidth?c:O,t.right=t.options.fullWidth?i-u:O+T,t.top=z,t.bottom=z+t.height,z=t.bottom):(t.left=W,t.right=W+t.width,t.top=P,t.bottom=P+k,W=t.right)}if(t){var l=t.options.layout,h=l?l.padding:null,c=0,u=0,d=0,p=0;isNaN(h)?(c=h.left||0,u=h.right||0,d=h.top||0,p=h.bottom||0):(c=h,u=h,d=h,p=h);var f=e.where(t.boxes,function(t){return"left"===t.options.position}),g=e.where(t.boxes,function(t){return"right"===t.options.position}),m=e.where(t.boxes,function(t){return"top"===t.options.position}),v=e.where(t.boxes,function(t){return"bottom"===t.options.position}),_=e.where(t.boxes,function(t){return"chartArea"===t.options.position});m.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),v.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var x=i-c-u,y=n-d-p,b=x/2,w=y/2,S=(i-b)/(f.length+g.length),C=(n-w)/(m.length+v.length),T=x,k=y,D=[];e.each(f.concat(g,m,v),o);var E=0,I=0,A=0,R=0;e.each(m.concat(v),function(t){if(t.getPadding){var e=t.getPadding();E=Math.max(E,e.left),I=Math.max(I,e.right)}}),e.each(f.concat(g),function(t){if(t.getPadding){var e=t.getPadding();A=Math.max(A,e.top),R=Math.max(R,e.bottom)}});var O=c,N=u,P=d,F=p;e.each(f.concat(g),r),e.each(f,function(t){O+=t.width}),e.each(g,function(t){N+=t.width}),e.each(m.concat(v),r),e.each(m,function(t){P+=t.height}),e.each(v,function(t){F+=t.height}),e.each(f.concat(g),s),O=c,N=u,P=d,F=p,e.each(f,function(t){O+=t.width}),e.each(g,function(t){N+=t.width}),e.each(m,function(t){P+=t.height}),e.each(v,function(t){F+=t.height});var L=Math.max(E-O,0);O+=L,N+=Math.max(I-N,0);var M=Math.max(A-P,0);P+=M,F+=Math.max(R-F,0);var B=n-P-F,H=i-O-N;H===T&&B===k||(e.each(f,function(t){t.height=B}),e.each(g,function(t){t.height=B}),e.each(m,function(t){t.options.fullWidth||(t.width=H)}),e.each(v,function(t){t.options.fullWidth||(t.width=H)}),k=B,T=H);var W=c+L,z=d+M;e.each(f.concat(m),a),W+=T,z+=k,e.each(g,a),e.each(v,a),t.chartArea={left:O,top:P,right:O+T,bottom:P+k},e.each(_,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(T,k)})}}}}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function i(e,i){var n=new t.Legend({ctx:e.chart.ctx,options:i,chart:e});e.legend=n,t.layoutService.addBox(e,n)}var n=t.helpers,o=n.noop;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,o=n.getDatasetMeta(i);o.hidden=null===o.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return n.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:n.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){n.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:o,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:o,beforeSetDimensions:o,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:o,beforeBuildLabels:o,buildLabels:function(){var t=this,e=t.options.labels,i=e.generateLabels.call(t,t.chart);e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:o,beforeFit:o,fit:function(){var i=this,o=i.options,r=o.labels,s=o.display,a=i.ctx,l=t.defaults.global,h=n.getValueOrDefault,c=h(r.fontSize,l.defaultFontSize),u=h(r.fontStyle,l.defaultFontStyle),d=h(r.fontFamily,l.defaultFontFamily),p=n.fontString(c,u,d),f=i.legendHitBoxes=[],g=i.minSize,m=i.isHorizontal();if(m?(g.width=i.maxWidth,g.height=s?10:0):(g.width=s?10:0,g.height=i.maxHeight),s)if(a.font=p,m){var v=i.lineWidths=[0],_=i.legendItems.length?c+r.padding:0;a.textAlign="left",a.textBaseline="top",n.each(i.legendItems,function(t,n){var o=e(r,c),s=o+c/2+a.measureText(t.text).width;v[v.length-1]+s+r.padding>=i.width&&(_+=c+r.padding,v[v.length]=i.left),f[n]={left:0,top:0,width:s,height:c},v[v.length-1]+=s+r.padding}),g.height+=_}else{var x=r.padding,y=i.columnWidths=[],b=r.padding,w=0,S=0,C=c+x;n.each(i.legendItems,function(t,i){var n=e(r,c),o=n+c/2+a.measureText(t.text).width;S+C>g.height&&(b+=w+r.padding,y.push(w),w=0,S=0),w=Math.max(w,o),S+=C,f[i]={left:0,top:0,width:o,height:c}}),b+=w,y.push(w),g.width+=b}i.width=g.width,i.height=g.height},afterFit:o,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var i=this,o=i.options,r=o.labels,s=t.defaults.global,a=s.elements.line,l=i.width,h=i.lineWidths;if(o.display){var c,u=i.ctx,d=n.getValueOrDefault,p=d(r.fontColor,s.defaultFontColor),f=d(r.fontSize,s.defaultFontSize),g=d(r.fontStyle,s.defaultFontStyle),m=d(r.fontFamily,s.defaultFontFamily),v=n.fontString(f,g,m);u.textAlign="left",u.textBaseline="top",u.lineWidth=.5,u.strokeStyle=p,u.fillStyle=p,u.font=v;var _=e(r,f),x=i.legendHitBoxes,y=function(e,i,n){if(!(isNaN(_)||_<=0)){u.save(),u.fillStyle=d(n.fillStyle,s.defaultColor),u.lineCap=d(n.lineCap,a.borderCapStyle),u.lineDashOffset=d(n.lineDashOffset,a.borderDashOffset),u.lineJoin=d(n.lineJoin,a.borderJoinStyle),u.lineWidth=d(n.lineWidth,a.borderWidth),u.strokeStyle=d(n.strokeStyle,s.defaultColor);var r=0===d(n.lineWidth,a.borderWidth);if(u.setLineDash&&u.setLineDash(d(n.lineDash,a.borderDash)),o.labels&&o.labels.usePointStyle){var l=f*Math.SQRT2/2,h=l/Math.SQRT2,c=e+h,p=i+h;t.canvasHelpers.drawPoint(u,n.pointStyle,l,c,p)}else r||u.strokeRect(e,i,_,f),u.fillRect(e,i,_,f);u.restore()}},b=function(t,e,i,n){u.fillText(i.text,_+f/2+t,e),i.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(_+f/2+t,e+f/2),u.lineTo(_+f/2+t+n,e+f/2),u.stroke())},w=i.isHorizontal();c=w?{x:i.left+(l-h[0])/2,y:i.top+r.padding,line:0}:{x:i.left+r.padding,y:i.top+r.padding,line:0};var S=f+r.padding;n.each(i.legendItems,function(t,e){var n=u.measureText(t.text).width,o=_+f/2+n,s=c.x,a=c.y;w?s+o>=l&&(a=c.y+=S,c.line++,s=c.x=i.left+(l-h[c.line])/2):a+S>i.bottom&&(s=c.x=s+i.columnWidths[c.line]+r.padding,a=c.y=i.top+r.padding,c.line++),y(s,a,t),x[e].left=s,x[e].top=a,b(s,a,t,n),w?c.x+=o+r.padding:c.y+=S})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var r=t.x,s=t.y;if(r>=e.left&&r<=e.right&&s>=e.top&&s<=e.bottom)for(var a=e.legendHitBoxes,l=0;l<a.length;++l){var h=a[l];if(r>=h.left&&r<=h.left+h.width&&s>=h.top&&s<=h.top+h.height){if("click"===n){i.onClick.call(e,t["native"],e.legendItems[l]),o=!0;break}if("mousemove"===n){i.onHover.call(e,t["native"],e.legendItems[l]),o=!0;break}}}return o}}),t.plugins.register({beforeInit:function(t){var e=t.options.legend;e&&i(t,e)},beforeUpdate:function(e){var o=e.options.legend;o?(o=n.configMerge(t.defaults.global.legend,o),e.legend?e.legend.options=o:i(e,o)):(t.layoutService.removeBox(e,e.legend),delete e.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}})}},{}],31:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.plugins={},t.plugins={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,o,r,s,a,l=this.descriptors(t),h=l.length;for(n=0;n<h;++n)if(o=l[n],r=o.plugin,"function"==typeof(a=r[e])&&(s=[t].concat(i||[]),s.push(o.options),!1===a.apply(r,s)))return!1;return!0},descriptors:function(i){var n=i._plugins||(i._plugins={});if(n.id===this._cacheId)return n.descriptors;var o=[],r=[],s=i&&i.config||{},a=t.defaults.global.plugins,l=s.options&&s.options.plugins||{};return this._plugins.concat(s.plugins||[]).forEach(function(t){if(-1===o.indexOf(t)){var i=t.id,n=l[i];!1!==n&&(!0===n&&(n=e.clone(a[i])),o.push(t),r.push({plugin:t,options:n||{}}))}}),n.descriptors=r,n.id=this._cacheId,r}},t.pluginService=t.plugins,t.PluginBase=e.inherits({})}},{}],32:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e,i){return n.isArray(e)?n.longestText(t,i,e):t.measureText(e).width}function i(e){var i=n.getValueOrDefault,o=t.defaults.global,r=i(e.fontSize,o.defaultFontSize),s=i(e.fontStyle,o.defaultFontStyle),a=i(e.fontFamily,o.defaultFontFamily);return{size:r,style:s,family:a,font:n.fontString(r,s,a)}}var n=t.helpers;t.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:t.Ticks.formatters.values}},t.Scale=t.Element.extend({getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},beforeUpdate:function(){n.callCallback(this.options.beforeUpdate,[this])},update:function(t,e,i){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=e,o.margins=n.extend({left:0,right:0,top:0,bottom:0},i),
|
|
o.longestTextCache=o.longestTextCache||{},o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeDataLimits(),o.determineDataLimits(),o.afterDataLimits(),o.beforeBuildTicks(),o.buildTicks(),o.afterBuildTicks(),o.beforeTickToLabelConversion(),o.convertTicksToLabels(),o.afterTickToLabelConversion(),o.beforeCalculateTickRotation(),o.calculateTickRotation(),o.afterCalculateTickRotation(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:function(){n.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){n.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){n.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){n.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:n.noop,afterDataLimits:function(){n.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){n.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:n.noop,afterBuildTicks:function(){n.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){n.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback)},afterTickToLabelConversion:function(){n.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){n.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,o=t.options.ticks,r=i(o);e.font=r.font;var s=o.minRotation||0;if(t.options.display&&t.isHorizontal())for(var a,l=n.longestText(e,r.font,t.ticks,t.longestTextCache),h=l,c=t.getPixelForTick(1)-t.getPixelForTick(0)-6;h>c&&s<o.maxRotation;){var u=n.toRadians(s);if(a=Math.cos(u),Math.sin(u)*l>t.maxHeight){s--;break}s++,h=a*l}t.labelRotation=s},afterCalculateTickRotation:function(){n.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){n.callCallback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},r=t.options,s=r.ticks,a=r.scaleLabel,l=r.gridLines,h=r.display,c=t.isHorizontal(),u=i(s),d=1.5*i(a).size,p=r.gridLines.tickMarkLength;if(o.width=c?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&l.drawTicks?p:0,o.height=c?h&&l.drawTicks?p:0:t.maxHeight,a.display&&h&&(c?o.height+=d:o.width+=d),s.display&&h){var f=n.longestText(t.ctx,u.font,t.ticks,t.longestTextCache),g=n.numberOfLabelLines(t.ticks),m=.5*u.size;if(c){t.longestLabelWidth=f;var v=n.toRadians(t.labelRotation),_=Math.cos(v),x=Math.sin(v),y=x*f+u.size*g+m*g;o.height=Math.min(t.maxHeight,o.height+y),t.ctx.font=u.font;var b=t.ticks[0],w=e(t.ctx,b,u.font),S=t.ticks[t.ticks.length-1],C=e(t.ctx,S,u.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?_*w+3:_*m+3,t.paddingRight="bottom"===r.position?_*m+3:_*C+3):(t.paddingLeft=w/2+3,t.paddingRight=C/2+3)}else s.mirror?f=0:f+=t.options.ticks.padding,o.width+=f,t.paddingTop=u.size/2,t.paddingBottom=u.size/2}t.handleMargins(),t.width=o.width,t.height=o.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){n.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||void 0===t?NaN:"number"!=typeof t||isFinite(t)?"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t:NaN},getLabelForIndex:n.noop,getPixelForValue:n.noop,getValueForPixel:n.noop,getPixelForTick:function(t,e){var i=this;if(i.isHorizontal()){var n=i.width-(i.paddingLeft+i.paddingRight),o=n/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),r=o*t+i.paddingLeft;e&&(r+=o/2);var s=i.left+Math.round(r);return s+=i.isFullWidth()?i.margins.left:0}var a=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(a/(i.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,o=e.left+Math.round(n);return o+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,i=t.max;return t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0},draw:function(e){var o=this,r=o.options;if(r.display){var s,a,l=o.ctx,h=t.defaults.global,c=r.ticks,u=r.gridLines,d=r.scaleLabel,p=0!==o.labelRotation,f=c.autoSkip,g=o.isHorizontal();c.maxTicksLimit&&(a=c.maxTicksLimit);var m=n.getValueOrDefault(c.fontColor,h.defaultFontColor),v=i(c),_=u.drawTicks?u.tickMarkLength:0,x=n.getValueOrDefault(u.borderDash,h.borderDash),y=n.getValueOrDefault(u.borderDashOffset,h.borderDashOffset),b=n.getValueOrDefault(d.fontColor,h.defaultFontColor),w=i(d),S=n.toRadians(o.labelRotation),C=Math.cos(S),T=o.longestLabelWidth*C;l.fillStyle=m;var k=[];if(g){if(s=!1,p&&(T/=2),(T+c.autoSkipPadding)*o.ticks.length>o.width-(o.paddingLeft+o.paddingRight)&&(s=1+Math.floor((T+c.autoSkipPadding)*o.ticks.length/(o.width-(o.paddingLeft+o.paddingRight)))),a&&o.ticks.length>a)for(;!s||o.ticks.length/(s||1)>a;)s||(s=1),s+=1;f||(s=!1)}var D="right"===r.position?o.left:o.right-_,E="right"===r.position?o.left+_:o.right,I="bottom"===r.position?o.top:o.bottom-_,A="bottom"===r.position?o.top+_:o.bottom;if(n.each(o.ticks,function(t,i){if(void 0!==t&&null!==t){var a=o.ticks.length===i+1;if((!(s>1&&i%s>0||i%s==0&&i+s>=o.ticks.length)||a)&&void 0!==t&&null!==t){var l,h;i===("undefined"!=typeof o.zeroLineIndex?o.zeroLineIndex:0)?(l=u.zeroLineWidth,h=u.zeroLineColor):(l=n.getValueAtIndexOrDefault(u.lineWidth,i),h=n.getValueAtIndexOrDefault(u.color,i));var d,f,m,v,b,w,C,T,R,O,N="middle",P="middle";if(g){"bottom"===r.position?(P=p?"middle":"top",N=p?"right":"center",O=o.top+_):(P=p?"middle":"bottom",N=p?"left":"center",O=o.bottom-_);var F=o.getPixelForTick(i)+n.aliasPixel(l);R=o.getPixelForTick(i,u.offsetGridLines)+c.labelOffset,d=m=b=C=F,f=I,v=A,w=e.top,T=e.bottom}else{var L,M="left"===r.position,B=c.padding;c.mirror?(N=M?"left":"right",L=B):(N=M?"right":"left",L=_+B),R=M?o.right-L:o.left+L;var H=o.getPixelForTick(i);H+=n.aliasPixel(l),O=o.getPixelForTick(i,u.offsetGridLines),d=D,m=E,b=e.left,C=e.right,f=v=w=T=H}k.push({tx1:d,ty1:f,tx2:m,ty2:v,x1:b,y1:w,x2:C,y2:T,labelX:R,labelY:O,glWidth:l,glColor:h,glBorderDash:x,glBorderDashOffset:y,rotation:-1*S,label:t,textBaseline:P,textAlign:N})}}}),n.each(k,function(t){if(u.display&&(l.save(),l.lineWidth=t.glWidth,l.strokeStyle=t.glColor,l.setLineDash&&(l.setLineDash(t.glBorderDash),l.lineDashOffset=t.glBorderDashOffset),l.beginPath(),u.drawTicks&&(l.moveTo(t.tx1,t.ty1),l.lineTo(t.tx2,t.ty2)),u.drawOnChartArea&&(l.moveTo(t.x1,t.y1),l.lineTo(t.x2,t.y2)),l.stroke(),l.restore()),c.display){l.save(),l.translate(t.labelX,t.labelY),l.rotate(t.rotation),l.font=v.font,l.textBaseline=t.textBaseline,l.textAlign=t.textAlign;var e=t.label;if(n.isArray(e))for(var i=0,o=0;i<e.length;++i)l.fillText(""+e[i],0,o),o+=1.5*v.size;else l.fillText(e,0,0);l.restore()}}),d.display){var R,O,N=0;if(g)R=o.left+(o.right-o.left)/2,O="bottom"===r.position?o.bottom-w.size/2:o.top+w.size/2;else{var P="left"===r.position;R=P?o.left+w.size/2:o.right-w.size/2,O=o.top+(o.bottom-o.top)/2,N=P?-.5*Math.PI:.5*Math.PI}l.save(),l.translate(R,O),l.rotate(N),l.textAlign="center",l.textBaseline="middle",l.fillStyle=b,l.font=w.font,l.fillText(d.labelString,0,0),l.restore()}if(u.drawBorder){l.lineWidth=n.getValueAtIndexOrDefault(u.lineWidth,0),l.strokeStyle=n.getValueAtIndexOrDefault(u.color,0);var F=o.left,L=o.right,M=o.top,B=o.bottom,H=n.aliasPixel(l.lineWidth);g?(M=B="top"===r.position?o.bottom:o.top,M+=H,B+=H):(F=L="left"===r.position?o.right:o.left,F+=H,L+=H),l.beginPath(),l.moveTo(F,M),l.lineTo(L,B),l.stroke()}}}})}},{}],33:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,i,n){this.constructors[t]=i,this.defaults[t]=e.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(i){return this.defaults.hasOwnProperty(i)?e.scaleMerge(t.defaults.scale,this.defaults[i]):{}},updateScaleDefaults:function(t,i){var n=this.defaults;n.hasOwnProperty(t)&&(n[t]=e.extend(n[t],i))},addScalesToLayout:function(i){e.each(i.scales,function(e){t.layoutService.addBox(i,e)})}}}},{}],34:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.Ticks={generators:{linear:function(t,i){var n,o=[];if(t.stepSize&&t.stepSize>0)n=t.stepSize;else{var r=e.niceNum(i.max-i.min,!1);n=e.niceNum(r/(t.maxTicks-1),!0)}var s=Math.floor(i.min/n)*n,a=Math.ceil(i.max/n)*n;t.min&&t.max&&t.stepSize&&e.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(s=t.min,a=t.max);var l=(a-s)/n;l=e.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:s);for(var h=1;h<l;++h)o.push(s+h*n);return o.push(void 0!==t.max?t.max:a),o},logarithmic:function(t,i){var n,o,r=[],s=e.getValueOrDefault,a=s(t.min,Math.pow(10,Math.floor(e.log10(i.min)))),l=Math.floor(e.log10(i.max)),h=Math.ceil(i.max/Math.pow(10,l));0===a?(n=Math.floor(e.log10(i.minNotZero)),o=Math.floor(i.minNotZero/Math.pow(10,n)),r.push(a),a=o*Math.pow(10,n)):(n=Math.floor(e.log10(a)),o=Math.floor(a/Math.pow(10,n)));do{r.push(a),++o,10===o&&(o=1,++n),a=o*Math.pow(10,n)}while(n<l||n===l&&o<h);var c=s(t.max,a);return r.push(c),r}},formatters:{values:function(t){return e.isArray(t)?t:""+t},linear:function(t,i,n){var o=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var r=e.log10(Math.abs(o)),s="";if(0!==t){var a=-1*Math.floor(r);a=Math.max(Math.min(a,20),0),s=t.toFixed(a)}else s="0";return s},logarithmic:function(t,i,n){var o=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===i||i===n.length-1?t.toExponential():""}}}}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){function e(e,i){var n=new t.Title({ctx:e.chart.ctx,options:i,chart:e});e.titleBlock=n,t.layoutService.addBox(e,n)}var i=t.helpers;t.defaults.global.title={display:!1,position:"top",fullWidth:!0,fontStyle:"bold",padding:10,text:""};var n=i.noop;t.Title=t.Element.extend({initialize:function(t){var e=this;i.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:n,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:n,beforeSetDimensions:n,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:n,beforeBuildLabels:n,buildLabels:n,afterBuildLabels:n,beforeFit:n,fit:function(){var e=this,n=i.getValueOrDefault,o=e.options,r=t.defaults.global,s=o.display,a=n(o.fontSize,r.defaultFontSize),l=e.minSize;e.isHorizontal()?(l.width=e.maxWidth,l.height=s?a+2*o.padding:0):(l.width=s?a+2*o.padding:0,l.height=e.maxHeight),e.width=l.width,e.height=l.height},afterFit:n,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var e=this,n=e.ctx,o=i.getValueOrDefault,r=e.options,s=t.defaults.global;if(r.display){var a,l,h,c=o(r.fontSize,s.defaultFontSize),u=o(r.fontStyle,s.defaultFontStyle),d=o(r.fontFamily,s.defaultFontFamily),p=i.fontString(c,u,d),f=0,g=e.top,m=e.left,v=e.bottom,_=e.right;n.fillStyle=o(r.fontColor,s.defaultFontColor),n.font=p,e.isHorizontal()?(a=m+(_-m)/2,l=g+(v-g)/2,h=_-m):(a="left"===r.position?m+c/2:_-c/2,l=g+(v-g)/2,h=v-g,f=Math.PI*("left"===r.position?-.5:.5)),n.save(),n.translate(a,l),n.rotate(f),n.textAlign="center",n.textBaseline="middle",n.fillText(r.text,0,0,h),n.restore()}}}),t.plugins.register({beforeInit:function(t){var i=t.options.title;i&&e(t,i)},beforeUpdate:function(n){var o=n.options.title;o?(o=i.configMerge(t.defaults.global.title,o),n.titleBlock?n.titleBlock.options=o:e(n,o)):(t.layoutService.removeBox(n,n.titleBlock),delete n.titleBlock)}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){var i=l.color(t);return i.alpha(e*i.alpha()).rgbaString()}function i(t,e){return e&&(l.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function n(t){var e=t._xScale,i=t._yScale||t._scale,n=t._index,o=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(n,o):"",yLabel:i?i.getLabelForIndex(n,o):"",index:n,datasetIndex:o,x:t._model.x,y:t._model.y}}function o(e){var i=t.defaults.global,n=l.getValueOrDefault;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:n(e.bodyFontFamily,i.defaultFontFamily),_bodyFontStyle:n(e.bodyFontStyle,i.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:n(e.bodyFontSize,i.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:n(e.titleFontFamily,i.defaultFontFamily),_titleFontStyle:n(e.titleFontStyle,i.defaultFontStyle),titleFontSize:n(e.titleFontSize,i.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:n(e.footerFontFamily,i.defaultFontFamily),_footerFontStyle:n(e.footerFontStyle,i.defaultFontStyle),footerFontSize:n(e.footerFontSize,i.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors}}function r(t,e){var i=t._chart.ctx,n=2*e.yPadding,o=0,r=e.body,s=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var a=e.title.length,h=e.footer.length,c=e.titleFontSize,u=e.bodyFontSize,d=e.footerFontSize;n+=a*c,n+=a?(a-1)*e.titleSpacing:0,n+=a?e.titleMarginBottom:0,n+=s*u,n+=s?(s-1)*e.bodySpacing:0,n+=h?e.footerMarginTop:0,n+=h*d,n+=h?(h-1)*e.footerSpacing:0;var p=0,f=function(t){o=Math.max(o,i.measureText(t).width+p)};return i.font=l.fontString(c,e._titleFontStyle,e._titleFontFamily),l.each(e.title,f),i.font=l.fontString(u,e._bodyFontStyle,e._bodyFontFamily),l.each(e.beforeBody.concat(e.afterBody),f),p=e.displayColors?u+2:0,l.each(r,function(t){l.each(t.before,f),l.each(t.lines,f),l.each(t.after,f)}),p=0,i.font=l.fontString(d,e._footerFontStyle,e._footerFontFamily),l.each(e.footer,f),o+=2*e.xPadding,{width:o,height:n}}function s(t,e){var i=t._model,n=t._chart,o=t._chartInstance.chartArea,r="center",s="center";i.y<e.height?s="top":i.y>n.height-e.height&&(s="bottom");var a,l,h,c,u,d=(o.left+o.right)/2,p=(o.top+o.bottom)/2;"center"===s?(a=function(t){return t<=d},l=function(t){return t>d}):(a=function(t){return t<=e.width/2},l=function(t){return t>=n.width-e.width/2}),h=function(t){return t+e.width>n.width},c=function(t){return t-e.width<0},u=function(t){return t<=p?"top":"bottom"},a(i.x)?(r="left",h(i.x)&&(r="center",s=u(i.y))):l(i.x)&&(r="right",c(i.x)&&(r="center",s=u(i.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:r,yAlign:f.yAlign?f.yAlign:s}}function a(t,e,i){var n=t.x,o=t.y,r=t.caretSize,s=t.caretPadding,a=t.cornerRadius,l=i.xAlign,h=i.yAlign,c=r+s,u=a+s;return"right"===l?n-=e.width:"center"===l&&(n-=e.width/2),"top"===h?o+=c:o-="bottom"===h?e.height+c:e.height/2,"center"===h?"left"===l?n+=c:"right"===l&&(n-=c):"left"===l?n-=u:"right"===l&&(n+=u),{x:n,y:o}}var l=t.helpers;t.defaults.global.tooltips={enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,callbacks:{beforeTitle:l.noop,title:function(t,e){var i="",n=e.labels,o=n?n.length:0;if(t.length>0){var r=t[0];r.xLabel?i=r.xLabel:o>0&&r.index<o&&(i=n[r.index])}return i},afterTitle:l.noop,beforeBody:l.noop,beforeLabel:l.noop,label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex),n=i.data[t.index],o=n._view;return{borderColor:o.borderColor,backgroundColor:o.backgroundColor}},afterLabel:l.noop,afterBody:l.noop,beforeFooter:l.noop,footer:l.noop,afterFooter:l.noop}},t.Tooltip=t.Element.extend({initialize:function(){this._model=o(this._options)},getTitle:function(){var t=this,e=t._options,n=e.callbacks,o=n.beforeTitle.apply(t,arguments),r=n.title.apply(t,arguments),s=n.afterTitle.apply(t,arguments),a=[];return a=i(a,o),a=i(a,r),a=i(a,s)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return l.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,o=n._options.callbacks,r=[];return l.each(t,function(t){var s={before:[],lines:[],after:[]};i(s.before,o.beforeLabel.call(n,t,e)),i(s.lines,o.label.call(n,t,e)),i(s.after,o.afterLabel.call(n,t,e)),r.push(s)}),r},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return l.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),o=e.footer.apply(t,arguments),r=e.afterFooter.apply(t,arguments),s=[];return s=i(s,n),s=i(s,o),s=i(s,r)},update:function(e){var i,h,c=this,u=c._options,d=c._model,p=c._model=o(u),f=c._active,g=c._data,m=c._chartInstance,v={xAlign:d.xAlign,yAlign:d.yAlign},_={x:d.x,y:d.y},x={width:d.width,height:d.height},y={x:d.caretX,y:d.caretY};if(f.length){p.opacity=1;var b=[];y=t.Tooltip.positioners[u.position](f,c._eventPosition);var w=[];for(i=0,h=f.length;i<h;++i)w.push(n(f[i]));u.filter&&(w=w.filter(function(t){return u.filter(t,g)})),u.itemSort&&(w=w.sort(function(t,e){return u.itemSort(t,e,g)})),l.each(w,function(t){b.push(u.callbacks.labelColor.call(c,t,m))}),p.title=c.getTitle(w,g),p.beforeBody=c.getBeforeBody(w,g),p.body=c.getBody(w,g),p.afterBody=c.getAfterBody(w,g),p.footer=c.getFooter(w,g),p.x=Math.round(y.x),p.y=Math.round(y.y),p.caretPadding=l.getValueOrDefault(y.padding,2),p.labelColors=b,p.dataPoints=w,x=r(this,p),v=s(this,x),_=a(p,x,v)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=_.x,p.y=_.y,p.width=x.width,p.height=x.height,p.caretX=y.x,p.caretY=y.y,c._model=p,e&&u.custom&&u.custom.call(c,p),c},drawCaret:function(t,i,n){var o,r,s,a,l,h,c=this._view,u=this._chart.ctx,d=c.caretSize,p=c.cornerRadius,f=c.xAlign,g=c.yAlign,m=t.x,v=t.y,_=i.width,x=i.height;"center"===g?("left"===f?(o=m,r=o-d,s=o):(o=m+_,r=o+d,s=o),l=v+x/2,a=l-d,h=l+d):("left"===f?(o=m+p,r=o+d,s=r+d):"right"===f?(o=m+_-p,r=o-d,s=r-d):(r=m+_/2,o=r-d,s=r+d),"top"===g?(a=v,l=a-d,h=a):(a=v+x,l=a+d,h=a)),u.fillStyle=e(c.backgroundColor,n),u.beginPath(),u.moveTo(o,a),u.lineTo(r,l),u.lineTo(s,h),u.closePath(),u.fill()},drawTitle:function(t,i,n,o){var r=i.title;if(r.length){n.textAlign=i._titleAlign,n.textBaseline="top";var s=i.titleFontSize,a=i.titleSpacing;n.fillStyle=e(i.titleFontColor,o),n.font=l.fontString(s,i._titleFontStyle,i._titleFontFamily);var h,c;for(h=0,c=r.length;h<c;++h)n.fillText(r[h],t.x,t.y),t.y+=s+a,h+1===r.length&&(t.y+=i.titleMarginBottom-a)}},drawBody:function(t,i,n,o){var r=i.bodyFontSize,s=i.bodySpacing,a=i.body;n.textAlign=i._bodyAlign,n.textBaseline="top";var h=e(i.bodyFontColor,o);n.fillStyle=h,n.font=l.fontString(r,i._bodyFontStyle,i._bodyFontFamily);var c=0,u=function(e){n.fillText(e,t.x+c,t.y),t.y+=r+s};l.each(i.beforeBody,u);var d=i.displayColors;c=d?r+2:0,l.each(a,function(s,a){l.each(s.before,u),l.each(s.lines,function(s){d&&(n.fillStyle=e(i.legendColorBackground,o),n.fillRect(t.x,t.y,r,r),n.strokeStyle=e(i.labelColors[a].borderColor,o),n.strokeRect(t.x,t.y,r,r),n.fillStyle=e(i.labelColors[a].backgroundColor,o),n.fillRect(t.x+1,t.y+1,r-2,r-2),n.fillStyle=h),u(s)}),l.each(s.after,u)}),c=0,l.each(i.afterBody,u),t.y-=s},drawFooter:function(t,i,n,o){var r=i.footer;r.length&&(t.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=e(i.footerFontColor,o),n.font=l.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),l.each(r,function(e){n.fillText(e,t.x,t.y),t.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,i,n,o,r){n.fillStyle=e(i.backgroundColor,r),l.drawRoundedRectangle(n,t.x,t.y,o.width,o.height,i.cornerRadius),n.fill()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(this.drawBackground(n,e,t,i,o),this.drawCaret(n,i,o),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,o),this.drawBody(n,e,t,o),this.drawFooter(n,e,t,o))}},handleEvent:function(t){var e=this,i=e._options,n=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chartInstance.getElementsAtEventForMode(t,i.mode,i),n=!l.arrayEquals(e._active,e._lastActive),e._lastActive=e._active,i.enabled||i.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),n|=o.x!==e._model.x||o.y!==e._model.y}return n}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,o=0,r=0;for(e=0,i=t.length;e<i;++e){var s=t[e];if(s&&s.hasValue()){var a=s.tooltipPosition();n+=a.x,o+=a.y,++r}}return{x:Math.round(n/r),y:Math.round(o/r)}},nearest:function(t,e){var i,n,o,r=e.x,s=e.y,a=Number.POSITIVE_INFINITY;for(n=0,o=t.length;n<o;++n){var h=t[n];if(h&&h.hasValue()){var c=h.getCenterPoint(),u=l.distanceBetweenPoints(e,c);u<a&&(a=u,i=h)}}if(i){var d=i.tooltipPosition();r=d.x,s=d.y}return{x:r,y:s}}}}},{}],37:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;i.elements.arc={backgroundColor:i.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,i){var n=this._view;if(n){for(var o=e.getAngleFromPoint(n,{x:t,y:i}),r=o.angle,s=o.distance,a=n.startAngle,l=n.endAngle;l<a;)l+=2*Math.PI;for(;r>l;)r-=2*Math.PI;for(;r<a;)r+=2*Math.PI;var h=r>=a&&r<=l,c=s>=n.innerRadius&&s<=n.outerRadius;return h&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],38:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:i.defaultColor,borderWidth:3,borderColor:i.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){function t(t,e){var i=e._view;!0===e._view.steppedLine?(l.lineTo(i.x,t._view.y),l.lineTo(i.x,i.y)):0===e._view.tension?l.lineTo(i.x,i.y):l.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,i.controlPointPreviousX,i.controlPointPreviousY,i.x,i.y)}var n=this,o=n._view,r=o.spanGaps,s=o.scaleZero,a=n._loop;a||("top"===o.fill?s=o.scaleTop:"bottom"===o.fill&&(s=o.scaleBottom));var l=n._chart.ctx;l.save();var h=n._children.slice(),c=-1;a&&h.length&&h.push(h[0]);var u,d,p,f;if(h.length&&o.fill){for(l.beginPath(),u=0;u<h.length;++u)d=h[u],p=e.previousItem(h,u),f=d._view,0===u?(a?l.moveTo(s.x,s.y):l.moveTo(f.x,s),f.skip||(c=u,l.lineTo(f.x,f.y))):(p=-1===c?p:h[c],f.skip?r||c!==u-1||(a?l.lineTo(s.x,s.y):l.lineTo(p._view.x,s)):(c!==u-1?r&&-1!==c?t(p,d):a?l.lineTo(f.x,f.y):(l.lineTo(f.x,s),l.lineTo(f.x,f.y)):t(p,d),c=u));a||-1===c||l.lineTo(h[c]._view.x,s),l.fillStyle=o.backgroundColor||i.defaultColor,l.closePath(),l.fill()}var g=i.elements.line;for(l.lineCap=o.borderCapStyle||g.borderCapStyle,l.setLineDash&&l.setLineDash(o.borderDash||g.borderDash),l.lineDashOffset=o.borderDashOffset||g.borderDashOffset,l.lineJoin=o.borderJoinStyle||g.borderJoinStyle,l.lineWidth=o.borderWidth||g.borderWidth,l.strokeStyle=o.borderColor||i.defaultColor,l.beginPath(),c=-1,u=0;u<h.length;++u)d=h[u],p=e.previousItem(h,u),f=d._view,0===u?f.skip||(l.moveTo(f.x,f.y),c=u):(p=-1===c?p:h[c],f.skip||(c!==u-1&&!r||-1===c?l.moveTo(f.x,f.y):t(p,d),c=u));l.stroke(),l.restore()}})}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){function e(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2)}function i(t){var e=this._view;return!!e&&Math.pow(t-e.y,2)<Math.pow(e.radius+e.hitRadius,2)}var n=t.helpers,o=t.defaults.global,r=o.defaultColor;o.elements.point={radius:3,pointStyle:"circle",backgroundColor:r,borderWidth:1,borderColor:r,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:e,inXRange:e,inYRange:i,getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(e){var i=this._view,s=this._model,a=this._chart.ctx,l=i.pointStyle,h=i.radius,c=i.x,u=i.y,d=t.helpers.color,p=1.01,f=0;i.skip||(a.strokeStyle=i.borderColor||r,a.lineWidth=n.getValueOrDefault(i.borderWidth,o.elements.point.borderWidth),a.fillStyle=i.backgroundColor||r,void 0!==e&&(s.x<e.left||e.right*p<s.x||s.y<e.top||e.bottom*p<s.y)&&(s.x<e.left?f=(c-s.x)/(e.left-s.x):e.right*p<s.x?f=(s.x-c)/(s.x-e.right):s.y<e.top?f=(u-s.y)/(e.top-s.y):e.bottom*p<s.y&&(f=(s.y-u)/(s.y-e.bottom)),f=Math.round(100*f)/100,a.strokeStyle=d(a.strokeStyle).alpha(f).rgbString(),a.fillStyle=d(a.fillStyle).alpha(f).rgbString()),t.canvasHelpers.drawPoint(a,l,h,c,u))}})}},{}],40:[function(t,e,i){"use strict";e.exports=function(t){function e(t){return void 0!==t._view.width}function i(t){var i,n,o,r,s=t._view;if(e(t)){var a=s.width/2;i=s.x-a,n=s.x+a,o=Math.min(s.y,s.base),r=Math.max(s.y,s.base)}else{var l=s.height/2;i=Math.min(s.x,s.base),n=Math.max(s.x,s.base),o=s.y-l,r=s.y+l}return{left:i,top:o,right:n,bottom:r}}var n=t.defaults.global;n.elements.rectangle={backgroundColor:n.defaultColor,borderWidth:0,borderColor:n.defaultColor,borderSkipped:"bottom"},t.elements.Rectangle=t.Element.extend({draw:function(){function t(t){return v[(x+t)%4]}var e,i,n,o,r,s,a,l=this._chart.ctx,h=this._view,c=h.borderWidth;if(h.horizontal?(e=h.base,i=h.x,n=h.y-h.height/2,o=h.y+h.height/2,r=i>e?1:-1,s=1,a=h.borderSkipped||"left"):(e=h.x-h.width/2,i=h.x+h.width/2,n=h.y,o=h.base,r=1,s=o>n?1:-1,a=h.borderSkipped||"bottom"),c){var u=Math.min(Math.abs(e-i),Math.abs(n-o));c=c>u?u:c;var d=c/2,p=e+("left"!==a?d*r:0),f=i+("right"!==a?-d*r:0),g=n+("top"!==a?d*s:0),m=o+("bottom"!==a?-d*s:0);p!==f&&(n=g,o=m),g!==m&&(e=p,i=f)}l.beginPath(),l.fillStyle=h.backgroundColor,l.strokeStyle=h.borderColor,l.lineWidth=c;var v=[[e,o],[e,n],[i,n],[i,o]],_=["bottom","left","top","right"],x=_.indexOf(a,0);-1===x&&(x=0);var y=t(0);l.moveTo(y[0],y[1]);for(var b=1;b<4;b++)y=t(b),l.lineTo(y[0],y[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var o=i(this);n=t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom}return n},inLabelRange:function(t,n){var o=this;if(!o._view)return!1;var r=i(o);return e(o)?t>=r.left&&t<=r.right:n>=r.top&&n<=r.bottom},inXRange:function(t){var e=i(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=i(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,i,n=this._view;return e(this)?(t=n.x,i=(n.y+n.base)/2):(t=(n.x+n.base)/2,i=n.y),{x:t,y:i}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],41:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){var i=l.getStyle(t,e),n=i&&i.match(/(\d+)px/);return n?Number(n[1]):void 0}function i(t,i){var n=t.style,o=t.getAttribute("height"),r=t.getAttribute("width");if(t._chartjs={initial:{height:o,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var s=e(t,"width");void 0!==s&&(t.width=s)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(i.options.aspectRatio||2);else{var a=e(t,"height");void 0!==s&&(t.height=a)}return t}function n(t,e,i,n,o){return{type:t,chart:e,"native":o||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function o(t,e){var i=h[t.type]||t.type,o=l.getRelativePosition(t,e);return n(i,e,o.x,o.y,t)}function r(t){var e=document.createElement("iframe");return e.className="chartjs-hidden-iframe",e.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;",e.tabIndex=-1,l.addEvent(e,"load",function(){l.addEvent(e.contentWindow||e,"resize",t),t()}),e}function s(t,e,i){var o=t._chartjs={ticking:!1},s=function(){o.ticking||(o.ticking=!0,l.requestAnimFrame.call(window,function(){if(o.resizer)return o.ticking=!1,e(n("resize",i))}))};o.resizer=r(s),t.insertBefore(o.resizer,t.firstChild)}function a(t){if(t&&t._chartjs){var e=t._chartjs.resizer;e&&(e.parentNode.removeChild(e),t._chartjs.resizer=null),delete t._chartjs}}var l=t.helpers,h={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};return{acquireContext:function(t,e){if("string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t instanceof HTMLCanvasElement){var n=t.getContext&&t.getContext("2d");if(n instanceof CanvasRenderingContext2D)return i(t,e),n}return null},releaseContext:function(t){var e=t.canvas;if(e._chartjs){var i=e._chartjs.initial;["height","width"].forEach(function(t){var n=i[t];void 0===n||null===n?e.removeAttribute(t):e.setAttribute(t,n)}),l.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e._chartjs}},addEventListener:function(t,e,i){var n=t.chart.canvas;if("resize"===e)return void s(n.parentNode,i,t.chart);var r=i._chartjs||(i._chartjs={}),a=r.proxies||(r.proxies={}),h=a[t.id+"_"+e]=function(e){i(o(e,t.chart))};l.addEvent(n,e,h)},removeEventListener:function(t,e,i){var n=t.chart.canvas;if("resize"===e)return void a(n.parentNode);var o=i._chartjs||{},r=o.proxies||{},s=r[t.id+"_"+e];s&&l.removeEvent(n,e,s)}}}},{}],
|
|
42:[function(t,e,i){"use strict";var n=t(41);e.exports=function(t){t.platform={acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},t.helpers.extend(t.platform,n(t))}},{41:41}],43:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},n=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,i=t.getLabels();t.minIndex=0,t.maxIndex=i.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(i,t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(i,t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=i[t.minIndex],t.max=i[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.isHorizontal();return n.yLabels&&!o?i.getRightValue(n.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e,i,n){var o=this,r=Math.max(o.maxIndex+1-o.minIndex-(o.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&isNaN(e)){var s=o.getLabels(),a=s.indexOf(t);e=-1!==a?a:e}if(o.isHorizontal()){var l=o.width/r,h=l*(e-o.minIndex);return(o.options.gridLines.offsetGridLines&&n||o.maxIndex===o.minIndex&&n)&&(h+=l/2),o.left+Math.round(h)}var c=o.height/r,u=c*(e-o.minIndex);return o.options.gridLines.offsetGridLines&&n&&(u+=c/2),o.top+Math.round(u)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e=this,i=Math.max(e.ticks.length-(e.options.gridLines.offsetGridLines?0:1),1),n=e.isHorizontal(),o=(n?e.width:e.height)/i;return t-=n?e.left:e.top,e.options.gridLines.offsetGridLines&&(t-=o/2),t<=0?0:Math.round(t/o)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",n,i)}},{}],44:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:t.Ticks.formatters.linear}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return a?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=i.chart,r=o.data,s=r.datasets,a=i.isHorizontal();i.min=null,i.max=null;var l=n.stacked;if(void 0===l&&e.each(s,function(e,i){if(!l){var n=o.getDatasetMeta(i);o.isDatasetVisible(i)&&t(n)&&void 0!==n.stack&&(l=!0)}}),n.stacked||l){var h={};e.each(s,function(r,s){var a=o.getDatasetMeta(s),l=[a.type,void 0===n.stacked&&void 0===a.stack?s:"",a.stack].join(".");void 0===h[l]&&(h[l]={positiveValues:[],negativeValues:[]});var c=h[l].positiveValues,u=h[l].negativeValues;o.isDatasetVisible(s)&&t(a)&&e.each(r.data,function(t,e){var o=+i.getRightValue(t);isNaN(o)||a.data[e].hidden||(c[e]=c[e]||0,u[e]=u[e]||0,n.relativePoints?c[e]=100:o<0?u[e]+=o:c[e]+=o)})}),e.each(h,function(t){var n=t.positiveValues.concat(t.negativeValues),o=e.min(n),r=e.max(n);i.min=null===i.min?o:Math.min(i.min,o),i.max=null===i.max?r:Math.max(i.max,r)})}else e.each(s,function(n,r){var s=o.getDatasetMeta(r);o.isDatasetVisible(r)&&t(s)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||s.data[e].hidden||(null===i.min?i.min=n:n<i.min&&(i.min=n),null===i.max?i.max=n:n>i.max&&(i.max=n))})});this.handleTickRangeOptions()},getTickLimit:function(){var i,n=this,o=n.options.ticks;if(n.isHorizontal())i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.width/50));else{var r=e.getValueOrDefault(o.fontSize,t.defaults.global.defaultFontSize);i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.height/(2*r)))}return i},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i=this,n=i.start,o=+i.getRightValue(t),r=i.end-n;return i.isHorizontal()?(e=i.left+i.width/r*(o-n),Math.round(e)):(e=i.bottom-i.height/r*(o-n),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,o=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,i)}},{}],45:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options,n=i.ticks;if(n.beginAtZero){var o=e.sign(t.min),r=e.sign(t.max);o<0&&r<0?t.max=0:o>0&&r>0&&(t.min=0)}void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(t.max=Math.max(t.max,n.suggestedMax)),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var i=this,n=i.options,o=n.ticks,r=i.getTickLimit();r=Math.max(2,r);var s={maxTicks:r,min:o.min,max:o.max,stepSize:e.getValueOrDefault(o.fixedStepSize,o.stepSize)},a=i.ticks=t.Ticks.generators.linear(s,i);i.handleDirectionalChanges(),i.max=e.max(a),i.min=e.min(a),o.reverse?(a.reverse(),i.start=i.max,i.end=i.min):(i.start=i.min,i.end=i.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],46:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:t.Ticks.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return h?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=n.ticks,r=i.chart,s=r.data,a=s.datasets,l=e.getValueOrDefault,h=i.isHorizontal();i.min=null,i.max=null,i.minNotZero=null;var c=n.stacked;if(void 0===c&&e.each(a,function(e,i){if(!c){var n=r.getDatasetMeta(i);r.isDatasetVisible(i)&&t(n)&&void 0!==n.stack&&(c=!0)}}),n.stacked||c){var u={};e.each(a,function(o,s){var a=r.getDatasetMeta(s),l=[a.type,void 0===n.stacked&&void 0===a.stack?s:"",a.stack].join(".");r.isDatasetVisible(s)&&t(a)&&(void 0===u[l]&&(u[l]=[]),e.each(o.data,function(t,e){var o=u[l],r=+i.getRightValue(t);isNaN(r)||a.data[e].hidden||(o[e]=o[e]||0,n.relativePoints?o[e]=100:o[e]+=r)}))}),e.each(u,function(t){var n=e.min(t),o=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?o:Math.max(i.max,o)})}else e.each(a,function(n,o){var s=r.getDatasetMeta(o);r.isDatasetVisible(o)&&t(s)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||s.data[e].hidden||(null===i.min?i.min=n:n<i.min&&(i.min=n),null===i.max?i.max=n:n>i.max&&(i.max=n),0!==n&&(null===i.minNotZero||n<i.minNotZero)&&(i.minNotZero=n))})});i.min=l(o.min,i.min),i.max=l(o.max,i.max),i.min===i.max&&(0!==i.min&&null!==i.min?(i.min=Math.pow(10,Math.floor(e.log10(i.min))-1),i.max=Math.pow(10,Math.floor(e.log10(i.max))+1)):(i.min=1,i.max=10))},buildTicks:function(){var i=this,n=i.options,o=n.ticks,r={min:o.min,max:o.max},s=i.ticks=t.Ticks.generators.logarithmic(r,i);i.isHorizontal()||s.reverse(),i.max=e.max(s),i.min=e.min(s),o.reverse?(s.reverse(),i.start=i.max,i.end=i.min):(i.start=i.min,i.end=i.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},getPixelForValue:function(t){var i,n,o,r=this,s=r.start,a=+r.getRightValue(t),l=r.options,h=l.ticks;return r.isHorizontal()?(o=e.log10(r.end)-e.log10(s),0===a?n=r.left:(i=r.width,n=r.left+i/o*(e.log10(a)-e.log10(s)))):(i=r.height,0!==s||h.reverse?0===r.end&&h.reverse?(o=e.log10(r.start)-e.log10(r.minNotZero),n=a===r.end?r.top:a===r.minNotZero?r.top+.02*i:r.top+.02*i+.98*i/o*(e.log10(a)-e.log10(r.minNotZero))):(o=e.log10(r.end)-e.log10(s),i=r.height,n=r.bottom-i/o*(e.log10(a)-e.log10(s))):(o=e.log10(r.end)-e.log10(r.minNotZero),n=a===s?r.bottom:a===r.minNotZero?r.bottom-.02*i:r.bottom-.02*i-.98*i/o*(e.log10(a)-e.log10(r.minNotZero)))),n},getValueForPixel:function(t){var i,n,o=this,r=e.log10(o.end)-e.log10(o.start);return o.isHorizontal()?(n=o.width,i=o.start*Math.pow(10,(t-o.left)*r/n)):(n=o.height,i=Math.pow(10,(o.bottom-t)*r/n)/o.start),i}});t.scaleService.registerScaleType("logarithmic",n,i)}},{}],47:[function(t,e,i){"use strict";e.exports=function(t){function e(t){return t.options.lineArc?0:t.chart.data.labels.length}function i(t){var e=t.options.pointLabels,i=p.getValueOrDefault(e.fontSize,f.defaultFontSize),n=p.getValueOrDefault(e.fontStyle,f.defaultFontStyle),o=p.getValueOrDefault(e.fontFamily,f.defaultFontFamily);return{size:i,style:n,family:o,font:p.fontString(i,n,o)}}function n(t,e,i){return p.isArray(i)?{w:p.longestText(t,t.font,i),h:i.length*e+1.5*(i.length-1)*e}:{w:t.measureText(i).width,h:e}}function o(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function r(t){var r,s,a,l=i(t),h=Math.min(t.height/2,t.width/2),c={l:t.width,r:0,t:t.height,b:0},u={};t.ctx.font=l.font,t._pointLabelSizes=[];var d=e(t);for(r=0;r<d;r++){a=t.getPointPosition(r,h),s=n(t.ctx,l.size,t.pointLabels[r]||""),t._pointLabelSizes[r]=s;var f=t.getIndexAngle(r),g=p.toDegrees(f)%360,m=o(g,a.x,s.w,0,180),v=o(g,a.y,s.h,90,270);m.start<c.l&&(c.l=m.start,u.l=f),m.end>c.r&&(c.r=m.end,u.r=f),v.start<c.t&&(c.t=v.start,u.t=f),v.end>c.b&&(c.b=v.end,u.b=f)}t.setReductions(h,c,u)}function s(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function a(t){return 0===t||180===t?"center":t<180?"left":"right"}function l(t,e,i,n){if(p.isArray(e))for(var o=i.y,r=1.5*n,s=0;s<e.length;++s)t.fillText(e[s],i.x,o),o+=r;else t.fillText(e,i.x,i.y)}function h(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function c(t){var n=t.ctx,o=p.getValueOrDefault,r=t.options,s=r.angleLines,c=r.pointLabels;n.lineWidth=s.lineWidth,n.strokeStyle=s.color;var u=t.getDistanceFromCenterForValue(r.reverse?t.min:t.max),d=i(t);n.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var m=t.getPointPosition(g,u);n.beginPath(),n.moveTo(t.xCenter,t.yCenter),n.lineTo(m.x,m.y),n.stroke(),n.closePath()}var v=t.getPointPosition(g,u+5),_=o(c.fontColor,f.defaultFontColor);n.font=d.font,n.fillStyle=_;var x=t.getIndexAngle(g),y=p.toDegrees(x);n.textAlign=a(y),h(y,t._pointLabelSizes[g],v),l(n,t.pointLabels[g]||"",v,d.size)}}function u(t,i,n,o){var r=t.ctx;if(r.strokeStyle=p.getValueAtIndexOrDefault(i.color,o-1),r.lineWidth=p.getValueAtIndexOrDefault(i.lineWidth,o-1),t.options.lineArc)r.beginPath(),r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var a=t.getPointPosition(0,n);r.moveTo(a.x,a.y);for(var l=1;l<s;l++)a=t.getPointPosition(l,n),r.lineTo(a.x,a.y);r.closePath(),r.stroke()}}function d(t){return p.isNumber(t)?t:0}var p=t.helpers,f=t.defaults.global,g={display:!0,animate:!0,lineArc:!1,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:t.Ticks.formatters.linear},pointLabels:{fontSize:10,callback:function(t){return t}}},m=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,i=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var n=p.min([t.height,t.width]),o=p.getValueOrDefault(i.fontSize,f.defaultFontSize);t.drawingArea=e.display?n/2-(o/2+i.backdropPaddingY):n/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;p.each(e.data.datasets,function(o,r){if(e.isDatasetVisible(r)){var s=e.getDatasetMeta(r);p.each(o.data,function(e,o){var r=+t.getRightValue(e);isNaN(r)||s.data[o].hidden||(i=Math.min(r,i),n=Math.max(r,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=p.getValueOrDefault(t.fontSize,f.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.lineArc?s(this):r(this)},setReductions:function(t,e,i){var n=this,o=e.l/Math.sin(i.l),r=Math.max(e.r-n.width,0)/Math.sin(i.r),s=-e.t/Math.cos(i.t),a=-Math.max(e.b-n.height,0)/Math.cos(i.b);o=d(o),r=d(r),s=d(s),a=d(a),n.drawingArea=Math.min(Math.round(t-(o+r)/2),Math.round(t-(s+a)/2)),n.setCenterPoint(o,r,s,a)},setCenterPoint:function(t,e,i,n){var o=this,r=o.width-e-o.drawingArea,s=t+o.drawingArea,a=i+o.drawingArea,l=o.height-n-o.drawingArea;o.xCenter=Math.round((s+r)/2+o.left),o.yCenter=Math.round((a+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this,n=i.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+i.xCenter,y:Math.round(Math.sin(n)*e)+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks,o=p.getValueOrDefault;if(e.display){var r=t.ctx,s=o(n.fontSize,f.defaultFontSize),a=o(n.fontStyle,f.defaultFontStyle),l=o(n.fontFamily,f.defaultFontFamily),h=p.fontString(s,a,l);p.each(t.ticks,function(a,l){if(l>0||e.reverse){var c=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),d=t.yCenter-c;if(i.display&&0!==l&&u(t,i,c,l),n.display){var p=o(n.fontColor,f.defaultFontColor);if(r.font=h,n.showLabelBackdrop){var g=r.measureText(a).width;r.fillStyle=n.backdropColor,r.fillRect(t.xCenter-g/2-n.backdropPaddingX,d-s/2-n.backdropPaddingY,g+2*n.backdropPaddingX,s+2*n.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=p,r.fillText(a,t.xCenter,d)}}}),e.lineArc||c(t)}}});t.scaleService.registerScaleType("radialLinear",m,g)}},{}],48:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},r=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),"undefined"!=typeof i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&!1!==e.options.time.isoWeekday?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(o,r){var s=[],a=t.chart.isDatasetVisible(r);"object"==typeof o.data[0]&&null!==o.data[0]?e.each(o.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),s.push(i),a&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):s=i,t.labelMoments.push(s)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var o=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),o.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):o=i,t.labelDiffs.push(o)},t)},buildTicks:function(){var n=this;n.ctx.save();var o=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),r=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),s=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),a=e.fontString(o,r,s);if(n.ctx.font=a,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width:n.height,h=n.tickFormatFunction(n.firstTick,0,[]),c=n.ctx.measureText(h).width;c=c*Math.cos(e.toRadians(n.options.ticks.maxRotation))+o*Math.sin(e.toRadians(n.options.ticks.maxRotation));var u=l/c;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var d=0,p=i.units[d];d<i.units.length;){if(n.unitScale=1,e.isArray(p.steps)&&Math.ceil(n.scaleSizeInUnits/u)<e.max(p.steps)){for(var f=0;f<p.steps.length;++f)if(p.steps[f]>=Math.ceil(n.scaleSizeInUnits/u)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,p.steps[f]);break}break}if(!1===p.maxStep||Math.ceil(n.scaleSizeInUnits/u)<p.maxStep){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,Math.ceil(n.scaleSizeInUnits/u));break}++d,p=i.units[d],n.tickUnit=p.name;var g=n.firstTick.diff(n.getMomentStartOf(n.firstTick),n.tickUnit,!0),m=n.getMomentStartOf(n.lastTick.clone().add(1,n.tickUnit)).diff(n.lastTick,n.tickUnit,!0);n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)+g+m,n.displayFormat=n.options.time.displayFormats[p.name]}}var v;if(n.options.time.min?v=n.getMomentStartOf(n.firstTick):(n.firstTick=n.getMomentStartOf(n.firstTick),v=n.firstTick),!n.options.time.max){var _=n.getMomentStartOf(n.lastTick),x=_.diff(n.lastTick,n.tickUnit,!0);x<0?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):x>=0&&(n.lastTick=_),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var y=n.unitScale;y<=n.scaleSizeInUnits;y+=n.unitScale){var b=v.clone().add(y,n.tickUnit);if(n.options.time.max&&b.diff(n.lastTick,n.tickUnit,!0)>=0)break;n.ticks.push(b)}0===n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit)&&0!==n.scaleSizeInUnits||(n.options.time.max?(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.ticks[0],n.tickUnit,!0)):(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0))),n.ctx.restore(),n.labelDiffs=void 0},getLabelForIndex:function(t,e){var i=this,n=i.chart.data.labels&&t<i.chart.data.labels.length?i.chart.data.labels[t]:"",o=i.chart.data.datasets[e].data[t];return null!==o&&"object"==typeof o&&(n=i.getRightValue(o)),i.options.time.tooltipFormat&&(n=i.parseTime(n).format(i.options.time.tooltipFormat)),n},tickFormatFunction:function(t,i,n){var o=t.format(this.displayFormat),r=this.options.ticks,s=e.getValueOrDefault(r.callback,r.userCallback);return s?s(o,i,n):o},convertTicksToLabels:function(){var t=this;t.tickMoments=t.ticks,t.ticks=t.ticks.map(t.tickFormatFunction,t)},getPixelForValue:function(t,e,i){var n=this,o=null;if(void 0!==e&&void 0!==i&&(o=n.getLabelDiff(i,e)),null===o&&(t&&t.isValid||(t=n.parseTime(n.getRightValue(t))),t&&t.isValid&&t.isValid()&&(o=t.diff(n.firstTick,n.tickUnit,!0))),null!==o){var r=0!==o?o/n.scaleSizeInUnits:o;if(n.isHorizontal()){var s=n.width*r;return n.left+Math.round(s)}var a=n.height*r;return n.top+Math.round(a)}},getPixelForTick:function(t){return this.getPixelForValue(this.tickMoments[t],null,null)},getValueForPixel:function(t){var e=this,i=e.isHorizontal()?e.width:e.height,o=(t-(e.isHorizontal()?e.left:e.top))/i;return o*=e.scaleSizeInUnits,e.firstTick.clone().add(n.duration(o,e.tickUnit).asSeconds(),"seconds")},parseTime:function(t){var e=this;return"string"==typeof e.options.time.parser?n(t,e.options.time.parser):"function"==typeof e.options.time.parser?e.options.time.parser(t):"function"==typeof t.getMonth||"number"==typeof t?n(t):t.isValid&&t.isValid()?t:"string"!=typeof e.options.time.format&&e.options.time.format.call?(console.warn("options.time.format is deprecated and replaced by options.time.parser. See http://nnnick.github.io/Chart.js/docs-v2/#scales-time-scale"),e.options.time.format(t)):n(t,e.options.time.format)}});t.scaleService.registerScaleType("time",r,o)}},{1:1}]},{},[7])(7)}),function(t,e,i){!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.sparkline&&t(jQuery)}(function(n){"use strict";var o,r,s,a,l,h,c,u,d,p,f,g,m,v,_,x,y,b,w,S,C,T,k,D,E,I,A,R,O,N,P,F={},L=0;o=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:i,normalRangeMax:i,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:i,chartRangeMax:i,chartRangeMinX:i,chartRangeMaxX:i,tooltipFormat:new s('<span style="color: {{color}}">●</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:i,nullColor:i,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,colorMap:i,tooltipFormat:new s('<span style="color: {{color}}">●</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new s('<span style="color: {{color}}">●</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:i,thresholdValue:0,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,tooltipFormat:new s("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:i,tooltipFormat:new s("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new s('<span style="color: {{color}}">●</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:i,targetColor:"#4a2",chartRangeMax:i,chartRangeMin:i,tooltipFormat:new s("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},E='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',r=function(){var t,e;return t=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(t.prototype=n.extend(new arguments[0],arguments[arguments.length-1]),t._super=arguments[0].prototype):t.prototype=arguments[arguments.length-1],arguments.length>2&&(e=Array.prototype.slice.call(arguments,1,-1),e.unshift(t.prototype),n.extend.apply(n,e))):t.prototype=arguments[0],t.prototype.cls=t,t},n.SPFormatClass=s=r({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(t,e){this.format=t,this.fclass=e},render:function(t,e,n){var o,r,s,a,l,h=this,c=t;return this.format.replace(this.fre,function(){var t;return r=arguments[1],s=arguments[3],o=h.precre.exec(r),o?(l=o[2],r=o[1]):l=!1,a=c[r],a===i?"":s&&e&&e[s]?(t=e[s],t.get?e[s].get(a)||a:e[s][a]||a):(d(a)&&(a=n.get("numberFormatter")?n.get("numberFormatter")(a):m(a,l,n.get("numberDigitGroupCount"),n.get("numberDigitGroupSep"),n.get("numberDecimalMark"))),a)})}}),n.spformat=function(t,e){return new s(t,e)},a=function(t,e,i){return t<e?e:t>i?i:t},l=function(t,i){var n;return 2===i?(n=e.floor(t.length/2),t.length%2?t[n]:(t[n-1]+t[n])/2):t.length%2?(n=(t.length*i+i)/4,n%1?(t[e.floor(n)]+t[e.floor(n)-1])/2:t[n-1]):(n=(t.length*i+2)/4,n%1?(t[e.floor(n)]+t[e.floor(n)-1])/2:t[n-1])},h=function(t){var e;switch(t){case"undefined":t=i;break;case"null":t=null;break;case"true":t=!0;break;case"false":t=!1;break;default:e=parseFloat(t),t==e&&(t=e)}return t},c=function(t){var e,i=[];for(e=t.length;e--;)i[e]=h(t[e]);return i},u=function(t,e){var i,n,o=[];for(i=0,n=t.length;i<n;i++)t[i]!==e&&o.push(t[i]);return o},d=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},m=function(t,e,i,o,r){var s,a;for(t=(!1===e?parseFloat(t).toString():t.toFixed(e)).split(""),(s=(s=n.inArray(".",t))<0?t.length:s)<t.length&&(t[s]=r),a=s-i;a>0;a-=i)t.splice(a,0,o);return t.join("")},p=function(t,e,i){var n;for(n=e.length;n--;)if((!i||null!==e[n])&&e[n]!==t)return!1;return!0},function(t){var e,i=0;for(e=t.length;e--;)i+="number"==typeof t[e]?t[e]:0;return i},g=function(t){return n.isArray(t)?t:[t]},f=function(e){var i;t.createStyleSheet?t.createStyleSheet().cssText=e:(i=t.createElement("style"),i.type="text/css",t.getElementsByTagName("head")[0].appendChild(i),i["string"==typeof t.body.style.WebkitAppearance?"innerText":"innerHTML"]=e)},n.fn.simpledraw=function(e,o,r,s){var a,l;if(r&&(a=this.data("_jqs_vcanvas")))return a;if(!1===n.fn.sparkline.canvas)return!1;if(n.fn.sparkline.canvas===i){var h=t.createElement("canvas");if(h.getContext&&h.getContext("2d"))n.fn.sparkline.canvas=function(t,e,i,n){return new O(t,e,i,n)};else{if(!t.namespaces||t.namespaces.v)return n.fn.sparkline.canvas=!1,!1;t.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),n.fn.sparkline.canvas=function(t,e,i,n){return new N(t,e,i)}}}return e===i&&(e=n(this).innerWidth()),o===i&&(o=n(this).innerHeight()),a=n.fn.sparkline.canvas(e,o,this,s),l=n(this).data("_jqs_mhandler"),l&&l.registerCanvas(a),a},n.fn.cleardraw=function(){var t=this.data("_jqs_vcanvas");t&&t.reset()},n.RangeMapClass=v=r({init:function(t){var e,i,n=[];for(e in t)t.hasOwnProperty(e)&&"string"==typeof e&&e.indexOf(":")>-1&&(i=e.split(":"),i[0]=0===i[0].length?-Infinity:parseFloat(i[0]),i[1]=0===i[1].length?Infinity:parseFloat(i[1]),i[2]=t[e],n.push(i));this.map=t,this.rangelist=n||!1},get:function(t){var e,n,o,r=this.rangelist;if((o=this.map[t])!==i)return o;if(r)for(e=r.length;e--;)if(n=r[e],n[0]<=t&&n[1]>=t)return n[2];return i}}),n.range_map=function(t){return new v(t)},_=r({init:function(t,e){var i=n(t);this.$el=i,this.options=e,this.currentPageX=0,this.currentPageY=0,this.el=t,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!e.get("disableTooltips"),this.highlightEnabled=!e.get("disableHighlight")},registerSparkline:function(t){this.splist.push(t),this.over&&this.updateDisplay()},registerCanvas:function(t){var e=n(t.canvas);this.canvas=t,this.$canvas=e,e.mouseenter(n.proxy(this.mouseenter,this)),e.mouseleave(n.proxy(this.mouseleave,this)),e.click(n.proxy(this.mouseclick,this))},reset:function(t){this.splist=[],this.tooltip&&t&&(this.tooltip.remove(),this.tooltip=i)},mouseclick:function(t){var e=n.Event("sparklineClick");e.originalEvent=t,e.sparklines=this.splist,this.$el.trigger(e)},mouseenter:function(e){n(t.body).unbind("mousemove.jqs"),n(t.body).bind("mousemove.jqs",n.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=e.pageX,this.currentPageY=e.pageY,this.currentEl=e.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new x(this.options),this.tooltip.updatePosition(e.pageX,e.pageY)),this.updateDisplay()},mouseleave:function(){n(t.body).unbind("mousemove.jqs");var e,i,o=this.splist,r=o.length,s=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),i=0;i<r;i++)e=o[i],e.clearRegionHighlight()&&(s=!0);s&&this.canvas.render()},mousemove:function(t){this.currentPageX=t.pageX,this.currentPageY=t.pageY,this.currentEl=t.target,this.tooltip&&this.tooltip.updatePosition(t.pageX,t.pageY),this.updateDisplay()},updateDisplay:function(){var t,e,i,o,r,s=this.splist,a=s.length,l=!1,h=this.$canvas.offset(),c=this.currentPageX-h.left,u=this.currentPageY-h.top;if(this.over){for(i=0;i<a;i++)e=s[i],(o=e.setRegionHighlight(this.currentEl,c,u))&&(l=!0);if(l){if(r=n.Event("sparklineRegionChange"),r.sparklines=this.splist,this.$el.trigger(r),this.tooltip){for(t="",i=0;i<a;i++)e=s[i],t+=e.getCurrentRegionTooltip();this.tooltip.setContent(t)}this.disableHighlight||this.canvas.render()}null===o&&this.mouseleave()}}}),x=r({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(e){var i,o=e.get("tooltipClassname","jqstooltip"),r=this.sizeStyle;this.container=e.get("tooltipContainer")||t.body,this.tooltipOffsetX=e.get("tooltipOffsetX",10),this.tooltipOffsetY=e.get("tooltipOffsetY",12),n("#jqssizetip").remove(),n("#jqstooltip").remove(),this.sizetip=n("<div/>",{id:"jqssizetip",style:r,"class":o}),this.tooltip=n("<div/>",{id:"jqstooltip","class":o}).appendTo(this.container),i=this.tooltip.offset(),this.offsetLeft=i.left,this.offsetTop=i.top,this.hidden=!0,n(window).unbind("resize.jqs scroll.jqs"),n(window).bind("resize.jqs scroll.jqs",n.proxy(this.updateWindowDims,this)),this.updateWindowDims()},
|
|
updateWindowDims:function(){this.scrollTop=n(window).scrollTop(),this.scrollLeft=n(window).scrollLeft(),this.scrollRight=this.scrollLeft+n(window).width(),this.updatePosition()},getSize:function(t){this.sizetip.html(t).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(t){if(!t)return this.tooltip.css("visibility","hidden"),void(this.hidden=!0);this.getSize(t),this.tooltip.html(t).css({width:this.width,height:this.height,visibility:"visible"}),this.hidden&&(this.hidden=!1,this.updatePosition())},updatePosition:function(t,e){if(t===i){if(this.mousex===i)return;t=this.mousex-this.offsetLeft,e=this.mousey-this.offsetTop}else this.mousex=t-=this.offsetLeft,this.mousey=e-=this.offsetTop;this.height&&this.width&&!this.hidden&&(e-=this.height+this.tooltipOffsetY,t+=this.tooltipOffsetX,e<this.scrollTop&&(e=this.scrollTop),t<this.scrollLeft?t=this.scrollLeft:t+this.width>this.scrollRight&&(t=this.scrollRight-this.width),this.tooltip.css({left:t,top:e}))},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=i,n(window).unbind("resize.jqs scroll.jqs")}}),I=function(){f(E)},n(I),P=[],n.fn.sparkline=function(e,o){return this.each(function(){var r,s,a=new n.fn.sparkline.options(this,o),l=n(this);if(r=function(){var o,r,s,h,c,u,d;if("html"===e||e===i?(d=this.getAttribute(a.get("tagValuesAttribute")),d!==i&&null!==d||(d=l.html()),o=d.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):o=e,r="auto"===a.get("width")?o.length*a.get("defaultPixelsPerValue"):a.get("width"),"auto"===a.get("height")?a.get("composite")&&n.data(this,"_jqs_vcanvas")||(h=t.createElement("span"),h.innerHTML="a",l.html(h),s=n(h).innerHeight()||n(h).height(),n(h).remove(),h=null):s=a.get("height"),a.get("disableInteraction")?c=!1:(c=n.data(this,"_jqs_mhandler"),c?a.get("composite")||c.reset():(c=new _(this,a),n.data(this,"_jqs_mhandler",c))),a.get("composite")&&!n.data(this,"_jqs_vcanvas"))return void(n.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),n.data(this,"_jqs_errnotify",!0)));u=new(n.fn.sparkline[a.get("type")])(this,o,a,r,s),u.render(),c&&c.registerSparkline(u)},n(this).html()&&!a.get("disableHiddenCheck")&&n(this).is(":hidden")||!n(this).parents("body").length){if(!a.get("composite")&&n.data(this,"_jqs_pending"))for(s=P.length;s;s--)P[s-1][0]==this&&P.splice(s-1,1);P.push([this,r]),n.data(this,"_jqs_pending",!0)}else r.call(this)})},n.fn.sparkline.defaults=o(),n.sparkline_display_visible=function(){var t,e,i,o=[];for(e=0,i=P.length;e<i;e++)t=P[e][0],n(t).is(":visible")&&!n(t).parents().is(":hidden")?(P[e][1].call(t),n.data(P[e][0],"_jqs_pending",!1),o.push(e)):!n(t).closest("html").length&&!n.data(t,"_jqs_pending")&&(n.data(P[e][0],"_jqs_pending",!1),o.push(e));for(e=o.length;e;e--)P.splice(o[e-1],1)},n.fn.sparkline.options=r({init:function(t,e){var i,o,r,s;this.userOptions=e=e||{},this.tag=t,this.tagValCache={},o=n.fn.sparkline.defaults,r=o.common,this.tagOptionsPrefix=e.enableTagOptions&&(e.tagOptionsPrefix||r.tagOptionsPrefix),s=this.getTagSetting("type"),i=s===F?o[e.type||r.type]:o[s],this.mergedOptions=n.extend({},r,i,e)},getTagSetting:function(t){var e,n,o,r,s=this.tagOptionsPrefix;if(!1===s||s===i)return F;if(this.tagValCache.hasOwnProperty(t))e=this.tagValCache.key;else{if((e=this.tag.getAttribute(s+t))===i||null===e)e=F;else if("["===e.substr(0,1))for(e=e.substr(1,e.length-2).split(","),n=e.length;n--;)e[n]=h(e[n].replace(/(^\s*)|(\s*$)/g,""));else if("{"===e.substr(0,1))for(o=e.substr(1,e.length-2).split(","),e={},n=o.length;n--;)r=o[n].split(":",2),e[r[0].replace(/(^\s*)|(\s*$)/g,"")]=h(r[1].replace(/(^\s*)|(\s*$)/g,""));else e=h(e);this.tagValCache.key=e}return e},get:function(t,e){var n,o=this.getTagSetting(t);return o!==F?o:(n=this.mergedOptions[t])===i?e:n}}),n.fn.sparkline._base=r({disabled:!1,init:function(t,e,o,r,s){this.el=t,this.$el=n(t),this.values=e,this.options=o,this.width=r,this.height=s,this.currentRegion=i},initTarget:function(){var t=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),t))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return!this.disabled||(this.el.innerHTML="",!1)},getRegion:function(t,e){},setRegionHighlight:function(t,e,n){var o,r=this.currentRegion,s=!this.options.get("disableHighlight");return e>this.canvasWidth||n>this.canvasHeight||e<0||n<0?null:(o=this.getRegion(t,e,n),r!==o&&(r!==i&&s&&this.removeHighlight(),this.currentRegion=o,o!==i&&s&&this.renderHighlight(),!0))},clearRegionHighlight:function(){return this.currentRegion!==i&&(this.removeHighlight(),this.currentRegion=i,!0)},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(t){},getCurrentRegionTooltip:function(){var t,e,o,r,a,l,h,c,u,d,p,f,g,m,v=this.options,_="",x=[];if(this.currentRegion===i)return"";if(t=this.getCurrentRegionFields(),p=v.get("tooltipFormatter"))return p(this,v,t);if(v.get("tooltipChartTitle")&&(_+='<div class="jqs jqstitle">'+v.get("tooltipChartTitle")+"</div>\n"),!(e=this.options.get("tooltipFormat")))return"";if(n.isArray(e)||(e=[e]),n.isArray(t)||(t=[t]),h=this.options.get("tooltipFormatFieldlist"),c=this.options.get("tooltipFormatFieldlistKey"),h&&c){for(u=[],l=t.length;l--;)d=t[l][c],-1!=(m=n.inArray(d,h))&&(u[m]=t[l]);t=u}for(o=e.length,g=t.length,l=0;l<o;l++)for(f=e[l],"string"==typeof f&&(f=new s(f)),r=f.fclass||"jqsfield",m=0;m<g;m++)t[m].isNull&&v.get("tooltipSkipNull")||(n.extend(t[m],{prefix:v.get("tooltipPrefix"),suffix:v.get("tooltipSuffix")}),a=f.render(t[m],v.get("tooltipValueLookups"),v),x.push('<div class="'+r+'">'+a+"</div>"));return x.length?_+x.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(t,i){var n,o,r,s,l=i.get("highlightColor"),h=i.get("highlightLighten");if(l)return l;if(h&&(n=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t))){for(r=[],o=4===t.length?16:1,s=0;s<3;s++)r[s]=a(e.round(parseInt(n[s+1],16)*o*h),0,255);return"rgb("+r.join(",")+")"}return t}}),y={changeHighlight:function(t){var e,i=this.currentRegion,o=this.target,r=this.regionShapes[i];r&&(e=this.renderRegion(i,t),n.isArray(e)||n.isArray(r)?(o.replaceWithShapes(r,e),this.regionShapes[i]=n.map(e,function(t){return t.id})):(o.replaceWithShape(r,e),this.regionShapes[i]=e.id))},render:function(){var t,e,i,o,r=this.values,s=this.target,a=this.regionShapes;if(this.cls._super.render.call(this)){for(i=r.length;i--;)if(t=this.renderRegion(i))if(n.isArray(t)){for(e=[],o=t.length;o--;)t[o].append(),e.push(t[o].id);a[i]=e}else t.append(),a[i]=t.id;else a[i]=null;s.render()}}},n.fn.sparkline.line=b=r(n.fn.sparkline._base,{type:"line",init:function(t,e,i,n,o){b._super.init.call(this,t,e,i,n,o),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(t,e,n){var o,r=this.regionMap;for(o=r.length;o--;)if(null!==r[o]&&e>=r[o][0]&&e<=r[o][1])return r[o][2];return i},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:null===this.yvalues[t],x:this.xvalues[t],y:this.yvalues[t],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:t}},renderHighlight:function(){var t,e,n=this.currentRegion,o=this.target,r=this.vertices[n],s=this.options,a=s.get("spotRadius"),l=s.get("highlightSpotColor"),h=s.get("highlightLineColor");r&&(a&&l&&(t=o.drawCircle(r[0],r[1],a,i,l),this.highlightSpotId=t.id,o.insertAfterShape(this.lastShapeId,t)),h&&(e=o.drawLine(this.canvasTop,r[1],this.canvasWidth,r[1],h),this.highlightLineId=e.id,o.insertAfterShape(this.lastShapeId,e)))},removeHighlight:function(){var t=this.target;this.highlightSpotId&&(t.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(t.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var t,i,n,o,r,s=this.values,a=s.length,l=this.xvalues,h=this.yvalues,c=this.yminmax;for(t=0;t<a;t++)i=s[t],n="string"==typeof s[t],o="object"==typeof s[t]&&s[t]instanceof Array,r=n&&s[t].split(":"),n&&2===r.length?(l.push(Number(r[0])),h.push(Number(r[1])),c.push(Number(r[1]))):o?(l.push(i[0]),h.push(i[1]),c.push(i[1])):(l.push(t),null===s[t]||"null"===s[t]?h.push(null):(h.push(Number(i)),c.push(Number(i))));this.options.get("xvalues")&&(l=this.options.get("xvalues")),this.maxy=this.maxyorg=e.max.apply(e,c),this.miny=this.minyorg=e.min.apply(e,c),this.maxx=e.max.apply(e,l),this.minx=e.min.apply(e,l),this.xvalues=l,this.yvalues=h,this.yminmax=c},processRangeOptions:function(){var t=this.options,e=t.get("normalRangeMin"),n=t.get("normalRangeMax");e!==i&&(e<this.miny&&(this.miny=e),n>this.maxy&&(this.maxy=n)),t.get("chartRangeMin")!==i&&(t.get("chartRangeClip")||t.get("chartRangeMin")<this.miny)&&(this.miny=t.get("chartRangeMin")),t.get("chartRangeMax")!==i&&(t.get("chartRangeClip")||t.get("chartRangeMax")>this.maxy)&&(this.maxy=t.get("chartRangeMax")),t.get("chartRangeMinX")!==i&&(t.get("chartRangeClipX")||t.get("chartRangeMinX")<this.minx)&&(this.minx=t.get("chartRangeMinX")),t.get("chartRangeMaxX")!==i&&(t.get("chartRangeClipX")||t.get("chartRangeMaxX")>this.maxx)&&(this.maxx=t.get("chartRangeMaxX"))},drawNormalRange:function(t,n,o,r,s){var a=this.options.get("normalRangeMin"),l=this.options.get("normalRangeMax"),h=n+e.round(o-o*((l-this.miny)/s)),c=e.round(o*(l-a)/s);this.target.drawRect(t,h,r,c,i,this.options.get("normalRangeColor")).append()},render:function(){var t,o,r,s,a,l,h,c,u,d,p,f,g,m,_,x,y,w,S,C,T,k,D,E,I,A=this.options,R=this.target,O=this.canvasWidth,N=this.canvasHeight,P=this.vertices,F=A.get("spotRadius"),L=this.regionMap;if(b._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),D=this.xvalues,E=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(s=a=0,t=this.maxx-this.minx==0?1:this.maxx-this.minx,o=this.maxy-this.miny==0?1:this.maxy-this.miny,r=this.yvalues.length-1,F&&(O<4*F||N<4*F)&&(F=0),F&&(T=A.get("highlightSpotColor")&&!A.get("disableInteraction"),(T||A.get("minSpotColor")||A.get("spotColor")&&E[r]===this.miny)&&(N-=e.ceil(F)),(T||A.get("maxSpotColor")||A.get("spotColor")&&E[r]===this.maxy)&&(N-=e.ceil(F),s+=e.ceil(F)),(T||(A.get("minSpotColor")||A.get("maxSpotColor"))&&(E[0]===this.miny||E[0]===this.maxy))&&(a+=e.ceil(F),O-=e.ceil(F)),(T||A.get("spotColor")||A.get("minSpotColor")||A.get("maxSpotColor")&&(E[r]===this.miny||E[r]===this.maxy))&&(O-=e.ceil(F))),N--,A.get("normalRangeMin")!==i&&!A.get("drawNormalOnTop")&&this.drawNormalRange(a,s,N,O,o),h=[],c=[h],m=_=null,x=E.length,I=0;I<x;I++)u=D[I],p=D[I+1],d=E[I],f=a+e.round((u-this.minx)*(O/t)),g=I<x-1?a+e.round((p-this.minx)*(O/t)):O,_=f+(g-f)/2,L[I]=[m||0,_,I],m=_,null===d?I&&(null!==E[I-1]&&(h=[],c.push(h)),P.push(null)):(d<this.miny&&(d=this.miny),d>this.maxy&&(d=this.maxy),h.length||h.push([f,s+N]),l=[f,s+e.round(N-N*((d-this.miny)/o))],h.push(l),P.push(l));for(y=[],w=[],S=c.length,I=0;I<S;I++)h=c[I],h.length&&(A.get("fillColor")&&(h.push([h[h.length-1][0],s+N]),w.push(h.slice(0)),h.pop()),h.length>2&&(h[0]=[h[0][0],h[1][1]]),y.push(h));for(S=w.length,I=0;I<S;I++)R.drawShape(w[I],A.get("fillColor"),A.get("fillColor")).append();for(A.get("normalRangeMin")!==i&&A.get("drawNormalOnTop")&&this.drawNormalRange(a,s,N,O,o),S=y.length,I=0;I<S;I++)R.drawShape(y[I],A.get("lineColor"),i,A.get("lineWidth")).append();if(F&&A.get("valueSpots"))for(C=A.get("valueSpots"),C.get===i&&(C=new v(C)),I=0;I<x;I++)(k=C.get(E[I]))&&R.drawCircle(a+e.round((D[I]-this.minx)*(O/t)),s+e.round(N-N*((E[I]-this.miny)/o)),F,i,k).append();F&&A.get("spotColor")&&null!==E[r]&&R.drawCircle(a+e.round((D[D.length-1]-this.minx)*(O/t)),s+e.round(N-N*((E[r]-this.miny)/o)),F,i,A.get("spotColor")).append(),this.maxy!==this.minyorg&&(F&&A.get("minSpotColor")&&(u=D[n.inArray(this.minyorg,E)],R.drawCircle(a+e.round((u-this.minx)*(O/t)),s+e.round(N-N*((this.minyorg-this.miny)/o)),F,i,A.get("minSpotColor")).append()),F&&A.get("maxSpotColor")&&(u=D[n.inArray(this.maxyorg,E)],R.drawCircle(a+e.round((u-this.minx)*(O/t)),s+e.round(N-N*((this.maxyorg-this.miny)/o)),F,i,A.get("maxSpotColor")).append())),this.lastShapeId=R.getLastShapeId(),this.canvasTop=s,R.render()}}}),n.fn.sparkline.bar=w=r(n.fn.sparkline._base,y,{type:"bar",init:function(t,o,r,s,l){var d,p,f,g,m,_,x,y,b,S,C,T,k,D,E,I,A,R,O,N,P,F,L=parseInt(r.get("barWidth"),10),M=parseInt(r.get("barSpacing"),10),B=r.get("chartRangeMin"),H=r.get("chartRangeMax"),W=r.get("chartRangeClip"),z=Infinity,U=-Infinity;for(w._super.init.call(this,t,o,r,s,l),_=0,x=o.length;_<x;_++)N=o[_],d="string"==typeof N&&N.indexOf(":")>-1,(d||n.isArray(N))&&(E=!0,d&&(N=o[_]=c(N.split(":"))),N=u(N,null),p=e.min.apply(e,N),f=e.max.apply(e,N),p<z&&(z=p),f>U&&(U=f));this.stacked=E,this.regionShapes={},this.barWidth=L,this.barSpacing=M,this.totalBarWidth=L+M,this.width=s=o.length*L+(o.length-1)*M,this.initTarget(),W&&(k=B===i?-Infinity:B,D=H===i?Infinity:H),m=[],g=E?[]:m;var V=[],$=[];for(_=0,x=o.length;_<x;_++)if(E)for(I=o[_],o[_]=O=[],V[_]=0,g[_]=$[_]=0,A=0,R=I.length;A<R;A++)null!==(N=O[A]=W?a(I[A],k,D):I[A])&&(N>0&&(V[_]+=N),z<0&&U>0?N<0?$[_]+=e.abs(N):g[_]+=N:g[_]+=e.abs(N-(N<0?U:z)),m.push(N));else N=W?a(o[_],k,D):o[_],null!==(N=o[_]=h(N))&&m.push(N);this.max=T=e.max.apply(e,m),this.min=C=e.min.apply(e,m),this.stackMax=U=E?e.max.apply(e,V):T,this.stackMin=z=E?e.min.apply(e,m):C,r.get("chartRangeMin")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMin")<C)&&(C=r.get("chartRangeMin")),r.get("chartRangeMax")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMax")>T)&&(T=r.get("chartRangeMax")),this.zeroAxis=b=r.get("zeroAxis",!0),S=C<=0&&T>=0&&b?0:0==b?C:C>0?C:T,this.xaxisOffset=S,y=E?e.max.apply(e,g)+e.max.apply(e,$):T-C,this.canvasHeightEf=b&&C<0?this.canvasHeight-2:this.canvasHeight-1,C<S?(F=E&&T>=0?U:T,(P=(F-S)/y*this.canvasHeight)!==e.ceil(P)&&(this.canvasHeightEf-=2,P=e.ceil(P))):P=this.canvasHeight,this.yoffset=P,n.isArray(r.get("colorMap"))?(this.colorMapByIndex=r.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=r.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new v(this.colorMapByValue))),this.range=y},getRegion:function(t,n,o){var r=e.floor(n/this.totalBarWidth);return r<0||r>=this.values.length?i:r},getCurrentRegionFields:function(){var t,e,i=this.currentRegion,n=g(this.values[i]),o=[];for(e=n.length;e--;)t=n[e],o.push({isNull:null===t,value:t,color:this.calcColor(e,t,i),offset:i});return o},calcColor:function(t,e,o){var r,s,a=this.colorMapByIndex,l=this.colorMapByValue,h=this.options;return r=this.stacked?h.get("stackedBarColor"):e<0?h.get("negBarColor"):h.get("barColor"),0===e&&h.get("zeroColor")!==i&&(r=h.get("zeroColor")),l&&(s=l.get(e))?r=s:a&&a.length>o&&(r=a[o]),n.isArray(r)?r[t%r.length]:r},renderRegion:function(t,o){var r,s,a,l,h,c,u,d,f,g,m=this.values[t],v=this.options,_=this.xaxisOffset,x=[],y=this.range,b=this.stacked,w=this.target,S=t*this.totalBarWidth,C=this.canvasHeightEf,T=this.yoffset;if(m=n.isArray(m)?m:[m],u=m.length,d=m[0],l=p(null,m),g=p(_,m,!0),l)return v.get("nullColor")?(a=o?v.get("nullColor"):this.calcHighlightColor(v.get("nullColor"),v),r=T>0?T-1:T,w.drawRect(S,r,this.barWidth-1,0,a,a)):i;for(h=T,c=0;c<u;c++){if(d=m[c],b&&d===_){if(!g||f)continue;f=!0}s=y>0?e.floor(C*(e.abs(d-_)/y))+1:1,d<_||d===_&&0===T?(r=h,h+=s):(r=T-s,T-=s),a=this.calcColor(c,d,t),o&&(a=this.calcHighlightColor(a,v)),x.push(w.drawRect(S,r,this.barWidth-1,s-1,a,a))}return 1===x.length?x[0]:x}}),n.fn.sparkline.tristate=S=r(n.fn.sparkline._base,y,{type:"tristate",init:function(t,e,o,r,s){var a=parseInt(o.get("barWidth"),10),l=parseInt(o.get("barSpacing"),10);S._super.init.call(this,t,e,o,r,s),this.regionShapes={},this.barWidth=a,this.barSpacing=l,this.totalBarWidth=a+l,this.values=n.map(e,Number),this.width=r=e.length*a+(e.length-1)*l,n.isArray(o.get("colorMap"))?(this.colorMapByIndex=o.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=o.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new v(this.colorMapByValue))),this.initTarget()},getRegion:function(t,i,n){return e.floor(i/this.totalBarWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===i,value:this.values[t],color:this.calcColor(this.values[t],t),offset:t}},calcColor:function(t,e){var i,n=this.values,o=this.options,r=this.colorMapByIndex,s=this.colorMapByValue;return s&&(i=s.get(t))?i:r&&r.length>e?r[e]:n[e]<0?o.get("negBarColor"):n[e]>0?o.get("posBarColor"):o.get("zeroBarColor")},renderRegion:function(t,i){var n,o,r,s,a,l,h=this.values,c=this.options,u=this.target;if(n=u.pixelHeight,r=e.round(n/2),s=t*this.totalBarWidth,h[t]<0?(a=r,o=r-1):h[t]>0?(a=0,o=r-1):(a=r-1,o=2),l=this.calcColor(h[t],t),null!==l)return i&&(l=this.calcHighlightColor(l,c)),u.drawRect(s,a,this.barWidth-1,o-1,l,l)}}),n.fn.sparkline.discrete=C=r(n.fn.sparkline._base,y,{type:"discrete",init:function(t,o,r,s,a){C._super.init.call(this,t,o,r,s,a),this.regionShapes={},this.values=o=n.map(o,Number),this.min=e.min.apply(e,o),this.max=e.max.apply(e,o),this.range=this.max-this.min,this.width=s="auto"===r.get("width")?2*o.length:this.width,this.interval=e.floor(s/o.length),this.itemWidth=s/o.length,r.get("chartRangeMin")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMin")<this.min)&&(this.min=r.get("chartRangeMin")),r.get("chartRangeMax")!==i&&(r.get("chartRangeClip")||r.get("chartRangeMax")>this.max)&&(this.max=r.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===r.get("lineHeight")?e.round(.3*this.canvasHeight):r.get("lineHeight"))},getRegion:function(t,i,n){return e.floor(i/this.itemWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===i,value:this.values[t],offset:t}},renderRegion:function(t,i){var n,o,r,s,l=this.values,h=this.options,c=this.min,u=this.max,d=this.range,p=this.interval,f=this.target,g=this.canvasHeight,m=this.lineHeight,v=g-m;return o=a(l[t],c,u),s=t*p,n=e.round(v-v*((o-c)/d)),r=h.get("thresholdColor")&&o<h.get("thresholdValue")?h.get("thresholdColor"):h.get("lineColor"),i&&(r=this.calcHighlightColor(r,h)),f.drawLine(s,n,s,n+m,r)}}),n.fn.sparkline.bullet=T=r(n.fn.sparkline._base,{type:"bullet",init:function(t,n,o,r,s){var a,l,h;T._super.init.call(this,t,n,o,r,s),this.values=n=c(n),h=n.slice(),h[0]=null===h[0]?h[2]:h[0],h[1]=null===n[1]?h[2]:h[1],a=e.min.apply(e,n),l=e.max.apply(e,n),a=o.get("base")===i?a<0?a:0:o.get("base"),this.min=a,this.max=l,this.range=l-a,this.shapes={},this.valueShapes={},this.regiondata={},this.width=r="auto"===o.get("width")?"4.0em":r,this.target=this.$el.simpledraw(r,s,o.get("composite")),n.length||(this.disabled=!0),this.initTarget()},getRegion:function(t,e,n){var o=this.target.getShapeAt(t,e,n);return o!==i&&this.shapes[o]!==i?this.shapes[o]:i},getCurrentRegionFields:function(){var t=this.currentRegion;return{fieldkey:t.substr(0,1),value:this.values[t.substr(1)],region:t}},changeHighlight:function(t){var e,i=this.currentRegion,n=this.valueShapes[i];switch(delete this.shapes[n],i.substr(0,1)){case"r":e=this.renderRange(i.substr(1),t);break;case"p":e=this.renderPerformance(t);break;case"t":e=this.renderTarget(t)}this.valueShapes[i]=e.id,this.shapes[e.id]=i,this.target.replaceWithShape(n,e)},renderRange:function(t,i){var n=this.values[t],o=e.round(this.canvasWidth*((n-this.min)/this.range)),r=this.options.get("rangeColors")[t-2];return i&&(r=this.calcHighlightColor(r,this.options)),this.target.drawRect(0,0,o-1,this.canvasHeight-1,r,r)},renderPerformance:function(t){var i=this.values[1],n=e.round(this.canvasWidth*((i-this.min)/this.range)),o=this.options.get("performanceColor");return t&&(o=this.calcHighlightColor(o,this.options)),this.target.drawRect(0,e.round(.3*this.canvasHeight),n-1,e.round(.4*this.canvasHeight)-1,o,o)},renderTarget:function(t){var i=this.values[0],n=e.round(this.canvasWidth*((i-this.min)/this.range)-this.options.get("targetWidth")/2),o=e.round(.1*this.canvasHeight),r=this.canvasHeight-2*o,s=this.options.get("targetColor");return t&&(s=this.calcHighlightColor(s,this.options)),this.target.drawRect(n,o,this.options.get("targetWidth")-1,r-1,s,s)},render:function(){var t,e,i=this.values.length,n=this.target;if(T._super.render.call(this)){for(t=2;t<i;t++)e=this.renderRange(t).append(),this.shapes[e.id]="r"+t,this.valueShapes["r"+t]=e.id;null!==this.values[1]&&(e=this.renderPerformance().append(),this.shapes[e.id]="p1",this.valueShapes.p1=e.id),null!==this.values[0]&&(e=this.renderTarget().append(),this.shapes[e.id]="t0",this.valueShapes.t0=e.id),n.render()}}}),n.fn.sparkline.pie=k=r(n.fn.sparkline._base,{type:"pie",init:function(t,i,o,r,s){var a,l=0;if(k._super.init.call(this,t,i,o,r,s),this.shapes={},this.valueShapes={},this.values=i=n.map(i,Number),"auto"===o.get("width")&&(this.width=this.height),i.length>0)for(a=i.length;a--;)l+=i[a];this.total=l,this.initTarget(),this.radius=e.floor(e.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(t,e,n){var o=this.target.getShapeAt(t,e,n);return o!==i&&this.shapes[o]!==i?this.shapes[o]:i},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===i,value:this.values[t],percent:this.values[t]/this.total*100,color:this.options.get("sliceColors")[t%this.options.get("sliceColors").length],offset:t}},changeHighlight:function(t){var e=this.currentRegion,i=this.renderSlice(e,t),n=this.valueShapes[e];delete this.shapes[n],this.target.replaceWithShape(n,i),this.valueShapes[e]=i.id,this.shapes[i.id]=e},renderSlice:function(t,n){var o,r,s,a,l,h=this.target,c=this.options,u=this.radius,d=c.get("borderWidth"),p=c.get("offset"),f=2*e.PI,g=this.values,m=this.total,v=p?2*e.PI*(p/360):0;for(a=g.length,s=0;s<a;s++){if(o=v,r=v,m>0&&(r=v+f*(g[s]/m)),t===s)return l=c.get("sliceColors")[s%c.get("sliceColors").length],n&&(l=this.calcHighlightColor(l,c)),h.drawPieSlice(u,u,u-d,o,r,i,l);v=r}},render:function(){var t,n,o=this.target,r=this.values,s=this.options,a=this.radius,l=s.get("borderWidth");if(k._super.render.call(this)){for(l&&o.drawCircle(a,a,e.floor(a-l/2),s.get("borderColor"),i,l).append(),n=r.length;n--;)r[n]&&(t=this.renderSlice(n).append(),this.valueShapes[n]=t.id,this.shapes[t.id]=n);o.render()}}}),n.fn.sparkline.box=D=r(n.fn.sparkline._base,{type:"box",init:function(t,e,i,o,r){D._super.init.call(this,t,e,i,o,r),this.values=n.map(e,Number),this.width="auto"===i.get("width")?"4.0em":o,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var t=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==i&&t.push({field:"lo",value:this.loutlier}),this.routlier!==i&&t.push({field:"ro",value:this.routlier}),this.lwhisker!==i&&t.push({field:"lw",value:this.lwhisker}),this.rwhisker!==i&&t.push({field:"rw",value:this.rwhisker}),t},render:function(){var t,n,o,r,s,a,h,c,u,d,p,f=this.target,g=this.values,m=g.length,v=this.options,_=this.canvasWidth,x=this.canvasHeight,y=v.get("chartRangeMin")===i?e.min.apply(e,g):v.get("chartRangeMin"),b=v.get("chartRangeMax")===i?e.max.apply(e,g):v.get("chartRangeMax"),w=0;if(D._super.render.call(this)){if(v.get("raw"))v.get("showOutliers")&&g.length>5?(n=g[0],t=g[1],r=g[2],s=g[3],a=g[4],h=g[5],c=g[6]):(t=g[0],r=g[1],s=g[2],a=g[3],h=g[4]);else if(g.sort(function(t,e){return t-e}),r=l(g,1),s=l(g,2),a=l(g,3),o=a-r,v.get("showOutliers")){for(t=h=i,u=0;u<m;u++)t===i&&g[u]>r-o*v.get("outlierIQR")&&(t=g[u]),g[u]<a+o*v.get("outlierIQR")&&(h=g[u]);n=g[0],c=g[m-1]}else t=g[0],h=g[m-1];this.quartiles=[r,s,a],this.lwhisker=t,this.rwhisker=h,this.loutlier=n,this.routlier=c,p=_/(b-y+1),v.get("showOutliers")&&(w=e.ceil(v.get("spotRadius")),_-=2*e.ceil(v.get("spotRadius")),p=_/(b-y+1),n<t&&f.drawCircle((n-y)*p+w,x/2,v.get("spotRadius"),v.get("outlierLineColor"),v.get("outlierFillColor")).append(),c>h&&f.drawCircle((c-y)*p+w,x/2,v.get("spotRadius"),v.get("outlierLineColor"),v.get("outlierFillColor")).append()),f.drawRect(e.round((r-y)*p+w),e.round(.1*x),e.round((a-r)*p),e.round(.8*x),v.get("boxLineColor"),v.get("boxFillColor")).append(),f.drawLine(e.round((t-y)*p+w),e.round(x/2),e.round((r-y)*p+w),e.round(x/2),v.get("lineColor")).append(),f.drawLine(e.round((t-y)*p+w),e.round(x/4),e.round((t-y)*p+w),e.round(x-x/4),v.get("whiskerColor")).append(),f.drawLine(e.round((h-y)*p+w),e.round(x/2),e.round((a-y)*p+w),e.round(x/2),v.get("lineColor")).append(),f.drawLine(e.round((h-y)*p+w),e.round(x/4),e.round((h-y)*p+w),e.round(x-x/4),v.get("whiskerColor")).append(),f.drawLine(e.round((s-y)*p+w),e.round(.1*x),e.round((s-y)*p+w),e.round(.9*x),v.get("medianColor")).append(),v.get("target")&&(d=e.ceil(v.get("spotRadius")),f.drawLine(e.round((v.get("target")-y)*p+w),e.round(x/2-d),e.round((v.get("target")-y)*p+w),e.round(x/2+d),v.get("targetColor")).append(),f.drawLine(e.round((v.get("target")-y)*p+w-d),e.round(x/2),e.round((v.get("target")-y)*p+w+d),e.round(x/2),v.get("targetColor")).append()),f.render()}}}),A=r({init:function(t,e,i,n){this.target=t,this.id=e,this.type=i,this.args=n},append:function(){return this.target.appendShape(this),this}}),R=r({_pxregex:/(\d+)(px)?\s*$/i,init:function(t,e,i){t&&(this.width=t,this.height=e,this.target=i,this.lastShapeId=null,i[0]&&(i=i[0]),n.data(i,"_jqs_vcanvas",this))},drawLine:function(t,e,i,n,o,r){return this.drawShape([[t,e],[i,n]],o,r)},drawShape:function(t,e,i,n){return this._genShape("Shape",[t,e,i,n])},drawCircle:function(t,e,i,n,o,r){return this._genShape("Circle",[t,e,i,n,o,r])},drawPieSlice:function(t,e,i,n,o,r,s){return this._genShape("PieSlice",[t,e,i,n,o,r,s])},drawRect:function(t,e,i,n,o,r){return this._genShape("Rect",[t,e,i,n,o,r])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(t,e){n(e).html(t)},_calculatePixelDims:function(t,e,i){var o;o=this._pxregex.exec(e),this.pixelHeight=o?o[1]:n(i).height(),o=this._pxregex.exec(t),this.pixelWidth=o?o[1]:n(i).width()},_genShape:function(t,e){var i=L++;return e.unshift(i),new A(this,i,t,e)},appendShape:function(t){alert("appendShape not implemented")},replaceWithShape:function(t,e){alert("replaceWithShape not implemented")},insertAfterShape:function(t,e){alert("insertAfterShape not implemented")},removeShapeId:function(t){alert("removeShapeId not implemented")},getShapeAt:function(t,e,i){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),O=r(R,{init:function(e,o,r,s){O._super.init.call(this,e,o,r),this.canvas=t.createElement("canvas"),r[0]&&(r=r[0]),n.data(r,"_jqs_vcanvas",this),n(this.canvas).css({display:"inline-block",width:e,height:o,verticalAlign:"top"}),this._insert(this.canvas,r),this._calculatePixelDims(e,o,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=s,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=i,n(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(t,e,n){var o=this.canvas.getContext("2d");return t!==i&&(o.strokeStyle=t),o.lineWidth=n===i?1:n,e!==i&&(o.fillStyle=e),o},reset:function(){this._getContext().clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=i},_drawShape:function(t,e,n,o,r){var s,a,l=this._getContext(n,o,r);for(l.beginPath(),l.moveTo(e[0][0]+.5,e[0][1]+.5),s=1,a=e.length;s<a;s++)l.lineTo(e[s][0]+.5,e[s][1]+.5);n!==i&&l.stroke(),o!==i&&l.fill(),this.targetX!==i&&this.targetY!==i&&l.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawCircle:function(t,n,o,r,s,a,l){var h=this._getContext(s,a,l);h.beginPath(),h.arc(n,o,r,0,2*e.PI,!1),this.targetX!==i&&this.targetY!==i&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t),s!==i&&h.stroke(),a!==i&&h.fill()},_drawPieSlice:function(t,e,n,o,r,s,a,l){var h=this._getContext(a,l);h.beginPath(),h.moveTo(e,n),h.arc(e,n,o,r,s,!1),h.lineTo(e,n),h.closePath(),a!==i&&h.stroke(),l&&h.fill(),this.targetX!==i&&this.targetY!==i&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawRect:function(t,e,i,n,o,r,s){return this._drawShape(t,[[e,i],[e+n,i],[e+n,i+o],[e,i+o],[e,i]],r,s)},appendShape:function(t){return this.shapes[t.id]=t,this.shapeseq.push(t.id),this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var i,n=this.shapeseq;for(this.shapes[e.id]=e,i=n.length;i--;)n[i]==t&&(n[i]=e.id);delete this.shapes[t]},replaceWithShapes:function(t,e){var i,n,o,r=this.shapeseq,s={};for(n=t.length;n--;)s[t[n]]=!0;for(n=r.length;n--;)i=r[n],s[i]&&(r.splice(n,1),delete this.shapes[i],o=n);for(n=e.length;n--;)r.splice(o,0,e[n].id),this.shapes[e[n].id]=e[n]},insertAfterShape:function(t,e){var i,n=this.shapeseq;for(i=n.length;i--;)if(n[i]===t)return n.splice(i+1,0,e.id),void(this.shapes[e.id]=e)},removeShapeId:function(t){var e,i=this.shapeseq;for(e=i.length;e--;)if(i[e]===t){i.splice(e,1);break}delete this.shapes[t]},getShapeAt:function(t,e,i){return this.targetX=e,this.targetY=i,this.render(),this.currentTargetShapeId},render:function(){var t,e,i,n=this.shapeseq,o=this.shapes,r=n.length,s=this._getContext();for(s.clearRect(0,0,this.pixelWidth,this.pixelHeight),i=0;i<r;i++)t=n[i],e=o[t],this["_draw"+e.type].apply(this,e.args);this.interact||(this.shapes={},this.shapeseq=[])}}),N=r(R,{init:function(e,i,o){var r;N._super.init.call(this,e,i,o),o[0]&&(o=o[0]),n.data(o,"_jqs_vcanvas",this),this.canvas=t.createElement("span"),n(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:e,height:i,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,o),this._calculatePixelDims(e,i,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,r='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",r),this.group=n(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(t,e,n,o,r){var s,a,l,h,c,u,d=[];for(u=0,c=e.length;u<c;u++)d[u]=e[u][0]+","+e[u][1];return s=d.splice(0,1),r=r===i?1:r,a=n===i?' stroked="false" ':' strokeWeight="'+r+'px" strokeColor="'+n+'" ',l=o===i?' filled="false"':' fillColor="'+o+'" filled="true" ',h=d[0]===d[d.length-1]?"x ":"",'<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+a+l+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+s+" l "+d.join(", ")+" "+h+'e"> </v:shape>'},_drawCircle:function(t,e,n,o,r,s,a){var l,h;return e-=o,n-=o,l=r===i?' stroked="false" ':' strokeWeight="'+a+'px" strokeColor="'+r+'" ',h=s===i?' filled="false"':' fillColor="'+s+'" filled="true" ','<v:oval id="jqsshape'+t+'" '+l+h+' style="position:absolute;top:'+n+"px; left:"+e+"px; width:"+2*o+"px; height:"+2*o+'px"></v:oval>'},_drawPieSlice:function(t,n,o,r,s,a,l,h){var c,u,d,p,f,g,m;if(s===a)return"";if(a-s==2*e.PI&&(s=0,a=2*e.PI),u=n+e.round(e.cos(s)*r),d=o+e.round(e.sin(s)*r),p=n+e.round(e.cos(a)*r),f=o+e.round(e.sin(a)*r),u===p&&d===f){if(a-s<e.PI)return"";u=p=n+r,d=f=o}return u===p&&d===f&&a-s<e.PI?"":(c=[n-r,o-r,n+r,o+r,u,d,p,f],g=l===i?' stroked="false" ':' strokeWeight="1px" strokeColor="'+l+'" ',m=h===i?' filled="false"':' fillColor="'+h+'" filled="true" ',
|
|
'<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+g+m+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+n+","+o+" wa "+c.join(", ")+' x e"> </v:shape>')},_drawRect:function(t,e,i,n,o,r,s){return this._drawShape(t,[[e,i],[e,i+o],[e+n,i+o],[e+n,i],[e,i]],r,s)},reset:function(){this.group.innerHTML=""},appendShape:function(t){var e=this["_draw"+t.type].apply(this,t.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",e):this.prerender+=e,this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var i=n("#jqsshape"+t),o=this["_draw"+e.type].apply(this,e.args);i[0].outerHTML=o},replaceWithShapes:function(t,e){var i,o=n("#jqsshape"+t[0]),r="",s=e.length;for(i=0;i<s;i++)r+=this["_draw"+e[i].type].apply(this,e[i].args);for(o[0].outerHTML=r,i=1;i<t.length;i++)n("#jqsshape"+t[i]).remove()},insertAfterShape:function(t,e){var i=n("#jqsshape"+t),o=this["_draw"+e.type].apply(this,e.args);i[0].insertAdjacentHTML("afterEnd",o)},removeShapeId:function(t){var e=n("#jqsshape"+t);this.group.removeChild(e[0])},getShapeAt:function(t,e,i){return t.id.substr(8)},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var o=n.closest("[type=submit]");if(0===o.length)return;i=o[0]}var r=i.form;if(r.clk=i,"image"===i.type)if(void 0!==e.offsetX)r.clk_x=e.offsetX,r.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var s=n.offset();r.clk_x=e.pageX-s.left,r.clk_y=e.pageY-s.top}else r.clk_x=e.pageX-i.offsetLeft,r.clk_y=e.pageY-i.offsetTop;setTimeout(function(){r.clk=r.clk_x=r.clk_y=null},100)}function n(){if(t.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 o=/\r?\n/g,r={};r.fileapi=void 0!==t('<input type="file">').get(0).files,r.formdata=void 0!==window.FormData;var s=!!t.fn.prop;t.fn.attr2=function(){if(!s)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,o,a){function l(i){var n,o,r=t.param(i,e.traditional).split("&"),s=r.length,a=[];for(n=0;n<s;n++)r[n]=r[n].replace(/\+/g," "),o=r[n].split("="),a.push([decodeURIComponent(o[0]),decodeURIComponent(o[1])]);return a}function h(i){function o(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(t){n("cannot get iframe.contentWindow document: "+t)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(i){n("cannot get iframe.contentDocument: "+i),e=t.document}return e}function r(){function e(){try{var t=o(m).readyState;n("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(t){n("Server abort: ",t," (",t.name,")"),a(E),w&&clearTimeout(w),w=void 0}}var i=p.attr2("target"),r=p.attr2("action"),s=p.attr("enctype")||p.attr("encoding")||"multipart/form-data";S.setAttribute("target",f),c&&!/post/i.test(c)||S.setAttribute("method","POST"),r!==u.url&&S.setAttribute("action",u.url),u.skipEncodingOverride||c&&!/post/i.test(c)||p.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),u.timeout&&(w=setTimeout(function(){b=!0,a(D)},u.timeout));var l=[];try{if(u.extraData)for(var h in u.extraData)u.extraData.hasOwnProperty(h)&&(t.isPlainObject(u.extraData[h])&&u.extraData[h].hasOwnProperty("name")&&u.extraData[h].hasOwnProperty("value")?l.push(t('<input type="hidden" name="'+u.extraData[h].name+'">',T).val(u.extraData[h].value).appendTo(S)[0]):l.push(t('<input type="hidden" name="'+h+'">',T).val(u.extraData[h]).appendTo(S)[0]));u.iframeTarget||g.appendTo(k),m.attachEvent?m.attachEvent("onload",a):m.addEventListener("load",a,!1),setTimeout(e,15);try{S.submit()}catch(t){document.createElement("form").submit.apply(S)}}finally{S.setAttribute("action",r),S.setAttribute("enctype",s),i?S.setAttribute("target",i):p.removeAttr("target"),t(l).remove()}}function a(e){if(!_.aborted&&!N){if((O=o(m))||(n("cannot access response document"),e=E),e===D&&_)return _.abort("timeout"),void C.reject(_,"timeout");if(e===E&&_)return _.abort("server abort"),void C.reject(_,"error","server abort");if(O&&O.location.href!==u.iframeSrc||b){m.detachEvent?m.detachEvent("onload",a):m.removeEventListener("load",a,!1);var i,r="success";try{if(b)throw"timeout";var s="xml"===u.dataType||O.XMLDocument||t.isXMLDoc(O);if(n("isXml="+s),!s&&window.opera&&(null===O.body||!O.body.innerHTML)&&--P)return n("requeing onLoad callback, DOM not available"),void setTimeout(a,250);var l=O.body?O.body:O.documentElement;_.responseText=l?l.innerHTML:null,_.responseXML=O.XMLDocument?O.XMLDocument:O,s&&(u.dataType="xml"),_.getResponseHeader=function(t){return{"content-type":u.dataType}[t.toLowerCase()]},l&&(_.status=Number(l.getAttribute("status"))||_.status,_.statusText=l.getAttribute("statusText")||_.statusText);var h=(u.dataType||"").toLowerCase(),c=/(json|script|text)/.test(h);if(c||u.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)_.responseText=p.value,_.status=Number(p.getAttribute("status"))||_.status,_.statusText=p.getAttribute("statusText")||_.statusText;else if(c){var f=O.getElementsByTagName("pre")[0],v=O.getElementsByTagName("body")[0];f?_.responseText=f.textContent?f.textContent:f.innerText:v&&(_.responseText=v.textContent?v.textContent:v.innerText)}}else"xml"===h&&!_.responseXML&&_.responseText&&(_.responseXML=F(_.responseText));try{R=M(_,h,u)}catch(t){r="parsererror",_.error=i=t||r}}catch(t){n("error caught: ",t),r="error",_.error=i=t||r}_.aborted&&(n("upload aborted"),r=null),_.status&&(r=_.status>=200&&_.status<300||304===_.status?"success":"error"),"success"===r?(u.success&&u.success.call(u.context,R,"success",_),C.resolve(_.responseText,"success",_),d&&t.event.trigger("ajaxSuccess",[_,u])):r&&(void 0===i&&(i=_.statusText),u.error&&u.error.call(u.context,_,r,i),C.reject(_,"error",i),d&&t.event.trigger("ajaxError",[_,u,i])),d&&t.event.trigger("ajaxComplete",[_,u]),d&&!--t.active&&t.event.trigger("ajaxStop"),u.complete&&u.complete.call(u.context,_,r),N=!0,u.timeout&&clearTimeout(w),setTimeout(function(){u.iframeTarget?g.attr("src",u.iframeSrc):g.remove(),_.responseXML=null},100)}}}var l,h,u,d,f,g,m,_,x,y,b,w,S=p[0],C=t.Deferred();if(C.abort=function(t){_.abort(t)},i)for(h=0;h<v.length;h++)l=t(v[h]),s?l.prop("disabled",!1):l.removeAttr("disabled");(u=t.extend(!0,{},t.ajaxSettings,e)).context=u.context||u,f="jqFormIO"+(new Date).getTime();var T=S.ownerDocument,k=p.closest("body");if(u.iframeTarget?(y=(g=t(u.iframeTarget,T)).attr2("name"))?f=y:g.attr2("name",f):(g=t('<iframe name="'+f+'" src="'+u.iframeSrc+'" />',T)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=g[0],_={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(t){}g.attr("src",u.iframeSrc),_.error=i,u.error&&u.error.call(u.context,_,i,e),d&&t.event.trigger("ajaxError",[_,u,i]),u.complete&&u.complete.call(u.context,_,i)}},(d=u.global)&&0==t.active++&&t.event.trigger("ajaxStart"),d&&t.event.trigger("ajaxSend",[_,u]),u.beforeSend&&!1===u.beforeSend.call(u.context,_,u))return u.global&&t.active--,C.reject(),C;if(_.aborted)return C.reject(),C;(x=S.clk)&&(y=x.name)&&!x.disabled&&(u.extraData=u.extraData||{},u.extraData[y]=x.value,"image"===x.type&&(u.extraData[y+".x"]=S.clk_x,u.extraData[y+".y"]=S.clk_y));var D=1,E=2,I=t("meta[name=csrf-token]").attr("content"),A=t("meta[name=csrf-param]").attr("content");A&&I&&(u.extraData=u.extraData||{},u.extraData[A]=I),u.forceSync?r():setTimeout(r,10);var R,O,N,P=50,F=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},L=t.parseJSON||function(t){return window.eval("("+t+")")},M=function(e,i,n){var o=e.getResponseHeader("content-type")||"",r=("xml"===i||!i)&&o.indexOf("xml")>=0,s=r?e.responseXML:e.responseText;return r&&"parsererror"===s.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(s=n.dataFilter(s,i)),"string"==typeof s&&(("json"===i||!i)&&o.indexOf("json")>=0?s=L(s):("script"===i||!i)&&o.indexOf("javascript")>=0&&t.globalEval(s)),s};return C}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var c,u,d,p=this;"function"==typeof e?e={success:e}:"string"==typeof e||!1===e&&arguments.length>0?(e={url:e,data:i,dataType:o},"function"==typeof a&&(e.success=a)):void 0===e&&(e={}),c=e.method||e.type||this.attr2("method"),(d=(d="string"==typeof(u=e.url||this.attr2("action"))?t.trim(u):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:d,success:t.ajaxSettings.success,type:c||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var f={};if(this.trigger("form-pre-serialize",[this,e,f]),f.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var g=e.traditional;void 0===g&&(g=t.ajaxSettings.traditional);var m,v=[],_=this.formToArray(e.semantic,v,e.filtering);if(e.data){var x=t.isFunction(e.data)?e.data(_):e.data;e.extraData=x,m=t.param(x,g)}if(e.beforeSubmit&&!1===e.beforeSubmit(_,this,e))return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[_,this,e,f]),f.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var y=t.param(_,g);m&&(y=y?y+"&"+m:m),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+y,e.data=null):e.data=y;var b=[];if(e.resetForm&&b.push(function(){p.resetForm()}),e.clearForm&&b.push(function(){p.clearForm(e.includeHidden)}),!e.dataType&&e.target){var w=e.success||function(){};b.push(function(i,n,o){var r=arguments,s=e.replaceTarget?"replaceWith":"html";t(e.target)[s](i).each(function(){w.apply(this,r)})})}else e.success&&(t.isArray(e.success)?t.merge(b,e.success):b.push(e.success));if(e.success=function(t,i,n){for(var o=e.context||this,r=0,s=b.length;r<s;r++)b[r].apply(o,[t,i,n||p,p])},e.error){var S=e.error;e.error=function(t,i,n){var o=e.context||this;S.apply(o,[t,i,n,p])}}if(e.complete){var C=e.complete;e.complete=function(t,i){var n=e.context||this;C.apply(n,[t,i,p])}}var T=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}).length>0,k="multipart/form-data",D=p.attr("enctype")===k||p.attr("encoding")===k,E=r.fileapi&&r.formdata;n("fileAPI :"+E);var I,A=(T||D)&&!E;!1!==e.iframe&&(e.iframe||A)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){I=h(_)}):I=h(_):I=(T||D)&&E?function(i){for(var n=new FormData,o=0;o<i.length;o++)n.append(i[o].name,i[o].value);if(e.extraData){var r=l(e.extraData);for(o=0;o<r.length;o++)r[o]&&n.append(r[o][0],r[o][1])}e.data=null;var s=t.extend(!0,{},t.ajaxSettings,e,{contentType:!1,processData:!1,cache:!1,type:c||"POST"});e.uploadProgress&&(s.xhr=function(){var i=t.ajaxSettings.xhr();return i.upload&&i.upload.addEventListener("progress",function(t){var i=0,n=t.loaded||t.position,o=t.total;t.lengthComputable&&(i=Math.ceil(n/o*100)),e.uploadProgress(t,n,o,i)},!1),i}),s.data=null;var a=s.beforeSend;return s.beforeSend=function(t,i){e.formData?i.data=e.formData:i.data=n,a&&a.call(this,t,i)},t.ajax(s)}(_):t.ajax(e),p.removeData("jqxhr").data("jqxhr",I);for(var R=0;R<v.length;R++)v[R]=null;return this.trigger("form-submit-notify",[this,e]),this},t.fn.ajaxForm=function(o,r,s,a){if(("string"==typeof o||!1===o&&arguments.length>0)&&(o={url:o,data:r,dataType:s},"function"==typeof a&&(o.success=a)),o=o||{},o.delegation=o.delegation&&t.isFunction(t.fn.on),!o.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(n("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(o)}),this):(n("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return o.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,o,e).on("click.form-plugin",this.selector,o,i),this):this.ajaxFormUnbind().on("submit.form-plugin",o,e).on("click.form-plugin",o,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,n){var o=[];if(0===this.length)return o;var s,a=this[0],l=this.attr("id"),h=e||void 0===a.elements?a.getElementsByTagName("*"):a.elements;if(h&&(h=t.makeArray(h)),l&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(s=t(':input[form="'+l+'"]').get()).length&&(h=(h||[]).concat(s)),!h||!h.length)return o;t.isFunction(n)&&(h=t.map(h,n));var c,u,d,p,f,g,m;for(c=0,g=h.length;c<g;c++)if(f=h[c],(d=f.name)&&!f.disabled)if(e&&a.clk&&"image"===f.type)a.clk===f&&(o.push({name:d,value:t(f).val(),type:f.type}),o.push({name:d+".x",value:a.clk_x},{name:d+".y",value:a.clk_y}));else if((p=t.fieldValue(f,!0))&&p.constructor===Array)for(i&&i.push(f),u=0,m=p.length;u<m;u++)o.push({name:d,value:p[u]});else if(r.fileapi&&"file"===f.type){i&&i.push(f);var v=f.files;if(v.length)for(u=0;u<v.length;u++)o.push({name:d,value:v[u],type:f.type});else o.push({name:d,value:"",type:f.type})}else null!==p&&void 0!==p&&(i&&i.push(f),o.push({name:d,value:p,type:f.type,required:!0}));if(!e&&a.clk){var _=t(a.clk),x=_[0];(d=x.name)&&!x.disabled&&"image"===x.type&&(o.push({name:d,value:_.val()}),o.push({name:d+".x",value:a.clk_x},{name:d+".y",value:a.clk_y}))}return o},t.fn.formSerialize=function(e){return t.param(this.formToArray(e))},t.fn.fieldSerialize=function(e){var i=[];return this.each(function(){var n=this.name;if(n){var o=t.fieldValue(this,e);if(o&&o.constructor===Array)for(var r=0,s=o.length;r<s;r++)i.push({name:n,value:o[r]});else null!==o&&void 0!==o&&i.push({name:this.name,value:o})}}),t.param(i)},t.fn.fieldValue=function(e){for(var i=[],n=0,o=this.length;n<o;n++){var r=this[n],s=t.fieldValue(r,e);null===s||void 0===s||s.constructor===Array&&!s.length||(s.constructor===Array?t.merge(i,s):i.push(s))}return i},t.fieldValue=function(e,i){var n=e.name,r=e.type,s=e.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!n||e.disabled||"reset"===r||"button"===r||("checkbox"===r||"radio"===r)&&!e.checked||("submit"===r||"image"===r)&&e.form&&e.form.clk!==e||"select"===s&&-1===e.selectedIndex))return null;if("select"===s){var a=e.selectedIndex;if(a<0)return null;for(var l=[],h=e.options,c="select-one"===r,u=c?a+1:h.length,d=c?a:0;d<u;d++){var p=h[d];if(p.selected&&!p.disabled){var f=p.value;if(f||(f=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),c)return f;l.push(f)}}return l}return t(e).val().replace(o,"\r\n")},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var n=this.type,o=this.tagName.toLowerCase();i.test(n)||"textarea"===o?this.value="":"checkbox"===n||"radio"===n?this.checked=!1:"select"===o?this.selectedIndex=-1:"file"===n?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(!0===e&&/hidden/.test(n)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){var e=t(this),i=this.tagName.toLowerCase();switch(i){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var n=e.parents("select");return n.length&&n[0].multiple?"option"===i?this.selected=this.defaultSelected:e.find("option").resetForm():n.resetForm(),!0;case"select":return e.find("option").each(function(t){if(this.selected=this.defaultSelected,this.defaultSelected&&!e[0].multiple)return e[0].selectedIndex=t,!1}),!0;case"label":var o=t(e.attr("for")),r=e.find("input,select,textarea");return o[0]&&r.unshift(o[0]),r.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return e.find("form,input,label,select,textarea").resetForm(),!0}})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var i=this.type;if("checkbox"===i||"radio"===i)this.checked=e;else if("option"===this.tagName.toLowerCase()){var n=t(this).parent("select");e&&n[0]&&"select-one"===n[0].type&&n.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1});var QRCode;!function(){function t(t){this.mode=l.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,i=this.data.length;e<i;e++){var n=[],o=this.data.charCodeAt(e);o>65536?(n[0]=240|(1835008&o)>>>18,n[1]=128|(258048&o)>>>12,n[2]=128|(4032&o)>>>6,n[3]=128|63&o):o>2048?(n[0]=224|(61440&o)>>>12,n[1]=128|(4032&o)>>>6,n[2]=128|63&o):o>128?(n[0]=192|(1984&o)>>>6,n[1]=128|63&o):n[0]=o,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(t,e){if(t.length==undefined)throw new Error(t.length+"/"+e);for(var i=0;i<t.length&&0==t[i];)i++;this.num=new Array(t.length-i+e);for(var n=0;n<t.length-i;n++)this.num[n]=t[n+i]}function n(t,e){this.totalCount=t,this.dataCount=e}function o(){this.buffer=[],this.length=0}function r(){var t=!1,e=navigator.userAgent;if(/android/i.test(e)){t=!0;var i=e.toString().match(/android ([0-9]\.[0-9])/i);i&&i[1]&&(t=parseFloat(i[1]))}return t}function s(t,e){for(var i=1,n=a(t),o=0,r=f.length;o<=r;o++){var s=0;switch(e){case h.L:s=f[o][0];break;case h.M:s=f[o][1];break;case h.Q:s=f[o][2];break;case h.H:s=f[o][3]}if(n<=s)break;i++}if(i>f.length)throw new Error("Too long data");return i}function a(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}t.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,i=this.parsedData.length;e<i;e++)t.put(this.parsedData[e],8)}},e.prototype={addData:function(e){var i=new t(e);this.dataList.push(i),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,i){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[n][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,i),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,i)},setupPositionProbePattern:function(t,e){for(var i=-1;i<=7;i++)if(!(t+i<=-1||this.moduleCount<=t+i))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(this.modules[t+i][e+n]=0<=i&&i<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==i||6==i)||2<=i&&i<=4&&2<=n&&n<=4)},getBestMaskPattern:function(){for(var t=0,e=0,i=0;i<8;i++){this.makeImpl(!0,i);var n=u.getLostPoint(this);(0==i||t>n)&&(t=n,e=i)}return e},createMovieClip:function(t,e,i){var n=t.createEmptyMovieClip(e,i);this.make();for(var o=0;o<this.modules.length;o++)for(var r=1*o,s=0;s<this.modules[o].length;s++){var a=1*s,l=this.modules[o][s];l&&(n.beginFill(0,100),n.moveTo(a,r),n.lineTo(a+1,r),n.lineTo(a+1,r+1),n.lineTo(a,r+1),n.endFill())}return n},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=u.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var i=0;i<t.length;i++){var n=t[e],o=t[i];if(null==this.modules[n][o])for(var r=-2;r<=2;r++)for(var s=-2;s<=2;s++)this.modules[n+r][o+s]=-2==r||2==r||-2==s||2==s||0==r&&0==s}},setupTypeNumber:function(t){for(var e=u.getBCHTypeNumber(this.typeNumber),i=0;i<18;i++){var n=!t&&1==(e>>i&1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=n}for(var i=0;i<18;i++){var n=!t&&1==(e>>i&1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=n}},setupTypeInfo:function(t,e){for(var i=this.errorCorrectLevel<<3|e,n=u.getBCHTypeInfo(i),o=0;o<15;o++){var r=!t&&1==(n>>o&1);o<6?this.modules[o][8]=r:o<8?this.modules[o+1][8]=r:this.modules[this.moduleCount-15+o][8]=r}for(var o=0;o<15;o++){var r=!t&&1==(n>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=r:o<9?this.modules[8][15-o-1+1]=r:this.modules[8][15-o-1]=r}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var i=-1,n=this.moduleCount-1,o=7,r=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;a<2;a++)if(null==this.modules[n][s-a]){var l=!1;r<t.length&&(l=1==(t[r]>>>o&1));var h=u.getMask(e,n,s-a);h&&(l=!l),this.modules[n][s-a]=l,o--,-1==o&&(r++,o=7)}if((n+=i)<0||this.moduleCount<=n){n-=i,i=-i;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,i,r){for(var s=n.getRSBlocks(t,i),a=new o,l=0;l<r.length;l++){var h=r[l];a.put(h.mode,4),a.put(h.getLength(),u.getLengthInBits(h.mode,t)),h.write(a)}for(var c=0,l=0;l<s.length;l++)c+=s[l].dataCount;if(a.getLengthInBits()>8*c)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*c+")");for(a.getLengthInBits()+4<=8*c&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;;){if(a.getLengthInBits()>=8*c)break;if(a.put(e.PAD0,8),a.getLengthInBits()>=8*c)break;a.put(e.PAD1,8)}return e.createBytes(a,s)},e.createBytes=function(t,e){for(var n=0,o=0,r=0,s=new Array(e.length),a=new Array(e.length),l=0;l<e.length;l++){var h=e[l].dataCount,c=e[l].totalCount-h;o=Math.max(o,h),r=Math.max(r,c),s[l]=new Array(h);for(var d=0;d<s[l].length;d++)s[l][d]=255&t.buffer[d+n];n+=h;var p=u.getErrorCorrectPolynomial(c),f=new i(s[l],p.getLength()-1),g=f.mod(p);a[l]=new Array(p.getLength()-1);for(var d=0;d<a[l].length;d++){var m=d+g.getLength()-a[l].length;a[l][d]=m>=0?g.get(m):0}}for(var v=0,d=0;d<e.length;d++)v+=e[d].totalCount;for(var _=new Array(v),x=0,d=0;d<o;d++)for(var l=0;l<e.length;l++)d<s[l].length&&(_[x++]=s[l][d]);for(var d=0;d<r;d++)for(var l=0;l<e.length;l++)d<a[l].length&&(_[x++]=a[l][d]);return _};for(var l={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},h={L:1,M:0,Q:3,H:2},c={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},u={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;u.getBCHDigit(e)-u.getBCHDigit(u.G15)>=0;)e^=u.G15<<u.getBCHDigit(e)-u.getBCHDigit(u.G15);return(t<<10|e)^u.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;u.getBCHDigit(e)-u.getBCHDigit(u.G18)>=0;)e^=u.G18<<u.getBCHDigit(e)-u.getBCHDigit(u.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return u.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,i){switch(t){case c.PATTERN000:return(e+i)%2==0;case c.PATTERN001:return e%2==0;case c.PATTERN010:return i%3==0;case c.PATTERN011:return(e+i)%3==0;case c.PATTERN100:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case c.PATTERN101:return e*i%2+e*i%3==0;case c.PATTERN110:return(e*i%2+e*i%3)%2==0;case c.PATTERN111:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new i([1],0),n=0;n<t;n++)e=e.multiply(new i([1,d.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case l.MODE_NUMBER:return 10;case l.MODE_ALPHA_NUM:return 9;case l.MODE_8BIT_BYTE:case l.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case l.MODE_NUMBER:return 12;case l.MODE_ALPHA_NUM:return 11;case l.MODE_8BIT_BYTE:return 16;case l.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case l.MODE_NUMBER:return 14;case l.MODE_ALPHA_NUM:return 13;case l.MODE_8BIT_BYTE:return 16;case l.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),i=0,n=0;n<e;n++)for(var o=0;o<e;o++){for(var r=0,s=t.isDark(n,o),a=-1;a<=1;a++)if(!(n+a<0||e<=n+a))for(var l=-1;l<=1;l++)o+l<0||e<=o+l||0==a&&0==l||s==t.isDark(n+a,o+l)&&r++;r>5&&(i+=3+r-5)}for(var n=0;n<e-1;n++)for(var o=0;o<e-1;o++){var h=0;t.isDark(n,o)&&h++,t.isDark(n+1,o)&&h++,t.isDark(n,o+1)&&h++,t.isDark(n+1,o+1)&&h++,0!=h&&4!=h||(i+=3)}for(var n=0;n<e;n++)for(var o=0;o<e-6;o++)t.isDark(n,o)&&!t.isDark(n,o+1)&&t.isDark(n,o+2)&&t.isDark(n,o+3)&&t.isDark(n,o+4)&&!t.isDark(n,o+5)&&t.isDark(n,o+6)&&(i+=40);for(var o=0;o<e;o++)for(var n=0;n<e-6;n++)t.isDark(n,o)&&!t.isDark(n+1,o)&&t.isDark(n+2,o)&&t.isDark(n+3,o)&&t.isDark(n+4,o)&&!t.isDark(n+5,o)&&t.isDark(n+6,o)&&(i+=40);for(var c=0,o=0;o<e;o++)for(var n=0;n<e;n++)t.isDark(n,o)&&c++;return i+=Math.abs(100*c/e/e-50)/5*10}},d={glog:function(t){if(t<1)throw new Error("glog("+t+")");return d.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return d.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},p=0;p<8;p++)d.EXP_TABLE[p]=1<<p;for(var p=8;p<256;p++)d.EXP_TABLE[p]=d.EXP_TABLE[p-4]^d.EXP_TABLE[p-5]^d.EXP_TABLE[p-6]^d.EXP_TABLE[p-8];for(var p=0;p<255;p++)d.LOG_TABLE[d.EXP_TABLE[p]]=p;i.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<t.getLength();o++)e[n+o]^=d.gexp(d.glog(this.get(n))+d.glog(t.get(o)));return new i(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=d.glog(this.get(0))-d.glog(t.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(var o=0;o<t.getLength();o++)n[o]^=d.gexp(d.glog(t.get(o))+e);return new i(n,0).mod(t)}},n.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],n.getRSBlocks=function(t,e){var i=n.getRsBlockTable(t,e);if(i==undefined)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var o=i.length/3,r=[],s=0;s<o;s++)for(var a=i[3*s+0],l=i[3*s+1],h=i[3*s+2],c=0;c<a;c++)r.push(new n(l,h));return r},n.getRsBlockTable=function(t,e){switch(e){case h.L:return n.RS_BLOCK_TABLE[4*(t-1)+0];case h.M:return n.RS_BLOCK_TABLE[4*(t-1)+1];case h.Q:return n.RS_BLOCK_TABLE[4*(t-1)+2];case h.H:return n.RS_BLOCK_TABLE[4*(t-1)+3];default:return undefined}},o.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var i=0;i<e;i++)this.putBit(1==(t>>>e-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}
|
|
;var f=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],g=function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){function e(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg",t);for(var n in e)e.hasOwnProperty(n)&&i.setAttribute(n,e[n]);return i}var i=this._htOption,n=this._el,o=t.getModuleCount();Math.floor(i.width/o),Math.floor(i.height/o);this.clear();var r=e("svg",{viewBox:"0 0 "+String(o)+" "+String(o),width:"100%",height:"100%",fill:i.colorLight});r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),n.append(r),r.append(e("rect",{fill:i.colorLight,width:"100%",height:"100%"})),r.append(e("rect",{fill:i.colorDark,width:"1",height:"1",id:"template"}));for(var s=0;s<o;s++)for(var a=0;a<o;a++)if(t.isDark(s,a)){var l=e("use",{x:String(a),y:String(s)});l.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),r.append(l)}},t.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},t}(),m="svg"===document.documentElement.tagName.toLowerCase(),v=m?g:function(){return"undefined"!=typeof CanvasRenderingContext2D}()?function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function e(t,e){var i=this;if(i._fFail=e,i._fSuccess=t,null===i._bSupportDataURI){var n=document.createElement("img"),o=function(){i._bSupportDataURI=!1,i._fFail&&i._fFail.call(i)},r=function(){i._bSupportDataURI=!0,i._fSuccess&&i._fSuccess.call(i)};return n.onabort=o,n.onerror=o,n.onload=r,void(n.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===i._bSupportDataURI&&i._fSuccess?i._fSuccess.call(i):!1===i._bSupportDataURI&&i._fFail&&i._fFail.call(i)}if(this._android&&this._android<=2.1){var i=1/window.devicePixelRatio,n=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(t,e,o,r,s,a,l,h,c){if("nodeName"in t&&/img/i.test(t.nodeName))for(var u=arguments.length-1;u>=1;u--)arguments[u]=arguments[u]*i;else void 0===h&&(arguments[1]*=i,arguments[2]*=i,arguments[3]*=i,arguments[4]*=i);n.apply(this,arguments)}}var o=function(t,e){this._bIsPainted=!1,this._android=r(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.append(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.append(this._elImage),this._bSupportDataURI=null};return o.prototype.draw=function(t){var e=this._elImage,i=this._oContext,n=this._htOption,o=t.getModuleCount(),r=n.width/o,s=n.height/o,a=Math.round(r),l=Math.round(s);e.style.display="none",this.clear();for(var h=0;h<o;h++)for(var c=0;c<o;c++){var u=t.isDark(h,c),d=c*r,p=h*s;i.strokeStyle=u?n.colorDark:n.colorLight,i.lineWidth=1,i.fillStyle=u?n.colorDark:n.colorLight,i.fillRect(d,p,r,s),i.strokeRect(Math.floor(d)+.5,Math.floor(p)+.5,a,l),i.strokeRect(Math.ceil(d)-.5,Math.ceil(p)-.5,a,l)}this._bIsPainted=!0},o.prototype.makeImage=function(){this._bIsPainted&&e.call(this,t)},o.prototype.isPainted=function(){return this._bIsPainted},o.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},o.prototype.round=function(t){return t?Math.floor(1e3*t)/1e3:t},o}():function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){for(var e=this._htOption,i=this._el,n=t.getModuleCount(),o=Math.floor(e.width/n),r=Math.floor(e.height/n),s=['<table style="border:0;border-collapse:collapse;">'],a=0;a<n;a++){s.push("<tr>");for(var l=0;l<n;l++)s.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+o+"px;height:"+r+"px;background-color:"+(t.isDark(a,l)?e.colorDark:e.colorLight)+';"></td>');s.push("</tr>")}s.push("</table>"),i.innerHTML=s.join("");var h=i.childNodes[0],c=(e.width-h.offsetWidth)/2,u=(e.height-h.offsetHeight)/2;c>0&&u>0&&(h.style.margin=u+"px "+c+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}();QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:h.H},"string"==typeof e&&(e={text:e}),e)for(var i in e)this._htOption[i]=e[i];"string"==typeof t&&(t=document.getElementById(t)),this._htOption.useSVG&&(v=g),this._android=r(),this._el=t,this._oQRCode=null,this._oDrawing=new v(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(t){this._oQRCode=new e(s(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=h}(),function(t,e){"use strict";var i=e.noConflict(!0),n={},o={innoJquery:i},r=t.innorix=function(t,e){n[t]=e},s=r._load=function(t){if(n[t]&&(o[t]=n[t](s),delete n[t]),!o.hasOwnProperty(t))throw'not find module "'+t+'"';return o[t]};o.klass=function(t,e){e||(e=t,t=[]),i.each(t.reverse(),function(t,i){var n=i.prototype||{};for(var o in n)n.hasOwnProperty(o)&&!e.hasOwnProperty(o)&&(e[o]=n[o])}),e.hasOwnProperty("constructor")||(e.constructor=function(){});var n=e.constructor;return n.prototype=e,n}}(window,jQuery),innorix("api",function(t){"use strict";var e,i=t("innoJquery"),n=t("singleton/agent"),o=t("singleton/agentUpdater"),r=t("singleton/controlBoxAll"),s=t("ControlBox/ControlBox"),a=t("Klass/Composite"),l=t("i18n/lang"),h=t("CONSTANT/ENV"),c=t("CONSTANT/EVENT"),u=t("ControlBox/defaultOption");return{all:r,agent:function(){return n},getUserAgent:function(){return t("userAgent")},create:function(t){for(var e in t)t.hasOwnProperty(e)&&("true"==t[e]&&(t[e]=!0),"false"==t[e]&&(t[e]=!1));if(!t.el)throw"required {option.el}";if(t.$el=i(t.el).eq(0),0===t.$el.length)throw'not exist "option.el"';var n=/iPhone|iPad|iPod|Android|SamsungBrowser/i.test(navigator.userAgent);this.getUserAgent();t.isMobile=n,"undefined"==typeof t.agent&&(t.agent=!0),l.set(t.controlLang);var o;return 1==t.autoHtmlMode?this.checkAgentInstalledNoHandle(function(e){t.agent=!!e,o=new s(t),r.__add(o),o.on(c.CONTROL_DESTROY,function(){r.__remove(o)})}):(o=new s(t),r.__add(o),o.on(c.CONTROL_DESTROY,function(){r.__remove(o)})),o},group:function(){var t=new a(s),e=i.makeArray(arguments);return i.each(e,function(e){e instanceof s&&(t.__add(e),e.on(c.CONTROL_DESTROY,function(){t.__remove(e)}))}),t},setConnectUrl:function(t){return n.setBaseUrl(t),o.agent.setBaseUrl(t),this},autoConnect:function(t){t=t||h.AGENT_HTTP_PRE_PORTS;var i=this;return e=n.findConnectUrl(t).done(function(t){i.setConnectUrl(t)})},onAutoConnect:function(t){return e||this.autoConnect(),e.done(function(){t(!0)}).fail(function(){t(!1)})},setLanguage:function(t){try{l.set(t)}catch(e){console.log(e)}return this},setEnvironment:function(t){return i.extend(h,t),this},addLanguageResource:function(t,e){return l.addResource(t,e),this},checkVersion:function(t){return"undefined"==typeof FormData?n.checkVersionFallback(t):n.checkVersion(t||i.noop)},checkAgentInstalled:function(t){return"undefined"==typeof FormData?n.checkOneTimeVersionFallback(t):n.checkOneTimeVersion(t||i.noop)},checkVersionNoHandle:function(t){return n.checkVersionNoHandle(t)},checkAgentInstalledNoHandle:function(t){return n.checkAgentInstalledNoHandle(t)},execute:function(t){return"undefined"==typeof FormData?n.executeFallback(t,function(t){console.log(t)}):n.execute(t)},getFileExists:function(t){return n.getFileExists(t)},checkImageFile:function(t){return n.checkImageFile(t)},checkTrayVersion:function(t){return"undefined"==typeof FormData?n.checkTrayVersionFallback(t):n.checkTrayVersion(t||i.noop)},pluginUpdateOrInstall:function(){var t=this.pluginResource;this.pluginResource;t=t||{};var e="http://";"https:"==window.location.protocol&&(e="https://");var i=(t.installUrl||e+window.location.host+h.INSTALL_PAGE)+"?redirect="+encodeURIComponent(window.location.href);-1!=t.installUrl.indexOf("redirect")&&(i=this.option.installUrl);t.updateFileUrl||(window.location.host,h.UPDATE_FILE_URL);return this.checkVersion(function(t){return null===t?window.location.href=i:!1===t&&(window.location.href=i),!1}),this},setPluginResource:function(t){this.pluginResource={installUrl:t.installUrl,updateFileUrl:t.updateFileUrl}},setModuleOption:function(t){if(i.isArray(t))for(var e in t)t.hasOwnProperty(e)&&(u[t[e].key]=t[e].value);else u[t.key]=t.value}}}),innorix("server",function(t){"use strict";var e=t("innoJquery"),i=t("ControlBox/defaultOption"),n=t("ControlBox/cachedOption"),o=t("i18n/lang"),r=t("Server/Client"),s=t("CONSTANT/EVENT"),a=new r;return{command:function(){var t=Array.prototype.slice.call(arguments);return this[t.shift()].apply(this,t)},use:function(t){if(t.url)-1==t.url.indexOf("http")?"https:"==window.location.protocol?a.setBaseUrl("https://"+t.url):a.setBaseUrl("http://"+t.url):a.setBaseUrl(t.url);else{var o="http://";"https:"==window.location.protocol&&(o="https://"),t.url=o+window.location.host}var r=[];r.push({key:"apiUrl",value:t.url}),t.key&&(a.setKey(t.key),r.push({key:"apiKey",value:t.key})),innorix.setModuleOption(r);var l={};l[s.TRANSFER_UPLOAD_COMPLETE]=function(t){var i=n.getOption();if(0==i.platformDepend)return!1;var o=e.extend({},t);o.pathName=location.pathname;var r="";i.custom.product&&(r=i.custom.product);var s="";i.custom.subproduct&&(s=i.custom.subproduct),o.product=r,o.subproduct=s,o.files=encodeURIComponent(JSON.stringify(o.files)),a.request("post","webpage/onUpload",o)},l[s.TRANSFER_DOWNLOAD_COMPLETE]=function(t){var i=n.getOption();if(0==i.platformDepend)return!1;var o=e.extend({},t);o.pathName=location.pathname;var r="";i.custom.product&&(r=i.custom.product);var s="";i.custom.subProduct&&(s=i.custom.subProduct),o.product=r,o.subproduct=s,o.files=encodeURIComponent(JSON.stringify(o.files)),a.request("post","webpage/onDownload",o)},e.extend(i,{uploadUrl:t.url+"/upload.jsp",events:l})},getBaseUrl:function(){return a.getBaseUrl()},getKey:function(){return a.getKey()},getFile:function(t){return a.request("get","webpage/file/"+t)},getTransfer:function(t){return a.request("get","webpage/transfer/"+t)},getGroupSessionId:function(){return a.request("get","webpage/groupid")},setDownloadFilesByTransferId:function(t,e){return this.getTransfer(e).done(function(e){e&&0!==e.length?t.presetDownloadFiles(e):alert(o("webpage.noFiles"))})},setDownloadFilesByFileId:function(t,e){return this.getFile(e).done(function(e){e&&e.downloadUrl?t.presetDownloadFiles([e]):alert(o("webpage.noFiles"))})}}}),innorix("userAgent",function(){"use strict";function t(t,e){var i,n,o=s.defaultString.browser.version,r=new RegExp("("+t+")","i").exec(e);return r?(n=r.index,t=r[0],n>-1&&(i=n+t.length+1,o=e.substring(i).split(" ")[0].replace(/_/g,".").replace(/\;|\)/g,"")),o):o}function e(t){return n(s.os,t)}function i(t){return n(s.browser,t)}function n(t,e){for(var i,n,o,s=0;o=t[s];s++)if(i=o.criteria,n=new RegExp(o.identity,"i").test(e),i?n&&r(a,i):n)return o}function o(t,e){for(var i,n=0;i=t[n];n++)if(r(a,i.criteria))return i.identity||e.name;return e.name}function r(t,e){return e&&e.test?!!e.test(t):t.indexOf(e)>-1}var s={browser:[{criteria:"PhantomJS",identity:"PhantomJS"},{criteria:/Opera|OPR/,identity:"Opera",versionSearch:"Version"},{criteria:/Edge/,identity:"Edge",versionSearch:"Edge"},{criteria:/MSIE|Trident|Windows Phone/,identity:"IE",versionSearch:"IEMobile|MSIE|rv"},{criteria:/SAMSUNG|SamsungBrowser/,identity:"SBrowser",versionSearch:"Chrome"},{criteria:/Chrome|CriOS/,identity:"Chrome"},{criteria:/Android/,identity:"default"},{criteria:/iPhone|iPad/,identity:"Safari",versionSearch:"Version"},{criteria:"Apple",identity:"Safari",versionSearch:"Version"},{criteria:"Firefox",identity:"Firefox"}],os:[{criteria:/Windows Phone|Windows NT/,identity:"Window",versionSearch:"Windows Phone|Windows NT"},{criteria:"Windows 2000",identity:"Window",versionAlias:"5.0"},{criteria:/iPhone|iPad/,identity:"iOS",versionSearch:"iPhone OS|CPU OS"},{criteria:"Mac",versionSearch:"OS X",identity:"MAC"},{criteria:/Android/,identity:"Android"}],webview:[{criteria:/iPhone|iPad/,browserVersionSearch:"Version",webviewBrowserVersion:/-1/},{criteria:/iPhone|iPad|Android/,webviewToken:/NAVER|DAUM|; wv/}],defaultString:{browser:{version:"-1",name:"default"},os:{version:"-1",name:"unknown"}}},a=window.navigator.userAgent,l={os:{},browser:{}};return l.browser.name=function(t){return o(t,s.defaultString.browser)}(s.browser),l.browser.version=function(e){var n;if(e)return n=i(e).versionSearch||e,t(n,a)}(l.browser.name),l.os.name=function(t){return o(t,s.defaultString.os)}(s.os),l.os.version=function(t){var i,n,o,r,l=a,h=e(t)||{},c=s.defaultString.os.version;if(t)return h.versionAlias?h.versionAlias:(n=h.versionSearch||t,o=new RegExp("("+n+")\\s([\\d_\\.]+|\\d_0)","i"),r=o.exec(l),r&&(i=o.exec(l)[2].replace(/_/g,".").replace(/\;|\)/g,"")),i||c)}(l.os.name),l.browser.webview=function(){for(var e,i,n=a,o=s.webview,l=!1,h=0;i=o[h];h++)if(r(n,i.criteria)&&(e=t(i.browserVersionSearch,n),r(n,i.webviewToken)||r(e,i.webviewBrowserVersion))){l=!0;break}return l}(),function(t){return t.browser.name=t.browser.name.toLowerCase(),t.os.name=t.os.name.toLowerCase(),"ios"===t.os.name&&t.browser.webview&&(t.browser.version="-1"),t}(l)}),innorix("util",function(t){"use strict";return{log:t("utils/log"),url:t("utils/url"),string:t("utils/string"),array:t("utils/array"),promise:t("utils/promise"),object:t("utils/object"),decorator:t("utils/decorator"),cookie:t("utils/cookie"),getZoom:function(){var t=1;return window.screen.systemXDPI&&window.screen.logicalXDPI&&window.screen.systemXDPI>window.screen.logicalXDPI?t=window.screen.systemXDPI/window.screen.logicalXDPI:window.devicePixelRatio&&(t=window.devicePixelRatio),t},getBoundingScreenRect:function(t,e,i){var n=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent),!!document.documentMode);!n&&window.StyleMedia;navigator.userAgent.toLowerCase().match("webkit");var o=this.getBoundingClientRect(e),r=this.getZoom(),s="undefined"!=typeof window.screenX?window.screenX:window.screenLeft,a=("undefined"!=typeof window.screenY?window.screenY:window.screenTop,s),l=t.screenY-Math.ceil(r*t.clientY);return i&&((i.iframeView||i.iframeNestedView)&&(a=t.screenX-Math.ceil(r*t.clientX)),i.isDebugDropZone&&(console.log("----------------------------"),console.log(i.iframeView),console.log(i.iframeNestedView),console.log(window.screenLeft),console.log(window.screenX),console.log(t.screenX),console.log(t.clientX),console.log(t.offsetX),console.log(t.layerX),console.log(t.x),console.log(a),console.log(o.left),console.log(r),console.log(a+r*o.left),console.log(window.screenTop),console.log(window.screenY),console.log(t.screenY),console.log(t.clientY),console.log(t.offsetY),console.log(t.layerY),console.log(t.y),console.log(l),console.log(o.top),console.log(r),console.log(l+r*o.top),console.log("----------------------------"))),{left:a+r*o.left,top:l+r*o.top,width:r*o.width,height:r*o.height}},getBoundingClientRect:function(t){var e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:e.width||t.offsetWidth,height:e.height||t.offsetHeight}},popupWindow:function(t,e,i,n,o,r){var s=window.screenLeft!=undefined?window.screenLeft:window.screenX,a=window.screenTop!=undefined?window.screenTop:window.screenY,l=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,h=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,c=l/2-i/2+s,u=h/2-n/2+a;o&&(u=o),r&&(c=r);var d=window.open(t,e,"scrollbars=yes, width="+i+", height="+n+", top="+u+", left="+c);window.focus&&d.focus()},generatePopupButton:function(t,e,i,n,o,r){var s=window.screenLeft!=undefined?window.screenLeft:window.screenX,a=window.screenTop!=undefined?window.screenTop:window.screenY,l=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,h=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,c=l/2-n/2+s,u=h/2-i/2+a;o&&(u=o),r&&(c=r);var d=window.open(t,"myWindow","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, top="+u+", left="+c+", width="+n+", height="+i);try{if(d){return'<button id="popupWindow" style="opacity:1;" target="_blank" onclick="window.open(\''+t+"', '"+e+"', 'width="+n+", height="+i+", top="+u+", left="+c+"')\"> </button>"}return!1}catch(p){return!1}},calcWatermarkPosition:function(t,e,i,n,o){var r,s,a,l;switch(t=t.split("|"),1===t.length?["LEFT","RIGHT","CENTER"].indexOf(t[0])>-1?(r="CENTER",s=t[0]):(r=t[0],s="CENTER"):["LEFT","RIGHT","CENTER"].indexOf(t[0])>-1?(r=t[1],s=t[0]):(r=t[0],s=t[1]),r){case"TOP":l=0;break;case"BOTTOM":l=i-o-0;break;default:l=(i-o)/2}switch(s){case"LEFT":a=0;break;case"RIGHT":a=e-n-0;break;default:a=(e-n)/2}return{left:a,top:l}}}}),innorix("Agent/ActiveCommandManager",function(t){"use strict";var e=t("klass"),i=t("util"),n=t("CONSTANT/EVENT");return e({constructor:function(t){this.event=t,this.actives=[]},add:function(t){return this.actives.push(t),this.attachEvents(t),this},attachEvents:function(t){var e=this;this.event.emit(n.AGENT_ADD_COMMAND,t),t.getClientDeferred().done(function(){e.event.emit(n.AGENT_DONE_COMMAND,t)}).fail(function(){e.event.emit(n.AGENT_FAIL_COMMAND,t)}).always(function(){e.remove(t),e.event.emit(n.AGENT_COMPLETE_COMMAND,t)})},remove:function(t){return this.has(t)?(this.actives.splice(this.indexOf(t),1),this):this},has:function(t){return-1!==this.indexOf(t)},indexOf:function(t){return this.actives.indexOf(t)},findByUUID:function(t){return i.array.find(this.actives,function(e){return e.uuid===t})},findByDefer:function(t){return i.array.find(this.actives,function(e){return e.getClientDeferred()===t})}})}),innorix("Agent/Agent",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=n.decorator.throttle,r=t("Agent/Client"),s=t("Klass/Event"),a=t("Agent/CommandFactory"),l=t("Agent/ConnectFinder"),h=t("Agent/ActiveCommandManager"),c=t("i18n/lang"),u={ENV:t("CONSTANT/ENV"),EVENT:t("CONSTANT/EVENT")};return i({constructor:function(t){this.event=new s,this.actives=new h(this.event),this.client=new r(t),this.connectFinder=new l(this.client),this.ajaxStatus={retry:0,state:null,alert:!1}},setOption:function(t){this.option=t},setControlBox:function(t){this.controlBox=t},setBaseUrl:function(t){this.client.setBaseUrl(t)},isConnect:function(){return this.client.isConnect()},findConnectUrl:function(t){return this.connectFinder.find(t||[])},callCommand:function(t,i,n){var o=this;n||(n={}),this.option?n.autoCheckVersion=this.option.autoCheckVersion:n.autoCheckVersion=!1;var r=a[t](i,n||{}),s=this.client.send(r,e.proxy(this.deferredCallback,o));return this.actives.add(r),s},callCommandNoHandle:function(t,i,n){var o=this,r=a[t](i,n||{}),s=this.client.sendPending(r,e.proxy(function(){},o));return this.actives.add(r),s},callCommandFallback:function(t,i,o){var r=this,s=t.action,a=JSON.stringify(t.getAjaxParam()),l=n.string.cryptoRandom().toString().substr(2),h="-----------------------------"+l+"\r\n";h+='Content-Disposition: form-data; name="_action"\r\n\r\n',h+=s+"\r\n",h+="-----------------------------"+l+"\r\n",h+='Content-Disposition: form-data; name="_param"\r\n\r\n',h+=a+"\r\n",h+="-----------------------------"+l+"--\r\n";var c=u.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(c=u.ENV.AGENT_HTTPS_URL);var d=new XDomainRequest;d.onload=function(){o(e.parseJSON(d.responseText))},d.ontimeout=function(){},d.onprogress=function(){},d.onerror=function(){var e="";if(null!=r.option&&(r.option.isMobile?(e=r.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=r.option.installUrlMobile.indexOf("redirect")&&(e=r.option.installUrlMobile)):(e=r.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=r.option.installUrl.indexOf("redirect")&&(e=r.option.installUrl))),"upload"!=s&&"uploadState"!=s&&"download"!=s&&"downloadState"!=s){if(r.ajaxStatus.retry>=3){if(null!=r.controlBox&&(r.controlBox.state="freeze"),r.ajaxStatus.alert=!1,r.ajaxStatus.retry=0,""!=e)if(r.option.installPopupWindow){var a=n.generatePopupButton(e,"Install Page",r.option.installPopupWindowHeight,r.option.installPopupWindowWidth);0==a&&r.controlBox.emit(u.EVENT.POPUP_BLOCKED)}else window.location.href=e;return!1}r.ajaxStatus.retry++}else{if(r.ajaxStatus.retry>=50){if(null!=r.controlBox&&(r.controlBox.state="freeze"),r.ajaxStatus.alert=!1,r.ajaxStatus.retry=0,""!=e)if(r.option.installPopupWindow){var a=n.generatePopupButton(e,"Install Page",r.option.installPopupWindowHeight,r.option.installPopupWindowWidth);0==a&&r.controlBox.emit(u.EVENT.POPUP_BLOCKED)}else window.location.href=e;return!1}"uploadState"!=s&&"downloadState"!=s||r.ajaxStatus.retry++}r.callCommandFallback(t,i,o)},d.open("POST",c+"/"+i),d.send(h)},openFileDialog:o(function(t,i,n,o){return this.checkVersion(function(){}),this.callCommand("comet","openFileDialog",{license:u.ENV.LICENSE,mode:t,allowExtension:JSON.stringify(n),option:i,resource:c.resourceGetter("openFileDialog")}).done(o||e.noop)}),openFileDialogFallback:function(t,e,i,n){this.checkVersionFallback(function(){});var o=a.comet("openFileDialog",{license:u.ENV.LICENSE,mode:t,allowExtension:JSON.stringify(i),option:e,resource:c.resourceGetter("openFileDialog")});this.callCommandFallback(o,"webpage",n)},openFileDialogSingle:o(function(t,i,n,o){return this.checkVersion(function(){}),this.callCommand("comet","openFileDialog",{license:u.ENV.LICENSE,mode:t,allowExtension:JSON.stringify(n),option:i,resource:c.resourceGetter("openFileDialog"),isAddOneFile:!0}).done(o||e.noop)}),openFileDialogSingleFallback:function(t,e,i,n){this.checkVersionFallback(function(){});var o=a.comet("openFileDialog",{license:u.ENV.LICENSE,mode:t,allowExtension:JSON.stringify(i),option:e,resource:c.resourceGetter("openFileDialog"),isAddOneFile:!0});this.callCommandFallback(o,"webpage",n)},directoryDialog:o(function(t,i){return this.checkVersion(function(){}),this.callCommand("comet","directoryDialog",{license:u.ENV.LICENSE,mode:t,resource:c.resourceGetter("directoryDialog")}).done(i||e.noop)}),directoryDialogFallback:function(t,e){this.checkVersionFallback(function(){});var i=a.comet("directoryDialog",{license:u.ENV.LICENSE,mode:t,resource:c.resourceGetter("directoryDialog")});this.callCommandFallback(i,"webpage",e)},dirDialog:o(function(t,i){return this.checkVersion(function(){}),this.callCommand("comet","dirDialog",{defaultPath:i,resouce:c.resourceGetter("directoryDialog")}).done(t||e.noop)}),dirDialogFallback:function(t,e){this.checkVersionFallback(function(){});var i=a.comet("dirDialog",{defaultPath:e,resouce:c.resourceGetter("directoryDialog")});this.callCommandFallback(i,"webpage",t)},showDropZone:o(function(t,i){return this.checkVersion(function(){}),this.callCommand("comet","showDropZone",t).done(i||e.noop)}),showDropZoneFallback:function(t,e){this.checkVersionFallback(function(){});var i=a.comet("showDropZone",t);this.callCommandFallback(i,"webpage",e)},showDropState:o(function(t,i){return this.checkVersion(function(){}),this.callCommand("comet","existDropZone",t).done(i||e.noop)}),showDropStateFallback:function(t,e){this.checkVersionFallback(function(){});var i=a.comet("existDropZone",t);this.callCommandFallback(i,"webpage",e)},downloadPathDialog:o(function(t,i){return this.checkVersion(function(){}),this.callCommand("comet","downloadPathDialog",{defaultPath:t,resource:c.resourceGetter("total")}).done(i||e.noop)}),downloadPathDialogFallback:function(t,e){this.checkVersionFallback(function(){});var i=a.comet("downloadPathDialog",{defaultPath:t,resource:c.resourceGetter("total")});this.callCommandFallback(i,"webpage",e)},addLocalFiles:o(function(t,i,n){return this.callCommand("comet","addLocalFiles",{license:u.ENV.LICENSE,mode:t,filePath:i}).done(n||e.noop)}),addLocalFilesFallback:function(t,e,i){var n=a.comet("addLocalFiles",{license:u.ENV.LICENSE,mode:t,filePath:e});this.callCommandFallback(n,"webpage",i)},checkVersion:function(t,e){return this.callCommand("base","version").done(function(i){var o=u.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?o=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?o=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?o=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(o=INNORIX_MAC_VERSION),t(n.string.versionCompare(i.value,o)>=0,e)}).fail(function(){t(null,e)})},checkOneTimeVersion:function(t,e){return this.callCommand("instant","version").done(function(i){var o=u.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?o=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?o=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?o=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(o=INNORIX_MAC_VERSION),t(n.string.versionCompare(i.value,o)>=0,e)}).fail(function(){t(null,e)})},checkVersionNoHandle:function(t,e){return this.callCommandNoHandle("instant","version").done(function(i){var o=u.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?o=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?o=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?o=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(o=INNORIX_MAC_VERSION),t(n.string.versionCompare(i.value,o)>=0,e)}).fail(function(){t(null,e)})},checkAgentInstalledNoHandle:function(t,e){return this.callCommandNoHandle("instant","version").done(function(i){u.ENV.TRAY_VERSION;"Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&INNORIX_MAC_VERSION,t(!0,e)}).fail(function(){t(null,e)})},checkVersionFallback:function(t,e){var i=a.base("version",{});this.callCommandFallback(i,"webpage",t)},checkTrayVersion:function(t){return this.callCommand("base","trayVersion").done(t||e.noop)},checkTrayVersionFallback:function(t){var e=a.base("trayVersion",{});this.callCommandFallback(e,"webpage",t)},getFileExists:function(t){var i=!1,n=u.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(n=u.ENV.AGENT_HTTPS_URL);var o={action:"existPath",path:t};if("undefined"!=typeof FormData){var r=new FormData;r.append("_action","existPath"),r.append("_param",JSON.stringify(o));var s={url:n+"/webpage",method:"POST",async:!1,processData:!1,contentType:!1,dataType:"text",timeout:3e3,data:r};e.ajax(s).done(function(t){"true"==t&&(i=!0)})}return i},checkImageFile:function(t){var i=!1,n=u.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(n=u.ENV.AGENT_HTTPS_URL);var o={action:"checkImageFile",path:t};if("undefined"!=typeof FormData){var r=new FormData;r.append("_action","checkImageFile"),r.append("_param",JSON.stringify(o));var s={url:n+"/webpage",method:"POST",async:!1,processData:!1,contentType:!1,dataType:"text",timeout:3e3,data:r};e.ajax(s).done(function(t){"true"==t&&(i=!0)})}return i},getDownloadPath:function(t){return this.callCommand("retry","getDownloadPath").done(t||e.noop)},getDownloadPathFallback:function(t){var e=a.retry("getDownloadPath",{});this.callCommandFallback(e,"webpage",t)},getFolderPath:function(t,i){return this.callCommand("comet","selectFolderDialog",{id:t.id}).done(i||e.noop)},getFolderPathFallback:function(t,e){var i=a.comet("selectFolderDialog",{id:t.id});this.callCommandFallback(i,"webpage",e)},messageCount:function(t){return this.callCommand("retry","messageCount",{messageCount:t})},upload:function(t,i,o,r){if(null!=o.incompleteTransfer&&(r=!0,o.incompleteTransfer=null),1==o.resumeCondition&&(r=!0),1!=o.isSliceTransfer)for(var s in i)i.hasOwnProperty(s)&&(i[s].uniqueFileName="");var a=o.sliceSize;0!=o.uploadSliceSize&&(a=o.uploadSliceSize);var l=o.sessionCount;0!=o.uploadSessionCount&&(l=o.uploadSessionCount);var h=o.resumeType;""!=o.resumeUploadType&&(h=o.resumeUploadType);var d=o.uploadUrl;e.isArray(o.uploadUrl)&&(d=JSON.stringify(o.uploadUrl));var p=o.maxMassFileListCount<i.length,f=0;p&&(f=this.controlBox.getTotalSize());var g=null,m=null;if(this.controlBox.list_thumbnail_agent.length>0)for(var v in this.controlBox.list_thumbnail_agent)if(this.controlBox.list_thumbnail_agent.hasOwnProperty(v)){m||(m=[]);var _=this.controlBox.list_thumbnail_agent[v],x=[];if(isNaN(parseInt(_.index)))for(var s=0;s<i.length;s++)x.push(s);else x.push(parseInt(_.index));m.push({width:_.width,height:_.height,baseLine:_.baseline,index:x})}if(this.controlBox.list_watermark_agent.length>0)for(var v in this.controlBox.list_watermark_agent)if(this.controlBox.list_watermark_agent.hasOwnProperty(v)){g||(g={});var y=this.controlBox.list_watermark_agent[v],b=[];if(isNaN(parseInt(y.index)))for(var s=0;s<i.length;s++)b.push(s);else b.push(parseInt(y.index));var w=y.position.split("|"),S="",C="";1==w.length?["LEFT","RIGHT","CENTER"].indexOf(w[0])>-1?(S="CENTER",C=w[0]):(S=w[0],C="CENTER"):["LEFT","RIGHT","CENTER"].indexOf(w[0])>-1?(S=w[1],C=w[0]):(S=w[0],C=w[1]),g={url:y.markImgUrl,position_x:C,position_y:S,index:b}}return this.controlBox.cleanAgentImageCommand(),this.callCommand("transfer","upload",{transferID:t,transferServer:d,files:i||[],cookie:o.cookie,postData:o.postData,retryCount:o.retryCount,retryDelay:o.retryDelay,resume:!!r,limitRate:o.limitRate>0?o.limitRate:null,useCrypt:!!o.useCrypt,encryptMetaData:o.encryptMetaData,monitorServer:o.monitorServer,domain:n.url.getCurrentPage(),userid:o.userid,UserPart:o.UserPart,custom:e.extend({webpage:!0},o.custom||{}),isHighSpeed:o.isHighSpeed,useProxy:o.useProxy,timeout:o.timeout,resumeType:h,isSliceTransfer:o.isSliceTransfer,isPresignedUrl:o.isPresignedUrl,skipErrorFile:o.skipErrorFile,showTransferFileStatus:o.showTransferFileStatus,virtualTransfer:o.virtualTransfer,isSpeedCheck:!!o.isSpeedCheck,useSmoothGraph:o.useSmoothGraph,charset:o.charset,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,advanced:{security:o.security,integrity:o.integrity},license:u.ENV.LICENSE,mode:o.transferMode,sliceSize:a,sessionCount:l,mrtVersion2:o.mrtVersion2,multipartMrt:o.multipartMrt,useDb:o.useDb,massFileTransfer:p,totalFileSize:f,uploadCompletedEvent:o.uploadCompletedEvent,
|
|
resource:c.resourceGetter("total"),thumbnail:m,watermark:g})},uploadFallback:function(t,i,o,r,s){if(null!=o.incompleteTransfer&&(r=!0,o.incompleteTransfer=null),1==o.resumeCondition&&(r=!0),1!=o.isSliceTransfer)for(var l in i)i.hasOwnProperty(l)&&(i[l].uniqueFileName="");var h=o.sliceSize;0!=o.uploadSliceSize&&(h=o.uploadSliceSize);var d=o.sessionCount;0!=o.uploadSessionCount&&(d=o.uploadSessionCount);var p=o.resumeType;""!=o.resumeUploadType&&(p=o.resumeUploadType);var f=o.uploadUrl;e.isArray(o.uploadUrl)&&(f=JSON.stringify(o.uploadUrl));var g=o.maxMassFileListCount<i.length,m=0;g&&(m=this.controlBox.getTotalSize());var v=a.transfer("upload",{transferID:t,transferServer:f,files:i||[],cookie:o.cookie,postData:o.postData,retryCount:o.retryCount,retryDelay:o.retryDelay,resume:!!r,limitRate:o.limitRate>0?o.limitRate:null,useCrypt:!!o.useCrypt,encryptMetaData:o.encryptMetaData,monitorServer:o.monitorServer,domain:n.url.getCurrentPage(),userid:o.userid,UserPart:o.UserPart,custom:e.extend({webpage:!0},o.custom||{}),isHighSpeed:o.isHighSpeed,isSliceTransfer:o.isSliceTransfer,isPresignedUrl:o.isPresignedUrl,useProxy:o.useProxy,timeout:o.timeout,resumeType:p,skipErrorFile:o.skipErrorFile,showTransferFileStatus:o.showTransferFileStatus,virtualTransfer:o.virtualTransfer,isSpeedCheck:!!o.isSpeedCheck,useSmoothGraph:o.useSmoothGraph,charset:o.charset,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,advanced:{security:o.security,integrity:o.integrity},license:u.ENV.LICENSE,mode:o.transferMode,sliceSize:h,sessionCount:d,mrtVersion2:o.mrtVersion2,multipartMrt:o.multipartMrt,useDb:o.useDb,massFileTransfer:g,totalFileSize:m,uploadCompletedEvent:o.uploadCompletedEvent,resource:c.resourceGetter("total")});this.callCommandFallback(v,"webpage",s)},uploadState:function(t){return this.callCommand("retry","uploadState",{transferID:t})},uploadStateFallback:function(t,e){var i=a.retry("uploadState",{transferID:t});this.callCommandFallback(i,"webpage",e)},uploadCancel:function(t){return this.callCommand("base","uploadCancel",{transferID:t})},uploadCancelFallback:function(t,e){var i=a.base("uploadCancel",{transferID:t});this.callCommandFallback(i,"webpage",e)},download:function(t,i,o,r){var s=!1,a=o.sliceSize,l=i[0];l.isCrypt&&(s=l.isCrypt),l.sliceSize&&(a=l.sliceSize),0!=o.downloadSliceSize&&(a=o.downloadSliceSize);var h=JSON.parse(JSON.stringify(i));for(var d in h)h.hasOwnProperty(d)&&(h[d].fixedFileSize&&(h[d].fileSize=h[d].fixedFileSize),1==o.folderIntact&&(h[d].printFileName=h[d].printFileName,h[d].subFolder=h[d].rootName));var p=o.sessionCount;0!=o.downloadSessionCount&&(p=o.downloadSessionCount);var f=o.resumeType;""!=o.resumeDownloadType&&(f=o.resumeDownloadType);var g=o.maxMassFileListCount<i.length,m=0;return g&&(m=this.controlBox.getTotalSize()),this.callCommand("transfer","download",{transferID:t,downloadPath:o.downloadPath,files:h,cookie:o.cookie,retryCount:o.retryCount,retryDelay:o.retryDelay,isStream:o.isStream,resume:!!r,limitRate:o.limitRate>0?o.limitRate:null,useCrypt:s,monitorServer:o.monitorServer,viaUrl:o.viaUrl,domain:n.url.getCurrentPage(),userid:o.userid,UserPart:o.UserPart,custom:e.extend({webpage:!0},o.custom||{}),isHighSpeed:o.isHighSpeed,isSliceTransfer:o.isSliceTransfer,isPresignedUrl:o.isPresignedUrl,useProxy:o.useProxy,timeout:o.timeout,useDownloadAction:o.useDownloadAction,useOpenFolder:o.useOpenFolder,useExecute:o.useExecute,skipErrorFile:o.skipErrorFile,showTransferFileStatus:o.showTransferFileStatus,virtualTransfer:o.virtualTransfer,isSpeedCheck:!!o.isSpeedCheck,serverInfoUrl:o.downloadServerInfoUrl,postData:o.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,downloadIntegrity:o.downloadIntegrity,downloadIntegrityFile:o.downloadIntegrityFile,advanced:{security:o.security,integrity:o.integrity},"target-action":f,resumeType:f,license:u.ENV.LICENSE,mode:o.transferMode,sliceSize:a,sessionCount:p,mrtVersion2:o.mrtVersion2,multipartMrt:o.multipartMrt,useDb:o.useDb,massFileTransfer:g,totalFileSize:m,downloadCompletedEvent:o.downloadCompletedEvent,resource:c.resourceGetter("total")})},downloadFallback:function(t,i,o,r,s){var l=!1,h=o.sliceSize,d=i[0];d.isCrypt&&(l=d.isCrypt),d.sliceSize&&(h=d.sliceSize),0!=o.downloadSliceSize&&(h=o.downloadSliceSize);var p=JSON.parse(JSON.stringify(i));for(var f in p)p.hasOwnProperty(f)&&(p[f].fixedFileSize&&(p[f].fileSize=p[f].fixedFileSize),1==o.folderIntact&&(p[f].printFileName=p[f].printFileName,p[f].subFolder=p[f].rootName));var g=o.sessionCount;0!=o.downloadSessionCount&&(g=o.downloadSessionCount);var m=o.resumeType;""!=o.resumeDownloadType&&(m=o.resumeDownloadType);var v=o.maxMassFileListCount<i.length,_=0;v&&(_=this.controlBox.getTotalSize());var x=a.transfer("download",{transferID:t,downloadPath:o.downloadPath,files:p,cookie:o.cookie,retryCount:o.retryCount,retryDelay:o.retryDelay,isStream:o.isStream,resume:!!r,limitRate:o.limitRate>0?o.limitRate:null,useCrypt:l,monitorServer:o.monitorServer,viaUrl:o.viaUrl,domain:n.url.getCurrentPage(),userid:o.userid,UserPart:o.UserPart,custom:e.extend({webpage:!0},o.custom||{}),isHighSpeed:o.isHighSpeed,isSliceTransfer:o.isSliceTransfer,isPresignedUrl:o.isPresignedUrl,useProxy:o.useProxy,timeout:o.timeout,useDownloadAction:o.useDownloadAction,useOpenFolder:o.useOpenFolder,useExecute:o.useExecute,skipErrorFile:o.skipErrorFile,showTransferFileStatus:o.showTransferFileStatus,virtualTransfer:o.virtualTransfer,isSpeedCheck:!!o.isSpeedCheck,serverInfoUrl:o.downloadServerInfoUrl,postData:o.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,downloadIntegrity:o.downloadIntegrity,downloadIntegrityFile:o.downloadIntegrityFile,advanced:{security:o.security,integrity:o.integrity},"target-action":m,resumeType:m,license:u.ENV.LICENSE,mode:o.transferMode,sliceSize:h,sessionCount:g,mrtVersion2:o.mrtVersion2,multipartMrt:o.multipartMrt,useDb:o.useDb,massFileTransfer:v,totalFileSize:_,downloadCompletedEvent:o.downloadCompletedEvent,resource:c.resourceGetter("total")});this.callCommandFallback(x,"webpage",s)},downloadState:function(t){return this.callCommand("retry","downloadState",{transferID:t})},downloadStateFallback:function(t,e){var i=a.retry("downloadState",{transferID:t});this.callCommandFallback(i,"webpage",e)},downloadCancel:function(t){return this.callCommand("retry","downloadCancel",{transferID:t})},downloadCancelFallback:function(t,e){var i=a.retry("downloadCancel",{transferID:t});this.callCommandFallback(i,"webpage",e)},immediateOpen:function(t,i,o,r){var s=!1,a=o.sliceSize,l=i[0];l.isCrypt&&(s=l.isCrypt),l.sliceSize&&(a=l.sliceSize),0!=o.downloadSliceSize&&(a=o.downloadSliceSize);var h=JSON.parse(JSON.stringify(i));for(var d in h)h.hasOwnProperty(d)&&(h[d].fixedFileSize&&(h[d].fileSize=h[d].fixedFileSize),1==o.folderIntact&&(h[d].printFileName=h[d].printFileName,h[d].subFolder=h[d].rootName));var p=o.sessionCount;return 0!=o.downloadSessionCount&&(p=o.downloadSessionCount),this.callCommand("base","immediateOpen",{transferID:t,files:h,cookie:o.cookie,retryCount:o.retryCount,retryDelay:o.retryDelay,isStream:o.isStream,resume:!!r,limitRate:o.limitRate>0?o.limitRate:null,monitorServer:o.monitorServer,userid:o.userid,UserPart:o.UserPart,custom:e.extend({webpage:!0},o.custom||{}),isHighSpeed:o.isHighSpeed,useProxy:o.useProxy,timeout:o.timeout,useDownloadAction:o.useDownloadAction,skipErrorFile:o.skipErrorFile,showTransferFileStatus:o.showTransferFileStatus,serverInfoUrl:o.downloadServerInfoUrl,postData:o.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,domain:n.url.getLocationOrigin(),license:u.ENV.LICENSE,mode:o.transferMode,sliceSize:a,sessionCount:p,resource:c.resourceGetter("total"),useCrypt:s,downloadIntegrity:o.downloadIntegrity,downloadIntegrityFile:o.downloadIntegrityFile,isSliceTransfer:o.isSliceTransfer,isPresignedUrl:o.isPresignedUrl,mrtVersion2:o.mrtVersion2,multipartMrt:o.multipartMrt,useDb:o.useDb})},immediateOpenFallback:function(t,i,o,r,s){var l=!1,h=o.sliceSize,d=i[0];d.isCrypt&&(l=d.isCrypt),d.sliceSize&&(h=d.sliceSize),0!=o.downloadSliceSize&&(h=o.downloadSliceSize);var p=JSON.parse(JSON.stringify(i));for(var f in p)p.hasOwnProperty(f)&&(p[f].fixedFileSize&&(p[f].fileSize=p[f].fixedFileSize),1==o.folderIntact&&(p[f].printFileName=p[f].printFileName,p[f].subFolder=p[f].rootName));var g=o.sessionCount;0!=o.downloadSessionCount&&(g=o.downloadSessionCount);var m=a.base("immediateOpen",{transferID:t,files:i,cookie:o.cookie,retryCount:o.retryCount,retryDelay:o.retryDelay,isStream:o.isStream,resume:!!r,limitRate:o.limitRate>0?o.limitRate:null,monitorServer:o.monitorServer,userid:o.userid,UserPart:o.UserPart,custom:e.extend({webpage:!0},o.custom||{}),isHighSpeed:o.isHighSpeed,useProxy:o.useProxy,timeout:o.timeout,useDownloadAction:o.useDownloadAction,skipErrorFile:o.skipErrorFile,showTransferFileStatus:o.showTransferFileStatus,serverInfoUrl:o.downloadServerInfoUrl,postData:o.postData,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null,domain:n.url.getLocationOrigin(),license:u.ENV.LICENSE,useCrypt:l,downloadIntegrity:o.downloadIntegrity,downloadIntegrityFile:o.downloadIntegrityFile,mode:o.transferMode,sliceSize:h,sessionCount:g,isSliceTransfer:o.isSliceTransfer,isPresignedUrl:o.isPresignedUrl,mrtVersion2:o.mrtVersion2,multipartMrt:o.multipartMrt,useDb:o.useDb,resource:c.resourceGetter("total")});this.callCommandFallback(m,"webpage",s)},openDownloadFolder:function(t,i){var o=u.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(o=u.ENV.AGENT_HTTPS_URL);var r={action:"openFolder",folderPath:i.downloadPath};if("undefined"==typeof FormData){var s=n.string.cryptoRandom().toString().substr(2),a="-----------------------------"+s+"\r\n";a+='Content-Disposition: form-data; name="_action"\r\n\r\n',a+="openFolder\r\n",a+="-----------------------------"+s+"\r\n",a+='Content-Disposition: form-data; name="_param"\r\n\r\n',a+=JSON.stringify(r)+"\r\n",a+="-----------------------------"+s+"--\r\n";var l=new XDomainRequest;l.onload=function(){t(e.parseJSON(l.responseText))},l.ontimeout=function(){},l.onprogress=function(){},l.open("POST",o+"/webpage"),l.send(a)}else{var h=new FormData;h.append("_action","openFolder"),h.append("_param",JSON.stringify(r));var i={url:o+"/webpage",method:"POST",processData:!1,contentType:!1,dataType:"json",data:h,success:t};e.ajax(i)}},uploadSpeedCheck:function(t,i,o,r,s,a,l){var h=u.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(h=u.ENV.AGENT_HTTPS_URL);var c=t;e.isArray(t)&&(c=JSON.stringify(t));var d={action:"uploadSpeedCheck",url:c,useProxy:r,isSave:void 0!==s&&s,discount:void 0!==a?a:0,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null};if(0!=i&&(d.sessionCount=i),0!=o&&(d.speedCheckTime=o),"undefined"==typeof FormData){var p=n.string.cryptoRandom().toString().substr(2),f="-----------------------------"+p+"\r\n";f+='Content-Disposition: form-data; name="_action"\r\n\r\n',f+="uploadSpeedCheck\r\n",f+="-----------------------------"+p+"\r\n",f+='Content-Disposition: form-data; name="_param"\r\n\r\n',f+=JSON.stringify(d)+"\r\n",f+="-----------------------------"+p+"--\r\n";var g=new XDomainRequest;g.onload=function(){l(e.parseJSON(g.responseText))},g.ontimeout=function(){},g.onprogress=function(){},g.open("POST",h+"/speedcheck"),g.send(f)}else{var m=new FormData;m.append("_action","uploadSpeedCheck"),m.append("_param",JSON.stringify(d));var v={url:h+"/speedcheck",method:"POST",processData:!1,contentType:!1,dataType:"json",data:m,success:l};e.ajax(v)}},downloadSpeedCheck:function(t,i,n,o,r,s,a,l,h){var c=u.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(c=u.ENV.AGENT_HTTPS_URL);var d=t;e.isArray(t)&&(d=JSON.stringify(t));var p={action:"downloadSpeedCheck",url:d,fileSize:i,useProxy:s,isStream:r,isSave:void 0!==a&&a,discount:void 0!==l?l:0,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null};0!=n&&(p.sessionCount=n),0!=o&&(p.speedCheckTime=o);var f=new FormData;f.append("_action","downloadSpeedCheck"),f.append("_param",JSON.stringify(p));var g={url:c+"/speedcheck",method:"POST",processData:!1,contentType:!1,dataType:"json",data:f,success:h};e.ajax(g)},downloadSpeedCheckFallback:function(t,i,o,r,s,a,l,h,c){var d=u.ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(d=u.ENV.AGENT_HTTPS_URL);var p=t;e.isArray(t)&&(p=JSON.stringify(t));var f={action:"downloadSpeedCheck",url:p,fileSize:i,useProxy:a,isStream:s,isSave:void 0!==l&&l,discount:void 0!==h?h:0,whiteList:"undefined"!=typeof WHITELIST?WHITELIST:null};0!=o&&(f.sessionCount=o),0!=r&&(f.speedCheckTime=r);var g=n.string.cryptoRandom().toString().substr(2),m="-----------------------------"+g+"\r\n";m+='Content-Disposition: form-data; name="_action"\r\n\r\n',m+="downloadSpeedCheck\r\n",m+="-----------------------------"+g+"\r\n",m+='Content-Disposition: form-data; name="_param"\r\n\r\n',m+=JSON.stringify(f)+"\r\n",m+="-----------------------------"+g+"--\r\n";var v=new XDomainRequest;v.onload=function(){c(e.parseJSON(v.responseText))},v.ontimeout=function(){},v.onprogress=function(){},v.open("POST",d+"/speedcheck"),v.send(m)},downloadPause:function(t){return this.callCommand("base","downloadPause",{transferID:t})},downloadPauseFallback:function(t,e){var i=a.base("downloadPause",{transferID:t});this.callCommandFallback(i,"webpage",e)},uploadPause:function(t){return this.callCommand("base","uploadPause",{transferID:t})},uploadPauseFallback:function(t,e){var i=a.base("uploadPause",{transferID:t});this.callCommandFallback(i,"webpage",e)},getIncompleteTransfer:function(t,i){return this.callCommand("base","getResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:i}).done(t||e.noop)},getIncompleteTransferFallback:function(t,e){var i=a.base("getResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:e});this.callCommandFallback(i,"webpage",t)},deleteIncompleteTransfer:function(t,i){return this.callCommand("base","removeResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:i}).done(t||e.noop)},deleteIncompleteTransferFallback:function(t,e){var i=a.base("removeResumeListInfo",{domain:n.url.getCurrentPage(),isUpload:e});this.callCommandFallback(i,"webpage",t)},execute:function(t){if(t.hasOwnProperty("filePath"))return this.callCommand("base","execute",{path:t.filePath,license:u.ENV.LICENSE})},executeFallback:function(t,e){if(t.hasOwnProperty("filePath")){var i=a.base("execute",{path:t.filePath,license:u.ENV.LICENSE});this.callCommandFallback(i,"webpage",e)}},deferredCallback:function(t,e){var i=e.action,o=e.clientDefer.state(),r="";if(this.option&&(this.option.isMobile?(r=this.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=this.option.installUrlMobile.indexOf("redirect")&&(r=this.option.installUrlMobile)):(r=this.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=this.option.installUrl.indexOf("redirect")&&(r=this.option.installUrl))),!this.controlBox)return!1;if(e.param&&e.param.notifyReady&&(this.controlBox.notifyReadyEvent=!0,this.controlBox.compareTrayVersion()),"freeze"==this.controlBox.state)return!1;if("ready"!=this.controlBox.state&&"rejected"==o){if(this.controlBox.state="freeze",0==this.controlBox.getInstallCheck())if(this.option.installPopupWindow){var s=n.generatePopupButton(r,"Install Page",this.option.installPopupWindowHeight,this.option.installPopupWindowWidth);0==s&&this.controlBox.emit(u.EVENT.POPUP_BLOCKED)}else window.location.href=r;return!1}if(this.ajaxStatus.state=null,"rejected"==o||"pending"==o)if("upload"!=i&&"uploadState"!=i&&"download"!=i&&"downloadState"!=i){if(this.ajaxStatus.retry>=3){if(this.controlBox.state="freeze",this.option.autoHtmlMode)return!1;if(this.option.installPopupWindow){var s=n.generatePopupButton(r,"Install Page",this.option.installPopupWindowHeight,this.option.installPopupWindowWidth);0==s&&this.controlBox.emit(u.EVENT.POPUP_BLOCKED)}else window.location.href=r;return!1}0==this.ajaxStatus.alert&&(this.ajaxStatus.alert=!0),this.ajaxStatus.retry++}else{if(this.ajaxStatus.retry>=50){if(this.controlBox.state="freeze",this.option.installPopupWindow){var s=n.generatePopupButton(r,"Install Page",this.option.installPopupWindowHeight,this.option.installPopupWindowWidth);0==s&&this.controlBox.emit(u.EVENT.POPUP_BLOCKED)}else window.location.href=r;return!1}"uploadState"!=i&&"downloadState"!=i||this.ajaxStatus.retry++}else this.ajaxStatus.alert=!1,this.ajaxStatus.retry=0},licenseNotValidate:function(t){1==t?alert(c("license.unauth")):2==t?alert(c("license.end")):3==t?alert(c("license.mode.invalid")):alert(c("license.invalid"))}})}),innorix("Agent/Client",function(t){"use strict";var e=t("innoJquery"),i={method:"POST",processData:!1,contentType:!1,dataType:"json"},n={method:"POST",processData:!1,contentType:!1,async:!1,dataType:"json"};return t("klass")({constructor:function(t){this.url=t?this.makeUrl(t):null},isConnect:function(){return!!this.url},setBaseUrl:function(t){return this.url=this.makeUrl(t),this},getUrl:function(t){return this.url},makeUrl:function(t){return t+"/webpage"},send:function(t,i){var n=e.Deferred();return t.setClientDeferred(n),this.request(t,i),n},sendPending:function(t,i){var n=e.Deferred();return t.setClientDeferred(n),this.requestPending(t,i),n},request:function(t,e){var i=this.makeAjaxParam(t.action,t.getAjaxParam()),n=this.makeAjaxOption(t.getAjaxOption(),i);t.handle(this.requestGenerator(t.getClientDeferred(),n),e)},requestPending:function(t,e){var i=this.makeAjaxParam(t.action,t.getAjaxParam()),n=this.makeAjaxOptionPending(t.getAjaxOption(),i);t.handle(this.requestGenerator(t.getClientDeferred(),n),e)},makeAjaxOption:function(t,n){return e.extend({url:this.url,data:n},i,t||{})},makeAjaxOptionPending:function(t,i){return e.extend({url:this.url,data:i},n,t||{})},makeAjaxParam:function(t,e){var i=new FormData;return i.append("_action",t),i.append("_param",JSON.stringify(e)),i},requestGenerator:function(t,i){return function(){return e.ajax(i)}}})}),innorix("Agent/Command",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util");return i({constructor:function(t,e,i){this.action=t,this.param=e||{},this.uuid=n.string.generateUUID(),this.handler=null,this.clientDefer=null,this.ajaxOption=i||{}},setHandler:function(t){return this.handler=t,this},setClientDeferred:function(t){return this.clientDefer=t,this},getClientDeferred:function(){if(!this.clientDefer)throw'not exists client deferred. :"'+this.action+'"';return this.clientDefer},handle:function(t,e){return this.handler.handle(this.clientDefer,t,this,e)},getAjaxOption:function(){var t=this.ajaxOption;return this.handler&&this.handler.getAjaxOption&&e.extend(t,this.handler.getAjaxOption()),t},getAjaxParam:function(){var t={action:this.action,uuid:this.uuid};return this.handler&&this.handler.getAjaxParam&&e.extend(t,this.handler.getAjaxParam(),this.param),t}})}),innorix("Agent/CommandFactory",function(t){"use strict";var e=t("Agent/Command"),i=t("Agent/CommandHandler/Base"),n=t("Agent/CommandHandler/Transfer"),o=t("Agent/CommandHandler/Comet"),r=t("Agent/CommandHandler/Retry"),s=t("Agent/CommandHandler/Instant");return{base:function(t,n){var o=new e(t,n);return o.setHandler(new i),o},transfer:function(t,i){var o=new e(t,i);return o.setHandler(new n),o},comet:function(t,i){var n=new e(t,i);return n.setHandler(new o),n},retry:function(t,i){var n=new e(t,i);return n.setHandler(new r),n},instant:function(t,i){var n=new e(t,i);return n.setHandler(new s),n},connect:function(t){var n=new e("version",null,{url:t});return n.setHandler(new i),n}}}),innorix("Agent/ConnectFinder",function(t){"use strict";var e=t("innoJquery"),i=t("util"),n=t("klass"),o=t("Agent/CommandFactory");return n({constructor:function(t){this.client=t,this.foundBaseUrl=i.cookie.get("__irx-connected-url__")||null},setClient:function(t){this.client=t},find:function(t){var n=e.Deferred(),o=this,r=function(t){i.cookie.set("__irx-connected-url__",t),o.foundBaseUrl=t,n.resolve(o.foundBaseUrl)};return this.foundBaseUrl?this.connect(this.foundBaseUrl).then(null,function(){return o.findUrlByPorts(t).fail(function(){n.reject()})}).done(r):this.findUrlByPorts(t).done(r).fail(function(){n.reject()}),n},findUrlByPorts:function(t){var n=e.Deferred(),o=this,r=[];return e.each(t,function(t,e){r.push(o.connect(o.makeBaseUrl(e,!1))),r.push(o.connect(o.makeBaseUrl(e,!0)))}),i.promise.race(r).done(function(t){n.resolve(t)}).fail(function(){n.reject()}),n},makeBaseUrl:function(t,e){return(e?"https":"http")+"://127.0.0.1:"+t},connect:function(t){var i=this.client,n=o.connect(i.makeUrl(t)),r=e.Deferred();return i.send(n).done(function(e){e.value?r.resolve(t):r.reject()}).fail(function(){r.reject()}),r}})}),innorix("AgentUpdater/Agent",function(t){"use strict";var e=t("klass"),i=t("util"),n=t("Agent/Agent"),o=t("AgentUpdater/Client"),r=t("CONSTANT/ENV");return e([n],{constructor:function(t){n.call(this,t),this.client=new o(t),this.connectFinder.setClient(this.client)},update:function(t,e){return this.callCommand("base","update",{version:r.TRAY_VERSION,transferID:i.string.generateUUID(),downloadUrl:t,printFileName:i.string.getFileName(t),transferType:"download",isStream:e||!1,resume:!1,domain:i.url.getLocationOrigin()})},updateExecute:function(){return this.callCommand("base","updateExecute",{version:r.TRAY_VERSION,transferID:i.string.generateUUID()})}})}),innorix("AgentUpdater/AgentUpdater",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("AgentUpdater/Agent"),o=t("Klass/Event"),r=t("AgentUpdater/View/MessageBox"),s=t("singleton/agent"),a=t("CONSTANT/EVENT"),l=t("CONSTANT/UPDATE_STATE");return i([o],{constructor:function(t){o.call(this),this.agent=new n(t),this.messageBox=new r(this),this.on(a.UPDATE_PATCH_EXECUTE,e.proxy(this.onPatchExecute,this))},setAgentBaseUrl:function(t){this.agent.setBaseUrl(t)},patchDownloadOrExecute:function(t,e){var i=this;return this.agent.update(t,e).done(function(t){t.isDownload===l.ALREADY_FILE&&i.agent.updateExecute().done(function(){i.emit(a.UPDATE_PATCH_EXECUTE)})})},onPatchExecute:function(){var t=this,e=setInterval(function(){s.checkVersion(function(i){null!==i&&(t.emit(a.UPDATE_PATCH_COMPLETE),clearInterval(e))})},3e3)}})}),innorix("AgentUpdater/Client",function(t){"use strict";return t("klass")([t("Agent/Client")],{makeUrl:function(t){return t+"/update"}})}),innorix("ControlBox/cachedOption",function(){"use strict";return{setOption:function(t){this.option=t},getOption:function(){return this.option}}}),innorix("ControlBox/ControlBox",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("i18n/lang"),r=t("singleton/agent"),s=t("singleton/html"),a=t("singleton/transferManager"),l=t("Klass/Event"),h=t("ControlBox/FileValidator"),c=t("ControlBox/FileList"),u=t("CONSTANT/ENV"),d={ENV:t("CONSTANT/ENV"),EVENT:t("CONSTANT/EVENT")},p=t("server"),f={base:t("ControlBox/Skin/Base/View"),input:t("ControlBox/Skin/Input/View"),tester:t("ControlBox/Skin/Basic/View"),compact:t("ControlBox/Skin/Compact/View"),basic:t("ControlBox/Skin/Basic/View")},g=t("CONSTANT/EVENT"),m=t("ControlBox/defaultOption"),v=t("ControlBox/cachedOption"),_=(t("Agent/CommandFactory"),{additionalProcess:!1,_defers:[],await:function(t){var i=this._defers.slice(0);return e.when.apply(null,i).done(t)},push:function(t){this._defers.push(t),t.always(function(){_.remove(t)})},remove:function(t){var e=this._defers.indexOf(t);-1!==e&&this._defers.splice(e,1)}});return i([l],{constructor:function(t){if(this.list_thumbnail_agent=[],this.list_watermark_agent=[],!t.url&&t.monitorServer){var i=t.monitorServer.split("://"),n=i[0],o=i[1].split("/")[0];t.url=n+"://"+o}t.iframeNestedView&&(t.iframeView=!1);var a=this;this.cloneTransferWindow=null,this.notifyReadyEvent=!1,"undefined"!=typeof inno_api_key&&""!=inno_api_key&&(t.key=inno_api_key,t.platformDepend=!1),"undefined"!=typeof inno_platform_user&&""!=inno_platform_user&&(t.custom?t.custom.inno_platform_user=inno_platform_user:t.custom={inno_platform_user:inno_platform_user}),"undefined"!=typeof inno_platform_groupId&&""!=inno_platform_groupId&&(t.custom?t.custom.groupId=inno_platform_groupId:t.custom={groupId:inno_platform_groupId}),"undefined"!=typeof inno_url&&""!=inno_url&&(t.url=inno_url),"undefined"!=typeof inno_monitorServer&&""!=inno_monitorServer&&(t.monitorServer=inno_monitorServer),l.call(this),m.custom=t.custom,this.option=e.extend(!0,{},m,t),this.disabledState=!1;var u=this.getBrowserCookie("forceHtml5Mode");0!=u.length&&("undefined"==typeof FormData?(t.agent=!0,this.option.agent=!0):"true"==u&&(t.agent=!1,this.option.agent=!1,"undefined"==typeof FormData&&(t.agent=!0,this.option.agent=!0))),this.option.agent||(this.option.showQrCode=!1),this.option.isMobile?this.option.enableMobileAgent||(t.agent=!1,this.option.agent=!1):window.navigator.userAgent.indexOf("ARM")>-1?(t.agent=!1,this.option.agent=!1):-1!=window.navigator.platform.indexOf("Win")||-1!=window.navigator.platform.indexOf("Mac")||-1!=window.navigator.platform.indexOf("Linux")||(t.agent=!1,this.option.agent=!1),p.use(t),v.setOption(this.option),this.fileList=new c,this.fileValidator=new h(this,this.option),this.connection={},f.hasOwnProperty(this.option.skin)?this.Skin=f[this.option.skin]:this.Skin=f.base,this.view=new this.Skin(this.option.$el,this),this.state="wait",this.installCheck=!1,this.loadingState="",this.fileloadingState="",this.module=r,this.transferMode=this.option.transferMode,r.setOption(this.option),r.setControlBox(this),this._init(),t.iframeView,0==t.agent?(this.module=s,this.state="ready",setTimeout(function(){a.emit(g.CONTROL_LOAD_COMPLETE),a.option.skipAgentCheck||(a.option.installCheckDelay?setTimeout(function(){a._initConnectionProperty()},1e3*a.option.installCheckDelay):a._initConnectionProperty())},100)):t.skipAgentCheck?(this.state="ready",setTimeout(function(){a.emit(g.CONTROL_LOAD_COMPLETE),a.option.skipAgentCheck||(a.option.installCheckDelay?setTimeout(function(){a._initConnectionProperty()},1e3*a.option.installCheckDelay):a._initConnectionProperty())},100)):this.option.installCheckDelay?setTimeout(function(){a.compareVersion()},1e3*a.option.installCheckDelay+1e3):a.compareVersion()},compareTrayVersion:function(){var t=this;this.option.isMobile,t.state="ready",1==t.installCheck?t.emit(g.AGENT_READY):1==t.notifyReadyEvent&&t.emit(g.AGENT_READY),t.emit(g.CONTROL_LOAD_COMPLETE),t.option.skipAgentCheck||(t.option.installCheckDelay?setTimeout(function(){t._initConnectionProperty()},1e3*t.option.installCheckDelay):t._initConnectionProperty())},compareVersion:function(){var t=this;"undefined"==typeof FormData?r.checkVersionFallback(function(e){var i=d.ENV.TRAY_VERSION;if("Win32"==navigator.platform&&"undefined"!=typeof INNORIX_WIN_VERSION?i=INNORIX_WIN_VERSION:"Linux x86_64"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?i=INNORIX_LINUX_VERSION:"Linux i686"==navigator.platform&&"undefined"!=typeof INNORIX_LINUX_VERSION?i=INNORIX_LINUX_VERSION:"MacIntel"==navigator.platform&&"undefined"!=typeof INNORIX_MAC_VERSION&&(i=INNORIX_MAC_VERSION),n.string.versionCompare(e.value,i)>=0)t.compareTrayVersion();else if(0==t.installCheck&&1==t.option.autoCheckVersion){var o="";if(t.option.isMobile?(o=t.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=t.option.installUrlMobile.indexOf("redirect")&&(o=t.option.installUrlMobile)):(o=t.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=t.option.installUrl.indexOf("redirect")&&(o=t.option.installUrl)),t.option.installPopupWindow){if(0==t.installCheck){var r=n.generatePopupButton(o,"Install Page",t.option.installPopupWindowHeight,t.option.installPopupWindowWidth);0==r&&0==t.installCheck&&t.emit(d.EVENT.POPUP_BLOCKED)}t.installCheck=!0,t.compareVersion()}else location.href=o}else 1==t.option.autoCheckVersion&&t.compareVersion()}):r.checkVersion(function(e,i){if(null!=e)if(0==e)if(0==t.installCheck&&1==t.option.autoCheckVersion){var o="";if(t.option.isMobile?(o=t.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=t.option.installUrlMobile.indexOf("redirect")&&(o=t.option.installUrlMobile)):(o=t.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=t.option.installUrl.indexOf("redirect")&&(o=t.option.installUrl)),t.option.installPopupWindow){if(0==t.installCheck){var r=n.generatePopupButton(o,"Install Page",t.option.installPopupWindowHeight,t.option.installPopupWindowWidth);0==r&&0==t.installCheck&&t.emit(d.EVENT.POPUP_BLOCKED)}t.installCheck=!0,t.compareVersion()}else location.href=o}else if(1==t.option.autoCheckVersion)t.compareVersion();else{var o="";if(t.option.isMobile?(o=t.option.installUrlMobile+"?redirect="+encodeURIComponent(window.location.href),-1!=t.option.installUrlMobile.indexOf("redirect")&&(o=t.option.installUrlMobile)):(o=t.option.installUrl+"?redirect="+encodeURIComponent(window.location.href),-1!=t.option.installUrl.indexOf("redirect")&&(o=t.option.installUrl)),t.option.installPopupWindow){if(0==t.installCheck){var r=n.generatePopupButton(o,"Install Page",t.option.installPopupWindowHeight,t.option.installPopupWindowWidth);0==r&&0==t.installCheck&&t.emit(d.EVENT.POPUP_BLOCKED)}}else location.href=o}else t.compareTrayVersion()},this)},setOption:function(t){return e.extend(this.option,t),v.setOption(this.option),this._init("refresh"),this},setCookie:function(t){return this.option.cookie=t,v.setOption(this.option),r.setOption(this.option),!0},setResumeType:function(t){return this.option.resumeType=t,v.setOption(this.option),r.setOption(this.option),!0},getCookie:function(){return this.option.cookie},getOption:function(){return this.option},getDownloadPath:function(t){var e=this;if(!this.option.downloadPath&&t)"undefined"==typeof FormData?e.module.getDownloadPathFallback(function(i){e.option.downloadPath=i.path||"",t&&t(i.path)}):e.module.getDownloadPath(function(i){e.option.downloadPath=i.path||"",t&&t(i.path)});else{if(!t)return this.option.downloadPath;t(this.option.downloadPath)}},deleteCookie:function(){return this.option.cookie="",v.setOption(this.option),r.setOption(this.option),!0},setPostData:function(t){return this.option.postData=t,v.setOption(this.option),this._init(),this},setFilePostDataByIndex:function(t,e){return this.fileList.setPostDataByIndex(t,e),!0},setFilePostDataById:function(t,e){return this.fileList.setPostDataById(t,e),!0},setAgentMode:function(t){return 0==t?(this.option.agent=!1,this.module=s):(this.option.agent=!0,this.module=r),v.setOption(this.option),r.setOption(this.option),!0},getAgentMode:function(){return this.option.agent},setVirtualTransfer:function(t){return this.option.virtualTransfer=t,v.setOption(this.option),r.setOption(this.option),!0},setLimitRate:function(t){return this.option.limitRate=t,v.setOption(this.option),r.setOption(this.option),!0},setUploadSessionCount:function(t){return this.option.uploadSessionCount=t,v.setOption(this.option),r.setOption(this.option),!0},setDownloadSessionCount:function(t){return this.option.downloadSessionCount=t,v.setOption(this.option),r.setOption(this.option),!0},getVirtualTransfer:function(){return this.option.virtualTransfer},setDownloadSlice:function(t){return this.option.downloadSliceSize=t,v.setOption(this.option),r.setOption(this.option),!0},getDownloadSlice:function(){return this.option.downloadSliceSize},setUploadSlice:function(t){return this.option.uploadSliceSize=t,v.setOption(this.option),r.setOption(this.option),!0},getUploadSlice:function(){return this.option.uploadSliceSize},setUploadUrl:function(t){return this.option.uploadUrl=t,this.option.uploadUrl=n.url.addOriginIfNot(this.option.uploadUrl),v.setOption(this.option),r.setOption(this.option),!0},getUploadUrl:function(){return this.option.uploadUrl},closeTransferWindow:function(){if(this.option.iframeView){var t;t="parent"==this.option.iframeViewLocation?parent:"top"==this.option.iframeViewLocation?top:parent,t.jQuery(".irx_transferWin_wrapper").hide()}else e(".irx_transferWin_wrapper").hide();a.isActive()&&a.inactive()},_init:function(t){var i=this.option;i.presetDownloadFiles&&(this.presetOptionDownloadFiles(i.presetDownloadFiles),i.presetDownloadFiles=null),
|
|
i.uploadUrl&&(i.uploadUrl=n.url.addOriginIfNot(i.uploadUrl)),i.uploadCompletedEvent&&i.uploadCompletedEvent.url&&(i.uploadCompletedEvent.url=n.url.addOriginIfNot(i.uploadCompletedEvent.url)),i.downloadCompletedEvent&&i.downloadCompletedEvent.url&&(i.downloadCompletedEvent.url=n.url.addOriginIfNot(i.downloadCompletedEvent.url)),i.isStream="stream"===i.downloadType,i.width=i.width||this.view.defaultSize.width,i.height=i.height||this.view.defaultSize.height,this.setSize(i.width,i.height),e(".irx_transferWin_wrapper .irx_custom_title").text(i.progressTitle),t||"download"==i.transferMode&&(this.option.$el.find(".irx_filetree").removeClass("empty-uploader"),this.option.$el.find(".irx_filetree").addClass("empty-downloader"),this.option.$el.find(".irx_filetree").find(".irx-empty-download-text").text(i.emptyDownloadFileText),this.option.$el.find(".irx_filetree").find(".irx-empty-download-text").show()),this.option.transferWindowMode&&(this.option.transferStart={upload:"manual",download:"manual"},this.option.$el.hide()),this.option.transferWindowModeOpen&&(this.option.transferStart={upload:"manual",download:"manual"},this.option.$el.hide());var o=this;i.events&&e.each(i.events,function(t,e){o.hasHandler(t,e)||o.on(t,e)})},addLocalFiles:function(t){if(!this.checkState())return!1;if(0==this.option.agent)return!1;if(this.fileloadingState="","undefined"==typeof FormData){var e=this;return this.module.addLocalFilesFallback(this.option.transferMode,t,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)}),this}var e=this;return this.module.addLocalFiles(this.option.transferMode,t,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)},this.option.$el),this},checkState:function(){return"ready"!=this.state?(alert(o("agent.exception.notReady")),!1):1!=this.getControlDisabledState()},openFileDialogInput:function(t){this.openFileDialog()},openFileDialog:function(t){if(!this.checkState())return!1;if(this.fileloadingState="",this.option.agent,"undefined"==typeof FormData){var e=this;return this.module.openFileDialogFallback(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)}),this}var e=this;return this.module.openFileDialog(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)},this.option.$el),this},openFileDialogSingle:function(t){if(!this.checkState())return!1;if(this.fileloadingState="",this.option.agent,"undefined"==typeof FormData){var e=this;return this.module.openFileDialogSingleFallback(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)}),this}var e=this;return this.module.openFileDialogSingle(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)},this.option.$el),this},openDirectorySelectDialog:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={value:"",result:!1};e(i)}}else"undefined"==typeof FormData?this.module.downloadPathDialogFallback(t,e):this.module.downloadPathDialog(t,e)},execute:function(t){if(!this.checkState())return!1;"undefined"==typeof FormData?this.module.executeFallback(t,function(t){}):this.module.execute(t)},setDownloadPathValue:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={result:!0};e(i)}}else{this.option.downloadPath=t,v.setOption(this.option),r.setOption(this.option)}},setDownloadPath:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={result:!0};e(i)}}else{var n=this;this.setControlDisabledState(!0),a.setDisabledState(!0),"undefined"==typeof FormData?this.module.downloadPathDialogFallback(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),e(t)}):this.module.downloadPathDialog(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),e(t)})}},setTransferDownloadPath:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={result:!0};e(i)}}else{var n=this;this.setControlDisabledState(!0),a.setDisabledState(!0),"undefined"==typeof FormData?this.module.downloadPathDialogFallback(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),a.setManagerDownloadPath(t.value),e(t)}):this.module.downloadPathDialog(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),a.setManagerDownloadPath(t.value),e(t)})}},openFolderDialog:function(){return!!this.checkState()&&(0!=this.option.agent&&void this.directoryDialog())},openDownloadFolder:function(){if(!this.checkState())return!1;if(0==this.option.agent)return!1;var t=this;if(!t.option.downloadPath)return void("undefined"==typeof FormData?t.module.getDownloadPathFallback(function(e){t.option.downloadPath=e.path||"",t.openDownloadFolder()}):t.module.getDownloadPath(function(e){t.option.downloadPath=e.path||"",t.openDownloadFolder()}));this.module.openDownloadFolder(function(t){},this.option)},directoryDialog:function(){if(!this.checkState())return!1;var t=this;return"undefined"==typeof FormData?this.module.directoryDialogFallback(this.option.transferMode,function(e){!1===e.value?t.module.licenseNotValidate(e.error):t._addFiles(e.value)}):this.module.directoryDialog(this.option.transferMode,function(e){!1===e.value?t.module.licenseNotValidate(e.error):t._addFiles(e.value)},this.option.$el),this},getFolderPath:function(t,e){"undefined"==typeof FormData?this.module.getFolderPathFallback({id:t},e):this.module.getFolderPath({id:t},e)},uploadInput:function(t){this.upload()},upload:function(t){var i=this;return!!this.checkState()&&(1==_.additionalProcess?(a.prepareHtmlThumbnailUpload([],i,i.option),a.emit(g.TRANSFER_UPLOAD_THUMBNAIL),_.await(function(){_.additionalProcess=!1,a.emit(g.TRANSFER_UPLOAD_THUMBNAIL_STOP),setTimeout(function(){i._upload(null,!0)},1e3)})):(e(".irx_thumb_prog_wrapper").hide(),e(".irx_thumb_progressBar").parent().hide(),this._upload()),this)},_upload:function(t,i){var r=this;if(!this.checkState())return!1;var s={},l=!0;if(void 0===t||null==t?s=this.fileList.getUploadFiles():(l=!1,s=t),this.qqoInformation)for(var h=0;h<s.length;h++)s[h].mrtInfo={sessionID:this.qqoInformation.sessionID,folderID:this.qqoInformation.folderID,rootName:s[h].rootName};if(0===s.length||null!=s&&"object"==typeof s&&!Object.keys(s).length)return alert(o("controlBox.noFile")),this;if(!this.option.uploadUrl)return console.log(o("controlBox.notSetUploadUrl")),this;if(1==this.option.platformDepend){var c=0;if(l)c=this.getTotalSize();else for(var u=0;u<s.length;u++)(s[u].transferType="upload")&&(c+=s[u].fileSize);1==this.option.cloudPlatformMode?e.ajax({url:p.getBaseUrl()+"/api/webpage/getGroupId",data:{api_key:p.getKey()},method:"get",dataType:"html"}).done(function(t){r.option.custom||(r.option.custom={}),r.option.custom.groupId=t,e.ajax({url:p.getBaseUrl()+"/api/transfer/"+r.option.licenseGroup,data:{api_key:p.getKey(),fileSize:c},method:"get",dataType:"json"}).done(function(t){if(t.result)r.option.custom||(r.option.custom={}),r.connection.currentPosition&&(r.option.custom.clientLatitude=r.connection.currentPosition.latitude,r.option.custom.clientLongitude=r.connection.currentPosition.longitude),r.connection.serverPosition&&(r.option.custom.serverLatitude=r.connection.serverPosition.latitude,r.option.custom.serverLongitude=r.connection.serverPosition.longitude),"compact"==r.option.skin?r.setCompactTemplate():r.option.iframeView?r.setIframeTemplate():r.option.isMobile&&r.setMobileTemplate(),a.upload(s,r,r.option,i);else if("disabled"==t.remain)alert(o("license.disabled"));else if("expired"==t.remain)alert(o("license.expired"));else if("storageLimit"==t.remain)alert(o("license.storageLimit"));else if("trafficLimit"==t.remain)alert(o("license.trafficLimit"));else{var e=n.string.humanFileSize(t.remain);alert(o("wp.overlimit",{size:e}))}})}):e.ajax({url:p.getBaseUrl()+"/api/transfer/"+r.option.licenseGroup,data:{api_key:p.getKey(),fileSize:c},method:"get",dataType:"json"}).done(function(t){if(t.result)r.option.custom||(r.option.custom={}),r.connection.currentPosition&&(r.option.custom.clientLatitude=r.connection.currentPosition.latitude,r.option.custom.clientLongitude=r.connection.currentPosition.longitude),r.connection.serverPosition&&(r.option.custom.serverLatitude=r.connection.serverPosition.latitude,r.option.custom.serverLongitude=r.connection.serverPosition.longitude),"compact"==r.option.skin?r.setCompactTemplate():r.option.iframeView?r.setIframeTemplate():r.option.isMobile&&r.setMobileTemplate(),a.upload(s,r,r.option,i);else if("disabled"==t.remain)alert(o("license.disabled"));else if("expired"==t.remain)alert(o("license.expired"));else if("storageLimit"==t.remain)alert(o("license.storageLimit"));else if("trafficLimit"==t.remain)alert(o("license.trafficLimit"));else{var e=n.string.humanFileSize(t.remain);alert(o("wp.overlimit",{size:e}))}})}else r.option.custom||(r.option.custom={}),r.connection.currentPosition&&(r.option.custom.clientLatitude=r.connection.currentPosition.latitude,r.option.custom.clientLongitude=r.connection.currentPosition.longitude),r.connection.serverPosition&&(r.option.custom.serverLatitude=r.connection.serverPosition.latitude,r.option.custom.serverLongitude=r.connection.serverPosition.longitude),"compact"==r.option.skin?r.setCompactTemplate():r.option.iframeView?r.setIframeTemplate():r.option.isMobile&&r.setMobileTemplate(),a.upload(s,r,r.option,i);return this},download:function(t){if(!this.checkState()&&!this.option.transferWindowMode)return!1;e(".irx_thumb_prog_wrapper").hide(),e(".irx_thumb_progressBar").parent().hide();var i=!1;if(t)if(e.isArray(t)){var n=[];for(var o in t){var r=this.getFileById(t[o]);r&&n.push(r)}n.length>0&&(i=!0,this._download(n))}else{var r=this.getFileById(t);r&&(i=!0,this._download([r]))}return 0==i&&this._download(this.fileList.getDownloadFiles()),this},downloadAll:function(){return!!this.checkState()&&(e(".irx_thumb_prog_wrapper").hide(),e(".irx_thumb_progressBar").parent().hide(),this.download())},downloadSelectedFiles:function(){return!!this.checkState()&&(e(".irx_thumb_prog_wrapper").hide(),e(".irx_thumb_progressBar").parent().hide(),this._download(this.fileList.getSelectedDownloadFiles()),this)},downloadAndOpen:function(){if(!this.checkState()&&!this.option.transferWindowMode)return!1;var t=this,e=this.fileList.getSelectedDownloadFiles();0==e.length&&(e=this.fileList.getDownloadFiles());var i=e[e.length-1];return i?(0==this.option.agent?s.downloadAndOpen(i,this,this.option):("compact"==this.option.skin?t.setCompactTemplate():t.option.iframeView?t.setIframeTemplate():t.option.isMobile&&t.setMobileTemplate(),a.downloadAndOpen(i,this,this.option)),this):(alert(o("controlBox.noFile")),this)},downloadAndOpenFile:function(t){if(!this.checkState())return!1;var i=this,r=this.getTotalSize();if(1==this.option.platformDepend)1==this.option.cloudPlatformMode?e.ajax({url:p.getBaseUrl()+"/api/webpage/getGroupId",data:{api_key:p.getKey()},method:"get",dataType:"html"}).done(function(l){i.option.custom||(i.option.custom={}),i.option.custom.groupId=l,e.ajax({url:p.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:p.getKey(),fileSize:r},method:"get",dataType:"json"}).done(function(e){if(e.result){if(0==i.option.agent)return s.downloadAndOpen(t,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}));"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),a.downloadAndOpen(t,i,i.option)}else if("disabled"==e.remain)alert(o("license.disabled"));else if("expired"==e.remain)alert(o("license.expired"));else if("storageLimit"==e.remain)alert(o("license.storageLimit"));else if("trafficLimit"==e.remain)alert(o("license.trafficLimit"));else{var r=n.string.humanFileSize(e.remain);alert(o("wp.overlimit",{size:r}))}})}):e.ajax({url:p.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:p.getKey(),fileSize:r},method:"get",dataType:"json"}).done(function(e){if(e.result){if(0==i.option.agent)return s.downloadAndOpen(t,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}));a.downloadAndOpen(t,i,i.option)}else if("disabled"==e.remain)alert(o("license.disabled"));else if("expired"==e.remain)alert(o("license.expired"));else if("storageLimit"==e.remain)alert(o("license.storageLimit"));else if("trafficLimit"==e.remain)alert(o("license.trafficLimit"));else{var r=n.string.humanFileSize(e.remain);alert(o("wp.overlimit",{size:r}))}});else{if(0==i.option.agent)return s.htmlDownload(files,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}));"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),a.downloadAndOpen(t,this,this.option)}return this},_download:function(t){var i=this;if(!this.checkState()&&!this.option.transferWindowMode)return!1;if(0===t.length)return void alert(o("controlBox.noFile"));if(this.qqoInformation)for(var r=0;r<t.length;r++)t[r].mrtInfo={sessionID:this.qqoInformation.sessionID,folderID:this.qqoInformation.folderID,rootName:""};var l=this.getTotalSize();if(1==this.option.platformDepend)1==this.option.cloudPlatformMode?e.ajax({url:p.getBaseUrl()+"/api/webpage/getGroupId",data:{api_key:p.getKey()},method:"get",dataType:"html"}).done(function(r){i.option.custom||(i.option.custom={}),i.option.custom.groupId=r,e.ajax({url:p.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:p.getKey(),fileSize:l},method:"get",dataType:"json"}).done(function(e){if(e.result){if(i.option.custom||(i.option.custom={}),i.connection.currentPosition&&(i.option.custom.clientLatitude=i.connection.currentPosition.latitude,i.option.custom.clientLongitude=i.connection.currentPosition.longitude),i.connection.serverPosition&&(i.option.custom.serverLatitude=i.connection.serverPosition.latitude,i.option.custom.serverLongitude=i.connection.serverPosition.longitude),0==i.option.agent)return s.htmlDownload(t,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i._download(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i._download(t)}));"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),a.download(t,i,i.option)}else if("disabled"==e.remain)alert(o("license.disabled"));else if("expired"==e.remain)alert(o("license.expired"));else if("storageLimit"==e.remain)alert(o("license.storageLimit"));else if("trafficLimit"==e.remain)alert(o("license.trafficLimit"));else{var r=n.string.humanFileSize(e.remain);alert(o("wp.overlimit",{size:r}))}})}):e.ajax({url:p.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:p.getKey(),fileSize:l},method:"get",dataType:"json"}).done(function(e){if(e.result){if(i.option.custom||(i.option.custom={}),i.connection.currentPosition&&(i.option.custom.clientLatitude=i.connection.currentPosition.latitude,i.option.custom.clientLongitude=i.connection.currentPosition.longitude),i.connection.serverPosition&&(i.option.custom.serverLatitude=i.connection.serverPosition.latitude,i.option.custom.serverLongitude=i.connection.serverPosition.longitude),0==i.option.agent)return s.htmlDownload(t,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i._download(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i._download(t)}));"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),a.download(t,i,i.option)}else if("disabled"==e.remain)alert(o("license.disabled"));else if("expired"==e.remain)alert(o("license.expired"));else if("storageLimit"==e.remain)alert(o("license.storageLimit"));else if("trafficLimit"==e.remain)alert(o("license.trafficLimit"));else{var r=n.string.humanFileSize(e.remain);alert(o("wp.overlimit",{size:r}))}});else{if(0==i.option.agent)return s.htmlDownload(t,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i._download(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i._download(t)}));"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),a.download(t,i,i.option)}},setCompactTemplate:function(){if(a.views.initView(),e(".irx_transferWin_wrapper").find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),e(".irx_transferWin_wrapper").find(".irx_close").attr("onclick","forceCloseTransferWindow(this)"),this.option.transferWindowPolicy?(e(".irx_transferWin_wrapper").find(".irx_transferWin").addClass("transferCompactP"),e(".irx_transferWin_wrapper").find(".irx_bottom_policy").show()):e(".irx_transferWin_wrapper").find(".irx_transferWin").addClass("transferCompact"),e(".irx_transferWin_wrapper").find(".irx_filetree").show(),this.option.iframeView){var t=this.option.el,i=null;e(".irx_transferWin_wrapper").addClass("iframeControl_"+t.replace("#","")),i="parent"==this.option.iframeViewLocation?parent:"top"==this.option.iframeViewLocation?top:parent;var n=this.option.iframeViewCssUrl;""!=n&&i.jQuery("head").append(n);i.jQuery("head").append("<script>function forceCloseTransferWindow(el){setTimeout(function(){if (!jQuery('.irx_transferWin_wrapper').hasClass('isClosing')){jQuery('.irx_transferWin_wrapper').remove()}},1000);}<\/script>"),e(".irx_transferWin_wrapper").appendTo(i.jQuery("body"));var o=i.jQuery(".iframeControl_"+t.replace("#",""));try{1==this.option.draggableTransferWindow&&o.find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}})}catch(c){}var r=(i.innerHeight-395)/2+"px",s=(i.innerWidth-500)/2+"px",l="0px",h="0px";if("default"!=this.option.iframeViewTop&&(r=this.option.iframeViewTop),"default"!=this.option.iframeViewLeft&&(s=this.option.iframeViewLeft),"default"!=this.option.iframeViewMarginLeft&&(l=this.option.iframeViewMarginLeft),"default"!=this.option.iframeViewMarginTop&&(h=this.option.iframeViewMarginTop),this.option.transferWindowMode){try{1==this.option.draggableTransferWindow&&i.jQuery(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}})}catch(c){}i.jQuery(".irx_transferWin_wrapper").find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),i.jQuery(".irx_transferWin").css({top:r,left:s,"margin-left":l,"margin-top":h})}else o.find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),o.find(".irx_transferWin").css({top:r,left:s,"margin-left":l,"margin-top":h})}else e.fn.center=function(t){return t=t?this.parent():window,(e(t).height()-this.outerHeight())/2+e(t).scrollTop()<0?this.css({top:"0px"}):this.css({top:(e(t).height()-this.outerHeight())/2+e(t).scrollTop()+"px"}),this},e(".irx_transferWin_wrapper").find(".irx_transferWin").center(!1),1==this.option.draggableTransferWindow&&e(".irx_transferWin_wrapper").find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}}),this.option.transferWindowMode&&e(".irx_transferWin_wrapper").find(".irx_transferWin").css({top:"0px",left:"0px","margin-top":"0px","margin-left":"0px"})},setMobileTemplate:function(){a.views.initMobile()},setEncodingTemplate:function(t){var e="",i=0;t.status&&(e=t.status),t.percentage&&(i=t.percentage),a.views.initEncoding(this.option.isMobile,i,e)},setIframeTemplate:function(){if(a.views.initView(),e(".irx_transferWin_wrapper").find(".irx_close").attr("onclick","forceCloseTransferWindow(this)"),this.option.iframeView){var t=this.option.el,i=null;e(".irx_transferWin_wrapper").addClass("iframeControl_"+t.replace("#","")),i="parent"==this.option.iframeViewLocation?parent:"top"==this.option.iframeViewLocation?top:parent;var n=this.option.iframeViewCssUrl;""!=n&&i.jQuery("head").append(n);i.jQuery("head").append("<script>function forceCloseTransferWindow(el){setTimeout(function(){if (!jQuery('.irx_transferWin_wrapper').hasClass('isClosing')){jQuery('.irx_transferWin_wrapper').remove()}},1000);}<\/script>"),e(".irx_transferWin_wrapper").appendTo(i.jQuery("body"));var o=i.jQuery(".iframeControl_"+t.replace("#",""));try{1==this.option.draggableTransferWindow&&o.find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}})}catch(c){}var r=(i.innerHeight-180)/2+"px",s=(i.innerWidth-500)/2+"px",l="0px",h="0px";if("default"!=this.option.iframeViewTop&&(r=this.option.iframeViewTop),"default"!=this.option.iframeViewLeft&&(s=this.option.iframeViewLeft),"default"!=this.option.iframeViewMarginLeft&&(l=this.option.iframeViewMarginLeft),"default"!=this.option.iframeViewMarginTop&&(h=this.option.iframeViewMarginTop),this.option.transferWindowMode||this.option.transferWindowModeOpen){try{1==this.option.draggableTransferWindow&&i.jQuery(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}})}catch(c){}i.jQuery(".irx_transferWin_wrapper").find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),i.jQuery(".irx_transferWin").css({top:r,left:s,"margin-left":l,"margin-top":h})}else o.find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),o.find(".irx_transferWin").css({top:r,left:s,"margin-left":l,"margin-top":h})}else e.fn.center=function(t){return t=t?this.parent():window,(e(t).height()-this.outerHeight())/2+e(t).scrollTop()<0?this.css({top:"0px"}):this.css({top:(e(t).height()-this.outerHeight())/2+e(t).scrollTop()+"px"}),this},e(".irx_transferWin_wrapper").find(".irx_transferWin").center(!1),1==this.option.draggableTransferWindow&&e(".irx_transferWin_wrapper").find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}}),(this.option.transferWindowMode||this.option.transferWindowModeOpen)&&e(".irx_transferWin_wrapper").find(".irx_transferWin").css({top:"0px",left:"0px","margin-top":"0px","margin-left":"0px"})},transferResume:function(){return!!this.checkState()&&(a.resume(),this)},transferPause:function(){return!!this.checkState()&&(a.pause(),this)},transferCancel:function(){return!!this.checkState()&&(a.cancel(),this)},setDropZone:function(t,i){if(t.originalEvent&&t.originalEvent.dataTransfer&&t.originalEvent.dataTransfer.types&&-1==e.inArray("Files",t.originalEvent.dataTransfer.types))return t.preventDefault(),this.emit(g.CONTROL_SET_DROPZONE_ERROR,t),!1;var o=n.getBoundingScreenRect(t.originalEvent,i,this.option),r=n.string.generateUUID();this.showDropZone({x:parseInt(o.left-10),y:parseInt(o.top-10),width:parseInt(o.width+20),height:parseInt(o.height+20),dropId:r,uuid:r,debug:this.option.isDebugDropZone,element:i})},showDropZone:function(t){if(!this.checkState()||"download"==this.option.transferMode||0==this.option.enableDropZone)return!1;var i=this;if(this.emit(g.DROPZONE_SHOW),this.fileloadingState="",this.option.agent,1==this.option.agent)return t.license=d.ENV.LICENSE,t.transferMode=this.option.transferMode,t.element&&delete t.element,"undefined"==typeof FormData?this.module.showDropZoneFallback(t,function(t){!1===t.value?(i.fileloadingState="hide",i.emit(g.FILE_PROCESSING_STATE_HIDE),i.module.licenseNotValidate(t.error)):i._addFiles(t.value),i.emit(g.DROPZONE_HIDE),i.emit(g.DROPZONE_STATE_HIDE),i.loadingState="hide"}):this.module.showDropZone(t).done(function(t){!1===t.value?(i.fileloadingState="hide",i.emit(g.FILE_PROCESSING_STATE_HIDE),i.module.licenseNotValidate(t.error)):i._addFiles(t.value)}).always(function(){i.emit(g.DROPZONE_HIDE),i.emit(g.DROPZONE_STATE_HIDE),i.loadingState="hide"}),this;var n=this.view.$el;if(t.element&&(n=e(t.element)),n.hasClass("evt-dropzone"))return!1;n.off("dragenter"),n.off("dragover"),n.off("dragleave"),n.off("drop"),n.on("dragenter dragover",function(t){i.emit(g.DROPZONE_SHOW),t.preventDefault()}),n.on("dragleave",function(t){i.emit(g.DROPZONE_HIDE),t.preventDefault()});n.on("drop",function(t){i.emit(g.DROPZONE_HIDE);var e=i.module.getDropFile(t);i._addFiles(e.value),t.preventDefault(),t.stopPropagation()})},showDropState:function(t){if(!this.checkState()||"download"==this.option.transferMode||0==this.option.enableDropZone)return!1;this.loadingState="";var e=this;return 1==this.option.agent&&("undefined"==typeof FormData?this.module.showDropStateFallback(t,function(t){1==t.value&&(e.emit(g.DROPZONE_STATE_HIDE),e.loadingState="hide")}):this.module.showDropState(t).done(function(t){1==t.value&&(e.emit(g.DROPZONE_STATE_HIDE),e.loadingState="hide")}).always(function(){}),this)},hideDropZone:function(t){var i=u.AGENT_HTTP_URL;"https:"==window.location.protocol&&(i=u.AGENT_HTTPS_URL);var o={action:"hideDropZone",uuid:t};if("undefined"==typeof FormData){var r=n.string.cryptoRandom().toString().substr(2),s="-----------------------------"+r+"\r\n";s+='Content-Disposition: form-data; name="_action"\r\n\r\n',s+="hideDropZone\r\n",s+="-----------------------------"+r+"\r\n",s+='Content-Disposition: form-data; name="_param"\r\n\r\n',s+=JSON.stringify(o)+"\r\n",s+="-----------------------------"+r+"--\r\n";var a=new XDomainRequest;a.onload=function(){},a.ontimeout=function(){},a.onprogress=function(){},a.open("POST",i+"/webpage"),a.send(s)}else{var l=new FormData;l.append("_action","hideDropZone"),l.append("_param",JSON.stringify(o));var h={url:i+"/webpage",method:"POST",processData:!1,contentType:!1,dataType:"json",data:l};e.ajax(h)}},_addFiles:function(t){var e=this;if("download"==this.option.transferMode)return this.fileloadingState="hide",this.emit(g.FILE_PROCESSING_STATE_HIDE),!1;var i,n,o=[],r=this.fileValidator.checkDemo(t);if(r)return void this.emit(g.CONTROL_ADD_FILE_ERROR,r,t);var s=[],l=[];for(var h in t)if(t.hasOwnProperty(h)){if(i=t[h],i.mode="upload",i.uploadUrl=e.option.uploadUrl,i.fileSize=parseInt(i.fileSize),0==e.option.folderIntact&&(i.rootName=""),i.hasOwnProperty("thumbnail")||(i.thumbnail=!1),i.hasOwnProperty("viaUrl")||(i.viaUrl=this.option.viaUrl),i.hasOwnProperty("controlId")||(i.controlId=this.option.$el.attr("id")),i.hasOwnProperty("basePath"));else{var c=i.filePath.split("/");1==c.length&&(c=i.filePath.split("\\"));for(var u="",d=0;d<c.length-1;d++)u+=c[d]+"\\";i.basePath=u}if("MacIntel"==navigator.platform&&("undefined"!=typeof i.filePath&&"undefined"!=typeof i.filePath.normalize&&(i.filePath=i.filePath.normalize("NFC")),"undefined"!=typeof i.printFileName&&"undefined"!=typeof i.printFileName.normalize&&(i.printFileName=i.printFileName.normalize("NFC"))),(n=this.fileValidator.checkUploadFile(i,t))&&(s.push(i),l.push(n),"maxFileCount"==n.type||"maxTotalSize"==n.type))break;if(0==this.option.agent&&!i.hasOwnProperty("file"))break;!1!==this.emit(g.CONTROL_BEFORE_ADD_FILE,i)&&(n||(this.fileList.addUploadFile(i),o.push(i)))}l.length>0&&this.emit(g.CONTROL_ADD_FILE_ERROR,l,s),this.fileloadingState="hide",this.emit(g.FILE_PROCESSING_STATE_HIDE),o.length>0&&this.emit(g.CONTROL_AFTER_ADD_FILES,o),a.resetResumeCondition()},addFiles:function(t){if(!this.checkState())return!1;this._addFiles(t)},presetDownloadFiles:function(t){if("undefined"==typeof this.fileList)return!1;var e=this;if("upload"==this.option.transferMode)return!1;for(var i=0;i<t.length;i++)t.hasOwnProperty(i)&&(t[i].thumbnail=!1,t[i].validate=!1,e.option.skipDownloadCheck?(t[i].validate=!0,t[i].fileSize&&(t[i].fileSize=parseInt(t[i].fileSize))):t[i].fileSize?(t[i].validate=!0,t[i].fileSize=parseInt(t[i].fileSize)):e.option.skipFileSizeCheck&&!e.option.agent?t[i].validate=!0:e.checkDownloadUrl(t[i]),t[i].sliceSize||(t[i].sliceSize=this.option.sliceSize));for(var n=!0,i=0;i<t.length;i++)t.hasOwnProperty(i)&&(t[i].validate||(n=!1));n&&e._presetDownloadFiles(t)},checkDownloadUrl:function(t){var i=this;e.ajax({url:t.downloadUrl,async:!1,type:"HEAD",timeout:i.option.checkDownloadTimeout}).done(function(e,i,n){var o=n.getResponseHeader("content-length");t.fileSize=o?parseInt(o):0,t.validate=!0}).fail(function(){t.validate=!0})},_presetDownloadFiles:function(t){if("upload"==this.option.transferMode)return!1;t=t.slice(0);for(var e,i,n=[];t.length>0;){if(e=t.shift(),e.mode="download",i=this.fileValidator.checkDownloadFile(e,this.fileList)){this.emit(g.CONTROL_ADD_FILE_ERROR,i,t);break}!1!==this.emit(g.CONTROL_BEFORE_ADD_FILE,e)&&(i||(this.fileList.addDownloadFile(e),n.push(e)))}var o=this;return n.length>0&&o.emit(g.CONTROL_AFTER_ADD_FILES,n),this},clearFiles:function(){if(!this.checkState())return!1;if(!1!==this.emit(g.CONTROL_BEFORE_REMOVE_FILES,t)){var t=this.fileList.removeAllFiles();this.emit(g.CONTROL_REMOVE_FILES,t),a.resetResumeCondition()}return this},getAllFiles:function(t){return this.fileList.getAllFiles(t)},getFileCount:function(){return this.fileList.getFileCount()},getSelectedFileCount:function(){return this.fileList.getSelectedFileCount()},getTotalFolderCount:function(){return this.fileList.getTotalFolderCount(this.option.$el)},getTotalFolderNames:function(){return this.fileList.getTotalFolderNames()},getSelectedFolderCount:function(){return this.fileList.getSelectedFolderCount(this.option.$el)},getUploadFiles:function(){return this.fileList.getUploadFiles()},getDownloadFiles:function(){return this.fileList.getDownloadFiles()},getUploadFilesSize:function(){return this.fileList.getUploadFilesSize()},getDownloadFilesSize:function(){return this.fileList.getDownloadFilesSize()},getSelectedFiles:function(){return this.fileList.getSelectedFiles()},getFileByIndex:function(t){return this.fileList.getFileByIndex(t)},getFileById:function(t){return this.fileList.getFileById(t)},getTotalSize:function(){return this.fileList.getTotalSize()},getSelectSize:function(){return this.fileList.getSelectSize()},removeFileByIndex:function(t){if(!this.checkState())return!1;var e=this.fileList.getFileByIndex(t);if(!1!==this.emit(g.CONTROL_BEFORE_REMOVE_FILES,[e])){var e=this.fileList.removeFileByIndex(t);this.emit(g.CONTROL_REMOVE_FILES,[e]),a.resetResumeCondition()}return this},removeFileById:function(t){if(!this.checkState())return!1;var e=this.fileList.getFileIndexById(t),i=this.fileList.getFileByIndex(e);if(!1!==this.emit(g.CONTROL_BEFORE_REMOVE_FILES,[i])){var i=this.fileList.removeFileById(t);this.emit(g.CONTROL_REMOVE_FILES,[i]),a.resetResumeCondition()}return this},removeFolderByName:function(t){if(!this.checkState())return!1;this.fileList.removeFileById(id)
|
|
;var e=this.fileList.getFileIndexById(id),i=this.fileList.getFileByIndex(e);if(!1!==this.emit(g.CONTROL_BEFORE_REMOVE_FILES,[i])){var i=this.fileList.removeFileById(id);this.emit(g.CONTROL_REMOVE_FILES,[i]),a.resetResumeCondition()}return this},removeAllFiles:function(t){return!!this.checkState()&&(this.clearFiles(),t&&t(),this)},removeSelectedFiles:function(){if(!this.checkState())return!1;var t=this.fileList.getSelectedFiles();if(!1!==this.emit(g.CONTROL_BEFORE_REMOVE_FILES,t)){var t=this.fileList.removeSelectedFiles();this.emit(g.CONTROL_REMOVE_FILES,t),a.resetResumeCondition()}return this},selectAllFiles:function(){if(!this.checkState())return!1;var t=this.fileList.addSelectFilesById();return this.emit(g.CONTROL_SELECT_ROWS,t),this},unselectAllFiles:function(){if(!this.checkState())return!1;var t=this.fileList.unSelectFilesById();return this.emit(g.CONTROL_UNSELECT_ROWS,t),this},addSelectFilesById:function(t){if(!this.checkState())return!1;var e=this.fileList.addSelectFilesById(t);return this.emit(g.CONTROL_SELECT_ROWS,e),this},unSelectFilesById:function(t){if(!this.checkState())return!1;var e=this.fileList.unSelectFilesById(t);return this.emit(g.CONTROL_UNSELECT_ROWS,e),this},setSize:function(t,e){return this.view.setSize(t,e,this.option),this},destroy:function(){this.view.destroy(),this.emit(g.CONTROL_DESTROY);for(var t in this)this.hasOwnProperty(t)&&delete this[t]},getTransferMode:function(){return this.option.transferMode},isEnsureMode:function(t){return t===this.getTransferMode()||!("both"!==this.getTransferMode()||!e.inArray(t,["upload","download"]))},estimateUploadTime:function(t){if(!this.isEnsureMode("upload")||!this.option.uploadUrl)return t(!1),this;var e=this;return this.module.uploadSpeedCheck(this.option.uploadUrl,0,0,this.option.useProxy,function(i){var n=e.getUploadFilesSize()/Math.pow(1024,2)/(i.mbytePerSeconde||1);t(n)}).fail(function(){t(!1)}),this},estimateDownloadTime:function(t){if(!this.isEnsureMode("download"))return t(!1),this;var i=n.array.sampleSize(this.getDownloadFiles(),3),o=e.map(i,function(t,e){if("undefined"!=typeof FormData)return this.module.downloadSpeedCheck(e.downloadUrl,e.fileSize,0,0,this.option.isStream,this.option.useProxy);this.module.downloadSpeedCheckFallback(e.downloadUrl,e.fileSize,0,0,this.option.isStream,this.option.useProxy,function(t){return t})}),r=this;return e.when.apply(null,o).fail(function(){t(!1)}).done(function(){var i=e.makeArray(arguments),n=0;e.each(i,function(t,e){n+=e.mbytePerSeconde});var o=n/i.length,s=r.getDownloadFilesSize()/Math.pow(1024,2)/(o||1);t(s)}),this},showGraph:function(){try{this.view.infoBox.showGraph()}catch(t){}},hideGraph:function(){try{this.view.infoBox.hideGraph()}catch(t){}},_initConnectionProperty:function(){this.option.initSpeedCheck&&this.option.uploadUrl&&this.uploadSpeedCheck();this.connection.serverPosition=null,this.connection.currentPosition=null,this.connection.uploadSpeed=0,this.getCurrentPosition(),this.getServerPosition(),0!=this.option.agent&&1==this.option.loadTransfer&&this.getIncompleteTransfer()},getBrowserCookie:function(t){for(var e,i=t+"=",n=0;n<=document.cookie.length;){var o=n+i.length;if(document.cookie.substring(n,o)==i)return-1==(e=document.cookie.indexOf(";",o))&&(e=document.cookie.length),unescape(document.cookie.substring(o,e));if(0===(n=document.cookie.indexOf(" ",n)+1))break}return""},getCurrentPositionData:function(){return this.connection.currentPosition},getServerPositionData:function(){return this.connection.serverPosition},getCurrentPosition:function(){var t=this;return 0==t.option.platformDepend&&0==t.option.checkLocation?(t.connection.currentPosition={latitude:0,longitude:0},!1):""==t.option.locationUrl?(t.connection.currentPosition={latitude:0,longitude:0},!1):void e.ajax({url:t.option.locationUrl,dataType:"json",success:function(e){var i=e;t.connection.currentPosition={latitude:i.lat,longitude:i["long"]}},error:function(e){var i=e;t.connection.currentPosition={latitude:i.lat,longitude:i["long"]}}})},getServerPosition:function(){var t=this;return 0==t.option.platformDepend&&0==t.option.checkLocation?(t.connection.serverPosition={latitude:0,longitude:0},!1):""==t.option.locationUrl?(t.connection.serverPosition={latitude:0,longitude:0},!1):void e.ajax({url:p.getBaseUrl()+"/api/webpage/getLocation",data:{api_key:p.getKey(),locationUrl:t.option.locationUrl},method:"GET",dataType:"json",success:function(e){var i=e;t.connection.serverPosition={latitude:i.lat,longitude:i["long"]}}})},uploadSpeedCheck:function(t,e,i,n,o){if(0!=this.option.agent){var r=this,s=this.option.uploadUrl,a=this.option.useProxy;t=void 0!==t?t:0,e=void 0!==e?e:0,this.module.uploadSpeedCheck(s,t,e,a,n,o,function(t){r.connection.uploadSpeed=parseFloat(t.mbytePerSecond);var e=r.connection.uploadSpeed,n=Math.round(1024*e*1024/1);if(n||(n=2097152),r.option.sessionCount=16,n=2097152,r.option.sliceSize=n,void 0!==i){i(t)}})}},downloadSpeedCheck:function(t,e,i,n,o,r,s){i=void 0!==i?i:0,n=void 0!==n?n:0,"undefined"==typeof FormData?this.module.downloadSpeedCheckFallback(t,e,i,n,this.option.isStream,this.option.useProxy,r,s,o):this.module.downloadSpeedCheck(t,e,i,n,this.option.isStream,this.option.useProxy,r,s,o)},estimateTime:function(){var t=this.getTotalSize();return 0!=this.connection.uploadSpeed&&{mbytePerSecond:this.connection.uploadSpeed,totalUploadSize:t,estimateTime:Math.ceil(t/parseFloat(1024*this.connection.uploadSpeed*1024))}},transferDistance:function(){function t(t){return t*Math.PI/180}var e=this.connection.currentPosition,i=this.connection.serverPosition;if(!e||!i)return{currentPosition:e,serverPosition:i,distance:0};var n,o,r=parseFloat(e.latitude),s=parseFloat(i.latitude),a=parseFloat(e.longitude),l=parseFloat(i.longitude);return n=a-l,o=Math.sin(t(r))*Math.sin(t(s))+Math.cos(t(r))*Math.cos(t(s))*Math.cos(t(n)),o=Math.acos(o),o=function(t){return 180*t/Math.PI}(o),o=60*o*1.1515,o*=1.609344,{currentPosition:e,serverPosition:i,distance:o}},getIncompleteTransfer:function(){var t=this.transferMode,i=this;"both"!=t&&"upload"!=t||("undefined"==typeof FormData?r.getIncompleteTransferFallback(function(t){i.setUploadTransfer(t)},!0):r.getIncompleteTransfer(e.proxy(this.setUploadTransfer,this),!0))},deleteUploadResumeInfo:function(){0!=this.option.agent&&("undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},!0):r.deleteIncompleteTransfer(function(){},!0))},deleteDownloadResumeInfo:function(){0!=this.option.agent&&("undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},!1):r.deleteIncompleteTransfer(function(){},!1))},setUploadTransfer:function(t){var i=this;if(0==t.value)return!1;var n=e.parseJSON(decodeURIComponent(t.param)),s=e.parseJSON(n.files),a=[];for(var l in s)if(s.hasOwnProperty(l)){var h=s[l];"#"+h.controlId==i.option.el&&a.push(h)}a.length>0&&1==this.option.autoLoadTransfer?(this.option.incompleteTransfer={transferId:n.transferId},i._addFiles(a)):a.length>0&&confirm(o("controlBox.resumeTransfer"))?(this.option.incompleteTransfer={transferId:n.transferId},i._addFiles(a)):"undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},!0):r.deleteIncompleteTransfer(function(){},!0)},setDownloadTransfer:function(t){var i=this;if(0==t.value)return!1;var n=e.parseJSON(decodeURIComponent(t.param)),s=e.parseJSON(n.files);s.length>0&&confirm(o("controlBox.resumeTransfer"))?(this.option.incompleteTransfer={transferId:n.transferId},i.presetDownloadFiles(s)):"undefined"==typeof FormData?r.deleteIncompleteTransferFallback(function(){},!1):r.deleteIncompleteTransfer(function(){},!1)},getServerBaseUrl:function(){return p.getBaseUrl()},openPopupWindowInstaller:function(){n.popupWindow(this.option.installUrl,"Install Page",700,500)},stopUploadServerProcessBar:function(t){1==this.option.agent&&a.emit(g.TRANSFER_UPLOAD_WORKING_STOP),setTimeout(function(){t&&t(!0)},1600)},startTransferProgress:function(){a.play()},stopDownloadServerProcessBar:function(t){a.emit(g.TRANSFER_DOWNLOAD_WORKING_STOP),setTimeout(function(){t&&t(!0)},1600)},setControlDisabledState:function(t){1==t?this.emit(g.AGENT_FILE_DIALOG_SHOW):this.emit(g.AGENT_FILE_DIALOG_HIDE),this.disabledState=t},getControlDisabledState:function(){return this.disabledState},removeParentTransferWindow:function(){1==this.option.iframeView&&(parent.jQuery('[class*="iframeControl"]').remove(),top.jQuery('[class*="iframeControl"]').remove())},isAgentInstalled:function(t){this.module.checkVersionNoHandle(function(e){t&&t(e)})},getInstallCheck:function(){return this.installCheck},stopTransfer:function(){a.cancel()},insertQqoInformation:function(t){var e="",i="";t&&(t.sessionID&&(e=t.sessionID),t.folderID&&(i=t.folderID)),""!=e&&""!=i&&(this.qqoInformation={sessionID:e,folderID:i})},sortName:function(t){this.fileList.sortList("printFileName",t),this.emit(g.CONTROL_SORT,this.getAllFiles())},createThumbFiles:function(t,i,o,r){var s=[];for(var a in t)if(t.hasOwnProperty(a)){var l=t[a],h=n.string.generateUUID(),c=l.printFileName,u=c.split("."),d=u[u.length-1];u.pop();var p=u.join(".");p=p+"_thumb_"+i+"x"+o+"_"+r+"."+d;var f=e.extend({},l,{id:h,rowID:h,parentID:l.rowID,filePath:p,printFileName:p,thumbnail:!0});s.push(f)}return s},loadImage:function(t,e){try{var i=new FileReader;i.readAsDataURL(t.file),i.onload=function(){var t=new Image;t.src=i.result,t.onload=function(){e(this)}}}catch(n){return console.log(n),!1}},makeThumbnail:function(t,i,n,o){var r=this;try{var s=e.Deferred();return r.loadImage(t,function(e){var r=document.createElement("canvas"),a=r.getContext("2d"),l=e.width,h=e.height;switch("VERTICAL"!=o&&"HORIZONTAL"!=o&&"FIX"!=o&&(o=h>l?"VERTICAL":"HORIZONTAL"),o){case"VERTICAL":var c=n/h;r.width=l*c,r.height=n,a.drawImage(e,0,0,l*c,n);break;case"HORIZONTAL":var u=i/l;r.width=i,r.height=h*u,a.drawImage(e,0,0,i,h*u);break;default:r.width=i,r.height=n,a.drawImage(e,0,0,i,n)}r.toBlob(function(e){t.file=e,t.fileSize=e.size,s.resolve(t)},"image/jpeg")}),s}catch(a){return console.log(a),!1}},attachWaterMark:function(t,i,o){var r=this,s=e.Deferred();return r.loadImage(t,function(e){var r=document.createElement("canvas"),a=r.getContext("2d");r.width=e.width,r.height=e.height,a.drawImage(e,0,0,e.width,e.height);var l=new Image;l.src=i,l.onload=function(){var i=this.width,l=this.height,h=n.calcWatermarkPosition(o,e.width,r.height,i,l);a.drawImage(this,h.left,h.top,i,l),r.toBlob(function(e){t.file=e,t.fileSize=e.size,s.resolve(t)},"image/jpeg")}}),s},cleanAgentImageCommand:function(){this.list_thumbnail_agent=[],this.list_watermark_agent=[]},appendThumbnailProperty:function(t,i,n,o){if(this.option.agent)return this.list_thumbnail_agent.push({index:t,width:i,height:n,baseline:o}),!0;var r=this,s=e.Deferred(),a=[];return _.additionalProcess=!0,_.await(function(){var l=r.getAllFiles("ORIGINAL");e.isNumeric(t)&&l[t]&&(l=[l[t]]),r.numOfGeneratedThumb||(r.numOfGeneratedThumb=0),r.numOfGeneratedThumb=r.numOfGeneratedThumb+1;var h=r.createThumbFiles(l,i,n,r.numOfGeneratedThumb),c=h.length;for(var u in h)if(h.hasOwnProperty(u)){var d=h[u];"picture"==d.fileExtType?r.makeThumbnail(d,i,n,o).done(function(t){a.push(t),0==--c&&(r._addFiles(a),s.resolve())}):0==--c&&(a.length>0&&r._addFiles(a),s.resolve())}}),_.push(s),!0},appendWatermarkProperty:function(t,i,o){var r=this;i=i.replace(/^\/+/,"");var s=n.string.getFileExt(i);if("jpg"!=(s=s.toLowerCase())&&"jpeg"!=s&&"png"!=s)return"not_supported";if(this.option.agent)return this.list_watermark_agent.push({index:t,markImgUrl:n.url.addOriginIfNot(i),where:"ALL",position:o}),!0;var a=e.Deferred(),l=r.getAllFiles("ALL");return e.isNumeric(t)&&l[t]&&(l=[l[t]]),_.additionalProcess=!0,_.await(function(){var t=l.length;for(var e in l)if(l.hasOwnProperty(e)){var n=l[e];"picture"==n.fileExtType?r.attachWaterMark(n,i,o,e).done(function(e){var i=r.fileList.getFileIndexById(e.id);r.fileList.updateSelectedFile(i,e),0==--t&&a.resolve()}):0==--t&&a.resolve()}}),_.push(a),!0}})}),innorix("ControlBox/defaultOption",function(){"use strict";return{skin:"basic",transferMode:"both",transferStart:{upload:"auto",download:"manual"},viaUrl:"",downloadPath:null,downloadType:"stream",limitRate:0,isStream:!0,useCrypt:!1,encryptMetaData:!1,custom:{},resumeType:"overwrite",resumeUploadType:"",resumeDownloadType:"",resumeCondition:!1,loadTransfer:!0,autoLoadTransfer:!1,showFolderItems:!1,showFolderItemsTree:!0,enableDropZone:!0,cloudPlatformMode:!1,transferWindowMode:!1,transferWindowModeOpen:!1,transferWindowPolicy:!1,showQrCode:!1,usePlugin:!0,iframeView:!1,iframeNestedView:!1,iframeViewCssUrl:"",iframeViewLocation:"top",iframeViewTop:"default",iframeViewLeft:"default",iframeViewMarginLeft:"default",iframeViewMarginTop:"default",cancelConfirmation:!1,draggableTransferWindow:!0,showTransferFileStatus:!1,showTransferWindow:!0,useSmoothGraph:!0,showFileListHeader:!1,showTransferStatusIcon:!0,charset:"UTF-8",isHighSpeed:!0,virtualTransfer:!1,downloadIntegrity:!1,downloadIntegrityFile:!1,advanced:{security:!0,integrity:"both"},folderIntact:!0,showGraph:!1,alwaysShowTransferGraph:!1,checkDownloadTimeout:1e3,skipDownloadCheck:!1,skipFileSizeCheck:!1,isPresignedUrl:!1,uploadCompletedEvent:{use:!1,url:""},downloadCompletedEvent:{use:!1,url:""},userid:null,UserPart:null,limitExtension:null,allowExtension:null,addDuplicateFile:!1,maxFileCount:null,maxFileSize:null,maxTotalSize:null,maxMassFileListCount:1e3,isDebugDropZone:!1,showByteSize:!1,cookie:document.cookie,installRetry:0,postData:{},retryCount:5,retryDelay:3,downloadDelay:200,keyboardDeleteEvent:!1,autoReTransfer:!0,maximumErrorCount:9999,useProxy:!1,limitContextMenu:!1,timeout:{minSeconds:60,bytes:0,seconds:0},width:null,height:null,monitorServer:null,ServerHost:null,agent:!0,demo:!1,demo2:!1,sliceSize:2097152,downloadSliceSize:0,uploadSliceSize:0,sessionCount:15,uploadSessionCount:0,downloadSessionCount:0,isSliceTransfer:!1,useFuncBtn:0,useContextMenu:!0,initSpeedCheck:!1,useDb:!0,installUrl:"/wp9/install/install.html",installUrlMobile:"/wp9/install/installMobile.html",installPopupWindow:!1,installPopupWindowHeight:1875,installPopupWindowWidth:975,installPopupWindowTop:0,installPopupWindowLeft:0,autoCheckVersion:!1,enableMobileAgent:!1,autoHtmlMode:!1,licenseGroup:"wp",platformDepend:!1,skipAgentCheck:!1,checkLocation:!1,mrtVersion2:!1,multipartMrt:!1,locationUrl:"",progressTitle:"WP",controlLang:"en",autoSortFile:"",installCheckDelay:0,emptyDownloadFileText:"There is no download file here.",showPreviewImage:!1}}),innorix("ControlBox/FileList",function(t){"use strict";var e=t("innoJquery"),i=t("util"),n=t("klass"),o=i.decorator.caching,r=i.decorator.removeCache;return n({constructor:function(){this.files=[],this.folders=[]},addUploadFile:r(function(t){var n=this,o="";o=this.getFileTree(t);var r=o.split("/");1==r.length&&(r=o.split("\\"));for(var s="",a=0;a<r.length;a++)s+=r[a],-1==n.folders.indexOf(s)&&""!=s&&n.folders.push(s);var l="";t.filePath&&(l=i.string.getFileName(t.filePath)),t.printFileName&&(l=t.printFileName);var h=i.string.generateUUID(),c=i.string.generateUUID()+".dat";0==t.isFile&&this.folders.push(h);var u=h;t.id&&(u=t.id),t.rowID&&(u=t.rowID);var d={};"undefined"!=typeof t.encoding&&(d=t.encoding);var p="";"undefined"!=typeof t.mediaType&&(p=t.mediaType);var f="";f=t.fileExtType?""==t.fileExtType?i.string.getFileExtType(l).toLowerCase():t.fileExtType:i.string.getFileExtType(l).toLowerCase();var g=-1;if(t.parentID){g=this.getFileIndexById(t.parentID),delete t.parentID}e.extend(t,{id:u,rowID:u,fileExtType:f,transferType:"upload",selected:!1,printFileName:l,uniqueFileName:c,folderName:o,rootName:o,encoding:d,mediaType:p}),-1!=g?this.files.splice(g+1,0,t):this.files.push(t)}),addDownloadFile:r(function(t){var n=i.string.generateUUID(),o=this,o=this,r="";t.rootName&&(r=t.rootName);var s=r.split("/");1==s.length&&(s=r.split("\\"));for(var a="",l=0;l<s.length;l++)a+=s[l],-1==o.folders.indexOf(a)&&""!=a&&o.folders.push(a);0!=t.isFile&&1!=t.isVirtual||this.folders.push(n);var h=n;t.id&&(h=t.id),t.rowID&&(h=t.rowID),e.extend(t,{id:h,rowID:h,transferType:"download",selected:!1,downloadUrl:i.url.addOriginIfNot(t.downloadUrl),fileSize:t.fileSize,isVirtual:t.isVirtual}),this.files.push(t)}),addSelectFilesById:r(function(t){var i=[];return e.each(this.files,function(e,n){t&&-1===t.indexOf(n.id)||(n.selected=!0,i.push(n))}),i}),unSelectFilesById:r(function(t){var i=[];return e.each(this.files,function(e,n){t&&-1===t.indexOf(n.id)||(n.selected=!1,i.push(n))}),i}),updateSelectedFile:function(t,e){return this.files[t]=e,this.files},getAllFiles:function(t){return t?"ORIGINAL"==t?e.grep(this.files,function(t){return!0!==t.thumbnail}):"THUMBNAIL"==t?e.grep(this.files,function(t){return!0===t.thumbnail}):this.files:this.files},getUploadFiles:o(function(){return e.grep(this.files,function(t){return"upload"===t.transferType})}),getDownloadFiles:o(function(){return e.grep(this.files,function(t){return"download"===t.transferType})}),getSelectedFiles:o(function(){return e.grep(this.files,function(t){return!0===t.selected})}),getSelectedDownloadFiles:o(function(){return e.grep(this.files,function(t){if(!0===t.selected&&"download"===t.transferType)return t})}),getFileById:function(t){return i.array.find(this.files,function(e){return e.id===t})},getFileByIndex:function(t){return this.files[t]},getFileIndexById:function(t){var e;return i.array.find(this.files,function(i,n){return i.id===t&&(e=n,!0)}),e},getFolderIndexByName:function(t){var e;return i.array.find(this.folders,function(i,n){return i===t&&(e=n,!0)}),e},setPostDataById:function(t,e){var i=this.getFileIndexById(t);return this.setPostDataByIndex(i,e)},setPostDataByIndex:r(function(t,e){return this.files[t].postData=e,this.files[t]}),removeFileById:function(t){var e=this.getFileIndexById(t);return this.removeFileByIndex(e)},removeFolderByName:function(t){var e=this.getFolderIndexByName(t);return this.removeFolderByIndex(e)},removeFileByIndex:r(function(t){var e=this.files[t];return this.files.splice(t,1),e}),removeFolderByIndex:r(function(t){var e=this.folders[t];return this.folders.splice(t,1),e}),removeAllFiles:r(function(){var t=this.files;return this.files=[],t}),removeSelectedFiles:r(function(){var t=[];return this.files=e.grep(this.files,function(e){return!e.selected||(t.push(e),!1)}),t}),getFileCount:function(){return this.files.length},getSelectedFileCount:function(){return this.getSelectedFiles().length},getSelectedFolderCount:function(t){var i=0;return e(t).find(".is-directory").each(function(t){e(this).hasClass("selected")&&i++}),i},getTotalFolderCount:function(t){var i=0;return e(t).find(".is-directory").each(function(t){i++}),i},getTotalFolderNames:function(){return this.folders},getTotalSize:o(function(){var t=0;return e.each(this.files,function(e,i){t+=i.fileSize}),t}),getUploadFilesSize:o(function(){var t=0;return e.each(this.getUploadFiles(),function(e,i){t+=i.fileSize}),t}),getDownloadFilesSize:o(function(){var t=0;return e.each(this.getDownloadFiles(),function(e,i){t+=i.fileSize}),t}),getSelectSize:o(function(){var t=0;return e.each(this.files,function(e,i){i.selected&&(t+=i.fileSize)}),t}),getFileTree:function(t){var e="",i=t.basePath.split("/");1==i.length&&(i=t.basePath.split("\\"));var n=t.filePath.split("/");1==n.length&&(n=t.filePath.split("\\"));try{for(var o=0;o<i.length;o++)n.shift();n.pop(),e=n.length>0?n.join("/"):""}catch(r){console.log(r),e=""}return e},sortList:function(t,e){this.unSelectFilesById(),"asc"==e?this.files.sort(function(e,i){return e[t]<i[t]?-1:e[t]==i[t]?0:1}):this.files.sort(function(e,i){return e[t]>i[t]?-1:e[t]==i[t]?0:1})}})}),innorix("ControlBox/fileValidateRules",function(t){"use strict";var e=t("util"),i=t("i18n/lang");return{addDuplicateFile:function(t,n,o){return!n&&(!(o.option.maxMassFileListCount<o.getAllFiles().length)&&(!!e.array.find(o.getAllFiles(),function(e){return t.filePath===e.filePath})&&i("controlBox.fileDuplicate")))},maxFileCount:function(t,e,n){return e>0&&n.getFileCount()>=e&&i("controlBox.overFileCount",{count:e})},maxTotalSize:function(t,n,o){return n>0&&o.getTotalSize()+t.fileSize>n&&i("controlBox.overTotalSize",{size:e.string.humanFileSize(n)})},limitExtension:function(t,n){if(!n||0===n.length)return!1;var o=e.string.getFileExt(t.filePath).toLowerCase();return-1!=n.indexOf(o)&&i("controlBox.cannotFileExt",{ext:o})},allowExtension:function(t,n){if(!n)return!1;var o=e.string.getFileExt(t.filePath).toLowerCase();if(n.length>0){var r=n.indexOf(o);if(-1==r)return i("controlBox.cannotFileExt",{ext:o})}else if("object"==typeof n){var r=!1;for(var s in n)if(n[s].length>0&&-1!=n[s].indexOf(o)){r=!0;break}if(!r)return i("controlBox.cannotFileExt",{ext:o})}return!1},maxFileSize:function(t,n){return n>0&&t.fileSize>n&&i("controlBox.overFileSize",{size:e.string.humanFileSize(n)})}}}),innorix("ControlBox/FileValidator",function(t){"use strict";var e=t("klass"),i=t("util"),n=t("i18n/lang"),o=t("ControlBox/fileValidateRules");return e({constructor:function(t,e){this.controlBox=t,this.option=e},checkDemo:function(t){var e="";if(1==this.option.demo&&0==this.option.virtualTransfer){if(this.option.maxFileCount=10,this.option.maxTotalSize=2147483648,t.length>10||this.controlBox.getFileCount()+t.length>10)return e=n("controlBox.demo.overFileCount"),alert(e),{type:"overFileCount",message:n("controlBox.overFileCount"),file:null};var i=this.controlBox.getUploadFilesSize();for(var o in t)t.hasOwnProperty(o)&&(i+=t[o].fileSize);if(i>this.option.maxTotalSize)return e=n("controlBox.demo.overTotalSize"),alert(e),{type:"overTotalSize",message:n("controlBox.overFileCount"),file:null}}return!1},checkUploadFile:function(t,e){var n=this;return 1==this.option.demo&&0==this.option.virtualTransfer&&(this.option.maxFileCount=10,this.option.maxTotalSize=2147483648),i.array.some(o,function(e,i){var o=e(t,n.option[i],n.controlBox);return!!o&&{type:i,message:o,file:t}})},checkDownloadFile:function(t,e){var i,o=e.files;if(t.downloadUrl||(i="{file.downloadUrl} is required"),t.printFileName||(i="{file.printFileName} is required"),this.controlBox.option.skipFileSizeCheck&&!this.controlBox.option.agent||"undefined"==typeof t.fileSize&&(i="{file.fileSize} is required"),this.controlBox.option.maxFileCount&&this.controlBox.getFileCount()>=this.controlBox.option.maxFileCount&&(i=n("controlBox.overFileCount",{count:this.controlBox.option.maxFileCount})),!this.controlBox.option.addDuplicateFile)for(var r in o)o.hasOwnProperty(r)&&t.downloadUrl==o[r].downloadUrl&&(i=n("controlBox.fileDuplicate"));return!!i&&{type:"invalid_download_file",message:i,file:t}}})}),innorix("CONSTANT/COMMAND_HANDLER",function(){"use strict";return{BASE:0,COMET:1,RETRY:2}}),innorix("CONSTANT/ENV",function(t){"use strict";var e=t("userAgent"),i="https://127.0.0.1:4523";return"mac"==e.os.name&&(i="https://localhost:4523"),{AGENT_HTTP_URL:"http://127.0.0.1:4033",AGENT_HTTPS_URL:i,AGENT_HTTP_PRE_PORTS:["4033","4034","4035","4036","36039"],TRAY_VERSION:INNORIX_VERSION,INSTALL_PAGE:"/wp9/install/install.html",UPDATE_FILE_URL:"install/innowp9.exe",LICENSE:INNORIX_LICENSE,DEBUG:!1}}),innorix("CONSTANT/EVENT",function(){"use strict";return{AGENT_ADD_COMMAND:"addCommand",AGENT_READY:"agentReady",AGENT_COMPLETE_COMMAND:"completeCommand",AGENT_DONE_COMMAND:"doneCommand",AGENT_FAIL_COMMAND:"failCommand",CONTROL_LOAD_COMPLETE:"loadComplete",CONTROL_BEFORE_ADD_FILE:"beforeAddFile",CONTROL_AFTER_ADD_FILES:"afterAddFiles",CONTROL_BEFORE_REMOVE_FILES:"beforeRemoveFiles",CONTROL_REMOVE_FILES:"removeFiles",CONTROL_ADD_FILE_ERROR:"addFileError",CONTROL_SELECT_ROWS:"onSelectRows",CONTROL_UNSELECT_ROWS:"onUnSelectRows",CONTROL_DESTROY:"onDestroy",CONTROL_DBL_CLICK_ROWS:"onDblClickRows",CONTROL_SET_DROPZONE_ERROR:"setDropzoneError",CONTROL_SORT:"afterSortFiles",TRANSFER_UPLOAD_ALWAYS:"uploadAlways",TRANSFER_UPLOAD_CREATE:"uploadCreate",TRANSFER_UPLOAD_CREATE_GUIDE:"uploadCreateGuide",TRANSFER_UPLOAD_CREATE_QR:"uploadCreateQr",TRANSFER_UPLOAD_START:"uploadStart",TRANSFER_UPLOAD_COMPLETE:"__uploadComplete",TRANSFER_UPLOAD_COMPLETE_USER:"uploadComplete",TRANSFER_UPLOAD_CANCEL:"uploadCancel",TRANSFER_UPLOAD_ERROR:"uploadError",TRANSFER_UPLOAD_PAUSE:"uploadPause",TRANSFER_UPLOAD_PAUSING:"uploadPausing",TRANSFER_UPLOAD_RESUME:"uploadResume",TRANSFER_UPLOAD_PROGRESS:"uploadProgress",TRANSFER_UPLOAD_RETRY:"uploadRetry",TRANSFER_UPLOAD_WORKING:"workingServer",TRANSFER_UPLOAD_WORKING_STOP:"workingServerStop",TRANSFER_HTML5_UPLOAD_WORKING_STOP:"htmlWorkingServerStop",TRANSFER_UPLOAD_THUMBNAIL:"thumbnailStart",TRANSFER_UPLOAD_THUMBNAIL_STOP:"thumbnailComplete",TRANSFER_DOWNLOAD_ALWAYS:"downloadAlways",TRANSFER_DOWNLOAD_CREATE:"downloadCreate",TRANSFER_DOWNLOAD_CREATE_GUIDE:"downloadCreateGuide",TRANSFER_DOWNLOAD_CREATE_QR:"downloadCreateQr",TRANSFER_DOWNLOAD_START:"downloadStart",TRANSFER_DOWNLOAD_COMPLETE:"__downloadComplete",TRANSFER_DOWNLOAD_COMPLETE_USER:"downloadComplete",TRANSFER_DOWNLOAD_CANCEL:"downloadCancel",TRANSFER_DOWNLOAD_ERROR:"downloadError",TRANSFER_DOWNLOAD_PAUSE:"downloadPause",TRANSFER_DOWNLOAD_PAUSING:"downloadPausing",TRANSFER_DOWNLOAD_RESUME:"downloadResume",TRANSFER_DOWNLOAD_PROGRESS:"downloadProgress",TRANSFER_DOWNLOAD_RETRY:"downloadRetry",TRANSFER_DOWNLOAD_WORKING:"downloadWorkingServer",TRANSFER_DOWNLOAD_WORKING_STOP:"downloadWorkingServerStop",TRANSFER_CHANGE_DOWNLOADPATH:"changeDownloadPath",UPDATE_PATCH_EXECUTE:"updatePatchExecute",UPDATE_PATCH_COMPLETE:"updatePatchComplete",DROPZONE_SHOW:"dropzoneShow",DROPZONE_HIDE:"dropzoneHide",DROPZONE_STATE_SHOW:"dropstateShow",DROPZONE_STATE_HIDE:"dropstateHide",TRANSFER_GRAPH_SHOW:"transferGraphShow",TRANSFER_GRAPH_HIDE:"transferGraphHide",FILE_PROCESSING_STATE_SHOW:"fileProcessingStateShow",FILE_PROCESSING_STATE_HIDE:"fileProcessingStateHide",GRAPH_SHOW:"graphShow",GRAPH_HIDE:"graphHide",AGENT_FILE_DIALOG_SHOW:"agentFileDialogShow",AGENT_FILE_DIALOG_HIDE:"agentFileDialogHide",POPUP_BLOCKED:"installPopupBlocked"}}),innorix("CONSTANT/LOGIN_ERROR",function(){"use strict";return{AREADY_LOGGED_ANOTHER_ID:1,TRANSFFERING:2,LICENSE_EXPIRED:3}}),innorix("CONSTANT/TRANSFER_STATE",function(){"use strict";return{BEFORE:"Before",READY:"Ready",TRANSFERRING:"Transferring",COMPLETE:"Complete",CANCEL:"Cancel",ERROR:"Error",PAUSE:"Pause"}}),innorix("CONSTANT/UPDATE_STATE",function(){"use strict";return{DOWNLOAD_START:1,DOWNLOADING:2,ALREADY_FILE:3,NEWEST_VERSION:4}}),innorix("i18n/lang",function(t){"use strict";function e(e,i){i=i||{};var o=t("i18n/resource/"+n),r=o[e]||e;for(var s in i)i.hasOwnProperty(s)&&(r=r.replace(new RegExp("{"+s+"}","g"),i[s]));return r}var i=["en","ko","auto"],n="en";return-1===i.indexOf(n)&&(n=i[0]),e.get=function(){return n},e.set=function(t){if(-1!==i.indexOf(t))if("auto"==t){var e=(window.navigator.language||window.navigator.userLanguage).substring(0,2);-1!==i.indexOf(e)&&(n=e)}else n=t},e.addResource=function(t,e){i.push(t),innorix("i18n/resource/"+t,function(){return e})},e.resourceGetter=function(t){var i={openFileDialog:{ID_OPEN_FILE_DIALOG_TITLE:e("ID_OPEN_FILE_DIALOG_TITLE")},directoryDialog:{ID_DIR_DIALOG_TITLE:e("ID_DIR_DIALOG_TITLE"),ID_DIR_DIALOG_BUTTON:e("ID_DIR_DIALOG_BUTTON")},total:{ID_ASK_TITLE:e("ID_ASK_TITLE"),ID_ASK_FILENAME:e("ID_ASK_FILENAME"),ID_ASK_EXIST:e("ID_ASK_EXIST"),ID_ASK_NEWFILESIZE:e("ID_ASK_NEWFILESIZE"),ID_ASK_ALLCHECK:e("ID_ASK_ALLCHECK"),ID_ASK_BTN_OVERWRITE:e("ID_ASK_BTN_OVERWRITE"),ID_ASK_BTN_RESUME:e("ID_ASK_BTN_RESUME"),ID_ASK_BTN_SAVEAS:e("ID_ASK_BTN_SAVEAS"),ID_ASK_BTN_CANCEL:e("ID_ASK_BTN_CANCEL"),ID_ASK_BTN_JUMP:e("ID_ASK_BTN_JUMP"),ID_ASK_BTN_SAVEAUTO:e("ID_ASK_BTN_SAVEAUTO"),ID_ASK_TEXT_AUTONAME_TAIL:e("ID_ASK_TEXT_AUTONAME_TAIL"),ID_ASK_ALLCHECK_NEW:e("ID_ASK_ALLCHECK_NEW"),ID_ASK_SUN:e("ID_ASK_SUN"),ID_ASK_MON:e("ID_ASK_MON"),ID_ASK_TUE:e("ID_ASK_TUE"),ID_ASK_WED:e("ID_ASK_WED"),ID_ASK_THU:e("ID_ASK_THU"),ID_ASK_FRI:e("ID_ASK_FRI"),ID_ASK_SAT:e("ID_ASK_SAT"),ID_ASK_AM:e("ID_ASK_AM"),ID_ASK_PM:e("ID_ASK_PM"),ID_MSG_ACCESS_DENIED:e("ID_MSG_ACCESS_DENIED"),ID_ERRTITLE_FILE_DOWNLOAD_FAIL:e("ID_ERRTITLE_FILE_DOWNLOAD_FAIL"),ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL:e("ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL"),ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL:e("ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL"),ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR:e("ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR"),ID_ERRTITLE_SERVER_SCRIPT_ERROR:e("ID_ERRTITLE_SERVER_SCRIPT_ERROR"),ID_ERRTITLE_SEND_INFO_FAIL:e("ID_ERRTITLE_SEND_INFO_FAIL"),ID_ERRTITLE_WRITE_UPLOAD_ERROR:e("ID_ERRTITLE_WRITE_UPLOAD_ERROR"),ID_ERRMSG_SEND_HEADER_FAIL:e("ID_ERRMSG_SEND_HEADER_FAIL"),ID_OPEN_FILE_DIALOG_TITLE:e("ID_OPEN_FILE_DIALOG_TITLE"),ID_DIR_DIALOG_TITLE:e("ID_DIR_DIALOG_TITLE"),ID_DIR_DIALOG_BUTTON:e("ID_DIR_DIALOG_BUTTON"),ID_DOWNLOAD_PATH_DIALOG:e("ID_DOWNLOAD_PATH_DIALOG"),ID_DOWNLOAD_PATH_DIALOG_BUTTON:e("ID_DOWNLOAD_PATH_DIALOG_BUTTON")}},n=/iPhone|iPad|iPod|Android|SamsungBrowser/i.test(navigator.userAgent);return i[t]?n?i[t]:JSON.stringify(i[t]):n?i.total:JSON.stringify(i.total)},e}),innorix("HTML/HTML",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=(t("i18n/lang"),t("server")),r=t("CONSTANT/TRANSFER_STATE"),s={ENV:t("CONSTANT/ENV"),EVENT:t("CONSTANT/EVENT")};return i({constructor:function(){this.speedCheck=!1,this.uploader={},this.fileIndex=0,this.showAnimationServer=!1},openFileDialog:function(t,i,n,o,r){var s=this,a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);r.find(".irx-hidden-input").remove();var l=e("<input>").addClass("irx-hidden-input").attr("type","file").attr("multiple","multiple");if(n){var h="";if(n.length>0)for(var c=0;c<n.length;++c)h+="."+n[c]+", ";else if("object"==typeof n)for(var u in n)if(n[u].length>0)for(var c=0;c<n[u].length;++c)h+="."+n[u][c]+", ";""!=l&&l.attr("accept",h)}l.css({position:"absolute",top:0,left:0,width:0,height:0}),l.bind("change",function(){var t=s.parseAgentFileType(e(this).prop("files"));o({value:t}),e(this).remove()}),l.appendTo(r),a?setTimeout(function(){l.click()},100):l.click()},openFileDialogSingle:function(t,i,n,o,r){var s=this;r.find(".irx-hidden-input").remove();var a=e("<input>").addClass("irx-hidden-input").attr("type","file");if(n){var l="";if(n.length>0)for(var h=0;h<n.length;++h)l+="."+n[h]+", ";else if("object"==typeof n)for(var c in n)if(n[c].length>0)for(var h=0;h<n[c].length;++h)l+="."+n[c][h]+", ";""!=a&&a.attr("accept",l)}a.css({position:"absolute",top:0,left:0,width:0,height:0}),a.on("change",function(){var t=s.parseAgentFileType(e(this).prop("files"));o({value:t}),e(this).remove()}),a.appendTo(r),a.click()},directoryDialog:function(t,i,n){var o=this;n.find(".irx-hidden-input").remove();var r=e("<input>").addClass("irx-hidden-input").attr("type","file").attr("multiple","multiple").attr("webkitdirectory","");r.css({position:"absolute",top:0,left:0,width:0,height:0}),r.on("change",function(){var t=o.parseAgentFileType(e(this).prop("files"));i({value:t}),e(this).remove()}),r.appendTo(n),r.click()},parseAgentFileType:function(t){for(var e=[],i="",o=0;o<t.length;o++)i=n.string.generateUUID(),e.push({basePath:"",filePath:""+t[o].name,fileSize:t[o].size,id:i,printFileName:t[o].name,fileExtType:n.string.getFileExtType(t[o].name).toLowerCase(),rootName:"",folderName:"",rowID:i,selected:!1,transferType:"upload",file:t[o]});return e},htmlUpload:function(t,e,i,n){i.draggableTransferWindow&&0==i.iframeView&&n.views.initDraggable();var o=this;this.uploader.files=t,this.fileIndex=0,this.uploader.controlBox=e,this.uploader.option=i,this.uploader.manager=n,this.uploader.errorCount=0,this.uploader.transferData={transferID:n.lastTransferring.id,files:[],totalSize:0},this.uploader.transferringSessionCount=0,this.uploader.lastTimestamp=Date.now(),this.uploader.displayTimestamp=Date.now(),!1===this.speedCheck?this.uploadSpeedCheck(i).done(function(){o.speedCheck=!0,o.getServerInfo(t,e,i,n),n.emit(s.EVENT.TRANSFER_UPLOAD_CREATE,n.lastTransferring.lastStatus)}).fail(function(){o.getServerInfo(t,e,i,n),n.emit(s.EVENT.TRANSFER_UPLOAD_CREATE,n.lastTransferring.lastStatus)}):(o.getServerInfo(),n.emit(s.EVENT.TRANSFER_UPLOAD_CREATE,n.lastTransferring.lastStatus))},htmlAjaxOption:function(t){
|
|
var i=this,n=e("meta[name='_csrf']").attr("content"),o=e("meta[name='_csrf_header']").attr("content");return{url:this.uploader.option.uploadUrl,data:t,method:"POST",processData:!1,contentType:!1,dataType:"text",beforeSend:function(t){t.setRequestHeader("html5",!0),i.uploader.option.useCsrf&&t.setRequestHeader(o,n)}}},uploadSpeedCheck:function(){var t=new FormData;return t.append("_action","speedCheck"),e.ajax(this.htmlAjaxOption(t))},prepareHtmlUpload:function(t){this.setHtmlTransferUI(t)},getServerInfo:function(){var t=this,i={_action:"getServerInfo",_innorix:"MultiSessionUpload",_product:"MS"};for(var n in this.uploader.manager.lastTransferring.option.postData)i[n]=encodeURIComponent(this.uploader.manager.lastTransferring.option.postData[n]);var o=this.getHTMLFormData(i);if(this.showAnimationServer=!1,this.uploader.errorCount>this.uploader.option.retryCount){this.uploader.manager.lastTransferring.lastStatus.state="Error",this.uploader.manager.emit(s.EVENT.TRANSFER_UPLOAD_ERROR,this.uploader.manager.lastTransferring.lastStatus),this.uploader.controlBox.emit(s.EVENT.TRANSFER_UPLOAD_ERROR,this.uploader.manager.lastTransferring.lastStatus)}else e.ajax(this.htmlAjaxOption(o)).done(function(e){"0000"==t.parseResponseText(e).file_code&&t.getFileInfo()})},setHtmlTransferUI:function(t){if("compact"==t.skin)if(t.iframeView){var i=null;i="parent"==t.iframeViewLocation?parent:"top"==t.iframeViewLocation?top:parent,i.jQuery(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),i.jQuery(".irx_transferWin_wrapper").find(".irx_transferWin").css({height:"320px"}),i.jQuery(".irx_transferWin_wrapper").find(".irx_container").css({height:"265px"}),i.jQuery(".irx_transferWin_wrapper").find(".irx_bottom").css({top:"295px"}),i.jQuery(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"})}else e(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),e(".irx_transferWin_wrapper").find(".irx_transferWin").css({height:"320px"}),e(".irx_transferWin_wrapper").find(".irx_container").css({height:"265px"}),e(".irx_transferWin_wrapper").find(".irx_bottom").css({top:"295px"}),e(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"});else if(t.iframeView){var i=null;i="parent"==t.iframeViewLocation?parent:"top"==t.iframeViewLocation?top:parent,i.jQuery(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),i.jQuery(".irx_transferWin").css({height:"140px"}),i.jQuery(".irx_transferWin_wrapper").find(".irx_container").css({height:"85px"}),i.jQuery(".irx_transferWin_wrapper").find(".irx_bottom").css({top:"115px"}),i.jQuery(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"})}else e(".irx_transferWin_wrapper").find(".irx_btnGroup .irx_controller").hide(),e(".irx_transferWin_wrapper").find(".irx_transferWin").css({height:"140px"}),e(".irx_transferWin_wrapper").find(".irx_container").css({height:"85px"}),e(".irx_transferWin_wrapper").find(".irx_bottom").css({top:"115px"}),e(".irx_transferWin_wrapper").find(".irx_toggle_graph").css({display:"none"})},getFileInfo:function(){this.showAnimationServer=!1;var t=this,i=this.uploader.files[t.fileIndex];"undefined"==typeof i.customValue&&(i.customValue=[]),t.uploader.files[t.fileIndex].startTotalTransferTime=(new Date).getTime(),i.transferSize=0,i.transferringCount=0,i.nextStartOffset=0;var n=this.uploader.manager,o={_action:"getFileInfo",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(i.printFileName),_unique_filename:encodeURIComponent(i.uniqueFileName),_filesize:i.fileSize,_folder:"",_clientpath:"",_compressed:"0"};for(var r in n.lastTransferring.option.postData)o[r]=encodeURIComponent(n.lastTransferring.option.postData[r]);for(var r in i.postData)o[r]=encodeURIComponent(i.postData[r]);var a=this.getHTMLFormData(o);e.ajax(this.htmlAjaxOption(a)).done(function(e){var i=t.parseResponseText(e);if("0000"==i.file_code){if(t.uploader.controlBox.emit(s.EVENT.TRANSFER_UPLOAD_START,n.lastTransferring.lastStatus),t.setHtmlTransferUI(t.uploader.controlBox.option),n.emit(s.EVENT.TRANSFER_UPLOAD_START,n.lastTransferring.lastStatus),n.isPlayingHtml()){if("undefined"!=typeof i.file_customvalue&&i.file_customvalue){var o=JSON.parse(i.file_customvalue);for(var r in o)t.uploader.files[t.fileIndex].customValue[r]=o[r]}"undefined"!=typeof i.file_uploadid&&i.file_uploadid&&(t.uploader.files[t.fileIndex].uploadId=i.file_uploadid,t.uploader.files[t.fileIndex].fileSlices=[]);for(var a=t.uploader.transferringSessionCount;a<t.uploader.option.sessionCount&&t.attachFile(i);a++);}}else n.isPlayingHtml()&&(t.setHtmlTransferUI(t.uploader.controlBox.option),t.uploader.errorCount=t.uploader.errorCount+1,t.getFileInfo())}).fail(function(){n.isPlayingHtml()&&(t.setHtmlTransferUI(t.uploader.controlBox.option),t.uploader.errorCount=t.uploader.errorCount+1,t.getFileInfo())})},attachFile:function(t){this.showAnimationServer=!1;var i=this,o=this.uploader.files[i.fileIndex],a=this.uploader.manager;if(0==o.nextStartOffset&&(i.uploader.files[i.fileIndex].startTransferTime=(new Date).getTime()),0==o.fileSize)return i.uploader.files[i.fileIndex].endTransferTime=(new Date).getTime(),i.attachFileCompleted(t),!1;if(o.nextStartOffset==o.fileSize||i.uploader.transferringSessionCount>=i.uploader.option.sessionCount)return!1;var l=1e6;0<this.uploader.option.uploadSliceSize?l=this.uploader.option.uploadSliceSize:0<this.uploader.option.sliceSize&&(l=this.uploader.option.sliceSize),this.uploader.option.isPresignedUrl&&5242880>l&&(l=5242880);var h=o.nextStartOffset,c=h+l-1;c>o.fileSize&&(c=o.fileSize-1);var u=1;0<h&&(u=h/l+1),o.nextStartOffset=c+1;var d=n.string.getFilePath(t.file_savepath),p={_action:"attachFile",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(o.printFileName),_new_filename:encodeURIComponent(t.file_savefilename),_serverpath:encodeURIComponent(t.file_savepath),_unique_filename:encodeURIComponent(o.uniqueFileName),_unique_filepath:encodeURIComponent(d+"/"+o.uniqueFileName),_filesize:o.fileSize,_folder:"",_clientpath:"",_compressed:"0",_encrypt:"0",_index:u,_empty_folder:"0",_start_offset:h,_end_offset:c};this.uploader.option.isPresignedUrl&&(p._presigngedUrl="1"),"undefined"!=typeof o.uploadId&&""!=o.uploadId&&(p._uploadId=o.uploadId);var f=o;f.state="Transferring",f.statusMode="html",a.emit(s.EVENT.TRANSFER_UPLOAD_ALWAYS,f);for(var g in a.lastTransferring.option.postData)p[g]=encodeURIComponent(a.lastTransferring.option.postData[g]);for(var g in o.postData)p[g]=encodeURIComponent(o.postData[g]);for(var g in o.customValue)p[g]=encodeURIComponent(o.customValue[g]);if(!this.uploader.option.isPresignedUrl){var m=o.file.slice(h,c+1);p._file=m}var v=0,_=0,x=this.getHTMLFormData(p),y=this.htmlAjaxOption(x);return y.xhr=function(){var t=new window.XMLHttpRequest;return t.upload.addEventListener("progress",function(e){if(a.isPlayingHtml()||t.abort(),!i.uploader.option.isPresignedUrl&&e.lengthComputable){var n=e.total-(c-h+1);if(0<e.loaded-n){var l=e.loaded-n;a.lastTransferring.lastStatus.state=r.TRANSFERRING;var u=i.uploader.lastTimestamp,d=Date.now();a.lastTransferring.lastStatus.transferSize+=l-_,a.lastTransferring.lastStatus.speed=a.lastTransferring.lastStatus.transferSize*(1e3/(d-u)),a.lastTransferring.lastStatus.progress=Math.ceil(a.lastTransferring.lastStatus.transferSize/a.lastTransferring.lastStatus.totalSize*100),o.transferSize+=l-_,v+=l-_,_=l,250<d-i.uploader.displayTimestamp&&(i.uploader.displayTimestamp=d,i.uploader.controlBox.emit(s.EVENT.TRANSFER_UPLOAD_PROGRESS),a.emit(s.EVENT.TRANSFER_UPLOAD_PROGRESS,a.lastTransferring.lastStatus))}}},!1),t},i.uploader.transferringSessionCount++,o.transferringCount++,e.ajax(y).done(function(e){var n=i.parseResponseText(e);if("0000"!=n.file_code)return o.transferSize-=v,a.lastTransferring.lastStatus.transferSize-=v,!!a.isPlayingHtml()&&(i.retryAttachFile(t,h,c),!0);if("undefined"!=typeof n.file_presignedurl&&n.file_presignedurl&&(i.uploader.files[i.fileIndex].fileSlices[u]={},i.uploader.files[i.fileIndex].fileSlices[u].presignedUrl=n.file_presignedurl),"undefined"!=typeof n.file_blockid&&n.file_blockid&&(i.uploader.files[i.fileIndex].fileSlices[u].eTag=n.file_blockid),i.uploader.option.isPresignedUrl)return i.attachFileByPut(t,u,h,c),!0;if(i.uploader.transferringSessionCount--,o.transferringCount--,o.transferSize==o.fileSize&&0==o.transferringCount){if("undefined"!=typeof n.file_customvalue&&n.file_customvalue){var r=JSON.parse(n.file_customvalue);for(var s in r)i.uploader.files[i.fileIndex].customValue[s]=r[s]}i.uploader.files[i.fileIndex].endTransferTime=(new Date).getTime(),i.attachFileCompleted(t)}else if(o.nextStartOffset!=o.fileSize)return!!a.isPlayingHtml()&&(i.attachFile(t),!0)}).fail(function(){return o.transferSize-=v,a.lastTransferring.lastStatus.transferSize-=v,i.uploader.transferringSessionCount--,o.transferringCount--,!!a.isPlayingHtml()&&(i.retryAttachFile(t,h,c),!0)}),!0},retryAttachFile:function(t,i,o){this.showAnimationServer=!1;var a=this,l=this.uploader.files[a.fileIndex],h=this.uploader.manager;if(0==l.nextStartOffset&&(a.uploader.files[a.fileIndex].startTransferTime=(new Date).getTime()),i==l.fileSize||a.uploader.transferringSessionCount>=a.uploader.option.sessionCount)return!1;var c=1e6;0<this.uploader.option.uploadSliceSize?c=this.uploader.option.uploadSliceSize:0<this.uploader.option.sliceSize&&(c=this.uploader.option.sliceSize),this.uploader.option.isPresignedUrl&&5242880>c&&(c=5242880);var u=1;0<i&&(u=i/c+1),o>l.fileSize&&(o=l.fileSize-1);var d=n.string.getFilePath(t.file_savepath),p={_action:"attachFile",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(l.printFileName),_new_filename:encodeURIComponent(t.file_savefilename),_serverpath:encodeURIComponent(t.file_savepath),_unique_filename:encodeURIComponent(l.uniqueFileName),_unique_filepath:encodeURIComponent(d+"/"+l.uniqueFileName),_filesize:l.fileSize,_folder:"",_clientpath:"",_compressed:"0",_encrypt:"0",_index:u,_empty_folder:"0",_start_offset:i,_end_offset:o};this.uploader.option.isPresignedUrl&&(p._presigngedUrl="1"),"undefined"!=typeof l.uploadId&&""!=l.uploadId&&(p._uploadId=l.uploadId);for(var f in h.lastTransferring.option.postData)p[f]=encodeURIComponent(h.lastTransferring.option.postData[f]);for(var f in l.postData)p[f]=encodeURIComponent(l.postData[f]);for(var f in l.customValue)p[f]=encodeURIComponent(l.customValue[f]);if(!this.uploader.option.isPresignedUrl){var g=l.file.slice(i,o+1);p._file=g}var m=0,v=0,_=this.getHTMLFormData(p),x=this.htmlAjaxOption(_);return x.xhr=function(){var t=new window.XMLHttpRequest;return t.upload.addEventListener("progress",function(e){if(h.isPlayingHtml()||t.abort(),!a.uploader.option.isPresignedUrl&&e.lengthComputable){var n=e.total-(o-i+1);if(0<e.loaded-n){var c=e.loaded-n;h.lastTransferring.lastStatus.state=r.TRANSFERRING;var u=a.uploader.lastTimestamp,d=Date.now();h.lastTransferring.lastStatus.transferSize+=c-v,h.lastTransferring.lastStatus.speed=h.lastTransferring.lastStatus.transferSize*(1e3/(d-u)),h.lastTransferring.lastStatus.progress=Math.ceil(h.lastTransferring.lastStatus.transferSize/h.lastTransferring.lastStatus.totalSize*100),l.transferSize+=c-v,m+=c-v,v=c,250<d-a.uploader.displayTimestamp&&(a.uploader.displayTimestamp=d,a.uploader.controlBox.emit(s.EVENT.TRANSFER_UPLOAD_PROGRESS),h.emit(s.EVENT.TRANSFER_UPLOAD_PROGRESS,h.lastTransferring.lastStatus))}}},!1),t},a.uploader.transferringSessionCount++,l.transferringCount++,e.ajax(x).done(function(e){var n=a.parseResponseText(e);if("0000"!=n.file_code)return l.transferSize-=m,h.lastTransferring.lastStatus.transferSize-=m,!!h.isPlayingHtml()&&(a.retryAttachFile(t,i,o),!0);if("undefined"!=typeof n.file_presignedurl&&n.file_presignedurl&&(a.uploader.files[a.fileIndex].fileSlices[u]={},a.uploader.files[a.fileIndex].fileSlices[u].presignedUrl=n.file_presignedurl),"undefined"!=typeof n.file_blockid&&n.file_blockid&&(a.uploader.files[a.fileIndex].fileSlices[u].eTag=n.file_blockid),a.uploader.option.isPresignedUrl)return a.attachFileByPut(t,u,i,o),!0;if(a.uploader.transferringSessionCount--,l.transferringCount--,l.transferSize==l.fileSize&&0==l.transferringCount){if("undefined"!=typeof n.file_customvalue&&n.file_customvalue){var r=JSON.parse(n.file_customvalue);for(var s in r)a.uploader.files[a.fileIndex].customValue[s]=r[s]}a.uploader.files[a.fileIndex].endTransferTime=(new Date).getTime(),a.attachFileCompleted(t)}else if(l.nextStartOffset!=l.fileSize)return!!h.isPlayingHtml()&&(a.attachFile(t),!0)}).fail(function(){return l.transferSize-=m,h.lastTransferring.lastStatus.transferSize-=m,a.uploader.transferringSessionCount--,l.transferringCount--,!!h.isPlayingHtml()&&(a.retryAttachFile(t,i,o),!0)}),!0},attachFileByPut:function(t,i,n,o){this.showAnimationServer=!1;var a=this,l=this.uploader.files[a.fileIndex],h=this.uploader.manager,c=l.file.slice(n,o+1),u=l.fileSlices[i].presignedUrl,d=0,p=0,f=e("meta[name='_csrf']").attr("content"),g=e("meta[name='_csrf_header']").attr("content"),m={url:u,data:c,method:"PUT",timeout:3e4,processData:!1,beforeSend:function(t){a.uploader.option.useCsrf&&t.setRequestHeader(g,f)}};return m.xhr=function(){var t=new window.XMLHttpRequest;return t.upload.addEventListener("progress",function(e){if(h.isPlayingHtml()||t.abort(),e.lengthComputable){var i=e.total-(o-n+1);if(0<e.loaded-i){var c=e.loaded-i;h.lastTransferring.lastStatus.state=r.TRANSFERRING;var u=a.uploader.lastTimestamp,f=Date.now();h.lastTransferring.lastStatus.transferSize+=c-p,h.lastTransferring.lastStatus.speed=h.lastTransferring.lastStatus.transferSize*(1e3/(f-u)),h.lastTransferring.lastStatus.progress=Math.ceil(h.lastTransferring.lastStatus.transferSize/h.lastTransferring.lastStatus.totalSize*100),l.transferSize+=c-p,d+=c-p,p=c,250<f-a.uploader.displayTimestamp&&(a.uploader.displayTimestamp=f,a.uploader.controlBox.emit(s.EVENT.TRANSFER_UPLOAD_PROGRESS),h.emit(s.EVENT.TRANSFER_UPLOAD_PROGRESS,h.lastTransferring.lastStatus))}}},!1),t},e.ajax(m).done(function(e,n,o){a.uploader.transferringSessionCount--,l.transferringCount--;var r=o.getResponseHeader("ETag");if(r&&(r=r.replace(/\"/gi,""),a.uploader.files[a.fileIndex].fileSlices[i].eTag=r),l.transferSize==l.fileSize&&0==l.transferringCount)a.uploader.files[a.fileIndex].endTransferTime=(new Date).getTime(),a.attachFileCompleted(t);else if(l.nextStartOffset!=l.fileSize)return!!h.isPlayingHtml()&&(a.attachFile(t),!0)}).fail(function(e){return l.transferSize-=d,h.lastTransferring.lastStatus.transferSize-=d,a.uploader.transferringSessionCount--,l.transferringCount--,!!h.isPlayingHtml()&&(a.retryAttachFile(t,n,o),!0)}),!0},attachFileCompleted:function(t){var i=this,o=t,r=this.uploader.files[i.fileIndex],a=i.uploader.manager,l=n.string.getFilePath(t.file_savepath),h={_action:"attachFileCompleted",_innorix:"MultiSessionUpload",_product:"MS",_orig_filename:encodeURIComponent(r.printFileName),_new_filename:encodeURIComponent(t.file_savefilename),_filepath:encodeURIComponent(t.file_savepath),_unique_filename:encodeURIComponent(r.uniqueFileName),_unique_filepath:encodeURIComponent(l+"/"+r.uniqueFileName),_filesize:r.fileSize,_compressed:"0",_compress_crc32:"0",_compressed_size:"0",_uncompressed_size:"0",_check_integrity:"0",_compress_upload_type:"0",_integrity_crc32:"0",_integrity_md5:"0",_merging:"0",_encrypt:"0"};if("undefined"!=typeof r.uploadId&&""!=r.uploadId){h._uploadId=r.uploadId;var c=[];for(var u in r.fileSlices){var d={};d.index=u,d.eTag=r.fileSlices[u].eTag,c.push(d)}var p=JSON.stringify(c);h._partETags=p}for(var f in a.lastTransferring.option.postData)h[f]=encodeURIComponent(a.lastTransferring.option.postData[f]);for(var f in r.postData)h[f]=encodeURIComponent(r.postData[f]);for(var f in r.customValue)h[f]=encodeURIComponent(r.customValue[f]);var g=this.getHTMLFormData(h);this.showAnimationServer=!0,a.emit(s.EVENT.TRANSFER_HTML5_UPLOAD_WORKING_STOP),setTimeout(function(){i.showAnimationServer},3e3),e.ajax(this.htmlAjaxOption(g)).done(function(t){var e=i.parseResponseText(t);if("undefined"!=typeof e.file_customvalue&&e.file_customvalue){var n=JSON.parse(e.file_customvalue);for(var l in n)i.uploader.files[i.fileIndex].customValue[l]=n[l]}i.showAnimationServer=!1,i.uploader.files[i.fileIndex].endTotalTransferTime=(new Date).getTime();var h=i.uploader.files[i.fileIndex].endTotalTransferTime-i.uploader.files[i.fileIndex].startTotalTransferTime,c=i.uploader.files[i.fileIndex].endTransferTime-i.uploader.files[i.fileIndex].startTransferTime,u={rowID:r.id,serverFileName:o.file_savefilename,serverFilePath:o.file_savepath,fileSize:r.fileSize,clientFileName:r.printFileName,rootName:"",postData:r.postData,customValue:r.customValue,state:"Complete",statusMode:"html"};i.uploader.files[i.fileIndex].totalTransferTime=h,i.uploader.files[i.fileIndex].transferTime=c,i.uploader.transferData.totalSize+=parseFloat(r.fileSize),i.uploader.transferData.files.push(u),a.emit(s.EVENT.TRANSFER_UPLOAD_ALWAYS,u),i.fileIndex++,i.uploader.files.length>i.fileIndex?i.getFileInfo():i.uploadComplete()})},uploadComplete:function(){var t=this,i=this.uploader.transferData;t.fileIndex=0;var n=e.extend({},i);n.pathName=location.pathname,n.sliceSize=0,n.files=encodeURIComponent(JSON.stringify(n.files)),n.product=this.uploader.option.custom.product?this.uploader.option.custom.product:"webpages",n.subproduct=this.uploader.option.custom.subproduct?this.uploader.option.custom.subproduct:"html5",n.postData=this.uploader.option.postData,n.type="upload",n.retries=0,n.state=r.COMPLETE,n.speed=0,n.transferSize=n.totalSize,n.progress=100,n.usetime=Date.now()-this.uploader.lastTimestamp;var a=t.uploader.manager;a.lastTransferring.lastStatus.state=r.COMPLETE,a.lastTransferring.lastStatus.postData=a.lastTransferring.option.postData;for(var l in a.lastTransferring.lastStatus.files)if(a.lastTransferring.lastStatus.files.hasOwnProperty(l)){var h=a.lastTransferring.lastStatus.files[l];for(var c in i.files)if(i.files.hasOwnProperty(c)){var u=i.files[c];if(h.id==u.rowID){a.lastTransferring.lastStatus.files[l].clientFileName=u.clientFileName,a.lastTransferring.lastStatus.files[l].serverFileName=u.serverFileName,a.lastTransferring.lastStatus.files[l].serverFilePath=u.serverFilePath,a.lastTransferring.lastStatus.files[l].fileState="complete",a.lastTransferring.lastStatus.files[l].clientFilePath="sandbox\\"+a.lastTransferring.lastStatus.files[l].filePath;for(var d in a.lastTransferring.option.postData)a.lastTransferring.lastStatus.files[l][d]=a.lastTransferring.option.postData[d];for(var d in u.postData)a.lastTransferring.lastStatus.files[l][d]=u.postData[d];for(var d in u.customValue)a.lastTransferring.lastStatus.files[l][d]=u.customValue[d];break}}}if(this.uploader.option.platformDepend){var p=e("meta[name='_csrf']").attr("content"),f=e("meta[name='_csrf_header']").attr("content");e.ajax({url:o.getBaseUrl()+"/api/webpage/onUpload?api_key="+o.getKey(),data:n,method:"POST",dataType:"json",beforeSend:function(e){t.uploader.option.useCsrf&&e.setRequestHeader(f,p)}}).done(function(t){a.emit(s.EVENT.TRANSFER_UPLOAD_COMPLETE,a.lastTransferring.lastStatus),a.emit(s.EVENT.TRANSFER_UPLOAD_COMPLETE_USER,a.lastTransferring.lastStatus),a.lastTransferring=null}).fail(function(){console.log("transferData input fail")})}else a.emit(s.EVENT.TRANSFER_UPLOAD_COMPLETE,a.lastTransferring.lastStatus),a.emit(s.EVENT.TRANSFER_UPLOAD_COMPLETE_USER,a.lastTransferring.lastStatus),a.lastTransferring=null},htmlDownload:function(t,i,n){i.emit(s.EVENT.TRANSFER_DOWNLOAD_START),i.view.$el.find("a.irx-fake-link").remove();var o=e("<a>").addClass("irx-fake-link");o.css({width:0,height:0,display:"none"}),i.view.$el.append(o),"string"==typeof n.downloadServerInfoUrl&&n.downloadServerInfoUrl&&""!==n.downloadServerInfoUrl?this.downloadGetServerInfo(t,o[0],0,i,n):this.doDownload(t,o[0],0,i,n)},downloadAndOpen:function(t,e,i){return console.log("not supported"),!0},parseResponseText:function(t){try{var e=unescape(decodeURIComponent(t))}catch(l){var e=t}for(var i=e.split("\n"),n={},o=0;o<i.length;o++){var r=i[o].match(/<(.*)>(.*)<\/(.*)>/);if(null!==r&&4==r.length){var s=r[1],a=r[2];n[s]=a}}var r=t.match(/<file_presignedurl>(.*)<\/file_presignedurl>/);return null!==r&&2==r.length&&(n.file_presignedurl=r[1]),n},getHTMLFormData:function(t){var e=new FormData;for(var i in t)if(t.hasOwnProperty(i)){if(null===t[i])continue;if("postData"==i)for(var n in t[i])e.append(n,t[i][n]);else e.append(i,t[i])}return e},getDropFile:function(t){return{value:this.parseAgentFileType(t.originalEvent.dataTransfer.files)}},downloadGetServerInfo:function(t,i,n,o,r){var s=this,a={_action:"getServerInfo",_innorix:"MultiSessionUpload",_product:"MS"};for(var l in r.postData)a[l]=encodeURIComponent(r.postData[l]);var h=this.getHTMLFormData(a),c=e("meta[name='_csrf']").attr("content"),u=e("meta[name='_csrf_header']").attr("content"),d={url:r.downloadServerInfoUrl,data:h,method:"POST",processData:!1,contentType:!1,dataType:"text",beforeSend:function(t){t.setRequestHeader("html5",!0),r.useCsrf&&t.setRequestHeader(u,c)}};e.ajax(d).done(function(e){"0000"==s.parseResponseText(e).file_code&&s.doDownload(t,i,n,o,r)})},downloadStartAction:function(t,i,n,o,r){var s=this,a=t[n];"undefined"==typeof a.customValue&&(a.customValue=[]);var l=a.downloadUrl;if("direct"!==r.downloadType){var h="_Action=DownloadStart";h=-1==l.indexOf("?")?"?"+h:"&"+h,l+=h}e.ajax({url:l,method:"GET"}).done(function(t){var e=s.parseResponseText(t);if(!("undefined"!=typeof e.file_customerrorcode&&e.file_customerrorcode||"undefined"!=typeof e.file_code&&e.file_code&&"0000"!=e.file_code)){if("undefined"!=typeof e.file_customvalue&&e.file_customvalue){var n=JSON.parse(e.file_customvalue);for(var o in n)a.customValue[o]=n[o]}"undefined"!=typeof a.customValue.fileSize&&a.customValue.fileSize&&(a.fileSize=a.customValue.fileSize);var l=a.downloadUrl;if("direct"!==r.downloadType){var h="_Html5=true";r.skipFileSizeCheck&&"undefined"!==r.skipFileSizeCheck||(h+="&_StartOffset=0&_EndOffset="+String(a.fileSize-1));for(var o in a.customValue)h+="&"+o+"="+a.customValue[o];h=-1==l.indexOf("?")?"?"+h:"&"+h,l+=h}i.href=l,i.target="_self",i.click()}}).fail(function(){console.log("transferData input fail")})},doDownload:function(t,i,s,a,l){var h=this;s||(s=0);try{if(0==t.length||t.length<=s){if(l.platformDepend){for(var c=0,u=0;u<t.length;u++)c+=t[u].fileSize;var d=n.string.generateUUID(),p={};p.pathName=location.pathname,p.sliceSize=0,p.files=encodeURIComponent(JSON.stringify(t)),p.product=l.custom.product?l.custom.product:"webpages",p.subproduct=l.custom.subproduct?l.custom.subproduct:"html5",p.progress=100,p.retries=0,p.speed=0,p.state=r.COMPLETE,p.transferID=d,p.postData=l.postData,p.type="download",p.totalSize=c,p.transferSize=c;var f=e("meta[name='_csrf']").attr("content"),g=e("meta[name='_csrf_header']").attr("content");e.ajax({url:o.getBaseUrl()+"/api/webpage/onDownload?api_key="+o.getKey(),data:p,method:"POST",dataType:"json",beforeSend:function(t){l.useCsrf&&t.setRequestHeader(g,f)}}).done(function(t){}).fail(function(){console.log("transferData input fail")})}return!0}if(1==l.useDownloadAction&&"direct"!==l.downloadType)this.downloadStartAction(t,i,s,a,l),setTimeout(function(){s++,h.doDownload(t,i,s,a,l)},l.downloadDelay);else{var m=t[s];if(l.isPresignedUrl){var v=m.downloadUrl;e.ajax({url:v,method:"GET"}).done(function(e){var n=JSON.parse(e),o=n.presignedUrl;i.href=o,i.target="_self",i.click(),setTimeout(function(){s++,h.doDownload(t,i,s,a,l)},l.downloadDelay)}).fail(function(){console.log("transferData input fail")})}else{var v=m.downloadUrl;if("direct"!==l.downloadType){var _="_Html5=true";l.skipFileSizeCheck&&"undefined"!==l.skipFileSizeCheck||(_+="&_StartOffset=0&_EndOffset="+String(m.fileSize-1)),_=-1==v.indexOf("?")?"?"+_:"&"+_,v+=_}i.href=v,i.target="_self",i.click(),setTimeout(function(){s++,h.doDownload(t,i,s,a,l)},l.downloadDelay)}}}catch(x){console.log("error.doDownload")}}})}),innorix("Klass/Composite",function(t){"use strict";var e=t("innoJquery");return t("klass")({constructor:function(t,i){this.__definedKlass=t,this.__instances=i||[];var n=this,o=t.prototype;e.each(o,function(t,i){!o.hasOwnProperty(t)&&n[t]||(n[t]=function(){var t=arguments;return e.map(n.__instances,function(e){return i.apply(e,t)})})})},__add:function(t){t instanceof this.__definedKlass&&this.__instances.push(t)},__remove:function(t){var e=this.__instances.indexOf(t);this.__instances.splice(e,1)}})}),innorix("Klass/Event",function(t){"use strict";var e=t("innoJquery");return t("klass")({constructor:function(){this._handlers={}},on:function(t,i){if(e.isPlainObject(t)){for(var n in t)t.hasOwnProperty(n)&&this.on(n,t[n]);return this}if(this.hasHandler(t)||(this._handlers[t]=[]),!e.isFunction(i))throw"not function! : "+t;return this._handlers[t].push(i),this},off:function(t,e){if(!e)return delete this._handlers[t],this;var i=this._handlers[t].indexOf(e);return-1!==i&&this._handlers.splice(i,1),this},emit:function(){var t=e.makeArray(arguments),i=t.shift();if(!this.hasHandler(i))return null;var n,o=this._handlers[i];for(var r in o)if(o.hasOwnProperty(r)){if(!o.hasOwnProperty(r))break;if(n=o[r],!1===n.apply(null,t))return!1}return!0},hasHandler:function(t,e){return!(!this._handlers.hasOwnProperty(t)||e&&-1===this._handlers[t].indexOf(e))}})}),innorix("Server/Client",function(t){"use strict";var e=t("innoJquery");return t("klass")({constructor:function(t,e){t&&this.setBaseUrl(t),e&&(this.key=e),this.lastRequest=null},setBaseUrl:function(t){this.baseUrl=t.replace(/[\/\s]+innoJquery/,"")},getBaseUrl:function(){return this.baseUrl},setKey:function(t){this.key=t},getKey:function(){return this.key},makeRequestUrl:function(t){return this.baseUrl+"/api/"+t+"?api_key="+this.key},request:function(t,i,n){return this.lastRequest=e.ajax({url:this.makeRequestUrl(i),type:t.toUpperCase(),dataType:"json",data:n||{}}),this.lastRequest}})}),innorix("Transfer/Manager",function(t){"use strict";var e=t("klass"),i=t("Klass/Event"),n=t("Transfer/View/Views"),o=t("Transfer/Transferring/Upload"),r=t("Transfer/Transferring/Download"),s=t("Transfer/Transferring/DownloadAndOpen"),a=t("singleton/agent"),l=t("singleton/html"),h=t("CONSTANT/EVENT");return e([i],{constructor:function(){i.call(this),this.lastTransferring=null,this.views=new n(this),this.currentErrorCount=0,this.stuckCount=0,this.htmlCancel=!1,this.workingServer=!1,this.resumeCondition=!1,this.disabledState=!1},isActive:function(){return this.lastTransferring&&!this.lastTransferring.ended},isPlaying:function(){return this.isActive()&&this.lastTransferring.playing},isPlayingHtml:function(){return!this.htmlCancel},isStarted:function(){return this.isActive()&&this.lastTransferring.started},isPause:function(){return this.isStarted()&&!this.lastTransferring.playing},inactive:function(){this.isActive()&&(this.lastTransferring.ended=!0)},getTransferring:function(){return this.isActive()?this.lastTransferring:null},prepareHtmlThumbnailUpload:function(t,e,i){this.isActive()||(i.draggableTransferWindow&&0==i.iframeView&&this.views.initDraggable(),i.resumeCondition=this.resumeCondition,this.lastTransferring=new o(t,this,e,i),!1===i.agent&&l.prepareHtmlUpload(i),this.emit(h.TRANSFER_UPLOAD_CREATE,this.lastTransferring.lastStatus))},upload:function(t,e,i,n){if(1==n);else if(this.isActive())return;i.draggableTransferWindow&&0==i.iframeView&&this.views.initDraggable(),i.resumeCondition=this.resumeCondition,this.lastTransferring=new o(t,this,e,i),i.showQrCode&&this.emit(h.TRANSFER_UPLOAD_CREATE_QR,this.lastTransferring),!1===i.agent?(this.htmlCancel=!1,l.htmlUpload(t,e,i,this)):(this.views.refreshStyle(),this.emit(h.TRANSFER_UPLOAD_CREATE,this.lastTransferring.lastStatus),"auto"==i.transferStart.upload?this.lastTransferring.play():this.emit(h.TRANSFER_UPLOAD_CREATE_GUIDE,this.lastTransferring.lastStatus))},download:function(t,e,i){this.isActive()||(i.draggableTransferWindow&&0==i.iframeView&&this.views.initDraggable(),this.lastTransferring=new r(t,this,e,i),this.emit(h.TRANSFER_DOWNLOAD_CREATE,this.lastTransferring.lastStatus),i.showQrCode&&this.emit(h.TRANSFER_DOWNLOAD_CREATE_QR,this.lastTransferring),"auto"==i.transferStart.download?this.lastTransferring.play():this.emit(h.TRANSFER_DOWNLOAD_CREATE_GUIDE,this.lastTransferring.lastStatus))},downloadAndOpen:function(t,e,i){i.draggableTransferWindow&&0==i.iframeView&&this.views.initDraggable(),i.showQrCode&&this.emit(h.TRANSFER_DOWNLOAD_CREATE_QR,this.lastTransferring),this.lastTransferring=new s(t,this,e,i),this.emit(h.TRANSFER_DOWNLOAD_CREATE,this.lastTransferring.lastStatus),i.transferStart.download,this.lastTransferring.play()},play:function(){this.isActive()&&!this.isStarted()&&this.lastTransferring.play()},cancel:function(){console.log("manager cancel"),this.htmlCancel=!0,this.isActive()&&(this.isStarted()&&this.lastTransferring.paused?(this.lastTransferring.cancel(),this.lastTransferring.handleOnCancel()):this.isStarted()&&!this.lastTransferring.paused?this.lastTransferring.cancel():this.lastTransferring.handleOnCancel(),this.resumeCondition=!0)},pause:function(){100!=this.lastTransferring.lastStatus.progress&&this.isActive()&&this.isPlaying()&&this.lastTransferring.pause()},resume:function(){this.isActive()&&this.isPause()&&this.lastTransferring.resume()},canChangeDownloadPath:function(){var t=this.lastTransferring;return this.isActive()&&"download"===t.getType()&&!t.started},downloadPathDialog:function(t){if(this.canChangeDownloadPath()){var e=this,i=this.lastTransferring;this.setDisabledState(!0),"undefined"==typeof FormData?a.downloadPathDialogFallback(t,function(t){e.canChangeDownloadPath()&&(i.setDownloadPath(t.value),e.setDisabledState(!1),e.emit(h.TRANSFER_CHANGE_DOWNLOADPATH,t.value))}):a.downloadPathDialog(t,function(t){e.canChangeDownloadPath()&&(i.setDownloadPath(t.value),e.setDisabledState(!1),e.emit(h.TRANSFER_CHANGE_DOWNLOADPATH,t.value))})}},showGraph:function(){console.log("show graph in manager")},setWorkingServer:function(){this.workingServer=!0,this.emit(h.TRANSFER_UPLOAD_WORKING)},stopWorkingServer:function(){this.workingServer&&(this.workingServer=!1,this.emit(h.TRANSFER_UPLOAD_WORKING_STOP))},initErrorCount:function(){this.currentErrorCount=0},addErrorCount:function(){return++this.currentErrorCount>this.lastTransferring.option.maximumErrorCount&&(this.currentErrorCount=0,!0)},addStuckCount:function(){this.stuckCount=0},resetStuckCount:function(){this.stuckCount=0},getStuckCount:function(){return this.stuckCount},resetResumeCondition:function(){this.resumeCondition=!1},setResumeType:function(t){this.lastTransferring.option.resumeType=t},setManagerDownloadPath:function(t){this.lastTransferring.setDownloadPath(t),this.emit(h.TRANSFER_CHANGE_DOWNLOADPATH,t)},setDisabledState:function(t){1==t?this.emit(h.AGENT_FILE_DIALOG_SHOW):this.emit(h.AGENT_FILE_DIALOG_HIDE),this.disabledState=t},getDisabledState:function(){return this.disabledState}})}),innorix("singleton/agent",function(t){"use strict";var e=t("CONSTANT/ENV"),i=t("Agent/Agent");return new i("https:"==window.location.protocol?e.AGENT_HTTPS_URL:e.AGENT_HTTP_URL)}),innorix("singleton/agentUpdater",function(t){"use strict";var e=t("CONSTANT/ENV"),i=t("AgentUpdater/AgentUpdater");return new i("https:"==window.location.protocol?e.AGENT_HTTPS_URL:e.AGENT_HTTP_URL)}),innorix("singleton/controlBoxAll",function(t){"use strict";var e=t("ControlBox/ControlBox");return new(t("Klass/Composite"))(e)}),innorix("singleton/html",function(t){"use strict";var e=t("CONSTANT/ENV"),i=t("HTML/HTML");return new i("https:"==window.location.protocol?e.AGENT_HTTPS_URL:e.AGENT_HTTP_URL)}),innorix("singleton/transferManager",function(t){"use strict";return new(t("Transfer/Manager"))}),innorix("utils/array",function(t){"use strict";var e=t("innoJquery");return{cryptoRandom:function(){try{for(var t,e,i=[];(e="."+i.join("")).length<30;){t=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(5));for(var n=0;n<t.length;n++){var o=t[n]<4e9?t[n].toString().slice(1):"";o.length>0&&(i[i.length]=o)}}return Number(e)}catch(r){
|
|
return Math.random()}},find:function(t,i){if(e.isArray(t)){for(var n=t.length-1;n>=0;n--)if(i(t[n],n))return t[n];return null}for(var o in t)if(t.hasOwnProperty(o)&&i(t[o],o))return t[o];return null},some:function(t,i){var n;if(e.isArray(t)){for(var o=t.length-1;o>=0;o--)if(n=i(t[o],o))return n;return null}for(var r in t)if(t.hasOwnProperty(r)&&(n=i(t[r],r)))return n;return null},sampleSize:function(t,e){var i=this,n=null===t?0:t.length;if(!n||e<1)return[];e=e>n?n:e;for(var o,r=-1,s=t.slice(0),a=[];++r<e;)o=Math.floor(i.cryptoRandom()*s.length),a.push(s.splice(o,1).shift());return a}}}),innorix("utils/cookie",function(){"use strict";return{set:function(t,e,i){var n,o;i=i||30,n=new Date,n.setDate(n.getDate()+i),o="expires="+n.toUTCString(),document.cookie=t+"="+e+"; "+o+"; path=/"},get:function(t){var e,i,n,o;for(t+="=",e=document.cookie.split("; "),i=0,n=e.length;i<n;i++)if(o=e[i],-1!==o.indexOf(t))return o.substring(t.length);return""},unset:function(t){return!!this.get(t)&&(document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/",!0)}}}),innorix("utils/decorator",function(t){"use strict";var e=t("innoJquery"),i=e.Deferred().promise(),n=0;return{throttle:function(t){var e=null;return function(){return e?i:(e=t.apply(this,arguments),e.always(function(){e=null}),e)}},caching:function(t){var e=n++;return function(){return this.__cached=this.__cached||{},this.__cached[e]||(this.__cached[e]=t.apply(this,arguments)),this.__cached[e]}},removeCache:function(t){return function(){return this.__cached={},t.apply(this,arguments)}},debounce:function(t,e,i){var n;return function(){var o=this,r=arguments,s=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||t.apply(o,r)},e),s&&t.apply(o,r)}}}}),innorix("utils/log",function(t){"use strict";var e=t("innoJquery").noop,i=t("CONSTANT/ENV"),n=i.DEBUG;return{info:function(t,i){n&&(void 0===i?(console.info||console.log||e)(t,i):(console.info||console.log||e)(t))},error:function(t){n&&(console.error||console.log||alert)(t)},table:function(t,i){n&&(this.info(t),(console.table||console.log||e)(i))}}}),innorix("utils/object",function(t){"use strict";var e=t("innoJquery");return{pick:function(t,i){if(!e.isPlainObject(t))return{};var n={};if("string"==typeof i)return t[i]&&(n[i]=t[i]),n;for(var o,r=-1;++r<i.length;)o=i[r],t[o]&&(n[o]=t[o]);return n}}}),innorix("utils/promise",function(t){"use strict";var e=t("innoJquery"),i=e.Deferred().promise();return{race:function(t){var i=e.Deferred(),n=e.proxy(i.resolve,i),o=e.proxy(i.reject,i),r=t.length;return e.each(t,function(t,e){e.done(n).fail(function(){0==--r&&o()})}),i},throttle:function(t){var e=null;return function(){return e?i:(e=t.apply(this,arguments),e.always(function(){e=null}),e)}}}}),innorix("utils/string",function(t){"use strict";var e=t("i18n/lang");return{cryptoRandom:function(){try{for(var t,e,i=[];(e="."+i.join("")).length<30;){t=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(5));for(var n=0;n<t.length;n++){var o=t[n]<4e9?t[n].toString().slice(1):"";o.length>0&&(i[i.length]=o)}}return Number(e)}catch(r){return Math.random()}},versionCompare:function(t,e){if(typeof t+typeof e!="stringstring")return!1;for(var i=t.split("."),n=e.split("."),o=0,r=Math.max(i.length,n.length);o<r;o++){if(i[o]&&!n[o]&&parseInt(i[o])>0||parseInt(i[o])>parseInt(n[o]))return 1;if(n[o]&&!i[o]&&parseInt(n[o])>0||parseInt(i[o])<parseInt(n[o]))return-1}return 0},formatMoney:function(t,e,i,n){var e=isNaN(e=Math.abs(e))?0:e,i=i==undefined?".":i,n=n==undefined?",":n,o=t<0?"-":"",r=String(parseInt(t=Math.abs(Number(t)||0).toFixed(e))),s=(s=r.length)>3?s%3:0;return o+(s?r.substr(0,s)+n:"")+r.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+n)+(e?i+Math.abs(t-r).toFixed(e).slice(2):"")},generateUUID:function(){var t=this;try{var e=(new Date).getTime(),i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var n=(e+16*t.cryptoRandom())%16|0;return e=Math.floor(e/16),("x"===i?n:7&n|8).toString(16)})}catch(n){var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"}return i},humanFileSize:function(t){var e=this.humanFileSizeObject(t),i=e.number.toFixed(2)+" "+e.unit;return i=i.replace(/\.00([^\d])/g,"$1")},humanFileSizeObject:function(t){if(Math.abs(t)<1024)return{number:t,unit:"B"};var e=["KB","MB","GB","TB","PB","EB","ZB","YB"],i=-1;do{t/=1024,++i}while(Math.abs(t)>=1e3&&i<e.length-1);return{number:t,unit:e[i]}},humanFileSizeBit:function(t){var e=this.humanFileSizeObjectBit(t),i=e.number.toFixed(2)+" "+e.unit;return i=i.replace(/\.00([^\d])/g,"$1")},humanFileSizeObjectBit:function(t){if(Math.abs(t)<1024)return{number:t,unit:"bps"};var e=["Kbps","Mbps","Gbps","Tbps","Pbps","Ebps","Zbps","Ybps"],i=-1;do{t/=1024,++i}while(Math.abs(t)>=1024&&i<e.length-1);return{number:t,unit:e[i]}},deparam:function(t){t=t.substring(t.indexOf("?")+1).split("&");var e,i,n={},o=decodeURIComponent;for(i=t.length;i>0;)e=t[--i].split("="),n[o(e[0])]=o(e[1]);return n},getFileExt:function(t){var e=t.replace(/\\/gi,"/");return e.substring(e.lastIndexOf(".")+1)},getFileExtType:function(t){var e=t.replace(/\\/gi,"/"),i=e.substring(e.lastIndexOf(".")+1);i=i.toLowerCase();var n={"3gp":"Video",afp:"Code",afpa:"Code",asp:"Code",aspx:"Code",avi:"Video",bat:"Application",bmp:"Picture",c:"Code",cfm:"Code",cgi:"Code",com:"Application",cpp:"Code",css:"CSS",doc:"Document",docx:"Document",exe:"Application",gif:"Picture",fla:"Flash",h:"Code",htm:"HTML",html:"HTML",jar:"Java",jpg:"Picture",jpeg:"Picture",js:"Script",lasso:"Code",log:"Text",m4p:"Audio",mov:"Video",mp3:"Audio",mp4:"Video",mpg:"Video",mpeg:"Video",ogg:"Audio",pcx:"Other Picture",pdf:"PDF",php:"Php",png:"Picture",ppt:"Presentation",pptx:"Presentation",psd:"Psd",pl:"Script",py:"Script",rb:"Ruby",rbx:"Ruby",rhtml:"Ruby",rpm:"Linux",ruby:"Ruby",sql:"Database",swf:"Flash",tif:"Other Picture",tiff:"Other Picture",txt:"Text",vb:"Code",wav:"Audio",wmv:"Video",xls:"Spreadsheet",xlsx:"Spreadsheet",csv:"Spreadsheet",xml:"Code",zip:"Compressed",rar:"Compressed",gz:"Compressed",directory:"Directory",ms4:"MS4"};return n[i]?n[i]:"File"},getFileName:function(t){var e=t.replace(/\\/gi,"/");return e.substring(e.lastIndexOf("/")+1)},getFilePath:function(t){var e=t.replace(/\\/gi,"/");return e.substring(0,e.lastIndexOf("/"))},toHHMMSS:function(t){var i,n,o;return t*=1,t=t>0?t:0,i=Math.floor(t/3600),n=Math.floor((t-3600*i)/60),o=Math.round(t-3600*i-60*n),n>0||i>0?(o=o>0?" "+o+" "+e("time.sec"):"",n>0?(n=n+" "+e("time.min"),i>0?(n=" "+n,i=i+" "+e("time.hour")):i=""):(n="",i=i+" "+e("time.hour"))):(o=o>0?o+" "+e("time.sec"):"1 "+e("time.sec"),n="",i=""),i+n+o}}}),innorix("utils/url",function(t){"use strict";var e=t("utils/string");return{getLocationOrigin:function(){var t=window.location;return t.origin?t.origin:t.protocol+"//"+t.host},getCurrentPage:function(){return window.location.href},getBaseUrl:function(){return window.location.host},addOriginIfNot:function(t){return/^http(s?):\/\//.test(t)?t:/^\//.test(t)?this.getLocationOrigin()+t:this.getLocationOrigin()+e.getFilePath(window.location.pathname)+"/"+t}}}),innorix("Agent/CommandHandler/Base",function(t){"use strict";var e=t("klass"),i=t("CONSTANT/COMMAND_HANDLER"),n="undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:3e3,o=0;return e({getType:function(){return i.BASE},handle:function(t,e,i,n){var r=this;return e().fail(function(){var s=i.clientDefer.state();if(++o<4)setTimeout(function(){r.handle(t,e,i,n)},300);else{var a=this;t.reject.apply(null,arguments),n(a,i),"upload"!=s&&"download"!=s&&r.handle(t,e,i,n)}}).done(function(e){o>4&&i.param&&(i.param.notifyReady=!0),o=0,t.resolve(e),n(this,i)}),t},getAjaxOption:function(){return{timeout:n}},getAjaxParam:function(){return{}}})}),innorix("Agent/CommandHandler/Comet",function(t){"use strict";var e=t("klass"),i=t("Agent/CommandHandler/Base"),n=t("CONSTANT/COMMAND_HANDLER"),o="undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:3e4;return e([i],{constructor:function(){i.apply(this,arguments),this.trise=0},getType:function(){return n.COMET},handle:function(t,e,i,n){var o=this;return e().error(function(){o.handle(t,e,i,n)}).done(function(e){t.resolve(e),n(this,i)}),t},getAjaxOption:function(){return{timeout:o}}})}),innorix("Agent/CommandHandler/Instant",function(t){"use strict";var e=t("klass"),i=t("Agent/CommandHandler/Base"),n=t("CONSTANT/COMMAND_HANDLER"),o=(t("CONSTANT/ENV"),"undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:1e4);return e([i],{constructor:function(){i.apply(this,arguments),this.trise=0},getType:function(){return n.RETRY},handle:function(t,e,i,n){return e().fail(function(){t.reject.apply(null,arguments),n(this,i)}).done(function(e){t.resolve(e),n(this,i)}),t},getAjaxOption:function(){return{timeout:o}}})}),innorix("Agent/CommandHandler/Retry",function(t){"use strict";var e=t("klass"),i=t("Agent/CommandHandler/Base"),n=t("CONSTANT/COMMAND_HANDLER"),o=(t("CONSTANT/ENV"),"undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:1e4);return e([i],{constructor:function(){i.apply(this,arguments),this.trise=0},getType:function(){return n.RETRY},handle:function(t,e,i,n){var o=this;return e().fail(function(){++o.trise<3?o.handle(t,e,i,n):(t.reject.apply(null,arguments),n(this,i))}).done(function(e){t.resolve(e),n(this,i)}),t},getAjaxOption:function(){return{timeout:o}}})}),innorix("Agent/CommandHandler/Transfer",function(t){"use strict";var e=t("klass"),i=t("Agent/CommandHandler/Base"),n=t("CONSTANT/COMMAND_HANDLER"),o="undefined"!=typeof INNORIX_COMMAND_TIMEOUT?INNORIX_COMMAND_TIMEOUT:3e4;return e([i],{constructor:function(){i.apply(this,arguments),this.trise=0},getType:function(){return n.COMET},handle:function(t,e,i,n){var o=this;return e().fail(function(){i.clientDefer.state();++o.trise<1?o.handle(t,e,i,n):(t.reject.apply(null,arguments),n(this,i))}).done(function(e){t.resolve(e),n(this,i)}),t},getAjaxOption:function(){return{timeout:o}}})}),innorix("AgentUpdater/View/MessageBox",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("i18n/lang"),o=t("CONSTANT/EVENT"),r=t("AgentUpdater/View/template");return i({constructor:function(t){this.updater=t,this.$wrap=e(r),this.$message=this.$wrap.find(".irx_messageBox"),this.initView(),this.listenUpdater()},listenUpdater:function(){this.updater.on(o.UPDATE_PATCH_EXECUTE,e.proxy(this.onExecute,this)),this.updater.on(o.UPDATE_PATCH_COMPLETE,e.proxy(this.onComplete,this))},initView:function(){var t=this;this.$wrap.hide(),e(document).ready(function(){e("body").append(t.$wrap)})},onExecute:function(){this.$message.text(n("agentUpdater.start")),this.$wrap.fadeIn(250)},onComplete:function(){this.$message.text(n("agentUpdater.complete")),this.$wrap.delay(3e3).fadeOut(250)}})}),innorix("AgentUpdater/View/template",function(t){"use strict";return t("innoJquery").parseHTML('<div class="irx_messageBox_wrapper"> <div class="irx_messageBox"> </div></div>')}),innorix("ControlBox/Skin/View",function(t){"use strict";var e=t("innoJquery"),i=t("klass");t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$el=t,this.controlBox=e,this.initView(),this.initLanguage()},onLoad:function(){},initView:function(){this.$el.empty().addClass("innorix_"+this.skinName);setTimeout(function(){},0)},setSize:function(t,e,i){if(t){this.$el.css("width",t),this.$el.find(".irx_filetree").css({width:this.$el.width()-160})}e&&(this.$el.css("height",e),this.$el.find(".irx_filetree").css({height:e}),this.$el.find(".irx_infoBox").css({height:e}))},destroy:function(){this.$el.empty()},initLanguage:e.noop})}),innorix("i18n/resource/en",function(){"use strict";return{"transfer.controller.start":"Start","transfer.controller.pause":"Pause","transfer.controller.resume":"Resume","transfer.controller.complete":"Complete","transfer.qr.desc":"1. Download INNORIX MRT App.<br/> 2. Take picture of the QR code.<br/> 3. You can monitor this status on your phone.","transferStatus.initDownload":" ","transferStatus.initDownloadGuide":"Choose the path and click the start button.","transferStatus.initUpload":" ","transferStatus.initUploadGuide":"Click the start button to upload.","transferStatus.transferCanceling":"Transfer canceled.","transferStatus.transferPreparation":"Creating reliable transfers.","transferStatus.finishTransferList":"Creating reliable transfers.","transferStatus.makeTransferList":"Creating reliable transfers.","transferStatus.errorSocket":"Server error {errorCode}","transferStatus.errorClient":"Client error.","transferStatus.errorServer":"Server error.","transferStatus.errorNetwork":"Network error.","transferStatus.errorLicense":"Wrong INNORIX license","transferStatus.transferring":"Transferring","transferStatus.errorAndRetry":"Exception {count}","transferStatus.encrypt":"Encrypting.","transferStatus.decrypt":"Decrypting.","transferStatus.workingServer":"Closing the transfer","transferStatus.transferCompleted":"Transfer complete. Verifying all files.","transferStatus.confirmCancelTransfer":"Want to cancel this transfer?","controlBox.fileTotalSelInfo":"{totalItemSelected} {textItem}{totalFolderSelected} {textFolder}<br/>selected","controlBox.fileTotalCount":"{totalItem} {textItem}{totalFolder} {textFolder}","controlBox.massFileTitle":"Mass File Mode","controlBox.massFileInfo":"<span class='massFileNumber'>{totalItemSize}</span> <span class='massFileText'>{totalItemSizeInfo}</span>, <span class='massFileNumber'>{totalItemCount}</span> <span class='massFileText'>Files</span>, <span class='massFileNumber'>{totalItemFolderCount}</span> <span class='massFileText'>Folders</span>","controlBox.massFileContent":"Are attached.","controlBox.noFile":"파일을 등록해 주세요.","controlBox.notSetUploadUrl":'"option.uploadUrl"속성이 설정되어 있지 않습니다.',"controlBox.resumeTransfer":"The last transfer has not completed. Do you want to resume transferring?","controlBox.demo.overTotalSize":"You can not transfer files over 2 GB in Live Demo.","controlBox.demo.overFileCount":"You can not select more than 10 files in Live Demo.","controlBox.cannotFileExt":"*.{ext} file can not be attached.","controlBox.fileDuplicate":"The same file is already attached.","controlBox.overFileCount":"The maximum number of files is {count}.","controlBox.overFileSize":"The maximum limit of a single file is {size}.","controlBox.overTotalSize":"The maximum limit of total files is {size}","controlBox.input.uploadBtn":"Upload","controlBox.input.downloadBtn":"Download","controlBox.input.descriptionOne":"{fileName}({size})","controlBox.input.descriptionMany":"{fileName} and {count} file(s)({size})","license.invalid":"license not validate.","license.unauth":"The current domain does not match the license key.","license.end":"Trial version has expired.","license.expired":"The license has expired.","license.disabled":"It is not a licensed product.","license.storageLimit":"Service is stopped becaused all licenced traffic was used.","license.trafficLimit":"Service is stopped becaused all licenced traffic was used.","license.mode.invalid":"The selected mode does not match the license key.","time.hour":"hour","time.min":"min","time.sec":"sec","agentUpdater.start":"INNORIX Agent is being updated to the latest version.","agentUpdater.complete":"INNORIX Agent has been updated to the latest version.","agent.exception.notReady":"File transfer is not ready yet, Please try again later.","agent.exception.error":"To fix unknown exceptions, please reinstall file transfer agent.","agent.exception.popupBlocked":"Pop-up Blocker is enabled! Please add this site to your exception list.","webpage.noFiles":"There is no file item information.","wp.overlimit":"You can only transfer up to {size} in this license.",ID_ASK_TITLE:"INNORIX Confirm",ID_ASK_FILENAME:"The '%s' file already exists in the folder.",ID_ASK_EXIST:"Existing file",ID_ASK_NEWFILESIZE:"The size of the new file is %s.",ID_ASK_ALLCHECK:"Apply this option to all files",ID_ASK_BTN_OVERWRITE:"Overwrite",ID_ASK_BTN_RESUME:"Resume",ID_ASK_BTN_SAVEAS:"Save as...",ID_ASK_BTN_CANCEL:"Cancel",ID_ASK_BTN_JUMP:"Skip",ID_ASK_BTN_SAVEAUTO:"Autosave",ID_ASK_TEXT_AUTONAME_TAIL:"It will be saved as '%s'",ID_ASK_ALLCHECK_NEW:"Do this for the next %d conflicts",ID_ASK_SUN:"Sun",ID_ASK_MON:"Mon",ID_ASK_TUE:"Tue",ID_ASK_WED:"Wed",ID_ASK_THU:"Thu",ID_ASK_FRI:"Fri",ID_ASK_SAT:"Sat",ID_ASK_AM:"AM",ID_ASK_PM:"PM",ID_MSG_ACCESS_DENIED:" Access denied for the selected file.",ID_ERRTITLE_FILE_DOWNLOAD_FAIL:"Exception has occurred while downloading.",ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL:"Exception has occurred when checking connection.",ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL:"Exception has occurred while transferring data.",ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR:"Save path does not exist in the server.",ID_ERRTITLE_SERVER_SCRIPT_ERROR:"Exception has occurred in the server script.",ID_ERRTITLE_SEND_INFO_FAIL:"Exception has occurred while checking the server.",ID_ERRTITLE_WRITE_UPLOAD_ERROR:"No permission to write in the upload path of the server ",ID_ERRMSG_SEND_HEADER_FAIL:"Exception has occurred while transferring header.",ID_OPEN_FILE_DIALOG_TITLE:"Open File",ID_DIR_DIALOG_TITLE:"Select a directory",ID_DIR_DIALOG_BUTTON:" ",ID_DOWNLOAD_PATH_DIALOG:"Select a directory",ID_DOWNLOAD_PATH_DIALOG_BUTTON:" ","fileListHeader.label":"Selected Files","fileListHeader.removeBtn":"Remove","fileListHeader.downloadBtn":"Download","context.addFile":"Add file","context.upload":"Upload","context.downloadSelect":"Download Selected files","context.download":"Download","context.downloadAndOpen":"Download and open","context.removeSelect":"Remove selected files","context.removeAll":"Remove all files"}}),innorix("i18n/resource/ko",function(){"use strict";return{"transfer.controller.start":"전송시작","transfer.controller.pause":"전송중지","transfer.controller.resume":"전송재개","transfer.controller.complete":"전송완료","transfer.qr.desc":"1. Download INNORIX MRT App and take picture of the QR code. <br/> 2. You can monitor this transfer status on your smart phone.","transferStatus.initDownload":" ","transferStatus.initDownloadGuide":"경로 설정 후 Start를 클릭하면 전송이 시작됩니다.","transferStatus.initUpload":" ","transferStatus.initUploadGuide":"Start를 클릭하면 전송이 시작됩니다.","transferStatus.transferCanceling":"전송 취소 중입니다.","transferStatus.transferPreparation":"서버와의 전송 안정화 채널을 생성하고 있습니다.","transferStatus.finishTransferList":"전송 목록 생성이 완료되었습니다.","transferStatus.makeTransferList":"전송 목록을 생성 중입니다.","transferStatus.errorSocket":"서버 예외사항({errorCode})이 발생 했습니다.","transferStatus.errorClient":"클라이언트 오류로 전송 대기중 입니다.","transferStatus.errorServer":"서버 오류로 전송 대기중 입니다.","transferStatus.errorNetwork":"네트워크 오류로 전송 대기중 입니다.","transferStatus.errorLicense":"라이선스 범위 초과로 전송할 수 없습니다.","transferStatus.transferring":"파일 전송 중입니다.","transferStatus.errorAndRetry":"예외사항이 발생 했습니다. ({count})","transferStatus.encrypt":"파일 암호화 중입니다.","transferStatus.decrypt":"파일 복호화 중입니다.","transferStatus.workingServer":"서버에서 작업 중입니다.","transferStatus.transferCompleted":"전송완료, 파일들을 점검하고 있습니다.","transferStatus.confirmCancelTransfer":"전송을 취소 하시겠습니까?","controlBox.fileTotalSelInfo":"{totalItemSelected} {textItem}, {totalFolderSelected} {textFolder}<br/>selected","controlBox.fileTotalCount":"{totalItem} {textItem}, {totalFolder} {textFolder}","controlBox.massFileTitle":"Mass File Mode","controlBox.massFileInfo":"<span class='massFileNumber'>{totalItemSize}</span> <span class='massFileText'>{totalItemSizeInfo}</span>, <span class='massFileNumber'>{totalItemCount}</span> <span class='massFileText'>Files</span>, <span class='massFileNumber'>{totalItemFolderCount}</span> <span class='massFileText'>Folders</span>","controlBox.massFileContent":"첨부가 완료되었습니다.","controlBox.noFile":"파일이 존재하지 않습니다.","controlBox.notSetUploadUrl":'"option.uploadUrl"속성이 설정되어 있지 않습니다.',"controlBox.resumeTransfer":"최근 전송이 완료되지 않았습니다. 이어서 전송 하시겠습니까?","controlBox.demo.overTotalSize":"라이브 데모에서는 2 GB 이상의 파일을 전송할 수 없습니다.","controlBox.demo.overFileCount":"라이브 데모에서는 10개 이상의 파일을 선택할 수 없습니다.","controlBox.cannotFileExt":"확장자 .{ext} 첨부할 수 없습니다.","controlBox.fileDuplicate":"동일한 파일이 이미 첨부되어 있습니다.","controlBox.overFileCount":"파일은 {count}개까지 첨부할 수 있습니다.","controlBox.overFileSize":"{size} 초과 파일은 첨부할 수 없습니다.","controlBox.overTotalSize":"첨부 가능한 총 용량은 {size} 입니다.","controlBox.input.uploadBtn":"업로드","controlBox.input.downloadBtn":"다운로드","controlBox.input.descriptionOne":"{fileName}({size})","controlBox.input.descriptionMany":"{fileName}외 {count}개 파일들({size})","license.invalid":"라이선스키 정보를 인식할 수 없습니다.","license.unauth":"지정된 도메인에서만 사용할 수 있습니다.","license.end":"체험버전 사용기간이 만료 되었습니다.","license.expired":"기간이 만료되었습니다.","license.disabled":"허가된 제품이 아닙니다.","license.storageLimit":"모든 트래픽이 사용되어, 서비스가 중지되었습니다.","license.trafficLimit":"모든 트래픽이 사용되어, 서비스가 중지되었습니다.","license.mode.invalid":"현재 라이선스에서 지원하지 않는 모드 입니다.","time.hour":"시간","time.min":"분","time.sec":"초","agentUpdater.start":"INNORIX Agent를 최신 버전으로 업데이트 중입니다.","agentUpdater.complete":"INNORIX Agent를 최신 버전으로 자동 업데이트 되었습니다.","agent.exception.notReady":"파일 전송이 아직 준비되지 않았습니다. 잠시 후 다시 시도하십시오.","agent.exception.error":"알려지지 않은 예외사항 복원을 위해 Agent를 재설치 합니다.","agent.exception.popupBlocked":"Pop-up Blocker is enabled! Please add this site to your exception list.","webpage.noFiles":"파일 아이템 정보가 없습니다.","wp.overlimit":"남은 용량인 {size} 까지만 전송할 수 있습니다.",ID_ASK_TITLE:"INNORIX Confirm",ID_ASK_FILENAME:"폴더에 이미 '%s' 파일이 있습니다.",ID_ASK_EXIST:"기존 파일",ID_ASK_NEWFILESIZE:"새로 받을 파일의 용량은 %s 입니다.",ID_ASK_ALLCHECK:"모든 파일에 이 옵션을 적용합니다.",ID_ASK_BTN_OVERWRITE:"덮어쓰기",ID_ASK_BTN_RESUME:"이어쓰기",ID_ASK_BTN_SAVEAS:"다른 이름으로 저장",ID_ASK_BTN_CANCEL:"취소",ID_ASK_BTN_JUMP:"건너뛰기",ID_ASK_BTN_SAVEAUTO:"자동 변경하여 저장",ID_ASK_TEXT_AUTONAME_TAIL:"%s 로 저장됨",ID_ASK_ALLCHECK_NEW:"다음 %d개 중복에 대해서도 동일하게 적용",ID_ASK_SUN:"일요일",ID_ASK_MON:"월요일",ID_ASK_TUE:"화요일",ID_ASK_WED:"수요일",ID_ASK_THU:"목요일",ID_ASK_FRI:"금요일",ID_ASK_SAT:"토요일",ID_ASK_AM:"오전",ID_ASK_PM:"오후",ID_MSG_ACCESS_DENIED:" Access denied for the selected file.",ID_ERRTITLE_FILE_DOWNLOAD_FAIL:"Exception has occurred while downloading.",ID_ERRTITLE_HTTP_CONNECT_INFO_FAIL:"Exception has occurred when checking connection.",ID_ERRTITLE_HTTP_CONNECT_DATA_FAIL:"Exception has occurred while transferring data.",ID_ERRTITLE_NOT_PATH_UPLOAD_ERROR:"Save path does not exist in the server.",ID_ERRTITLE_SERVER_SCRIPT_ERROR:"Exception has occurred in the server script.",ID_ERRTITLE_SEND_INFO_FAIL:"Exception has occurred while checking the server.",ID_ERRTITLE_WRITE_UPLOAD_ERROR:"No permission to write in the upload path of the server ",ID_ERRMSG_SEND_HEADER_FAIL:"Exception has occurred while transferring header.",ID_OPEN_FILE_DIALOG_TITLE:"파일 열기",ID_DIR_DIALOG_TITLE:"디렉토리 선택",ID_DIR_DIALOG_BUTTON:" ",ID_DOWNLOAD_PATH_DIALOG:"디렉토리 선택",ID_DOWNLOAD_PATH_DIALOG_BUTTON:" ","fileListHeader.label":"선택 파일","fileListHeader.removeBtn":"삭제","fileListHeader.downloadBtn":"다운로드","context.addFile":"파일추가","context.upload":"업로드","context.downloadSelect":"선택파일 받기","context.download":"전체파일 받기","context.downloadAndOpen":"바로열기","context.removeSelect":"선택제거","context.removeAll":"전체제거"}}),innorix("Transfer/Transferring/Abstract",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/TRANSFER_STATE");return i({constructor:function(t,e,i){this.id=n.string.generateUUID(),null!=i.option.incompleteTransfer&&(this.id=i.option.incompleteTransfer.transferId),this.files=t,this.manager=e,this.controlBox=i,this.totalSize=this.computeTotalSize(),this.ended=!1,this.playing=!1,this.started=!1,this.canceling=!1,this.paused=!1,this.updateCountAfterCancel=0,this.cancelCommand=!1,this.preventEvent=!1,this.lastStatus={transferID:this.id,files:this.files,type:this.getType(),retries:0,state:o.BEFORE,speed:0,progress:0,totalSize:this.totalSize,transferSize:0},this.EVENT=this.getEvents()},computeTotalSize:function(){var t=0;return e.each(this.files,function(e,i){t+=i.fileSize}),t},emit:function(t){return this.manager.emit(t,this.lastStatus),this.controlBox.emit(t,this.lastStatus)},updateStateHandler:function(t){if(0==t)return this.emit(this.EVENT.CANCEL),!1;if(this.playing||this.paused){if(this.canceling&&++this.updateCountAfterCancel>=20)return void this.handleOnCancel();this.lastStatus;switch(this.lastStatus=this.nomalizeStatus(t),this.lastStatus.state){case o.READY:case o.TRANSFERRING:this.handleOnProgress();break;case o.COMPLETE:this.handleOnComplete();break;case o.CANCEL:if(this.cancelCommand){this.handleOnCancel();break}this.lastStatus.state=o.TRANSFERRING,this.handleOnProgress();break;case o.ERROR:this.handleOnError(this.lastStatus.stopRetrying);break;case o.PAUSE:this.handleOnPause()}this.emit(this.EVENT.ALWAYS)}},handleOnStart:function(){this.playing=!0,this.started=!0,this.emit(this.EVENT.START)},handleOnProgress:function(){this.emit(this.EVENT.PROGRESS);var t=this;setTimeout(function(){(t.playing||t.paused||t.canceling)&&t.updateState()},500)},handleOnComplete:function(){this.handleOnEnd(),this.emit(this.EVENT.COMPLETE)},handleOnEnd:function(){this.ended=!0,this.playing=!1},handleOnCancel:function(){this.handleOnEnd(),this.emit(this.EVENT.CANCEL)},handleOnCanceling:function(){this.canceling=!0,this.paused=!1},handleOnError:function(t){if(this.emit(this.EVENT.ERROR),this.paused)return void(this.preventEvent=!1);if(this.playing)if(this.lastStatus.retries++,t){var i=this;this.manager.initErrorCount(),setTimeout(function(){i.playing=!1,i.paused=!0,i.emit(i.EVENT.PAUSE)},1e3)}else if(this.manager.addErrorCount()){var i=this;setTimeout(function(){i.playing=!1,i.paused=!0,i.emit(i.EVENT.PAUSE)},1e3)}else if(this.controlBox.option.autoReTransfer)setTimeout(e.proxy(this.retryPlay,this),1e3),this.emit(this.EVENT.RETRY);else{var i=this;setTimeout(function(){i.playing=!1,i.paused=!0,i.emit(i.EVENT.PAUSE)},1e3)}},handleOnPausing:function(){this.emit(this.EVENT.PAUSING)},handleOnPause:function(){this.playing=!1,this.paused=!0,this.preventEvent=!0,this.emit(this.EVENT.PAUSE)},handleOnResume:function(){this.playing=!0,this.paused=!1,this.emit(this.EVENT.RESUME)},nomalizeStatus:function(t){t.totalBytes!=this.totalSize&&(this.totalSize=t.totalBytes);var e=Math.ceil((t.transferBytes||0)/(this.totalSize||1)*100);return{transferID:this.id,type:this.getType(),retries:this.lastStatus.retries||0,files:t.files?t.files:this.files,state:t.transferState,speed:t.transferSpeed||0,totalSize:this.totalSize,transferSize:t.transferBytes||0,progress:e<100?e:100,stopRetrying:t.stopRetrying,client_ip:t.client_ip||"",statusMessage:{customError:t.customError||"",errorCode:t.resourceCode||!1,id:t.resourceID||""}}}})}),innorix("Transfer/Transferring/Download",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("singleton/agent"),o=t("Transfer/Transferring/Abstract"),r=t("CONSTANT/EVENT");return i([o],{constructor:function(t,e,i,n){o.apply(this,[t,e,i]),this.option=n},getType:function(){return"download"},setDownloadPath:function(t){this.option.downloadPath=t},getDownloadPath:function(){return this.option.downloadPath?this.option.downloadPath:""},getEvents:function(){return{ALWAYS:r.TRANSFER_DOWNLOAD_ALWAYS,CREATE:r.TRANSFER_DOWNLOAD_CREATE,START:r.TRANSFER_DOWNLOAD_START,COMPLETE:r.TRANSFER_DOWNLOAD_COMPLETE,COMPLETE_USER:r.TRANSFER_DOWNLOAD_COMPLETE_USER,CANCEL:r.TRANSFER_DOWNLOAD_CANCEL,ERROR:r.TRANSFER_DOWNLOAD_ERROR,PAUSE:r.TRANSFER_DOWNLOAD_PAUSE,PAUSING:r.TRANSFER_DOWNLOAD_PAUSING,RESUME:r.TRANSFER_DOWNLOAD_RESUME,PROGRESS:r.TRANSFER_DOWNLOAD_PROGRESS,RETRY:r.TRANSFER_DOWNLOAD_RETRY}},play:function(){var t=this;"undefined"==typeof FormData?(n.downloadFallback(this.id,this.files,this.option,!1,function(e){!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}),this.handleOnStart()):(n.download(this.id,this.files,this.option).done(function(e){!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.handleOnError()}),this.handleOnStart())},retryPlay:function(){var t=this;"undefined"==typeof FormData?n.downloadFallback(this.id,this.files,this.option,!0,function(e){t.updateState()}):n.download(this.id,this.files,this.option,!0).done(function(){t.updateState()}).fail(function(){t.handleOnError()})},updateState:function(){var t=this;"undefined"==typeof FormData?n.downloadStateFallback(this.id,function(e){t.updateStateHandler(e)}):n.downloadState(this.id).done(e.proxy(this.updateStateHandler,this)).fail(function(){t.handleOnError()})},cancel:function(){var t=this;this.cancelCommand=!0,"undefined"==typeof FormData?n.downloadCancelFallback(this.id,function(e){t.handleOnCanceling()}):n.downloadCancel(this.id).always(function(){t.handleOnCanceling()})},pause:function(){var t=this;"undefined"==typeof FormData?n.downloadPauseFallback(this.id,function(e){t.handleOnPausing()}):n.downloadPause(this.id).always(function(){t.handleOnPausing()})},resume:function(){this.retryPlay(),this.handleOnResume()}})}),innorix("Transfer/Transferring/DownloadAndOpen",function(t){"use strict";var e=t("klass"),i=t("singleton/agent"),n=t("Transfer/Transferring/Abstract");return e([t("Transfer/Transferring/Download")],{constructor:function(t,e,i,o){Array.isArray(t)||(t=[t]),n.apply(this,[t,e,i]),this.option=o},getDownloadPath:function(){return""},play:function(){var t=this;"undefined"==typeof FormData?(i.immediateOpenFallback(this.id,this.files,this.option,!1,function(e){!1===e.value?(i.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}),this.handleOnStart()):(i.immediateOpen(this.id,this.files,this.option,!1).done(function(e){!1===e.value?(i.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.handleOnError()}),this.handleOnStart())},retryPlay:function(){var t=this;"undefined"==typeof FormData?(i.immediateOpenFallback(this.id,this.files,this.option,!1,function(e){!1===e.value?(i.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}),this.handleOnStart()):(i.immediateOpen(this.id,this.files,this.option,!0).done(function(e){!1===e.value?(i.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.handleOnError()}),this.handleOnStart())}})}),innorix("Transfer/Transferring/Upload",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("singleton/agent"),o=t("Transfer/Transferring/Abstract"),r=t("CONSTANT/EVENT");return i([o],{constructor:function(t,e,i,n){o.apply(this,[t,e,i]),this.option=n},getType:function(){return"upload"},getEvents:function(){return{ALWAYS:r.TRANSFER_UPLOAD_ALWAYS,CREATE:r.TRANSFER_UPLOAD_CREATE,START:r.TRANSFER_UPLOAD_START,COMPLETE:r.TRANSFER_UPLOAD_COMPLETE,COMPLETE_USER:r.TRANSFER_UPLOAD_COMPLETE_USER,CANCEL:r.TRANSFER_UPLOAD_CANCEL,ERROR:r.TRANSFER_UPLOAD_ERROR,PAUSE:r.TRANSFER_UPLOAD_PAUSE,PAUSING:r.TRANSFER_UPLOAD_PAUSING,RESUME:r.TRANSFER_UPLOAD_RESUME,PROGRESS:r.TRANSFER_UPLOAD_PROGRESS,RETRY:r.TRANSFER_UPLOAD_RETRY}},play:function(){var t=this,i={transferID:this.id,files:this.files,sliceSize:this.option.sliceSize},n=[];for(var o in this.files){var r=this.files[o];r.sliceSize=this.option.sliceSize,n.push({rowID:r.rowID,fileSize:r.fileSize,fixedFileSize:r.fileSize,sliceSize:r.sliceSize,printFileName:r.printFileName,uniqueFileName:r.uniqueFileName,rootName:r.rootName})}i.files=encodeURIComponent(JSON.stringify(n)),t.option.platformDepend?e.ajax({url:t.option.url+"/api/webpage/onPreUpload?api_key="+t.option.apiKey,type:"POST",data:i}).done(function(e){t.startUpload()}):t.startUpload()},startUpload:function(){var t=this;"relay"!=t.option.resumeType&&"relay"!=t.option.resumeUploadType||1!=t.option.agent||1!=t.option.resumeCondition?"undefined"==typeof FormData?(n.uploadFallback(t.id,t.files,t.option,!1,function(e){!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}),t.handleOnStart()):(n.upload(t.id,t.files,t.option).done(function(e){!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.handleOnError()}),t.handleOnStart()):"undefined"==typeof FormData?n.getIncompleteTransferFallback(function(i){if(0==i.value)return!1;var o=e.parseJSON(decodeURIComponent(i.param));0==o.isChangeFile?(t.id=o.transferId,n.uploadFallback(t.id,t.files,t.option,!1,function(e){
|
|
!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()})):n.uploadFallback(t.id,t.files,t.option,!1,function(e){!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}),t.handleOnStart()},!0):n.getIncompleteTransfer(e.proxy(function(i){var o=e.parseJSON(decodeURIComponent(i.param));0==o.isChangeFile?(t.id=o.transferId,n.upload(t.id,t.files,t.option).done(function(e){!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.handleOnError()})):n.upload(t.id,t.files,t.option).done(function(e){!1===e.value?(n.licenseNotValidate(e.error),t.updateStateHandler(!1)):t.updateState()}).fail(function(){t.handleOnError()}),t.handleOnStart()},this),!0)},retryPlay:function(){var t=this;"undefined"==typeof FormData?(n.uploadFallback(this.id,this.files,this.option,!0,function(e){t.updateState()}),t.handleOnStart()):n.upload(this.id,this.files,this.option,!0).done(function(){t.updateState()}).fail(function(){t.handleOnError()})},updateState:function(){var t=this;"undefined"==typeof FormData?n.uploadStateFallback(this.id,function(e){t.updateStateHandler(e)}):n.uploadState(this.id).done(e.proxy(this.updateStateHandler,this)).fail(function(){t.handleOnError()})},cancel:function(){var t=this;this.cancelCommand=!0,"undefined"==typeof FormData?n.uploadCancelFallback(this.id,function(e){t.handleOnCanceling()}):n.uploadCancel(this.id).always(function(){t.handleOnCanceling()})},pause:function(){var t=this;"undefined"==typeof FormData?n.uploadPauseFallback(this.id,function(e){t.handleOnPausing()}):n.uploadPause(this.id).always(function(){t.handleOnPausing()})},resume:function(){this.retryPlay(),this.handleOnResume()}})}),innorix("Transfer/View/ControlButtons",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("i18n/lang"),o=t("CONSTANT/EVENT"),r=t("CONSTANT/TRANSFER_STATE");return i({constructor:function(t,e){this.manager=e,this.lastStatus=null,this.$btnGroup=t.find(".irx_btnGroup");var i=t.find(".irx_btnGroup");this.$play=i.children(".irx_controller"),this.$status=i.children(".irx_trn_status"),this.$graph=i.children(".irx_toggle_graph"),this.$graphWrapper=t.find(".irx_graph_wrapper"),this.$container=t.find(".irx_container"),this.$window=t.find(".irx_transferWin"),this.$showQrCodeButton=t.find(".irx_qr_code"),this.listenManager(),this.attachEvents()},listenManager:function(){var t=e.proxy(this.renderOnCreate,this);this.manager.on(o.TRANSFER_DOWNLOAD_CREATE,t),this.manager.on(o.TRANSFER_UPLOAD_CREATE,t);var i=e.proxy(this.renderOnStart,this);this.manager.on(o.TRANSFER_DOWNLOAD_START,i),this.manager.on(o.TRANSFER_UPLOAD_START,i);var n=e.proxy(this.renderOnPause,this);this.manager.on(o.TRANSFER_DOWNLOAD_PAUSE,n),this.manager.on(o.TRANSFER_UPLOAD_PAUSE,n);var r=e.proxy(this.renderOnResume,this);this.manager.on(o.TRANSFER_DOWNLOAD_RESUME,r),this.manager.on(o.TRANSFER_UPLOAD_RESUME,r);var s=e.proxy(this.renderOnCompelte,this);this.manager.on(o.TRANSFER_DOWNLOAD_COMPLETE,s),this.manager.on(o.TRANSFER_UPLOAD_COMPLETE,s);var a=e.proxy(this.renderStatusBtn,this);this.manager.on(o.TRANSFER_DOWNLOAD_ALWAYS,a),this.manager.on(o.TRANSFER_UPLOAD_ALWAYS,a),this.manager.on(o.TRANSFER_DOWNLOAD_ERROR,a),this.manager.on(o.TRANSFER_UPLOAD_ERROR,a);var l=e.proxy(this.renderStatusWarningBtn,this);this.manager.on(o.TRANSFER_UPLOAD_RETRY,l),this.manager.on(o.TRANSFER_DOWNLOAD_RETRY,l);var h=e.proxy(this.renderGraphBtn,this);this.manager.on(o.GRAPH_SHOW,h),this.manager.on(o.GRAPH_HIDE,h);var c=(e.proxy(this.renderQrCodeView,this),e.proxy(this.renderDisableState,this)),u=e.proxy(this.renderActiveState,this);this.manager.on(o.AGENT_FILE_DIALOG_SHOW,c),this.manager.on(o.AGENT_FILE_DIALOG_HIDE,u)},renderOnCreate:function(t){this.$btnGroup.show(),this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.isMobile&&this.$play.css("width","60px"),this.manager.lastTransferring&&(this.manager.lastTransferring.controlBox.option.showTransferStatusIcon||(this.$status.css("opacity",0),this.$status.hide()));var e=!0;this.manager.lastTransferring&&(e=this.manager.lastTransferring.controlBox.option.usePlugin),e&&this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.alwaysShowTransferGraph&&(this.$window.toggleClass("show-graph"),this.manager.lastTransferring&&(this.$window.hasClass("show-graph")?this.manager.lastTransferring.controlBox.emit(o.TRANSFER_GRAPH_SHOW):this.manager.lastTransferring.controlBox.emit(o.TRANSFER_GRAPH_HIDE))),this.$play.removeClass("irx_on").text(n("transfer.controller.start"))},renderOnStart:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnPause:function(){this.$play.removeClass("irx_on").text(n("transfer.controller.resume"))},renderOnResume:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnCompelte:function(){this.$play.addClass("irx_on").text(n("transfer.controller.complete"))},attachEvents:function(){this.$play.on("click",e.proxy(this.onControllerClick,this)),this.$graph.on("click",e.proxy(this.renderGraphBtn,this)),this.$showQrCodeButton.on("click",e.proxy(this.renderQrCodeView,this))},renderDisableState:function(){this.$play.css("cursor","default"),this.$status.css("cursor","default"),this.$graph.css("cursor","default")},renderActiveState:function(){this.$play.css("cursor","pointer"),this.$status.css("cursor","pointer"),this.$graph.css("cursor","pointer")},onControllerClick:function(){0==this.manager.getDisabledState()&&(this.manager.isPlaying()?this.lastStatus.state!=r.COMPLETE&&this.manager.pause():this.manager.isPause()?this.manager.resume():this.manager.play())},renderStatusBtn:function(t){if(this.$status.hasClass("irx_warn")&&t.state===r.READY)return!1;t.state===r.ERROR?this.$status.addClass("irx_warn"):this.$status.hasClass("irx_warn")?null==this.lastStatus||this.lastStatus.transferSize!=t.transferSize&&this.$status.removeClass("irx_warn"):this.$status.removeClass("irx_warn"),this.lastStatus=t},renderStatusWarningBtn:function(t){this.$status.addClass("irx_warn")},renderGraphBtn:function(t){if(0==this.manager.getDisabledState()){var e=!0;this.manager.lastTransferring&&(e=this.manager.lastTransferring.controlBox.option.usePlugin),e&&(this.$window.hasClass("show-qr")&&this.$window.toggleClass("show-qr"),this.$window.toggleClass("show-graph"),this.manager.lastTransferring&&(this.$window.hasClass("show-graph")?this.manager.lastTransferring.controlBox.emit(o.TRANSFER_GRAPH_SHOW):this.manager.lastTransferring.controlBox.emit(o.TRANSFER_GRAPH_HIDE)))}},renderQrCodeView:function(t){if(0==this.manager.getDisabledState()){var e=!0,i=!1;this.manager.lastTransferring&&(e=this.manager.lastTransferring.controlBox.option.usePlugin,i=this.manager.lastTransferring.controlBox.option.showQrCode),e&&i&&(this.$window.hasClass("show-graph")&&this.$window.toggleClass("show-graph"),this.$window.toggleClass("show-qr"),this.manager.lastTransferring&&this.$window.hasClass("show-qr"))}}})}),innorix("Transfer/View/FolderPath",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.manager=e,this.$folderPath=t.find(".irx_folderPath"),this.$btn=this.$folderPath.children(".irx_folderDialog"),this.$text=this.$folderPath.children(".irx_folderPath_str"),this.listenManager(),this.attachEvents()},listenManager:function(){var t=e.proxy(this.render,this),i=e.proxy(this.renderPath,this),o=e.proxy(this.renderDisableState,this),r=e.proxy(this.renderActiveState,this);this.manager.on(n.TRANSFER_DOWNLOAD_CREATE,t),this.manager.on(n.TRANSFER_UPLOAD_CREATE,t),this.manager.on(n.TRANSFER_CHANGE_DOWNLOADPATH,i),this.manager.on(n.AGENT_FILE_DIALOG_SHOW,o),this.manager.on(n.AGENT_FILE_DIALOG_HIDE,r)},attachEvents:function(){this.$btn.on("click",e.proxy(this.onClick,this)),this.$text.on("click",e.proxy(this.onClick,this))},render:function(){"download"===this.manager.getTransferring().getType()?(this.$folderPath.show(),this.renderPath()):this.$folderPath.hide()},renderDisableState:function(){this.$btn.css("cursor","default"),this.$text.css("cursor","default")},renderActiveState:function(){this.$btn.css("cursor","pointer"),this.$text.css("cursor","pointer")},renderPath:function(){this.$text.text(this.manager.getTransferring().getDownloadPath())},onClick:function(){0==this.manager.getDisabledState()&&this.manager.downloadPathDialog(this.$text.text())}})}),function(t,e){"use strict";function i(t,e){var i,n,o,r,s;return t*=1,r=e?" ":"",t>0?(i=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(t)/Math.log(i)),s=(t/Math.pow(i,o)).toFixed(1)+r+n[o]):s="0"+r+"Byte",s}function n(t){try{var i,n;for(l=t,h=e('<div class="innorix_trn_rate"></div>').prependTo(l),c=e('<div class="innorix_avg_trn_rate"></div>').prependTo(l),u=[],d=20,p=[],f=20,i=0,n=d-1;i<n;i++)u.push(0);for(i=0,n=f-1;i<n;i++)p.push(0);return!0}catch(o){return!1}}function o(t,e){try{return t*=1,u.push(t>0?t:0),u.length>d&&u.splice(0,1),e*=1,p.push(e>0?e:0),p.length>f&&p.splice(0,1),!0}catch(i){return!1}}function r(t){return i(t)+"/s"}function s(){try{return!(u.length<d)&&(e.fn.sparkline.defaults.common.opacity=.5,c.sparkline(p,{type:"line",width:"100%",height:"100%",chartRangeMin:0,spotRadius:!1,lineColor:"#10bbe6",fillColor:"#10bbe6",disableInteraction:!0}),h.sparkline(u,{type:"line",width:"100%",height:"100%",chartRangeMin:0,spotRadius:!1,lineColor:"#108ee6",fillColor:"#108ee6",highlightLineColor:"#1de7bf",tooltipContainer:l[0],tooltipClassname:"innorix_jqstooltip",numberFormatter:r}),!0)}catch(t){return!1}}var a,l,h,c,u,d,p,f;a=innorix||(t.innorix={}),a.transferGraph={init:function(t){return n(t)},setGraph:function(t,e){return o(t,e)},drawGraph:function(){return s()}}}(window,jQuery),innorix("Transfer/View/Progress",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/EVENT"),r=t("CONSTANT/TRANSFER_STATE");return i({constructor:function(t,e){this.manager=e,this.$el=t,this.$window=t.find(".irx_transferWin"),this.$percent=t.find(".irx_percent"),this.$progressStrLeft=t.find(".irx_progressStr_left"),this.$progressStrRight=t.find(".irx_progressStr_right"),this.$progressBar=t.find(".irx_progressBar"),this.$progressBarServer=t.find(".irx_validate_progress_server"),this.$container=t.find(".irx_container"),this.$footerGroup=t.find(".irx_bottom"),this.$graphWrapper=t.find(".irx_graph_wrapper"),this.$graphSpeedWrapper=t.find(".irx_avg_trn_rate_txt"),this.$tooltip=t.find(".innorix_jqstooltip"),this.$validateProgress=t.find(".irx_validate_progress"),this.transferring=null,this.lastStatus=null,this.graphInterval=null,this.lastProgress=0,this.fileValidate=null,this.processThumbnail=!1,this.listenManager()},listenManager:function(){var t=e.proxy(this.renderInit,this),i=e.proxy(this.renderProgress,this),n=e.proxy(this.renderComplete,this),r=e.proxy(this.renderCancel,this),s=e.proxy(this.renderServerAnimation,this),a=e.proxy(this.renderServerAnimationStop,this),l=e.proxy(this.renderHtmlServerAnimationStop,this),h=e.proxy(this.animateThumbnailProcess,this),c=e.proxy(this.stopThumbnailProcess,this);this.manager.on(o.TRANSFER_DOWNLOAD_CREATE,t),this.manager.on(o.TRANSFER_DOWNLOAD_PROGRESS,i),this.manager.on(o.TRANSFER_DOWNLOAD_ERROR,i),this.manager.on(o.TRANSFER_DOWNLOAD_COMPLETE,n),this.manager.on(o.TRANSFER_DOWNLOAD_CANCEL,r),this.manager.on(o.TRANSFER_UPLOAD_CREATE,t),this.manager.on(o.TRANSFER_UPLOAD_PROGRESS,i),this.manager.on(o.TRANSFER_UPLOAD_ERROR,i),this.manager.on(o.TRANSFER_UPLOAD_COMPLETE,n),this.manager.on(o.TRANSFER_UPLOAD_CANCEL,r),this.manager.on(o.TRANSFER_UPLOAD_WORKING,s),this.manager.on(o.TRANSFER_UPLOAD_WORKING_STOP,a),this.manager.on(o.TRANSFER_HTML5_UPLOAD_WORKING_STOP,l),this.manager.on(o.TRANSFER_DOWNLOAD_WORKING,s),this.manager.on(o.TRANSFER_DOWNLOAD_WORKING_STOP,a),this.manager.on(o.TRANSFER_UPLOAD_THUMBNAIL,h),this.manager.on(o.TRANSFER_UPLOAD_THUMBNAIL_STOP,c)},renderInit:function(t){this.hideServerProcess=!1,this.$progressBarServer.stop(!0).animate({width:"0%"},1,function(){}),this.transferring=this.manager.getTransferring(),this.lastStatus=this.transferring.lastStatus,this.$percent.text("0%"),this.renderProgressStrLeft(t,!0),this.renderProgressStrRight(t,!0),this.$progressBar.css("width","0%").attr("data-progress",0),this.$validateProgress.css("width","0%").attr("data-progress",0),this.$trnRate&&this.$avgTrnRate&&(this.$trnRate.remove(),this.$avgTrnRate.remove()),this.$trnRate=e('<div class="innorix_trn_rate"></div>').prependTo(this.$graphWrapper),this.$avgTrnRate=e('<div class="innorix_avg_trn_rate"></div>').prependTo(this.$graphWrapper),this.trnRateArray=[],this.maxLenOfTrnRateArray=40,this.avgTrnRateArray=[],this.maxLenOfAvgTrnRateArray=40;for(var i=0,n=this.maxLenOfTrnRateArray-1;i<n;i++)this.trnRateArray.push(0);for(var i=0,n=this.maxLenOfAvgTrnRateArray-1;i<n;i++)this.avgTrnRateArray.push(0);this.$graphSpeedWrapper.html("0bps"),this.drawGraph(),this.transferring.controlBox.option.showTransferWindow&&this.renderOpen()},renderProgressStrLeft:function(t,e){(e||t.transferSize>=this.lastStatus.transferSize)&&this.$progressStrLeft.text(this.makeProgressStrLeft(t))},renderProgressStrRight:function(t,e){(e||t.speed>0)&&this.$progressStrRight.text(this.makeProgressStrRight(t))},makeProgressStrLeft:function(t){var i=t.progress;return e.isNumeric(i)||(i=0),this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.isMobile?i+"%":i+"% ("+n.string.humanFileSize(t.transferSize)+"/"+n.string.humanFileSize(t.totalSize)+")"},makeProgressStrRight:function(t){var e=Math.floor((t.totalSize-t.transferSize)/t.speed),i="";return isFinite(e)&&(i+=n.string.toHHMMSS(e)+" "),100==t.progress&&(i="0 sec "),i+"("+n.string.humanFileSizeBit(8*t.speed)+")"},renderProgress:function(t){0==this.processThumbnail&&t.statusMessage&&"makeTransferList"==t.statusMessage.id&&(this.processThumbnail=!0,this.animateThumbnailProcess()),t.statusMessage&&("finishTransferList"!=t.statusMessage.id&&"transferring"!=t.statusMessage.id||1==this.processThumbnail&&(this.processThumbnail=!1,this.stopThumbnailProcess())),this.animate(t)},renderServerAnimation:function(t){this.$progressBarServer.css("opacity","1");this.hideServerProcess=!1,this.animateServerProcess(t)},renderServerAnimationStop:function(t){this.hideServerProcess=!0,this.$progressBarServer.css("width","91.5%"),this.$progressBarServer.css("opacity","1")},renderHtmlServerAnimationStop:function(t){this.hideServerProcess=!0,this.$progressBarServer.css("width","0%"),this.$progressBarServer.css("opacity","0")},renderComplete:function(t){var i=this;i.$progressBarServer.css("width","0%"),this.animate(t,function(){setTimeout(function(){for(var n=0,r=i.maxLenOfTrnRateArray;n<r;n++)i.trnRateArray[n]=0;for(var n=0,r=i.maxLenOfAvgTrnRateArray;n<r;n++)i.avgTrnRateArray[n]=0;i.drawGraph(),e(".innorix_trn_rate").remove(),e(".innorix_avg_trn_rate").remove(),this.$trnRate=e('<div class="innorix_trn_rate"></div>').prependTo(this.$graphWrapper),this.$avgTrnRate=e('<div class="innorix_avg_trn_rate"></div>').prependTo(this.$graphWrapper),i.lastStatus=t;i.manager.lastTransferring&&i.manager.lastTransferring.controlBox.option.skin,"upload"===t.type&&!1!==i.transferring.emit(o.TRANSFER_UPLOAD_COMPLETE_USER)&&i.renderClose(),"download"===t.type&&(i.manager.emit(o.TRANSFER_DOWNLOAD_WORKING),!1!==i.transferring.emit(o.TRANSFER_DOWNLOAD_COMPLETE_USER)&&i.renderClose())},500)})},animate:function(t,i){var n=this;t.state==r.COMPLETE&&(t.progress=100),n.renderGraph(t),n.lastProgress=n.lastStatus.progress,this.renderProgressStrLeft(t),this.renderProgressStrRight(t),t.transferSize>this.lastStatus.transferSize&&(this.lastStatus=t),(parseFloat(this.$progressBar.attr("data-progress"))<t.progress||100==t.progress)&&(this.$percent.text(t.progress+"%"),this.$progressBar.stop(!0).animate({width:t.progress+"%"},function(){e(this).attr("data-progress",t.progress),i&&i()}))},animateThumbnailProcess:function(t){this.$progressBarServer.animate({width:"91.5%"},1e4,function(){})},stopThumbnailProcess:function(t){var e=this,i=1e3;this.manager&&this.manager.lastTransferring&&this.manager.lastTransferring.controlBox.option.agent&&(i=250),this.$progressBarServer.stop(!0).animate({width:"91.5%"},i,function(){e.$progressBarServer.stop(!0).animate({width:"0"},1,function(){})})},animateServerProcess:function(t){var e=this;0==this.hideServerProcess?this.$progressBarServer.stop(!0).animate({width:"91.5%"},1500,function(){e.$progressBarServer.css("width","0%"),0==e.hideServerProcess?e.animateServerProcess():e.$progressBarServer.css("width","91.5%")}):e.$progressBarServer.css("width","91.5%")},renderCancel:function(t){this.hideServerProcess=!0,this.renderClose()},renderOpen:function(){this.$window.removeClass("show-graph"),this.$el.show()},renderClose:function(){this.hideServerProcess=!0,this.transferring.option&&1==this.transferring.option.iframeView&&(window.top?"top"==this.transferring.option.iframeViewLocation&&window.top.jQuery('[class*="iframeControl"]').detach():this.$el.remove(),window.parent?"top"==this.transferring.option.iframeViewLocation&&window.parent.jQuery('[class*="iframeControl"]').detach():this.$el.remove()),this.$el.hide()},setGraph:function(t){this.trnRateArray.push(t>0?t:0),this.trnRateArray.length>this.maxLenOfTrnRateArray&&this.trnRateArray.splice(0,1);var e=t;this.avgTrnRateArray.push(e>0?e:0),this.avgTrnRateArray.length>this.maxLenOfAvgTrnRateArray&&this.avgTrnRateArray.splice(0,1)},numberFormatter:function(t){return"/s"},drawGraph:function(){this.transferring.controlBox.option.usePlugin&&(this.$avgTrnRate.sparkline(this.avgTrnRateArray,{type:"line",width:"100%",height:"100%",chartRangeMin:0,spotRadius:!1,lineColor:"#10bbe6",fillColor:"#10bbe6",disableInteraction:!0}),this.$trnRate.sparkline(this.trnRateArray,{type:"line",width:"100%",height:"100%",opacity:.5,chartRangeMin:0,spotRadius:!1,lineColor:"#10bbe6",fillColor:"#108ee6",highlightLineColor:"#1de7bf",tooltipClassname:"innorix_jqstooltip",tooltipSuffix:this.trnRateType+"/s",tooltipContainer:this.$graphWrapper,tooltipFormatter:function(t,e,i){var o=i.y;return n.string.humanFileSizeBit(8*o)}}))},bytesToSize:function(t,e){var i,n,o,r,s;return t*=1,r=" ",t>0?(i=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(t)/Math.log(i)),s=(t/Math.pow(i,o)).toFixed(1)+r+n[o]):s="0"+r+"Byte",s},renderGraph:function(t){if("Transferring"==t.state){var e=t.speed,i=Math.ceil(1),o=Math.floor(10),r=Math.floor(n.string.cryptoRandom()*(o-i))+i;r/=100;e-=r*e;var s=this.bytesToSize(e);s=s.split(" ");s[0],this.bytesToSize(e);this.trnRateType=s[1],this.$graphSpeedWrapper.html(n.string.humanFileSizeBit(8*e)),this.setGraph(e),this.drawGraph()}},renderValidateStart:function(){var t=this;t.fileValidate=setInterval(function(){var e=t.$validateProgress,i=parseInt(e.attr("data-progress"));if(i<100){var n=i+20;e.attr("data-progress",n),e.stop().animate({width:n+"%"},250)}else e.stop().css("width","0%"),e.attr("data-progress",0)},250)},renderValidateEnd:function(){var t=this;t.$validateProgress.stop().css("width","100%").attr("data-progress",100),clearInterval(t.fileValidate),t.fileValidate=null}})}),innorix("Transfer/View/QrCodeWrapper",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("i18n/lang"),o=t("CONSTANT/EVENT");t("CONSTANT/TRANSFER_STATE");return i({constructor:function(t,e){this.manager=e,this.lastStatus=null,this.innoJquerycodeWrapper=t.find(".irx_qr_wrapper"),this.descWrapper=this.innoJquerycodeWrapper.find(".desc"),this.$showQrCodeButton=t.find(".irx_qr_code"),this.innoJquerycode=t.find(".qr_code"),this.listenManager(),this.attachEvents()},listenManager:function(){var t=e.proxy(this.renderOnCreate,this);this.manager.on(o.TRANSFER_DOWNLOAD_CREATE_QR,t),this.manager.on(o.TRANSFER_UPLOAD_CREATE_QR,t)},renderOnCreate:function(t){this.$showQrCodeButton.hasClass("enable")||t.option.showQrCode&&"compact"!=t.option.skin&&(this.$showQrCodeButton.show(),this.$showQrCodeButton.toggleClass("enable")),this.descWrapper.html(n("transfer.qr.desc"));var e=new QRCode(this.innoJquerycode,{width:125,height:125}),i="http://"+window.location.host;t.option.custom&&(t.option.custom.product&&t.option.custom.product,t.option.custom.userID&&t.option.custom.userID),t.option.url&&(i=t.option.url);var o=i;i=i.replace("http://",""),i=i.replace("https://",""),i=i.split("/");var r={serverIP:i[0],transferID:t.id};o=o.replace("http://",""),o=o.replace("https://",""),o=o.split("/");o[0],t.id;e.makeCode(JSON.stringify(r))},renderOnStart:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnPause:function(){this.$play.removeClass("irx_on").text(n("transfer.controller.resume"))},renderOnResume:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnCompelte:function(){this.innoJquerycheckGroup.prop("disabled",!1)},attachEvents:function(){},onControllerClick:function(t,i){if(this.manager.isPlaying());else if(this.manager.isPause());else{var n=e(t.target);n.is(":checked")?(this.innoJquerycheckGroup.prop("checked",!1),n.prop("checked",!0)):n.prop("checked",!0),this.manager.setResumeType(n.val())}},renderCheckboxBtn:function(t){this.innoJquerycheckGroup.prop("disabled",!0)},renderStatusWarningBtn:function(t){this.$status.addClass("irx_warn")},renderGraphBtn:function(t){this.$window.toggleClass("show-graph")}})}),innorix("Transfer/View/ResumePolicy",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("i18n/lang"),o=t("CONSTANT/EVENT");t("CONSTANT/TRANSFER_STATE");return i({constructor:function(t,e){this.manager=e,this.lastStatus=null,this.innoJquerycheckGroup=t.find(".resume_policy_checkbox"),this.$graphWrapper=t.find(".irx_graph_wrapper"),this.$container=t.find(".irx_container"),this.$window=t.find(".irx_transferWin"),this.innoJquerycheckGroup.prop("disabled",!1),this.listenManager(),this.attachEvents()},listenManager:function(){var t=e.proxy(this.renderCheckboxBtn,this);this.manager.on(o.TRANSFER_DOWNLOAD_ALWAYS,t),this.manager.on(o.TRANSFER_UPLOAD_ALWAYS,t),this.manager.on(o.TRANSFER_DOWNLOAD_ERROR,t),this.manager.on(o.TRANSFER_UPLOAD_ERROR,t),this.manager.on(o.AGENT_FILE_DIALOG_SHOW,t);var i=e.proxy(this.renderOnCompelte,this);this.manager.on(o.TRANSFER_DOWNLOAD_CREATE,i),this.manager.on(o.TRANSFER_UPLOAD_CREATE,i),this.manager.on(o.TRANSFER_DOWNLOAD_COMPLETE,i),this.manager.on(o.TRANSFER_UPLOAD_COMPLETE,i),this.manager.on(o.AGENT_FILE_DIALOG_HIDE,i)},renderOnCreate:function(){this.$play.removeClass("irx_on").text(n("transfer.controller.start"))},renderOnStart:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnPause:function(){this.$play.removeClass("irx_on").text(n("transfer.controller.resume"))},renderOnResume:function(){this.$play.addClass("irx_on").text(n("transfer.controller.pause"))},renderOnCompelte:function(){this.innoJquerycheckGroup.prop("disabled",!1)},attachEvents:function(){this.innoJquerycheckGroup.on("change",e.proxy(this.onControllerClick,this))},onControllerClick:function(t,i){if(this.manager.isPlaying());else if(this.manager.isPause());else{var n=e(t.target);n.is(":checked")?(this.innoJquerycheckGroup.prop("checked",!1),n.prop("checked",!0)):n.prop("checked",!0),this.manager.setResumeType(n.val())}},renderCheckboxBtn:function(t){this.innoJquerycheckGroup.prop("disabled",!0)},renderStatusWarningBtn:function(t){this.$status.addClass("irx_warn")},renderGraphBtn:function(t){this.$window.toggleClass("show-graph")}})}),function(t,e,i){!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.sparkline&&t(jQuery)}(function(i){"use strict";var n,o,r,s,a,l,h,c,u,d,p,f,g,m,v,_,x,y,b,w,S,C,T,k,D,E,I,A,R,O,N,P={},F=0;n=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",opacity:1,defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:void 0,normalRangeMax:void 0,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:void 0,chartRangeMax:void 0,chartRangeMinX:void 0,chartRangeMaxX:void 0,tooltipFormat:new r('<span style="color: {{color}}">●</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0,tooltipFormat:new r('<span style="color: {{color}}">●</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new r('<span style="color: {{color}}">●</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:void 0,thresholdValue:0,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,tooltipFormat:new r("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:void 0,tooltipFormat:new r("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new r('<span style="color: {{color}}">●</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:void 0,targetColor:"#4a2",chartRangeMax:void 0,chartRangeMin:void 0,tooltipFormat:new r("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},D='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',o=function(){var t,e;return t=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(t.prototype=i.extend(new arguments[0],arguments[arguments.length-1]),t._super=arguments[0].prototype):t.prototype=arguments[arguments.length-1],arguments.length>2&&(e=Array.prototype.slice.call(arguments,1,-1),e.unshift(t.prototype),i.extend.apply(i,e))):t.prototype=arguments[0],t.prototype.cls=t,t},i.SPFormatClass=r=o({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(t,e){this.format=t,this.fclass=e},render:function(t,e,i){var n,o,r,s,a,l=this,h=t;return this.format.replace(this.fre,function(){var t;return o=arguments[1],r=arguments[3],n=l.precre.exec(o),n?(a=n[2],o=n[1]):a=!1,void 0===(s=h[o])?"":r&&e&&e[r]?(t=e[r],t.get?e[r].get(s)||s:e[r][s]||s):(u(s)&&(s=i.get("numberFormatter")?i.get("numberFormatter")(s):g(s,a,i.get("numberDigitGroupCount"),i.get("numberDigitGroupSep"),i.get("numberDecimalMark"))),s)})}}),i.spformat=function(t,e){return new r(t,e)},s=function(t,e,i){return t<e?e:t>i?i:t},a=function(t,i){var n;return 2===i?(n=e.floor(t.length/2),t.length%2?t[n]:(t[n-1]+t[n])/2):t.length%2?(n=(t.length*i+i)/4,n%1?(t[e.floor(n)]+t[e.floor(n)-1])/2:t[n-1]):(n=(t.length*i+2)/4,n%1?(t[e.floor(n)]+t[e.floor(n)-1])/2:t[n-1])},l=function(t){var e;switch(t){case"undefined":t=void 0;break;case"null":t=null;break;case"true":t=!0;break;case"false":t=!1;break;default:e=parseFloat(t),t==e&&(t=e)}return t},h=function(t){var e,i=[];for(e=t.length;e--;)i[e]=l(t[e]);return i},c=function(t,e){var i,n,o=[];for(i=0,n=t.length;i<n;i++)t[i]!==e&&o.push(t[i]);return o},u=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=function(t,e,n,o,r){var s,a;for(t=(!1===e?parseFloat(t).toString():t.toFixed(e)).split(""),s=(s=i.inArray(".",t))<0?t.length:s,s<t.length&&(t[s]=r),a=s-n;a>0;a-=n)t.splice(a,0,o);return t.join("")},d=function(t,e,i){var n;for(n=e.length;n--;)if((!i||null!==e[n])&&e[n]!==t)return!1;return!0},f=function(t){return i.isArray(t)?t:[t]},p=function(e){var i;t.createStyleSheet?t.createStyleSheet().cssText=e:(i=t.createElement("style"),i.type="text/css",t.getElementsByTagName("head")[0].appendChild(i),i["string"==typeof t.body.style.WebkitAppearance?"innerText":"innerHTML"]=e)},i.fn.simpledraw=function(e,n,o,r){var s,a;if(o&&(s=this.data("_jqs_vcanvas")))return s;if(!1===i.fn.sparkline.canvas)return!1;if(void 0===i.fn.sparkline.canvas){var l=t.createElement("canvas");if(l.getContext&&l.getContext("2d"))i.fn.sparkline.canvas=function(t,e,i,n){return new R(t,e,i,n)};else{if(!t.namespaces||t.namespaces.v)return i.fn.sparkline.canvas=!1,!1;t.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),i.fn.sparkline.canvas=function(t,e,i,n){return new O(t,e,i)}}}return void 0===e&&(e=i(this).innerWidth()),void 0===n&&(n=i(this).innerHeight()),s=i.fn.sparkline.canvas(e,n,this,r),a=i(this).data("_jqs_mhandler"),a&&a.registerCanvas(s),s},i.fn.cleardraw=function(){var t=this.data("_jqs_vcanvas");t&&t.reset()},i.RangeMapClass=m=o({init:function(t){var e,i,n=[];for(e in t)t.hasOwnProperty(e)&&"string"==typeof e&&e.indexOf(":")>-1&&(i=e.split(":"),i[0]=0===i[0].length?-Infinity:parseFloat(i[0]),i[1]=0===i[1].length?Infinity:parseFloat(i[1]),i[2]=t[e],n.push(i));this.map=t,this.rangelist=n||!1},get:function(t){var e,i,n,o=this.rangelist;if(void 0!==(n=this.map[t]))return n;if(o)for(e=o.length;e--;)if(i=o[e],i[0]<=t&&i[1]>=t)return i[2]}}),i.range_map=function(t){return new m(t)},v=o({init:function(t,e){var n=i(t);this.$el=n,this.options=e,this.currentPageX=0,this.currentPageY=0,this.el=t,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!e.get("disableTooltips"),this.highlightEnabled=!e.get("disableHighlight")},registerSparkline:function(t){this.splist.push(t),this.over&&this.updateDisplay()},registerCanvas:function(t){var e=i(t.canvas);this.canvas=t,this.innoJquerycanvas=e,e.mouseenter(i.proxy(this.mouseenter,this)),e.mouseleave(i.proxy(this.mouseleave,this)),e.click(i.proxy(this.mouseclick,this))},reset:function(t){this.splist=[],this.tooltip&&t&&(this.tooltip.remove(),this.tooltip=void 0)},mouseclick:function(t){var e=i.Event("sparklineClick");e.originalEvent=t,e.sparklines=this.splist,this.$el.trigger(e)},mouseenter:function(e){i(t.body).unbind("mousemove.jqs"),i(t.body).bind("mousemove.jqs",i.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=e.pageX,this.currentPageY=e.pageY,this.currentEl=e.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new _(this.options),this.tooltip.updatePosition(e.pageX,e.pageY)),this.updateDisplay()},mouseleave:function(){i(t.body).unbind("mousemove.jqs");var e,n,o=this.splist,r=o.length,s=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),n=0;n<r;n++)e=o[n],e.clearRegionHighlight()&&(s=!0);s&&this.canvas.render()},mousemove:function(t){this.currentPageX=t.pageX,this.currentPageY=t.pageY,this.currentEl=t.target,this.tooltip&&this.tooltip.updatePosition(t.pageX,t.pageY),this.updateDisplay()},updateDisplay:function(){
|
|
var t,e,n,o,r,s=this.splist,a=s.length,l=!1,h=this.innoJquerycanvas.offset(),c=this.currentPageX-h.left,u=this.currentPageY-h.top;if(this.over){for(n=0;n<a;n++)e=s[n],(o=e.setRegionHighlight(this.currentEl,c,u))&&(l=!0);if(l){if(r=i.Event("sparklineRegionChange"),r.sparklines=this.splist,this.$el.trigger(r),this.tooltip){for(t="",n=0;n<a;n++)e=s[n],t+=e.getCurrentRegionTooltip();this.tooltip.setContent(t)}this.disableHighlight||this.canvas.render()}null===o&&this.mouseleave()}}}),_=o({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(e){var n=e.get("tooltipClassname","jqstooltip"),o=this.sizeStyle;this.container=e.get("tooltipContainer")||t.body,this.tooltipOffsetX=e.get("tooltipOffsetX",10),this.tooltipOffsetY=e.get("tooltipOffsetY",12),i("#jqssizetip").remove(),i("#jqstooltip").remove(),this.sizetip=i("<div/>",{id:"jqssizetip",style:o,"class":n}),this.tooltip=i("<div/>",{id:"jqstooltip","class":n}).appendTo(this.container),this.offsetLeft=this.tooltip.offset().left,this.offsetTop=this.tooltip.offset().top,this.hidden=!0,i(window).unbind("resize.jqs scroll.jqs"),i(window).bind("resize.jqs scroll.jqs",i.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=i(window).scrollTop(),this.scrollLeft=i(window).scrollLeft(),this.scrollRight=this.scrollLeft+this.container.offsetWidth,this.updatePosition()},getSize:function(t){this.sizetip.html(t).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(t){if(!t)return this.tooltip.css("visibility","hidden"),void(this.hidden=!0);this.getSize(t),this.tooltip.html(t).css({width:this.width,height:this.height,visibility:"visible"}),this.hidden&&(this.hidden=!1,this.updatePosition())},updatePosition:function(t,e){if(void 0===t){if(void 0===this.mousex)return;t=this.mousex-this.offsetLeft,e=this.mousey-this.offsetTop}else this.mousex=t-=this.offsetLeft,this.mousey=e-=this.offsetTop;if(this.height&&this.width&&!this.hidden&&(e-=this.height+this.tooltipOffsetY,t+=this.tooltipOffsetX,this.tooltip)){var i=this.tooltip[0].offsetWidth;e<0&&(e=0),t<this.scrollLeft?t=this.scrollLeft:t+i>this.scrollRight&&(t=this.scrollRight-i),this.tooltip.css({left:t,top:e})}},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=void 0,i(window).unbind("resize.jqs scroll.jqs")}}),E=function(){p(D)},i(E),N=[],i.fn.sparkline=function(e,n){return this.each(function(){var o,r,s=new i.fn.sparkline.options(this,n),a=i(this);if(o=function(){var n,o,r,l,h,c,u;if("html"===e||void 0===e?(u=this.getAttribute(s.get("tagValuesAttribute")),void 0!==u&&null!==u||(u=a.html()),n=u.replace(/(^\s*<!--)|(-->\s*innoJquery)|\s+/g,"").split(",")):n=e,o="auto"===s.get("width")?n.length*s.get("defaultPixelsPerValue"):s.get("width"),"auto"===s.get("height")?s.get("composite")&&i.data(this,"_jqs_vcanvas")||(l=t.createElement("span"),l.innerHTML="a",a.html(l),r=i(l).innerHeight()||i(l).height(),i(l).remove(),l=null):r=s.get("height"),s.get("disableInteraction")?h=!1:(h=i.data(this,"_jqs_mhandler"),h?s.get("composite")||h.reset():(h=new v(this,s),i.data(this,"_jqs_mhandler",h))),s.get("composite")&&!i.data(this,"_jqs_vcanvas"))return void(i.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),i.data(this,"_jqs_errnotify",!0)));c=new(i.fn.sparkline[s.get("type")])(this,n,s,o,r),c.render(),h&&h.registerSparkline(c)},i(this).html()&&!s.get("disableHiddenCheck")&&i(this).is(":hidden")||!i(this).parents("body").length){if(!s.get("composite")&&i.data(this,"_jqs_pending"))for(r=N.length;r;r--)N[r-1][0]==this&&N.splice(r-1,1);N.push([this,o]),i.data(this,"_jqs_pending",!0)}else o.call(this)})},i.fn.sparkline.defaults=n(),i.sparkline_display_visible=function(){var t,e,n,o=[];for(e=0,n=N.length;e<n;e++)t=N[e][0],i(t).is(":visible")&&!i(t).parents().is(":hidden")?(N[e][1].call(t),i.data(N[e][0],"_jqs_pending",!1),o.push(e)):i(t).closest("html").length||i.data(t,"_jqs_pending")||(i.data(N[e][0],"_jqs_pending",!1),o.push(e));for(e=o.length;e;e--)N.splice(o[e-1],1)},i.fn.sparkline.options=o({init:function(t,e){var n,o,r,s;this.userOptions=e=e||{},this.tag=t,this.tagValCache={},o=i.fn.sparkline.defaults,r=o.common,this.tagOptionsPrefix=e.enableTagOptions&&(e.tagOptionsPrefix||r.tagOptionsPrefix),s=this.getTagSetting("type"),n=s===P?o[e.type||r.type]:o[s],this.mergedOptions=i.extend({},r,n,e)},getTagSetting:function(t){var e,i,n,o,r=this.tagOptionsPrefix;if(!1===r||void 0===r)return P;if(this.tagValCache.hasOwnProperty(t))e=this.tagValCache.key;else{if(void 0===(e=this.tag.getAttribute(r+t))||null===e)e=P;else if("["===e.substr(0,1))for(e=e.substr(1,e.length-2).split(","),i=e.length;i--;)e[i]=l(e[i].replace(/(^\s*)|(\s*innoJquery)/g,""));else if("{"===e.substr(0,1))for(n=e.substr(1,e.length-2).split(","),e={},i=n.length;i--;)o=n[i].split(":",2),e[o[0].replace(/(^\s*)|(\s*innoJquery)/g,"")]=l(o[1].replace(/(^\s*)|(\s*innoJquery)/g,""));else e=l(e);this.tagValCache.key=e}return e},get:function(t,e){var i,n=this.getTagSetting(t);return n!==P?n:void 0===(i=this.mergedOptions[t])?e:i}}),i.fn.sparkline._base=o({disabled:!1,init:function(t,e,n,o,r){this.el=t,this.$el=i(t),this.values=e,this.options=n,this.width=o,this.height=r,this.currentRegion=void 0},initTarget:function(){var t=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),t))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return!this.disabled||(this.el.innerHTML="",!1)},getRegion:function(t,e){},setRegionHighlight:function(t,e,i){var n,o=this.currentRegion,r=!this.options.get("disableHighlight");return e>this.canvasWidth||i>this.canvasHeight||e<0||i<0?null:(n=this.getRegion(t,e,i),o!==n&&(void 0!==o&&r&&this.removeHighlight(),this.currentRegion=n,void 0!==n&&r&&this.renderHighlight(),!0))},clearRegionHighlight:function(){return void 0!==this.currentRegion&&(this.removeHighlight(),this.currentRegion=void 0,!0)},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(t){},getCurrentRegionTooltip:function(){var t,e,n,o,s,a,l,h,c,u,d,p,f,g,m=this.options,v="",_=[];if(void 0===this.currentRegion)return"";if(t=this.getCurrentRegionFields(),d=m.get("tooltipFormatter"))return d(this,m,t);if(m.get("tooltipChartTitle")&&(v+='<div class="jqs jqstitle">'+m.get("tooltipChartTitle")+"</div>\n"),!(e=this.options.get("tooltipFormat")))return"";if(i.isArray(e)||(e=[e]),i.isArray(t)||(t=[t]),l=this.options.get("tooltipFormatFieldlist"),h=this.options.get("tooltipFormatFieldlistKey"),l&&h){for(c=[],a=t.length;a--;)u=t[a][h],-1!=(g=i.inArray(u,l))&&(c[g]=t[a]);t=c}for(n=e.length,f=t.length,a=0;a<n;a++)for(p=e[a],"string"==typeof p&&(p=new r(p)),o=p.fclass||"jqsfield",g=0;g<f;g++)t[g].isNull&&m.get("tooltipSkipNull")||(i.extend(t[g],{prefix:m.get("tooltipPrefix"),suffix:m.get("tooltipSuffix")}),s=p.render(t[g],m.get("tooltipValueLookups"),m),_.push('<div class="'+o+'">'+s+"</div>"));return _.length?v+_.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(t,i){var n,o,r,a,l=i.get("highlightColor"),h=i.get("highlightLighten");if(l)return l;if(h&&(n=/^#([0-9a-f])([0-9a-f])([0-9a-f])innoJquery/i.exec(t)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})innoJquery/i.exec(t))){for(r=[],o=4===t.length?16:1,a=0;a<3;a++)r[a]=s(e.round(parseInt(n[a+1],16)*o*h),0,255);return"rgb("+r.join(",")+")"}return t}}),x={changeHighlight:function(t){var e,n=this.currentRegion,o=this.target,r=this.regionShapes[n];r&&(e=this.renderRegion(n,t),i.isArray(e)||i.isArray(r)?(o.replaceWithShapes(r,e),this.regionShapes[n]=i.map(e,function(t){return t.id})):(o.replaceWithShape(r,e),this.regionShapes[n]=e.id))},render:function(){var t,e,n,o,r=this.values,s=this.target,a=this.regionShapes;if(this.cls._super.render.call(this)){for(n=r.length;n--;)if(t=this.renderRegion(n))if(i.isArray(t)){for(e=[],o=t.length;o--;)t[o].append(),e.push(t[o].id);a[n]=e}else t.append(),a[n]=t.id;else a[n]=null;s.render()}}},i.fn.sparkline.line=y=o(i.fn.sparkline._base,{type:"line",init:function(t,e,i,n,o){y._super.init.call(this,t,e,i,n,o),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(t,e,i){var n,o=this.regionMap;for(n=o.length;n--;)if(null!==o[n]&&e>=o[n][0]&&e<=o[n][1])return o[n][2]},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:null===this.yvalues[t],x:this.xvalues[t],y:this.yvalues[t],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:t}},renderHighlight:function(){var t,e,i=this.currentRegion,n=this.target,o=this.vertices[i],r=this.options,s=r.get("spotRadius"),a=r.get("highlightSpotColor"),l=r.get("highlightLineColor");o&&(s&&a&&(t=n.drawCircle(o[0],o[1],s,void 0,a),this.highlightSpotId=t.id,n.insertAfterShape(this.lastShapeId,t)),l&&(e=n.drawLine(0,o[1],this.canvasWidth,o[1],l),this.highlightLineId=e.id,n.insertAfterShape(this.lastShapeId,e)))},removeHighlight:function(){var t=this.target;this.highlightSpotId&&(t.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(t.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var t,i,n,o,r,s=this.values,a=s.length,l=this.xvalues,h=this.yvalues,c=this.yminmax;for(t=0;t<a;t++)i=s[t],n="string"==typeof s[t],o="object"==typeof s[t]&&s[t]instanceof Array,r=n&&s[t].split(":"),n&&2===r.length?(l.push(Number(r[0])),h.push(Number(r[1])),c.push(Number(r[1]))):o?(l.push(i[0]),h.push(i[1]),c.push(i[1])):(l.push(t),null===s[t]||"null"===s[t]?h.push(null):(h.push(Number(i)),c.push(Number(i))));this.options.get("xvalues")&&(l=this.options.get("xvalues")),this.maxy=this.maxyorg=e.max.apply(e,c),this.miny=this.minyorg=e.min.apply(e,c),this.maxx=e.max.apply(e,l),this.minx=e.min.apply(e,l),this.xvalues=l,this.yvalues=h,this.yminmax=c},processRangeOptions:function(){var t=this.options,e=t.get("normalRangeMin"),i=t.get("normalRangeMax");void 0!==e&&(e<this.miny&&(this.miny=e),i>this.maxy&&(this.maxy=i)),void 0!==t.get("chartRangeMin")&&(t.get("chartRangeClip")||t.get("chartRangeMin")<this.miny)&&(this.miny=t.get("chartRangeMin")),void 0!==t.get("chartRangeMax")&&(t.get("chartRangeClip")||t.get("chartRangeMax")>this.maxy)&&(this.maxy=t.get("chartRangeMax")),void 0!==t.get("chartRangeMinX")&&(t.get("chartRangeClipX")||t.get("chartRangeMinX")<this.minx)&&(this.minx=t.get("chartRangeMinX")),void 0!==t.get("chartRangeMaxX")&&(t.get("chartRangeClipX")||t.get("chartRangeMaxX")>this.maxx)&&(this.maxx=t.get("chartRangeMaxX"))},drawNormalRange:function(t,i,n,o,r){var s=this.options.get("normalRangeMin"),a=this.options.get("normalRangeMax"),l=i+e.round(n-n*((a-this.miny)/r)),h=e.round(n*(a-s)/r);this.target.drawRect(t,l,o,h,void 0,this.options.get("normalRangeColor")).append()},render:function(){var t,n,o,r,s,a,l,h,c,u,d,p,f,g,v,_,x,b,w,S,C,T,k,D,E,I=this.options,A=this.target,R=this.canvasWidth,O=this.canvasHeight,N=this.vertices,P=I.get("spotRadius"),F=this.regionMap;if(y._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),k=this.xvalues,D=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(r=s=0,t=this.maxx-this.minx==0?1:this.maxx-this.minx,n=this.maxy-this.miny==0?1:this.maxy-this.miny,o=this.yvalues.length-1,P&&(R<4*P||O<4*P)&&(P=0),P&&(C=I.get("highlightSpotColor")&&!I.get("disableInteraction"),(C||I.get("minSpotColor")||I.get("spotColor")&&D[o]===this.miny)&&(O-=e.ceil(P)),(C||I.get("maxSpotColor")||I.get("spotColor")&&D[o]===this.maxy)&&(O-=e.ceil(P),r+=e.ceil(P)),(C||(I.get("minSpotColor")||I.get("maxSpotColor"))&&(D[0]===this.miny||D[0]===this.maxy))&&(s+=e.ceil(P),R-=e.ceil(P)),(C||I.get("spotColor")||I.get("minSpotColor")||I.get("maxSpotColor")&&(D[o]===this.miny||D[o]===this.maxy))&&(R-=e.ceil(P))),O--,void 0===I.get("normalRangeMin")||I.get("drawNormalOnTop")||this.drawNormalRange(s,r,O,R,n),l=[],h=[l],g=v=null,_=D.length,E=0;E<_;E++)c=k[E],d=k[E+1],u=D[E],p=s+e.round((c-this.minx)*(R/t)),f=E<_-1?s+e.round((d-this.minx)*(R/t)):R,v=p+(f-p)/2,F[E]=[g||0,v,E],g=v,null===u?E&&(null!==D[E-1]&&(l=[],h.push(l)),N.push(null)):(u<this.miny&&(u=this.miny),u>this.maxy&&(u=this.maxy),l.length||l.push([p,r+O]),a=[p,r+e.round(O-O*((u-this.miny)/n))],l.push(a),N.push(a));for(x=[],b=[],w=h.length,E=0;E<w;E++)l=h[E],l.length&&(I.get("fillColor")&&(l.push([l[l.length-1][0],r+O]),b.push(l.slice(0)),l.pop()),l.length>2&&(l[0]=[l[0][0],l[1][1]]),x.push(l));for(w=b.length,E=0;E<w;E++)A.drawShape(b[E],I.get("fillColor"),I.get("fillColor")).append();for(void 0!==I.get("normalRangeMin")&&I.get("drawNormalOnTop")&&this.drawNormalRange(s,r,O,R,n),w=x.length,E=0;E<w;E++)A.drawShape(x[E],I.get("lineColor"),void 0,I.get("lineWidth")).append();if(P&&I.get("valueSpots"))for(S=I.get("valueSpots"),void 0===S.get&&(S=new m(S)),E=0;E<_;E++)(T=S.get(D[E]))&&A.drawCircle(s+e.round((k[E]-this.minx)*(R/t)),r+e.round(O-O*((D[E]-this.miny)/n)),P,void 0,T).append();P&&I.get("spotColor")&&null!==D[o]&&A.drawCircle(s+e.round((k[k.length-1]-this.minx)*(R/t)),r+e.round(O-O*((D[o]-this.miny)/n)),P,void 0,I.get("spotColor")).append(),this.maxy!==this.minyorg&&(P&&I.get("minSpotColor")&&(c=k[i.inArray(this.minyorg,D)],A.drawCircle(s+e.round((c-this.minx)*(R/t)),r+e.round(O-O*((this.minyorg-this.miny)/n)),P,void 0,I.get("minSpotColor")).append()),P&&I.get("maxSpotColor")&&(c=k[i.inArray(this.maxyorg,D)],A.drawCircle(s+e.round((c-this.minx)*(R/t)),r+e.round(O-O*((this.maxyorg-this.miny)/n)),P,void 0,I.get("maxSpotColor")).append())),this.lastShapeId=A.getLastShapeId(),this.canvasTop=r,A.render()}}}),i.fn.sparkline.bar=b=o(i.fn.sparkline._base,x,{type:"bar",init:function(t,n,o,r,a){var u,d,p,f,g,v,_,x,y,w,S,C,T,k,D,E,I,A,R,O,N,P,F=parseInt(o.get("barWidth"),10),L=parseInt(o.get("barSpacing"),10),M=o.get("chartRangeMin"),B=o.get("chartRangeMax"),H=o.get("chartRangeClip"),W=Infinity,z=-Infinity;for(b._super.init.call(this,t,n,o,r,a),v=0,_=n.length;v<_;v++)O=n[v],((u="string"==typeof O&&O.indexOf(":")>-1)||i.isArray(O))&&(D=!0,u&&(O=n[v]=h(O.split(":"))),O=c(O,null),d=e.min.apply(e,O),p=e.max.apply(e,O),d<W&&(W=d),p>z&&(z=p));this.stacked=D,this.regionShapes={},this.barWidth=F,this.barSpacing=L,this.totalBarWidth=F+L,this.width=r=n.length*F+(n.length-1)*L,this.initTarget(),H&&(T=void 0===M?-Infinity:M,k=void 0===B?Infinity:B),g=[],f=D?[]:g;var U=[],V=[];for(v=0,_=n.length;v<_;v++)if(D)for(E=n[v],n[v]=R=[],U[v]=0,f[v]=V[v]=0,I=0,A=E.length;I<A;I++)null!==(O=R[I]=H?s(E[I],T,k):E[I])&&(O>0&&(U[v]+=O),W<0&&z>0?O<0?V[v]+=e.abs(O):f[v]+=O:f[v]+=e.abs(O-(O<0?z:W)),g.push(O));else O=H?s(n[v],T,k):n[v],null!==(O=n[v]=l(O))&&g.push(O);this.max=C=e.max.apply(e,g),this.min=S=e.min.apply(e,g),this.stackMax=z=D?e.max.apply(e,U):C,this.stackMin=W=D?e.min.apply(e,g):S,void 0!==o.get("chartRangeMin")&&(o.get("chartRangeClip")||o.get("chartRangeMin")<S)&&(S=o.get("chartRangeMin")),void 0!==o.get("chartRangeMax")&&(o.get("chartRangeClip")||o.get("chartRangeMax")>C)&&(C=o.get("chartRangeMax")),this.zeroAxis=y=o.get("zeroAxis",!0),w=S<=0&&C>=0&&y?0:0==y?S:S>0?S:C,this.xaxisOffset=w,x=D?e.max.apply(e,f)+e.max.apply(e,V):C-S,this.canvasHeightEf=y&&S<0?this.canvasHeight-2:this.canvasHeight-1,S<w?(P=D&&C>=0?z:C,(N=(P-w)/x*this.canvasHeight)!==e.ceil(N)&&(this.canvasHeightEf-=2,N=e.ceil(N))):N=this.canvasHeight,this.yoffset=N,i.isArray(o.get("colorMap"))?(this.colorMapByIndex=o.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=o.get("colorMap"),this.colorMapByValue&&void 0===this.colorMapByValue.get&&(this.colorMapByValue=new m(this.colorMapByValue))),this.range=x},getRegion:function(t,i,n){var o=e.floor(i/this.totalBarWidth);return o<0||o>=this.values.length?void 0:o},getCurrentRegionFields:function(){var t,e,i=this.currentRegion,n=f(this.values[i]),o=[];for(e=n.length;e--;)t=n[e],o.push({isNull:null===t,value:t,color:this.calcColor(e,t,i),offset:i});return o},calcColor:function(t,e,n){var o,r,s=this.colorMapByIndex,a=this.colorMapByValue,l=this.options;return o=this.stacked?l.get("stackedBarColor"):e<0?l.get("negBarColor"):l.get("barColor"),0===e&&void 0!==l.get("zeroColor")&&(o=l.get("zeroColor")),a&&(r=a.get(e))?o=r:s&&s.length>n&&(o=s[n]),i.isArray(o)?o[t%o.length]:o},renderRegion:function(t,n){var o,r,s,a,l,h,c,u,p,f,g=this.values[t],m=this.options,v=this.xaxisOffset,_=[],x=this.range,y=this.stacked,b=this.target,w=t*this.totalBarWidth,S=this.canvasHeightEf,C=this.yoffset;if(g=i.isArray(g)?g:[g],c=g.length,u=g[0],a=d(null,g),f=d(v,g,!0),a)return m.get("nullColor")?(s=n?m.get("nullColor"):this.calcHighlightColor(m.get("nullColor"),m),o=C>0?C-1:C,b.drawRect(w,o,this.barWidth-1,0,s,s)):void 0;for(l=C,h=0;h<c;h++){if(u=g[h],y&&u===v){if(!f||p)continue;p=!0}r=x>0?e.floor(S*(e.abs(u-v)/x))+1:1,u<v||u===v&&0===C?(o=l,l+=r):(o=C-r,C-=r),s=this.calcColor(h,u,t),n&&(s=this.calcHighlightColor(s,m)),_.push(b.drawRect(w,o,this.barWidth-1,r-1,s,s))}return 1===_.length?_[0]:_}}),i.fn.sparkline.tristate=w=o(i.fn.sparkline._base,x,{type:"tristate",init:function(t,e,n,o,r){var s=parseInt(n.get("barWidth"),10),a=parseInt(n.get("barSpacing"),10);w._super.init.call(this,t,e,n,o,r),this.regionShapes={},this.barWidth=s,this.barSpacing=a,this.totalBarWidth=s+a,this.values=i.map(e,Number),this.width=o=e.length*s+(e.length-1)*a,i.isArray(n.get("colorMap"))?(this.colorMapByIndex=n.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=n.get("colorMap"),this.colorMapByValue&&void 0===this.colorMapByValue.get&&(this.colorMapByValue=new m(this.colorMapByValue))),this.initTarget()},getRegion:function(t,i,n){return e.floor(i/this.totalBarWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:void 0===this.values[t],value:this.values[t],color:this.calcColor(this.values[t],t),offset:t}},calcColor:function(t,e){var i,n=this.values,o=this.options,r=this.colorMapByIndex,s=this.colorMapByValue;return s&&(i=s.get(t))?i:r&&r.length>e?r[e]:n[e]<0?o.get("negBarColor"):n[e]>0?o.get("posBarColor"):o.get("zeroBarColor")},renderRegion:function(t,i){var n,o,r,s,a,l,h=this.values,c=this.options,u=this.target;if(n=u.pixelHeight,r=e.round(n/2),s=t*this.totalBarWidth,h[t]<0?(a=r,o=r-1):h[t]>0?(a=0,o=r-1):(a=r-1,o=2),null!==(l=this.calcColor(h[t],t)))return i&&(l=this.calcHighlightColor(l,c)),u.drawRect(s,a,this.barWidth-1,o-1,l,l)}}),i.fn.sparkline.discrete=S=o(i.fn.sparkline._base,x,{type:"discrete",init:function(t,n,o,r,s){S._super.init.call(this,t,n,o,r,s),this.regionShapes={},this.values=n=i.map(n,Number),this.min=e.min.apply(e,n),this.max=e.max.apply(e,n),this.range=this.max-this.min,this.width=r="auto"===o.get("width")?2*n.length:this.width,this.interval=e.floor(r/n.length),this.itemWidth=r/n.length,void 0!==o.get("chartRangeMin")&&(o.get("chartRangeClip")||o.get("chartRangeMin")<this.min)&&(this.min=o.get("chartRangeMin")),void 0!==o.get("chartRangeMax")&&(o.get("chartRangeClip")||o.get("chartRangeMax")>this.max)&&(this.max=o.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===o.get("lineHeight")?e.round(.3*this.canvasHeight):o.get("lineHeight"))},getRegion:function(t,i,n){return e.floor(i/this.itemWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:void 0===this.values[t],value:this.values[t],offset:t}},renderRegion:function(t,i){var n,o,r,a,l=this.values,h=this.options,c=this.min,u=this.max,d=this.range,p=this.interval,f=this.target,g=this.canvasHeight,m=this.lineHeight,v=g-m;return o=s(l[t],c,u),a=t*p,n=e.round(v-v*((o-c)/d)),r=h.get("thresholdColor")&&o<h.get("thresholdValue")?h.get("thresholdColor"):h.get("lineColor"),i&&(r=this.calcHighlightColor(r,h)),f.drawLine(a,n,a,n+m,r)}}),i.fn.sparkline.bullet=C=o(i.fn.sparkline._base,{type:"bullet",init:function(t,i,n,o,r){var s,a,l;C._super.init.call(this,t,i,n,o,r),this.values=i=h(i),l=i.slice(),l[0]=null===l[0]?l[2]:l[0],l[1]=null===i[1]?l[2]:l[1],s=e.min.apply(e,i),a=e.max.apply(e,i),s=void 0===n.get("base")?s<0?s:0:n.get("base"),this.min=s,this.max=a,this.range=a-s,this.shapes={},this.valueShapes={},this.regiondata={},this.width=o="auto"===n.get("width")?"4.0em":o,this.target=this.$el.simpledraw(o,r,n.get("composite")),i.length||(this.disabled=!0),this.initTarget()},getRegion:function(t,e,i){var n=this.target.getShapeAt(t,e,i);return void 0!==n&&void 0!==this.shapes[n]?this.shapes[n]:void 0},getCurrentRegionFields:function(){var t=this.currentRegion;return{fieldkey:t.substr(0,1),value:this.values[t.substr(1)],region:t}},changeHighlight:function(t){var e,i=this.currentRegion,n=this.valueShapes[i];switch(delete this.shapes[n],i.substr(0,1)){case"r":e=this.renderRange(i.substr(1),t);break;case"p":e=this.renderPerformance(t);break;case"t":e=this.renderTarget(t)}this.valueShapes[i]=e.id,this.shapes[e.id]=i,this.target.replaceWithShape(n,e)},renderRange:function(t,i){var n=this.values[t],o=e.round(this.canvasWidth*((n-this.min)/this.range)),r=this.options.get("rangeColors")[t-2];return i&&(r=this.calcHighlightColor(r,this.options)),this.target.drawRect(0,0,o-1,this.canvasHeight-1,r,r)},renderPerformance:function(t){var i=this.values[1],n=e.round(this.canvasWidth*((i-this.min)/this.range)),o=this.options.get("performanceColor");return t&&(o=this.calcHighlightColor(o,this.options)),this.target.drawRect(0,e.round(.3*this.canvasHeight),n-1,e.round(.4*this.canvasHeight)-1,o,o)},renderTarget:function(t){var i=this.values[0],n=e.round(this.canvasWidth*((i-this.min)/this.range)-this.options.get("targetWidth")/2),o=e.round(.1*this.canvasHeight),r=this.canvasHeight-2*o,s=this.options.get("targetColor");return t&&(s=this.calcHighlightColor(s,this.options)),this.target.drawRect(n,o,this.options.get("targetWidth")-1,r-1,s,s)},render:function(){var t,e,i=this.values.length,n=this.target;if(C._super.render.call(this)){for(t=2;t<i;t++)e=this.renderRange(t).append(),this.shapes[e.id]="r"+t,this.valueShapes["r"+t]=e.id;null!==this.values[1]&&(e=this.renderPerformance().append(),this.shapes[e.id]="p1",this.valueShapes.p1=e.id),null!==this.values[0]&&(e=this.renderTarget().append(),this.shapes[e.id]="t0",this.valueShapes.t0=e.id),n.render()}}}),i.fn.sparkline.pie=T=o(i.fn.sparkline._base,{type:"pie",init:function(t,n,o,r,s){var a,l=0;if(T._super.init.call(this,t,n,o,r,s),this.shapes={},this.valueShapes={},this.values=n=i.map(n,Number),"auto"===o.get("width")&&(this.width=this.height),n.length>0)for(a=n.length;a--;)l+=n[a];this.total=l,this.initTarget(),this.radius=e.floor(e.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(t,e,i){var n=this.target.getShapeAt(t,e,i);return void 0!==n&&void 0!==this.shapes[n]?this.shapes[n]:void 0},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:void 0===this.values[t],value:this.values[t],percent:this.values[t]/this.total*100,color:this.options.get("sliceColors")[t%this.options.get("sliceColors").length],offset:t}},changeHighlight:function(t){var e=this.currentRegion,i=this.renderSlice(e,t),n=this.valueShapes[e];delete this.shapes[n],this.target.replaceWithShape(n,i),this.valueShapes[e]=i.id,this.shapes[i.id]=e},renderSlice:function(t,i){var n,o,r,s,a,l=this.target,h=this.options,c=this.radius,u=h.get("borderWidth"),d=h.get("offset"),p=2*e.PI,f=this.values,g=this.total,m=d?2*e.PI*(d/360):0;for(s=f.length,r=0;r<s;r++){if(n=m,o=m,g>0&&(o=m+p*(f[r]/g)),t===r)return a=h.get("sliceColors")[r%h.get("sliceColors").length],i&&(a=this.calcHighlightColor(a,h)),l.drawPieSlice(c,c,c-u,n,o,void 0,a);m=o}},render:function(){var t,i,n=this.target,o=this.values,r=this.options,s=this.radius,a=r.get("borderWidth");if(T._super.render.call(this)){for(a&&n.drawCircle(s,s,e.floor(s-a/2),r.get("borderColor"),void 0,a).append(),i=o.length;i--;)o[i]&&(t=this.renderSlice(i).append(),this.valueShapes[i]=t.id,this.shapes[t.id]=i);n.render()}}}),i.fn.sparkline.box=k=o(i.fn.sparkline._base,{type:"box",init:function(t,e,n,o,r){k._super.init.call(this,t,e,n,o,r),this.values=i.map(e,Number),this.width="auto"===n.get("width")?"4.0em":o,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var t=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return void 0!==this.loutlier&&t.push({field:"lo",value:this.loutlier}),void 0!==this.routlier&&t.push({field:"ro",value:this.routlier}),void 0!==this.lwhisker&&t.push({field:"lw",value:this.lwhisker}),void 0!==this.rwhisker&&t.push({field:"rw",value:this.rwhisker}),t},render:function(){var t,i,n,o,r,s,l,h,c,u,d,p=this.target,f=this.values,g=f.length,m=this.options,v=this.canvasWidth,_=this.canvasHeight,x=void 0===m.get("chartRangeMin")?e.min.apply(e,f):m.get("chartRangeMin"),y=void 0===m.get("chartRangeMax")?e.max.apply(e,f):m.get("chartRangeMax"),b=0;if(k._super.render.call(this)){if(m.get("raw"))m.get("showOutliers")&&f.length>5?(i=f[0],t=f[1],o=f[2],r=f[3],s=f[4],l=f[5],h=f[6]):(t=f[0],o=f[1],r=f[2],s=f[3],l=f[4]);else if(f.sort(function(t,e){return t-e}),o=a(f,1),r=a(f,2),s=a(f,3),n=s-o,m.get("showOutliers")){for(t=l=void 0,c=0;c<g;c++)void 0===t&&f[c]>o-n*m.get("outlierIQR")&&(t=f[c]),f[c]<s+n*m.get("outlierIQR")&&(l=f[c]);i=f[0],h=f[g-1]}else t=f[0],l=f[g-1];this.quartiles=[o,r,s],this.lwhisker=t,this.rwhisker=l,this.loutlier=i,this.routlier=h,d=v/(y-x+1),m.get("showOutliers")&&(b=e.ceil(m.get("spotRadius")),v-=2*e.ceil(m.get("spotRadius")),d=v/(y-x+1),i<t&&p.drawCircle((i-x)*d+b,_/2,m.get("spotRadius"),m.get("outlierLineColor"),m.get("outlierFillColor")).append(),h>l&&p.drawCircle((h-x)*d+b,_/2,m.get("spotRadius"),m.get("outlierLineColor"),m.get("outlierFillColor")).append()),p.drawRect(e.round((o-x)*d+b),e.round(.1*_),e.round((s-o)*d),e.round(.8*_),m.get("boxLineColor"),m.get("boxFillColor")).append(),p.drawLine(e.round((t-x)*d+b),e.round(_/2),e.round((o-x)*d+b),e.round(_/2),m.get("lineColor")).append(),p.drawLine(e.round((t-x)*d+b),e.round(_/4),e.round((t-x)*d+b),e.round(_-_/4),m.get("whiskerColor")).append(),p.drawLine(e.round((l-x)*d+b),e.round(_/2),e.round((s-x)*d+b),e.round(_/2),m.get("lineColor")).append(),p.drawLine(e.round((l-x)*d+b),e.round(_/4),e.round((l-x)*d+b),e.round(_-_/4),m.get("whiskerColor")).append(),p.drawLine(e.round((r-x)*d+b),e.round(.1*_),e.round((r-x)*d+b),e.round(.9*_),m.get("medianColor")).append(),m.get("target")&&(u=e.ceil(m.get("spotRadius")),p.drawLine(e.round((m.get("target")-x)*d+b),e.round(_/2-u),e.round((m.get("target")-x)*d+b),e.round(_/2+u),m.get("targetColor")).append(),p.drawLine(e.round((m.get("target")-x)*d+b-u),e.round(_/2),e.round((m.get("target")-x)*d+b+u),e.round(_/2),m.get("targetColor")).append()),p.render()}}}),I=o({init:function(t,e,i,n){this.target=t,this.id=e,this.type=i,this.args=n},append:function(){return this.target.appendShape(this),this}}),A=o({_pxregex:/(\d+)(px)?\s*innoJquery/i,init:function(t,e,n){t&&(this.width=t,this.height=e,this.target=n,this.lastShapeId=null,n[0]&&(n=n[0]),i.data(n,"_jqs_vcanvas",this))},drawLine:function(t,e,i,n,o,r){return this.drawShape([[t,e],[i,n]],o,r)},drawShape:function(t,e,i,n){return this._genShape("Shape",[t,e,i,n])},drawCircle:function(t,e,i,n,o,r){return this._genShape("Circle",[t,e,i,n,o,r])},drawPieSlice:function(t,e,i,n,o,r,s){return this._genShape("PieSlice",[t,e,i,n,o,r,s])},drawRect:function(t,e,i,n,o,r){return this._genShape("Rect",[t,e,i,n,o,r])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(t,e){i(e).html(t)},_calculatePixelDims:function(t,e,n){var o;o=this._pxregex.exec(e),this.pixelHeight=o?o[1]:i(n).height(),o=this._pxregex.exec(t),this.pixelWidth=o?o[1]:i(n).width()},_genShape:function(t,e){var i=F++;return e.unshift(i),new I(this,i,t,e)},appendShape:function(t){alert("appendShape not implemented")},replaceWithShape:function(t,e){alert("replaceWithShape not implemented")},insertAfterShape:function(t,e){alert("insertAfterShape not implemented")},removeShapeId:function(t){alert("removeShapeId not implemented")},getShapeAt:function(t,e,i){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),R=o(A,{init:function(e,n,o,r){R._super.init.call(this,e,n,o),this.canvas=t.createElement("canvas"),o[0]&&(o=o[0]),i.data(o,"_jqs_vcanvas",this),i(this.canvas).css({display:"inline-block",width:e,height:n,verticalAlign:"top"}),this._insert(this.canvas,o),this._calculatePixelDims(e,n,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=r,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0,i(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(t,e,n){var o=this.canvas.getContext("2d");return o.globalAlpha=i.fn.sparkline.defaults.common.opacity,void 0!==t&&(o.strokeStyle=t),o.lineWidth=void 0===n?1:n,void 0!==e&&(o.fillStyle=e),o},reset:function(){this._getContext().clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0},_drawShape:function(t,e,i,n,o){var r,s,a=this._getContext(i,n,o);for(a.beginPath(),a.moveTo(e[0][0]+.5,e[0][1]+.5),r=1,s=e.length;r<s;r++)a.lineTo(e[r][0]+.5,e[r][1]+.5);void 0!==i&&a.stroke(),void 0!==n&&a.fill(),void 0!==this.targetX&&void 0!==this.targetY&&a.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawCircle:function(t,i,n,o,r,s,a){var l=this._getContext(r,s,a);l.beginPath(),l.arc(i,n,o,0,2*e.PI,!1),void 0!==this.targetX&&void 0!==this.targetY&&l.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t),void 0!==r&&l.stroke(),void 0!==s&&l.fill()},_drawPieSlice:function(t,e,i,n,o,r,s,a){var l=this._getContext(s,a);l.beginPath(),l.moveTo(e,i),l.arc(e,i,n,o,r,!1),l.lineTo(e,i),l.closePath(),void 0!==s&&l.stroke(),a&&l.fill(),void 0!==this.targetX&&void 0!==this.targetY&&l.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawRect:function(t,e,i,n,o,r,s){return this._drawShape(t,[[e,i],[e+n,i],[e+n,i+o],[e,i+o],[e,i]],r,s)},appendShape:function(t){return this.shapes[t.id]=t,this.shapeseq.push(t.id),this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var i,n=this.shapeseq;for(this.shapes[e.id]=e,i=n.length;i--;)n[i]==t&&(n[i]=e.id);delete this.shapes[t]},replaceWithShapes:function(t,e){var i,n,o,r=this.shapeseq,s={};for(n=t.length;n--;)s[t[n]]=!0;for(n=r.length;n--;)i=r[n],s[i]&&(r.splice(n,1),delete this.shapes[i],o=n);for(n=e.length;n--;)r.splice(o,0,e[n].id),this.shapes[e[n].id]=e[n]},insertAfterShape:function(t,e){var i,n=this.shapeseq;for(i=n.length;i--;)if(n[i]===t)return n.splice(i+1,0,e.id),void(this.shapes[e.id]=e)},removeShapeId:function(t){var e,i=this.shapeseq;for(e=i.length;e--;)if(i[e]===t){i.splice(e,1);break}delete this.shapes[t]},getShapeAt:function(t,e,i){return this.targetX=e,this.targetY=i,this.render(),this.currentTargetShapeId},render:function(){var t,e,i,n=this.shapeseq,o=this.shapes,r=n.length,s=this._getContext();for(s.clearRect(0,0,this.pixelWidth,this.pixelHeight),i=0;i<r;i++)t=n[i],e=o[t],this["_draw"+e.type].apply(this,e.args);this.interact||(this.shapes={},this.shapeseq=[])}}),O=o(A,{init:function(e,n,o){var r;O._super.init.call(this,e,n,o),o[0]&&(o=o[0]),i.data(o,"_jqs_vcanvas",this),this.canvas=t.createElement("span"),i(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:e,height:n,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,o),this._calculatePixelDims(e,n,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,
|
|
r='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",r),this.group=i(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(t,e,n,o,r){var s,a,l,h,c,u,d,p=[];for(u=0,c=e.length;u<c;u++)p[u]=e[u][0]+","+e[u][1];return s=p.splice(0,1),r=void 0===r?1:r,a=void 0===n?' stroked="false" ':' strokeWeight="'+r+'px" strokeColor="'+n+'" ',l=void 0===o?' filled="false"':' fillColor="'+o+'" filled="true" ',h=p[0]===p[p.length-1]?"x ":"",d=100*i.fn.sparkline.defaults.common.opacity+"%",'<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+a+l+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+s+" l "+p.join(", ")+" "+h+'e"><v:fill opacity="'+d+'"/> </v:shape>'},_drawCircle:function(t,e,i,n,o,r,s){var a,l;return e-=n,i-=n,a=void 0===o?' stroked="false" ':' strokeWeight="'+s+'px" strokeColor="'+o+'" ',l=void 0===r?' filled="false"':' fillColor="'+r+'" filled="true" ','<v:oval id="jqsshape'+t+'" '+a+l+' style="position:absolute;top:'+i+"px; left:"+e+"px; width:"+2*n+"px; height:"+2*n+'px"></v:oval>'},_drawPieSlice:function(t,i,n,o,r,s,a,l){var h,c,u,d,p,f,g;if(r===s)return"";if(s-r==2*e.PI&&(r=0,s=2*e.PI),c=i+e.round(e.cos(r)*o),u=n+e.round(e.sin(r)*o),d=i+e.round(e.cos(s)*o),p=n+e.round(e.sin(s)*o),c===d&&u===p){if(s-r<e.PI)return"";c=d=i+o,u=p=n}return c===d&&u===p&&s-r<e.PI?"":(h=[i-o,n-o,i+o,n+o,c,u,d,p],f=void 0===a?' stroked="false" ':' strokeWeight="1px" strokeColor="'+a+'" ',g=void 0===l?' filled="false"':' fillColor="'+l+'" filled="true" ','<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+t+'" '+f+g+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+i+","+n+" wa "+h.join(", ")+' x e"> </v:shape>')},_drawRect:function(t,e,i,n,o,r,s){return this._drawShape(t,[[e,i],[e,i+o],[e+n,i+o],[e+n,i],[e,i]],r,s)},reset:function(){this.group.innerHTML=""},appendShape:function(t){var e=this["_draw"+t.type].apply(this,t.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",e):this.prerender+=e,this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var n=i("#jqsshape"+t),o=this["_draw"+e.type].apply(this,e.args);n[0].outerHTML=o},replaceWithShapes:function(t,e){var n,o=i("#jqsshape"+t[0]),r="",s=e.length;for(n=0;n<s;n++)r+=this["_draw"+e[n].type].apply(this,e[n].args);for(o[0].outerHTML=r,n=1;n<t.length;n++)i("#jqsshape"+t[n]).remove()},insertAfterShape:function(t,e){var n=i("#jqsshape"+t),o=this["_draw"+e.type].apply(this,e.args);n[0].insertAdjacentHTML("afterEnd",o)},removeShapeId:function(t){var e=i("#jqsshape"+t);this.group.removeChild(e[0])},getShapeAt:function(t,e,i){return t.id.substr(8)},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math),innorix("Transfer/View/SpeedLight",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.manager=e,this.innoJquerylights=t.find(".irx_speed_light > li");var i=t.find(".irx_btnGroup");this.$status=i.children(".irx_trn_status"),this.nextAnimateTimer=null,this.listenManager()},listenManager:function(){var t=e.proxy(this.renderStart,this),i=e.proxy(this.renderStop,this);this.manager.on(n.TRANSFER_DOWNLOAD_ALWAYS,t),this.manager.on(n.TRANSFER_DOWNLOAD_START,t),this.manager.on(n.TRANSFER_DOWNLOAD_RESUME,t),this.manager.on(n.TRANSFER_DOWNLOAD_PAUSE,i),this.manager.on(n.TRANSFER_DOWNLOAD_COMPLETE,i),this.manager.on(n.TRANSFER_DOWNLOAD_CANCEL,i),this.manager.on(n.TRANSFER_DOWNLOAD_RETRY,i),this.manager.on(n.TRANSFER_UPLOAD_ALWAYS,t),this.manager.on(n.TRANSFER_UPLOAD_START,t),this.manager.on(n.TRANSFER_UPLOAD_RESUME,t),this.manager.on(n.TRANSFER_UPLOAD_PAUSE,i),this.manager.on(n.TRANSFER_UPLOAD_COMPLETE,i),this.manager.on(n.TRANSFER_UPLOAD_CANCEL,i),this.manager.on(n.TRANSFER_UPLOAD_RETRY,i)},renderStart:function(t){if(this.renderStop(),this.$status.hasClass("irx_warn"));else{var e=0,i=this;this.nextAnimateTimer=setInterval(function(){3===e&&(e=0),i.innoJquerylights.removeClass("innorix_on").eq(e).addClass("innorix_on"),e++},100)}},renderStop:function(){this.nextAnimateTimer&&(clearInterval(this.nextAnimateTimer),this.nextAnimateTimer=null)}})}),innorix("Transfer/View/Status",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("i18n/lang"),o=t("CONSTANT/EVENT"),r=t("CONSTANT/TRANSFER_STATE"),s=["makeTransferList","finishTransferList"];return i({constructor:function(t,e){this.manager=e,this.$el=t,this.$status=t.find(".irx_status"),this.isCanceling=!1,this.isPausing=!1,this.alreadyShownMessageMap={},this.lastStatus=null,this.listenManager()},listenManager:function(){var t=e.proxy(this.renderRetry,this),i=e.proxy(this.renderInit,this),n=e.proxy(this.renderInitOnDownload,this),r=e.proxy(this.renderInitOnDownloadGuide,this),s=e.proxy(this.renderInitOnUpload,this),a=e.proxy(this.renderInitOnUploadGuide,this),l=e.proxy(this.render,this),h=e.proxy(this.renderPause,this),c=e.proxy(this.renderPausing,this);this.manager.on(o.TRANSFER_DOWNLOAD_RETRY,t),this.manager.on(o.TRANSFER_DOWNLOAD_CREATE,n),this.manager.on(o.TRANSFER_DOWNLOAD_CREATE_GUIDE,r),this.manager.on(o.TRANSFER_DOWNLOAD_CANCEL,i),this.manager.on(o.TRANSFER_DOWNLOAD_ALWAYS,l),this.manager.on(o.TRANSFER_DOWNLOAD_PAUSE,h),this.manager.on(o.TRANSFER_DOWNLOAD_PAUSING,c),this.manager.on(o.TRANSFER_UPLOAD_RETRY,t),this.manager.on(o.TRANSFER_UPLOAD_CREATE,s),this.manager.on(o.TRANSFER_UPLOAD_CREATE_GUIDE,a),this.manager.on(o.TRANSFER_UPLOAD_CANCEL,i),this.manager.on(o.TRANSFER_UPLOAD_ALWAYS,l),this.manager.on(o.TRANSFER_UPLOAD_PAUSE,h),this.manager.on(o.TRANSFER_UPLOAD_PAUSING,c)},renderRetry:function(t){this.isCanceling||this.renderByLang("errorAndRetry",{count:t.retries})},renderInit:function(){this.isCanceling=!1,this.isPausing=!1,this.$status.empty(),this.alreadyShownMessageMap={}},renderInitOnUpload:function(){this.renderInit(),this.renderByLang("initUpload")},renderInitOnUploadGuide:function(){this.renderByLang("initUploadGuide")},renderInitOnDownload:function(){this.renderInit(),this.renderByLang("initDownload")},renderInitOnDownloadGuide:function(){this.renderByLang("initDownloadGuide")},render:function(t){var i=this;if(t.statusMode){if("html"==t.statusMode){var n=t,o=this.$el.find("#"+n.rowID);if(o.length){var a=o.find(".filestatus"),l="green";"Error"==t.state?l="red":"Transferring"==t.state&&(l="blue"),a.html('<span style="color:'+l+';">'+t.state+"</span>")}}}else{for(var h=t.files,c=0;c<h.length;c++){var n=h[c];try{if(this.$el.length){var o=this.$el.find("#"+n.rowID);if(o.length){var a=o.find(".filestatus"),l="blue",u=n.fileState,d=n.clientFilePath;if("error"==n.fileState){l="red",u="Error",d=n.errorTitle?n.errorTitle:n.errorCode;var p='<span class="errorState" data-state="'+u+'" data-error="'+d+'" style="color:'+l+';">'+u+"</span>";a.html(p),a.hover(function(){var t=e(this).find(".errorState");t.length&&i.$status.html("<span style='color:red;'>"+t.data("error")+"</span>")},function(){e(this).find(".errorState").length&&i.$status.html("<span style='color:#646464;'>"+i.$status.data("textt")+"</span>")})}else"transferring"==n.fileState?(l="blue",u="Transferring"):"complete"==n.fileState?(l="green",u="Complete"):"pass"==n.fileState?(l="blue",u="Skip"):"cancel"==n.fileState?(l="blue",u="Cancel"):"pause"==n.fileState?(l="blue",u="Pause"):(l="blue",u="Working"),a.html('<span style="color:'+l+';">'+u+"</span>")}}}catch(g){}}if(this.isCanceling||this.isPausing)return;t.state!=r.COMPLETE?null!=this.lastStatus&&(this.lastStatus.transferSize==t.transferSize?this.manager.addStuckCount():this.manager.resetStuckCount()):this.manager.resetStuckCount(),100==t.progress&&this.manager.resetStuckCount();var f=t.statusMessage;if(this.manager.lastTransferring&&this.manager.lastTransferring.option.isMobile)return void(this.lastStatus=t);if(!f.id)return;if(this.alreadyShownMessageMap[f.id])return void(this.status=t);-1!==s.indexOf(f.id)&&(this.alreadyShownMessageMap[f.id]=!0),this.renderByLang(f.id,f.errorCode?{errorCode:f.errorCode,customError:f.customError}:null),this.lastStatus=t}},renderByLang:function(t,e){"workingServer"==t||"transferCompleted"==t?this.manager.setWorkingServer():this.manager.stopWorkingServer();var i=n("transferStatus."+t,e);if(this.manager.lastTransferring&&this.manager.lastTransferring.option.isMobile){i="upload"==this.manager.lastTransferring.files[0].mode?"Uploading":"Downloading"}if("errorSocket"==t){var o=parseInt(e.errorCode);i=0==o?n("transferStatus.errorClient"):5e3==o?n("transferStatus.errorLicense"):o>=1&&o<=399?n("transferStatus.errorServer"):o>=400&&o<=599?n("transferStatus.errorNetwork"):o>=1e3&&o<=1003?n("transferStatus.errorServer"):o>=1e3&&o<=1999?e.customError?e.customError:n("transferStatus.errorServer"):n("transferStatus.errorNetwork")}this.$status.attr("data-textt",i),this.$status.text(i)},renderCanceling:function(){this.isCanceling=!0,this.renderByLang("transferCanceling")},renderPausing:function(){this.isPausing=!0},renderPause:function(){this.isPausing=!1}})}),innorix("Transfer/View/template",function(t){"use strict";t("innoJquery");return'<div class="irx_transferWin_wrapper"> <div class="irx_transferWin"> <div class="irx_header"> <span class="irx_title"> <span class="irx_percent">0%</span> - <span class="irx_custom_title">WP</span> </span> <button class="irx_close" type="button">X</button> </div> <div class="irx_container"> <div class="irx_filetree"> </div> <div class="irx_indicator"> <ol class="irx_speed_light"> <li class="irx_speed1"></li> <li class="irx_speed2"></li> <li class="irx_speed3"></li> </ol> </div> <div class="irx_validate_progress_server"></div> <div class="irx_progress"> <span class="irx_progressStr_left">0% (0Byte / 0Byte)</span> <span class="irx_progressStr_right irx_right">0 sec (0B/s)</span> <div class="irx_progressBar"> <span class="irx_progressStr_left">0% (0Byte / 0Byte)</span> <span class="irx_progressStr_right">0 sec (0B/s)</span> <div class="irx_validate_progress"></div> </div> </div> <div class="irx_center"> <div data-textt="status" class="irx_status"> </div> <div class="irx_btnGroup"> <button type="button" class="irx_trn_status">Connection Status</button> <button type="button" class="irx_toggle_graph">Graph</button> <button type="button" class="irx_qr_code">QR Code</button> <button type="button" class="irx_controller">Start</button> </div> </div> <div class="irx_folderPath_wrapper"> <div class="irx_folderPath"> <button type="button" class="irx_folderDialog">Open</button> <span class="irx_folderPath_str">C:/ASDF</span> </div> </div> <div class="irx_bottom_policy"> <span>Resume Policy</span>'+" <label for='irx_resume_policy'><input type='checkbox' value='resume' checked id='irx_resume_policy' class='resume_policy_checkbox'> Resume </label> <label for='irx_overwrite_policy'><input type='checkbox' value='overwrite' id='irx_overwrite_policy' class='resume_policy_checkbox'> Overwrite <label for='irx_confirm_policy'><input type='checkbox' value='confirm' id='irx_confirm_policy' class='resume_policy_checkbox'> Confirm </div> <div class=\"irx_qr_wrapper\"> <div class='gplayLogo'></div> <div class='desc'></div> <div class = 'qr_code'> </div> </div> <div class=\"irx_graph_wrapper\"> <span class=\"irx_avg_trn_rate_txt\">0Byte/s</span> </div> <div class=\"irx_bottom\"> <span>INNORIX</span> </div> </div> </div ></div >"}),innorix("Transfer/View/Views",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("Transfer/View/template"),o=t("Transfer/View/SpeedLight"),r=t("Transfer/View/Progress"),s=t("Transfer/View/Status"),a=t("Transfer/View/ControlButtons"),l=t("Transfer/View/FolderPath"),h=t("Transfer/View/ResumePolicy"),c=t("Transfer/View/QrCodeWrapper"),u=t("i18n/lang"),d=t("CONSTANT/EVENT");return i({constructor:function(t){this.manager=t,this.$el=e(n),this.speedLight=new o(this.$el,t),this.progress=new r(this.$el,t),this.status=new s(this.$el,t),this.controlButtons=new a(this.$el,t),this.folderPath=new l(this.$el,t),this.resumePolicy=new h(this.$el,t),this.showQrCodeWrapper=new c(this.$el,t),this.$window=this.$el.find(".irx_transferWin"),this.initView(),this.attachEvents()},initView:function(){var t=this;this.clickingClose=!1,this.$el.hide(),this.manager.on(d.TRANSFER_UPLOAD_PAUSE,function(){setTimeout(function(){1==t.clickingClose&&t.showConfirmCancel()},100)}),this.manager.on(d.TRANSFER_DOWNLOAD_PAUSE,function(){setTimeout(function(){1==t.clickingClose&&t.showConfirmCancel()},100)}),e(document).ready(function(){t.$el.appendTo("body")})},refreshStyle:function(){this.$window.find(".irx_btnGroup .irx_controller").show(),this.$window.css({height:"180px"}),this.$window.find(".irx_container").css({height:"125px"}),this.$window.find(".irx_bottom").css({top:"155px"}),this.$window.find(".irx_toggle_graph").show()},initDraggable:function(){this.$el.find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}})},initMobile:function(){e.fn.center=function(t){return t=t?this.parent():window,(e(t).height()-this.outerHeight())/2+e(t).scrollTop()<0?this.css({top:"0px"}):this.css({top:(e(t).height()-this.outerHeight())/2+e(t).scrollTop()+"px"}),this},this.$window.css("width","300px"),this.$window.find(".irx_controller").hide(),this.$window.find(".irx_progress").css("width","258px"),this.$window.find(".irx_status").css("opacity",0),this.$window.find(".irx_progressStr_left").css("width","240px"),this.$window.find(".irx_progressStr_right").css("width","240px"),this.$window.find(".irx_folderPath_wrapper").hide(),this.$window.find(".irx_bottom").css("top","132px"),this.$window.find(".irx_container").animate({height:100},10,function(){}),this.$window.animate({height:156},10,function(){}),this.$window.css("margin-top","0px"),this.$window.css("margin-left","0px"),this.$window.css("top","45%"),this.$window.css("left",Math.max(0,(e(window).width()-this.$window.outerWidth())/2+e(window).scrollLeft())+"px"),this.attachEvents()},initEncoding:function(t,e,i){t&&this.initMobile(),this.$el.show(),this.$window.find(".irx_progressStr_left").text(e+"%"),this.$window.find(".irx_progressStr_right").text(""),this.$window.find(".irx_folderPath_wrapper").hide(),this.$window.find(".irx_status").show(),this.$window.find(".irx_status").text("Encoding"),this.$window.find(".irx_btnGroup").hide(),this.$window.find(".irx_progressBar").stop(!0).animate({width:e+"%"})},attachEvents:function(){this.$el.find(".irx_close").on("click",e.proxy(this.onClickClose,this))},attachEventsParent:function(t){t.jQuery('[class*="iframeControl"]').find(".irx_close").on("click",e.proxy(this.onClickClose,this))},showConfirmCancel:function(){var t=this;try{if(this.iframeView)var e=window.top.confirm(u("transferStatus.confirmCancelTransfer"));else var e=confirm(u("transferStatus.confirmCancelTransfer"));1==e&&(this.status.manager&&this.status.manager.lastTransferring&&this.status.manager.lastTransferring.controlBox&&this.status.manager.lastTransferring.controlBox.deleteUploadResumeInfo(),null!=t.status.lastStatus&&"Complete"==t.status.lastStatus.state?(t.$el.hide(),window.parent.jQuery('[class*="iframeControl"]').remove(),window.top.jQuery('[class*="iframeControl"]').remove()):(t.status.renderCanceling(),t.manager.cancel(),null==t.status.lastStatus&&(t.$el.hide(),window.parent.jQuery('[class*="iframeControl"]').remove(),window.top.jQuery('[class*="iframeControl"]').remove())),t.manager.isActive()&&t.manager.inactive())}catch(i){console.log(i),t.$el.hide(),window.parent?window.parent.jQuery('[class*="iframeControl"]').remove():t.$el.remove(),window.top?window.top.jQuery('[class*="iframeControl"]').remove():t.$el.remove()}this.clickingClose=!1},showConfirmCancelDirectClose:function(){1==confirm(u("transferStatus.confirmCancelTransfer"))&&this.destroyParentTransferWindow(),this.clickingClose=!1},destroyParentTransferWindow:function(){if(this.status.manager&&this.status.manager.lastTransferring&&this.status.manager.lastTransferring.controlBox&&1==this.status.manager.lastTransferring.controlBox.option.iframeView){"parent"==this.status.manager.lastTransferring.controlBox.option.iframeViewLocation?(parent,window.parent.jQuery('[class*="iframeControl"]').remove()):(top,window.top.jQuery('[class*="iframeControl"]').remove())}},onClickClose:function(t,e){this.$el.addClass("isClosing");var i=!1;this.iframeView=!1;this.status.manager&&this.status.manager.lastTransferring&&this.status.manager.lastTransferring.controlBox&&(1==this.status.manager.lastTransferring.controlBox.option.cancelConfirmation&&(i=!0),1==this.status.manager.lastTransferring.controlBox.option.iframeView&&(this.iframeView=!0)),1==i?0==this.manager.getDisabledState()&&(this.clickingClose=!0,this.manager.isPause()?this.showConfirmCancel():null!=this.status.lastStatus&&"Complete"==this.status.lastStatus.state?this.showConfirmCancel():null==this.status.lastStatus?this.showConfirmCancel():this.manager.pause()):0==this.manager.getDisabledState()&&(null!=this.status.lastStatus&&"Complete"==this.status.lastStatus.state?(this.$el.hide(),this.iframeView&&(window.top?window.top.jQuery('[class*="iframeControl"]').remove():this.$el.remove(),window.parent?window.parent.jQuery('[class*="iframeControl"]').remove():this.$el.remove())):(this.status.renderCanceling(),this.manager.cancel(),null==this.status.lastStatus&&(this.$el.hide(),this.iframeView&&(window.top?window.top.jQuery('[class*="iframeControl"]').remove():this.$el.remove(),window.parent?window.parent.jQuery('[class*="iframeControl"]').remove():this.$el.remove()))),this.manager.isActive()&&this.manager.inactive())}})}),innorix("ControlBox/Skin/Base/Dropzone",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$inner=t,this.controlBox=e,this.attachEvents(),this.listenControlBox()},attachEvents:function(){this.$inner.parent().on("dragenter",e.proxy(this.onDragEnter,this)),this.$inner.parent().on("drop",e.proxy(this.onDrop,this)),this.$inner.parent().on("dragover",e.proxy(this.onDrop,this))},listenControlBox:function(){this.controlBox.on(o.DROPZONE_SHOW,e.proxy(this.renderShow,this)),this.controlBox.on(o.DROPZONE_HIDE,e.proxy(this.renderHide,this)),this.controlBox.on(o.DROPZONE_STATE_SHOW,e.proxy(this.renderLoadingShow,this)),this.controlBox.on(o.DROPZONE_STATE_HIDE,e.proxy(this.renderLoadingHide,this)),this.controlBox.on(o.FILE_PROCESSING_STATE_SHOW,e.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(o.FILE_PROCESSING_STATE_HIDE,e.proxy(this.renderFileLoadingHide,this)),this.controlBox.on(o.CONTROL_DESTROY,e.proxy(this.resetEvent,this))},resetEvent:function(t){this.controlBox.off(o.DROPZONE_SHOW,e.proxy(this.renderShow,this)),this.controlBox.off(o.DROPZONE_HIDE,e.proxy(this.renderHide,this)),this.controlBox.off(o.DROPZONE_STATE_SHOW,e.proxy(this.renderLoadingShow,this)),this.controlBox.off(o.DROPZONE_STATE_HIDE,e.proxy(this.renderLoadingHide,this)),this.controlBox.off(o.FILE_PROCESSING_STATE_SHOW,e.proxy(this.renderFileLoadingShow,this)),this.controlBox.off(o.FILE_PROCESSING_STATE_HIDE,e.proxy(this.renderFileLoadingHide,this)),this.controlBox.off(o.CONTROL_DESTROY,e.proxy(this.resetEvent,this)),this.dropzone.off("dragenter",e.proxy(this.onDragEnter,this)),this.dropzone.off("drop",e.proxy(this.onDrop,this)),this.dropzone.off("dragover",e.proxy(this.onDrop,this))},onDragEnter:function(t){var e=n.getBoundingScreenRect(t.originalEvent,this.$inner.get(0),this.controlBox.option),i=n.string.generateUUID();this.controlBox.showDropState({dropId:i,uuid:i}),this.controlBox.showDropZone({x:parseInt(e.left-10),y:parseInt(e.top-10),width:parseInt(e.width+20),height:parseInt(e.height+20),dropId:i,uuid:i,addEmptyDirectory:!0,debug:this.controlBox.option.isDebugDropZone})},onDrop:function(t){t.preventDefault()},renderShow:function(){this.$inner.addClass("_irx_dragging")},renderHide:function(){this.$inner.removeClass("_irx_dragging")},renderLoadingShow:function(){this.$inner.find(".loading-layout").show()},renderLoadingHide:function(){this.$inner.find(".loading-layout").hide()},renderFileLoadingShow:function(){this.$inner.find(".loading-layout-file-processing").show()},renderFileLoadingHide:function(){this.$inner.find(".loading-layout-file-processing").hide()}})}),innorix("ControlBox/Skin/Base/Empty",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$empty=t.children(".irx_empty"),this.$contents=t.children(".irx_contents"),this.controlBox=e,this.listenControlBox()},listenControlBox:function(){var t=e.proxy(this.render,this);this.controlBox.on(n.CONTROL_AFTER_ADD_FILES,t),this.controlBox.on(n.CONTROL_REMOVE_FILES,t)},render:function(){this.controlBox.getFileCount()>0?(this.$empty.hide(),this.$contents.show()):(this.$empty.show(),this.$contents.hide())}})}),innorix("ControlBox/Skin/Base/InfoBox",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("i18n/lang"),r=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$infobox=t.find(".irx_infoBox"),this.controlBox=e,this.listenControlBox()},listenControlBox:function(){var t=e.proxy(this.renderSelectSize,this);this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,e.proxy(this.renderTotalSize,this)),this.controlBox.on(r.CONTROL_REMOVE_FILES,t),this.controlBox.on(r.CONTROL_SELECT_ROWS,t),this.controlBox.on(r.CONTROL_UNSELECT_ROWS,t)},renderTotalSize:function(){var t=n.string.humanFileSizeObject(this.controlBox.getTotalSize());this.$infobox.find(".irx_size").text(t.number.toFixed(1)),this.$infobox.find(".irx_unit").text(t.unit+"yte"),this.$infobox.find(".irx_text").empty()},renderSelectSize:function(){var t=this.controlBox.getSelectedFileCount();if(0===t)return void this.renderTotalSize();var e=n.string.humanFileSizeObject(this.controlBox.getSelectSize());this.$infobox.find(".irx_size").text(e.number.toFixed(1)),this.$infobox.find(".irx_unit").text(e.unit+"yte"),this.$infobox.find(".irx_text").text(o("controlBox.fileTotalSelInfo",{total:this.controlBox.getFileCount(),select:t}))}})}),innorix("ControlBox/Skin/Base/ListGrid",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$inner=t,this.$listGrid=t.find(".irx_listGrid"),this.controlBox=e,this.lastOdd=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(o.CONTROL_REMOVE_FILES,e.proxy(this.renderRemoveFiles,this)),this.controlBox.on(o.CONTROL_AFTER_ADD_FILES,e.proxy(this.renderAddFiles,this))},attachEvents:function(){this.$listGrid.on("click",".irx_remove",e.proxy(this.onRemoveClick,this))},renderAddFiles:function(t){var i=this,o="";e.each(t,function(t,e){i.lastOdd=!i.lastOdd;var r=e.printFileName,s=e.filePath?e.filePath:e.printFileName;r.length>25&&(r=r.slice(0,25)+"...");var a="";e.fileSize&&(a=n.string.humanFileSize(e.fileSize)),o+=(i.lastOdd?'<li class="irx_odd"':"<li")+' id="'+e.id+'"title="'+s+'"> <input type="checkbox">'+r+' <span class="irx_info">('+a+')</span><span class="irx_remove">X</span></li>'}),o+="",this.$listGrid.append(o)},renderClearFiles:function(){this.$listGrid.empty()},renderRemoveFiles:function(t){if(0===this.controlBox.getFileCount())return void this.renderClearFiles();var i=this.$listGrid;e.each(t,function(t,e){i.find("#"+e.id).remove()})},onRemoveClick:function(t){if(0==this.controlBox.getControlDisabledState()){t.stopPropagation();var i=e(t.currentTarget).parent("li"),n=i.attr("id");this.controlBox.removeFileById(n)}},onKeyupEvent:function(t){console.log(t.keyCode)}})}),innorix("ControlBox/Skin/Base/Loading",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("singleton/agent"),o=t("CONSTANT/EVENT"),r=["openFileDialog"];return i({constructor:function(t){this.$loading=t.children(".irx_loading"),this.commandStackCount=0,this.listenAgent()},listenAgent:function(){var t=n.event;t.on(o.AGENT_ADD_COMMAND,e.proxy(this.renderShow,this)),t.on(o.AGENT_COMPLETE_COMMAND,e.proxy(this.renderHide,this))},renderShow:function(t){-1!==r.indexOf(t.action)&&0==this.commandStackCount++&&this.$loading.show()},renderHide:function(t){-1!==r.indexOf(t.action)&&0==--this.commandStackCount&&this.$loading.hide()}})}),innorix("ControlBox/Skin/Base/RowSelection",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$listGrid=t.find(".irx_listGrid"),this.controlBox=e,this.lastSelectedIndex=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(n.CONTROL_SELECT_ROWS,e.proxy(this.renderSelectRows,this)),this.controlBox.on(n.CONTROL_UNSELECT_ROWS,e.proxy(this.renderUnSelectRows,this))},renderSelectRows:function(t){var i=this.$listGrid;e.each(t,function(t,e){i.find("#"+e.id).addClass("selected").find(":checkbox").prop("checked",!0)})},renderUnSelectRows:function(t){var i=this.$listGrid;e.each(t,function(t,e){i.find("#"+e.id).removeClass("selected").find(":checkbox").prop("checked",!1)})},attachEvents:function(){this.$listGrid.on("click","li",e.proxy(this.onRowClick,this))},onRowClick:function(t){if(0==this.controlBox.getControlDisabledState()){var i=e(t.currentTarget),n=i.index(),o=i.attr("id"),r=this.controlBox.getFileById(o);t.shiftKey&&!1!==this.lastSelectedIndex?this.selectMultipleRows(this.lastSelectedIndex,n,t.ctrlKey):t.shiftKey||!r.selected?this.selectRow(o):this.unSelectRow(o),this.lastSelectedIndex=n}},selectMultipleRows:function(t,i,n){t>i&&(i=[t,t=i][0]);var o=this.controlBox.getAllFiles().slice(t,i+1),r=e.map(o,function(t){return t.id});n||this.controlBox.unSelectFilesById(),this.controlBox.addSelectFilesById(r)},selectRow:function(t){this.controlBox.addSelectFilesById([t])},unSelectRow:function(t){this.controlBox.unSelectFilesById([t])}})}),innorix("ControlBox/Skin/Base/template",function(t){"use strict";return t("innoJquery").parseHTML('<div class="irx_inner"> <div class="irx_contents"> <div class="irx_infoBox"> <div class="irx_infoBox_inner"> <div class="irx_top"> <span class="irx_size"></span> <span class="irx_unit"></span> </div> <div class="irx_bottom"> <span class="irx_text"></span> </div> </div> </div> <div class="irx_listGrid_wrap"> <ul class="irx_listGrid"> </ul> </div> </div> <div class="irx_empty"> </div> <div class="irx_loading"> <span></span> </div></div>')}),innorix("ControlBox/Skin/Base/View",function(t){"use strict";var e,i=t("innoJquery"),n=t("klass"),o=t("ControlBox/Skin/View"),r=t("ControlBox/Skin/Base/Dropzone"),s=t("ControlBox/Skin/Base/ListGrid"),a=t("ControlBox/Skin/Base/InfoBox"),l=t("ControlBox/Skin/Base/Empty"),h=t("ControlBox/Skin/Base/RowSelection"),c=t("ControlBox/Skin/Base/Loading");return n([o],{constructor:function(n,u){e=t("ControlBox/Skin/Base/template"),o.call(this,n,u),this.$inner=i(e).appendTo(n),this.$first=this.$inner.children(".irx_first"),this.$contents=this.$inner.children(".irx_contents"),this.dropzone=new r(this.$inner,u),this.listGrid=new s(this.$inner,u),this.infoBox=new a(this.$inner,u),this.empty=new l(this.$inner,u),this.rowSelection=new h(this.$inner,u),this.loading=new c(this.$inner,u),this.addThemeIfExist()},addThemeIfExist:function(){var t=this.controlBox.option.skinTheme;t&&this.$el.addClass("irx_theme_"+t)},defaultSize:{width:550,height:200},skinName:"base"})}),innorix("ControlBox/Skin/Basic/Dropzone",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$inner=t,this.controlBox=e,this.lastDropId="",this.dropzone=this.$inner.parent(),this.attachEvents(),this.listenControlBox()},attachEvents:function(){this.dropzone.on("dragenter",e.proxy(this.onDragEnter,this)),this.dropzone.on("drop",e.proxy(this.onDrop,this)),this.dropzone.on("dragover",e.proxy(this.onDrop,this))},listenControlBox:function(){this.controlBox.on(o.DROPZONE_SHOW,e.proxy(this.renderShow,this)),this.controlBox.on(o.DROPZONE_HIDE,e.proxy(this.renderHide,this)),this.controlBox.on(o.DROPZONE_STATE_SHOW,e.proxy(this.renderLoadingShow,this)),this.controlBox.on(o.DROPZONE_STATE_HIDE,e.proxy(this.renderLoadingHide,this)),this.controlBox.on(o.FILE_PROCESSING_STATE_SHOW,e.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(o.FILE_PROCESSING_STATE_HIDE,e.proxy(this.renderFileLoadingHide,this)),this.controlBox.on(o.CONTROL_DESTROY,e.proxy(this.resetEvent,this))},resetEvent:function(t){this.controlBox.off(o.DROPZONE_SHOW,e.proxy(this.renderShow,this)),this.controlBox.off(o.DROPZONE_HIDE,e.proxy(this.renderHide,this)),this.controlBox.off(o.DROPZONE_STATE_SHOW,e.proxy(this.renderLoadingShow,this)),this.controlBox.off(o.DROPZONE_STATE_HIDE,e.proxy(this.renderLoadingHide,this)),this.controlBox.off(o.FILE_PROCESSING_STATE_SHOW,e.proxy(this.renderFileLoadingShow,this)),this.controlBox.off(o.FILE_PROCESSING_STATE_HIDE,e.proxy(this.renderFileLoadingHide,this)),this.controlBox.off(o.CONTROL_DESTROY,e.proxy(this.resetEvent,this)),this.dropzone.off("dragenter",e.proxy(this.onDragEnter,this)),this.dropzone.off("drop",e.proxy(this.onDrop,this)),this.dropzone.off("dragover",e.proxy(this.onDrop,this))},onDragEnter:function(t){var e=n.getBoundingScreenRect(t.originalEvent,this.dropzone.get(0),this.controlBox.option),i=n.string.generateUUID();this.lastDropId=i,this.controlBox.showDropState({dropId:i,uuid:i}),this.controlBox.showDropZone({x:parseInt(e.left-10),y:parseInt(e.top-10),width:parseInt(e.width+20),height:parseInt(e.height+20),dropId:i,uuid:i,addEmptyDirectory:!0,debug:this.controlBox.option.isDebugDropZone})},onDrop:function(t){t.preventDefault()},renderShow:function(){this.controlBox.view.$el.addClass("_irx_dragging"),this.$inner.addClass("_irx_dragging")},renderHide:function(){this.controlBox.view.$el.removeClass("_irx_dragging"),this.$inner.removeClass("_irx_dragging")},renderLoadingShow:function(){this.$inner.find(".loading-layout").show()},renderLoadingHide:function(){this.$inner.find(".loading-layout").hide()},renderFileLoadingShow:function(){this.$inner.find(".loading-layout-file-processing").show()},renderFileLoadingHide:function(){this.$inner.find(".loading-layout-file-processing").hide()}})}),innorix("ControlBox/Skin/Basic/Empty",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$empty=t.children(".irx_empty"),this.$contents=t.children(".irx_contents"),this.controlBox=e,this.listenControlBox()},listenControlBox:function(){var t=e.proxy(this.render,this);this.controlBox.on(n.CONTROL_AFTER_ADD_FILES,t),this.controlBox.on(n.CONTROL_REMOVE_FILES,t)},render:function(){this.controlBox.getFileCount()>0?(this.$empty.hide(),this.$contents.show()):(this.$empty.show(),this.$contents.hide())}})}),innorix("ControlBox/Skin/Basic/InfoBox",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("i18n/lang"),r=(t("CONSTANT/ENV"),
|
|
t("CONSTANT/EVENT"));return i({constructor:function(t,i){this.$inner=t,this.$infobox=e(t[1]),this.$fileSizeWrapper=t.find(".irx-chart-file-size"),this.$fileCountWrapper=t.find(".irx-chart-file-count"),this.$massFileWrapper=t.find(".irx-mass-wrapper"),this.$massFileWrapperTitle=t.find(".irx-mass-file-title"),this.$massFileWrapperSize=t.find(".irx-mass-file-size"),this.$massFileWrapperCount=t.find(".irx-mass-file-count"),this.$massFileWrapperContent=t.find(".irx-mass-file-content"),this.$closeGraphBtn=t.find(".irx-chart-toggle"),this.$chartCanvas=t.find(".irx-chart-canvas"),this.$chartObj=null,this.controlBox=i,this.listenControlBox(),this.attachEvents(),this.hideGraph(),this.controlBox.option.showGraph&&this.showGraph()},listenControlBox:function(){var t=e.proxy(this.renderChart,this);this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,e.proxy(this.renderChart,this)),this.controlBox.on(r.CONTROL_REMOVE_FILES,t),this.controlBox.on(r.CONTROL_SELECT_ROWS,t),this.controlBox.on(r.CONTROL_UNSELECT_ROWS,t)},attachEvents:function(){this.$infobox.on("click",".irx-chart-toggle",e.proxy(this.hideGraph,this)),this.$infobox.on("click",".irx-mass-toggle",e.proxy(this.hideMass,this)),this.$infobox.on("mouseenter",e.proxy(this.showCloseGraph,this)),this.$infobox.on("mouseleave",e.proxy(this.hideCloseGraph,this))},renderChart:function(){var t=this;setTimeout(function(){t.$massFileWrapperTitle.html(o("controlBox.massFileTitle")),t.$massFileWrapperContent.html(o("controlBox.massFileContent"));var e=t.controlBox.getTotalSize(),i=t.controlBox.getSelectSize(),r=n.string.humanFileSizeObject(e),s=r.number.toFixed(2);s=s.replace(/\.00([^\d])/g,"$1");var a=r.unit;r=r.number.toFixed(2)+r.unit,r=r.replace(/\.00([^\d])/g,"$1");var l=n.string.humanFileSizeObject(i);l=l.number.toFixed(2)+l.unit,l=l.replace(/\.00([^\d])/g,"$1");var h=t.controlBox.getSelectedFileCount(),c=t.controlBox.getFileCount(),u=t.controlBox.getTotalFolderCount(),d=t.controlBox.getSelectedFolderCount(),p='<div class="selected-file-size">'+l+"</div><br/>";if(p+='<div class="total-file-size"></div>',h>0){p='<div class="selected-file-size">'+l+"</div>",p+='<div class="total-file-size"><div class="topBorder"></div>'+r+"</div>";var f="file",g="folder";1==d?(d=", "+d,g="folder"):d>1?(d=", "+d,g="folders"):0==h?(d=", "+d,g="folder"):(g="",d=""),h>1&&(f="files"),t.$fileSizeWrapper.addClass("file-select"),t.$fileCountWrapper.html(o("controlBox.fileTotalSelInfo",{totalFolderSelected:d,totalItemSelected:h,textItem:f,textFolder:g}))}else{var f="file",g="folder";1==u?(u=", "+u,g="folder"):u>1?(u=", "+u,g="folders"):(g="",u=""),c>1&&(f="files"),p='<div class="selected-file-size">'+r+"</div>",t.$fileSizeWrapper.removeClass("file-select"),t.$fileCountWrapper.html(o("controlBox.fileTotalCount",{totalItem:c,totalFolder:u,textItem:f,textFolder:g}))}t.$massFileWrapperSize.html(o("controlBox.massFileInfo",{totalItemSize:s,totalItemSizeInfo:a,totalItemCount:c,totalItemFolderCount:u}));t.controlBox.option.maxMassFileListCount<c?t.$massFileWrapper.show():t.$massFileWrapper.hide(),t.$fileSizeWrapper.html(p);var m={labels:["SELECTED FILESIZE","TOTAL FILESIZE"],datasets:[{data:[i,0===e?1:e-i],backgroundColor:["#44C8FF","#09A3E4"],borderWidth:[0,0]}]};if("undefined"==typeof HTMLCanvasElement);else if(t.controlBox.option.usePlugin){if(0!=i);null!==t.$chartObj?(t.$chartObj.data.datasets[0].data[0]=i,t.$chartObj.data.datasets[0].data[1]=0===e?1:e-i,t.$chartObj.update()):t.$chartObj=new Chart(t.$chartCanvas,{type:"doughnut",data:m,options:{legend:{display:!1},tooltips:{enabled:!1},animation:{animateScale:!1,animateRotate:!0},hover:!1,cutoutPercentage:75}})}},200);var i=this.controlBox.getSelectedFiles(),r=null;e.each(i,function(t,e){r="picture"==e.fileExtType?e:null})},toggleChart:function(){this.controlBox.option.$el.toggleClass("chart-hide")},showCloseGraph:function(){this.$closeGraphBtn.stop().animate({opacity:1},300)},hideCloseGraph:function(){this.$closeGraphBtn.stop().animate({opacity:0},300)},showGraph:function(){if(this.controlBox.option.showGraph){this.controlBox.option.$el.removeClass("chart-hide"),this.renderChart()}},hideGraph:function(){var t=this.controlBox.option.$el;t.addClass("chart-hide"),t.removeClass("preview-show")},hideMass:function(){this.controlBox.clearFiles(),this.$massFileWrapper.hide()}})}),innorix("ControlBox/Skin/Basic/ListGrid",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("i18n/lang"),r=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$inner=t,this.$listGrid=t.find(".irx_listGrid"),this.$fileHeader=t.find(".irx-file-header"),this.$fileHeaderCheck=this.$fileHeader.find(".fileheader-checkbox"),this.$fileHeaderRemoveBtn=this.$fileHeader.find(".irx-file-remove-button"),this.$fileHeaderDownloadBtn=this.$fileHeader.find(".irx-file-download-button"),this.controlBox=e,this.lastOdd=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(r.CONTROL_REMOVE_FILES,e.proxy(this.renderRemoveFiles,this)),this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,e.proxy(this.renderAddFiles,this)),0==this.controlBox.option.useFuncBtn&&this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,e.proxy(this.sortableList,this)),this.controlBox.on(r.CONTROL_REMOVE_FILES,e.proxy(this.updateListGrid,this)),this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,e.proxy(this.updateListGrid,this)),this.controlBox.option.showFileListHeader&&(this.controlBox.on(r.CONTROL_SELECT_ROWS,e.proxy(this.updateFileHeader,this)),this.controlBox.on(r.CONTROL_UNSELECT_ROWS,e.proxy(this.updateFileHeader,this))),this.controlBox.on(r.CONTROL_SORT,e.proxy(this.updateDisplayGrid,this))},attachEvents:function(){this.$listGrid.off("click"),0==this.controlBox.option.useFuncBtn&&this.$listGrid.on("click",".irx_remove",e.proxy(this.onRemoveClick,this)),this.controlBox.option.showFolderItemsTree&&this.$listGrid.on("click",".tree-icon.directory",e.proxy(this.toggleFileTree,this)),this.controlBox.option.showFileListHeader&&(this.$fileHeaderCheck.on("click",e.proxy(this.toggleFileHeaderCheck,this)),this.$fileHeaderRemoveBtn.on("click",e.proxy(this.toggleFileHeaderRemoveBtn,this)),this.$fileHeaderDownloadBtn.on("click",e.proxy(this.toggleFileHeaderDownloadBtn,this))),this.controlBox.option.keyboardDeleteEvent&&e("html").on("keyup",e.proxy(this.onKeyupEvent,this))},renderAddFiles:function(t){this.controlBox.option.showFileListHeader&&(this.controlBox.getFileCount()>0?(e(".irx-file-header-desc").text(o("fileListHeader.label")),e(".irx-file-remove-button").text(o("fileListHeader.removeBtn")),e(".irx-file-download-button").text(o("fileListHeader.downloadBtn")),this.$listGrid.parent().find(".irx_filetree_list").css("position","relative"),this.$listGrid.parent().find(".irx_filetree_list").css("top","30px"),this.$listGrid.parent().find(".irx_filetree_list").css("height",parseInt(this.controlBox.option.height)-30+"px"),this.$fileHeader.css("width",parseInt(this.controlBox.option.width)-11+"px"),this.$fileHeader.css("position","absolute"),this.$fileHeader.show()):this.$fileHeader.hide());var i=this,r="",s=this.controlBox.option.folderIntact;this.controlBox.option.maxMassFileListCount>=this.controlBox.getFileCount()&&e.each(t,function(t,e){if(0==e.thumbnail){var o=e.printFileName;e.description&&(o+=" "+e.description);var a=n.string.getFileExt(e.printFileName).toLowerCase();0!=e.isFile&&1!=e.isVirtual||(a="directory");var l="";if(e.fileSize)if(1==i.controlBox.option.showByteSize)var l="("+n.string.formatMoney(e.fileSize)+" Byte)";else var l="("+n.string.humanFileSize(e.fileSize)+")";var h="";if(1==s)var h=e.rootName;var c=i.getRootObj(h),u=!1;e.isRemove&&(u=e.isRemove);e.isFile,r='<li id="'+e.id+'" class="irx-file-wrapper is-file '+(u?"is-removed":"")+'" title=""><div class="irx-file-inner-wrapper" data-fileId="'+e.id+'">',2!=i.controlBox.option.useFuncBtn&&(r+=' <div class="tree-icon filetree-checkbox"></div>'),r+=' <div class="tree-icon file-icon ext_'+a+'"></div> <div class="filename">'+o+'</div> <div class="filesize">'+(u?"(file not found)":l)+"</div>",0==i.controlBox.option.useFuncBtn&&(r+=' <div class="btn-group"> <span class="irx_btn_move"> </span> <span class="irx_btn_del irx_remove"> </span> </div>'),r+="</div></li>",c.append(r)}}),this.updateListGrid(),this.controlBox.option.showFolderItems&&this.showAllFolderItems(),this.controlBox.option.transferWindowMode&&this.controlBox.download(),this.controlBox.option.transferWindowModeOpen&&this.controlBox.downloadAndOpen(),"asc"==this.controlBox.option.autoSortFile&&this.controlBox.sortName("asc"),"desc"==this.controlBox.option.autoSortFile&&this.controlBox.sortName("desc")},updateDisplayGrid:function(t){this.controlBox.option.showFileListHeader&&(this.controlBox.getFileCount()>0?(e(".irx-file-header-desc").text(o("fileListHeader.label")),e(".irx-file-remove-button").text(o("fileListHeader.removeBtn")),e(".irx-file-download-button").text(o("fileListHeader.downloadBtn")),this.$listGrid.parent().find(".irx_filetree_list").css("position","relative"),this.$listGrid.parent().find(".irx_filetree_list").css("top","30px"),this.$listGrid.parent().find(".irx_filetree_list").css("height",parseInt(this.controlBox.option.height)-30+"px"),this.$fileHeader.css("width",parseInt(this.controlBox.option.width)-11+"px"),this.$fileHeader.css("position","absolute"),this.$fileHeader.show()):this.$fileHeader.hide());var i=this,r="";i.controlBox.option.$el.find("ul.irx_filetree_list").html("");var s=this.controlBox.option.folderIntact;this.controlBox.option.maxMassFileListCount>=this.controlBox.getFileCount()&&e.each(t,function(t,e){if(0==e.thumbnail){var o=e.printFileName;e.description&&(o+=" "+e.description);var a=n.string.getFileExt(e.printFileName).toLowerCase();0!=e.isFile&&1!=e.isVirtual||(a="directory");var l="";if(e.fileSize)if(1==i.controlBox.option.showByteSize)var l="("+n.string.formatMoney(e.fileSize)+" Byte)";else var l="("+n.string.humanFileSize(e.fileSize)+")";var h="";if(1==s)var h=e.rootName;var c=i.getRootObj(h),u=!1;e.isRemove&&(u=e.isRemove);e.isFile,r='<li id="'+e.id+'" class="irx-file-wrapper is-file '+(u?"is-removed":"")+'" title=""><div class="irx-file-inner-wrapper" data-fileId="'+e.id+'">',2!=i.controlBox.option.useFuncBtn&&(r+=' <div class="tree-icon filetree-checkbox"></div>'),r+=' <div class="tree-icon file-icon ext_'+a+'"></div> <div class="filename">'+o+'</div> <div class="filesize">'+(u?"(file not found)":l)+"</div>",0==i.controlBox.option.useFuncBtn&&(r+=' <div class="btn-group"> <span class="irx_btn_move"> </span> <span class="irx_btn_del irx_remove"> </span> </div>'),r+="</div></li>",c.append(r)}}),this.updateListGrid(),this.controlBox.option.showFolderItems&&this.showAllFolderItems(),this.controlBox.option.transferWindowMode&&this.controlBox.download(),this.controlBox.option.transferWindowModeOpen&&this.controlBox.downloadAndOpen()},sortableList:function(){var t=this.controlBox.view.$el.find(".irx_filetree").find("ul");this.controlBox.option.usePlugin&&e(t).sortable({connectWith:t,axis:"y",stop:e.proxy(this.sortableStop,this),sort:function(){}})},sortableStop:function(){this.updateFileIndex(),this.updateListGrid()},updateFileIndex:function(){var t,i=e(this.controlBox.fileList.files),n=this.$listGrid.find("li"),o=[];n.each(function(n,r){t=r.id,i.each(function(i,n){t===n.id&&(n.rootName=e("#"+t).closest("ul").attr("data-root"),o.push(n))})}),this.controlBox.fileList.files=o},renderClearFiles:function(){this.$listGrid.empty()},renderRemoveFiles:function(t){if(0===this.controlBox.getFileCount())return void this.renderClearFiles();var i=this.$listGrid;e.each(t,function(t,e){i.find("#"+e.id).remove()})},onRemoveClick:function(t){if(t.stopPropagation(),0==this.controlBox.getControlDisabledState()){var i=this,n=e(t.currentTarget).closest("li");if(n.hasClass("is-directory")){n.find(".irx-file-wrapper.is-file").each(function(){var t=e(this).attr("id");i.controlBox.removeFileById(t)});n.find("ul").eq(0).attr("data-root").split("/");n.remove()}else{var o=n.attr("id");i.controlBox.removeFileById(o)}}},updateFileHeader:function(){for(var t=!1,e=this.controlBox.getSelectedFiles(),i=0;i<e.length;i++){"upload"==e[i].mode&&(t=!0)}t?(this.$fileHeaderRemoveBtn.parent().css("float","none"),this.$fileHeaderDownloadBtn.parent().hide()):0==e.length?(this.$fileHeaderRemoveBtn.parent().css("float","none"),this.$fileHeaderDownloadBtn.parent().hide()):(this.$fileHeaderRemoveBtn.parent().css("float","left"),this.$fileHeaderDownloadBtn.parent().show())},updateListGrid:function(){var t=this;this.controlBox.option.showFileListHeader&&(0==t.controlBox.getFileCount()&&t.$fileHeader.hide(),setTimeout(function(){},100)),0==this.$listGrid.find("li.irx-file-wrapper").length?"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().addClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").text(this.controlBox.option.emptyDownloadFileText),this.$listGrid.parent().find(".irx-empty-download-text").show()):this.$listGrid.parent().addClass("empty-uploader"):"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").hide()):this.$listGrid.parent().removeClass("empty-uploader");var i=this.controlBox.view.$el.parents().length;this.$listGrid.find("li.irx-file-wrapper").each(function(){var t=e(this).parents().length-i-3,n=e(this).find(".irx-file-inner-wrapper").eq(0);t>0?n.css({"padding-left":10*t+"px"}):n.css({"padding-left":"0px"})})},getRootObj:function(t){var i=this;if(!t||0==t.length)return this.$listGrid;t=t.split("/");for(var n=this.$listGrid,o="",r=0;r<t.length;r++){var s=!1;i.controlBox.option.$el.find("ul.irx_filetree_list").each(function(){o+t[r]==e(this).attr("data-root")&&(s=!0,n=e(this))}),0==s&&(n=i.addRootObj(t[r],n,o+t[r])),o=o+t[r]+"/"}return n},addRootObj:function(t,i,n){var o=e('<li class="irx-file-wrapper is-directory" title="fileURI">');0==n.length&&(n="");var r='<div class="irx-file-inner-wrapper"> <div class="tree-icon filetree-checkbox"></div> <div class="tree-icon directory"></div> <div class="filename">'+t+'</div> <div class="filesize"></div> <div class="btn-group"> <span class="irx_btn_move"> </span> <span class="irx_btn_del irx_remove"> </span> </div></div><ul class="irx_filetree_list irx_listGrid" style="display: none;" data-root="'+n+'"></ul>';return o.append(r).appendTo(i),o.find("ul.irx_filetree_list").eq(0)},toggleFileTree:function(t){if(0==this.controlBox.getControlDisabledState()){var i=e(t.target),n=i.closest("li.irx-file-wrapper");i.hasClass("open")?(i.removeClass("open"),n.find("ul.irx_filetree_list").eq(0).hide()):(i.addClass("open"),n.find("ul.irx_filetree_list").eq(0).show())}return!1},toggleFileHeaderRemoveBtn:function(t,e){this.controlBox.removeSelectedFiles()},toggleFileHeaderDownloadBtn:function(t,e){this.controlBox.downloadSelectedFiles()},toggleFileHeaderCheck:function(t,i){return e(t.target).hasClass("active")?(e(t.target).removeClass("active"),this.controlBox.unselectAllFiles()):(e(t.target).addClass("active"),this.controlBox.selectAllFiles()),!1},showAllFolderItems:function(){return this.$listGrid.find(".directory").each(function(){var t=e(this),i=t.closest("li.irx-file-wrapper");t.hasClass("open")?(t.removeClass("open"),i.find("ul.irx_filetree_list").eq(0).hide()):(t.addClass("open"),i.find("ul.irx_filetree_list").eq(0).show())}),!1},onKeyupEvent:function(t){46==t.keyCode&&this.controlBox.removeSelectedFiles()}})}),innorix("ControlBox/Skin/Basic/Loading",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("singleton/agent"),o=t("CONSTANT/EVENT"),r=["openFileDialog"];return i({constructor:function(t){this.$loading=t.children(".irx_loading"),this.commandStackCount=0,this.listenAgent()},listenAgent:function(){var t=n.event;t.on(o.AGENT_ADD_COMMAND,e.proxy(this.renderShow,this)),t.on(o.AGENT_COMPLETE_COMMAND,e.proxy(this.renderHide,this))},renderShow:function(t){-1!==r.indexOf(t.action)&&0==this.commandStackCount++&&this.$loading.show()},renderHide:function(t){-1!==r.indexOf(t.action)&&0==--this.commandStackCount&&this.$loading.hide()}})}),innorix("ControlBox/Skin/Basic/RowSelection",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/ENV"),r=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$inner=t,this.$listGrid=t.find(".irx_listGrid"),this.controlBox=e,this.lastSelectedIndex=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(r.CONTROL_SELECT_ROWS,e.proxy(this.renderSelectRows,this)),this.controlBox.on(r.CONTROL_UNSELECT_ROWS,e.proxy(this.renderUnSelectRows,this))},renderSelectRows:function(t){var i=this.$listGrid,r=null;if(e.each(t,function(t,e){r="picture"==e.fileExtType?e:null,i.find("#"+e.id).addClass("selected").find(":checkbox").prop("checked",!0)}),r&&this.controlBox.option.showPreviewImage)if("picture"==r.fileExtType){var s=n.string.humanFileSizeObject(r.fileSize);if(s=s.number.toFixed(2)+s.unit,s=s.replace(/\.00([^\d])/g,"$1"),this.controlBox.option.agent){var a=o.AGENT_HTTP_URL;"https:"==window.location.protocol&&(a=o.AGENT_HTTPS_URL),this.$inner.find(".irx-preview-image").attr("src",a+r.thumbnailUrl)}else this.$inner.find(".irx-preview-image").attr("src",URL.createObjectURL(r.file));this.$inner.find(".irx-preview-file-name").text(r.printFileName),this.$inner.find(".irx-preview-file-size").text(s),this.$inner.find(".irx-preview-image").show(),this.$inner.parent().addClass("preview-show")}else this.$inner.find(".irx-preview-file-name").text(""),this.$inner.find(".irx-preview-file-size").text(""),this.$inner.find(".irx-preview-image").hide(),this.$inner.parent().addClass("preview-show");else this.$inner.find(".irx-preview-image").attr("src",""),this.$inner.parent().removeClass("preview-show")},renderUnSelectRows:function(t){var i=this.$listGrid,n=this;e.each(t,function(t,e){n.$inner.find(".irx-preview-file-name").text()==e.printFileName&&(n.$inner.find(".irx-preview-image").attr("src",""),n.$inner.parent().removeClass("preview-show")),i.find("#"+e.id).removeClass("selected").find(":checkbox").prop("checked",!1)})},attachEvents:function(){this.$listGrid.on("click dblclick contextmenu","li > div",e.proxy(this.onRowClick,this))},onRowClick:function(t){if(0==this.controlBox.getControlDisabledState()){var i=this,n=e(t.currentTarget).closest("li");n.removeClass("dblClick");var o=n.hasClass("is-directory"),s=n.index(),a=n.hasClass("selected");if(a&&"contextmenu"==t.originalEvent.type)return!0;if(o)a?n.removeClass("selected"):n.addClass("selected"),n.find(".irx-file-wrapper.is-file").each(function(){var t=e(this).attr("id");a?i.unSelectRow(t):i.selectRow(t)});else{var l=n.attr("id"),h=this.controlBox.getFileById(l);"dblclick"==t.originalEvent.type&&(this.controlBox.emit(r.CONTROL_DBL_CLICK_ROWS,h),n.addClass("dblClick")),h.selected?setTimeout(function(){n.hasClass("dblClick")||i.unSelectRow(l)},175):i.selectRow(l)}this.lastSelectedIndex=s,this.updateDirectorySelect()}},selectMultipleRows:function(t,i,n){t>i&&(i=[t,t=i][0]);var o=this.controlBox.getAllFiles().slice(t,i+1),r=e.map(o,function(t){return t.id});n||this.controlBox.unSelectFilesById(),this.controlBox.addSelectFilesById(r)},selectRow:function(t){this.controlBox.addSelectFilesById([t])},unSelectRow:function(t){this.controlBox.unSelectFilesById([t])},updateDirectorySelect:function(){this.$listGrid.find(".irx-file-wrapper.is-directory").each(function(){var t=!0;0==e(this).find(".irx-file-wrapper.is-file").length&&(t=!1),e(this).find(".irx-file-wrapper.is-file").each(function(){e(this).hasClass("selected")||(t=!1)}),t?e(this).addClass("selected"):e(this).removeClass("selected")})}})}),innorix("ControlBox/Skin/Basic/template",function(t){"use strict";var e=(t("innoJquery"),t("i18n/lang"));return{controlBox:'<div class="irx_filetree empty-uploader"><div style=\'display:none;\' class="irx-empty-download-text">There is no download file here.</div><div style=\'display:none;\' class="loading-layout-file-processingg"><div class="sk-fading-circle"><div class="sk-circle1 sk-circle"></div><div class="sk-circle2 sk-circle"></div><div class="sk-circle3 sk-circle"></div><div class="sk-circle4 sk-circle"></div><div class="sk-circle5 sk-circle"></div><div class="sk-circle6 sk-circle"></div><div class="sk-circle7 sk-circle"></div><div class="sk-circle8 sk-circle"></div><div class="sk-circle9 sk-circle"></div><div class="sk-circle10 sk-circle"></div><div class="sk-circle11 sk-circle"></div><div class="sk-circle12 sk-circle"></div></div></div><div style=\'display:none;\' class="loading-layoutg"><div class="sk-fading-circle"><div class="sk-circle1 sk-circle"></div><div class="sk-circle2 sk-circle"></div><div class="sk-circle3 sk-circle"></div><div class="sk-circle4 sk-circle"></div><div class="sk-circle5 sk-circle"></div><div class="sk-circle6 sk-circle"></div><div class="sk-circle7 sk-circle"></div><div class="sk-circle8 sk-circle"></div><div class="sk-circle9 sk-circle"></div><div class="sk-circle10 sk-circle"></div><div class="sk-circle11 sk-circle"></div><div class="sk-circle12 sk-circle"></div></div></div><div class="irx-file-header" > <div class="tree-icon fileheader-checkbox"></div> <div class="irx-file-header-desc">Selected Files</div> <div class="irx-file-remove-button-wrapper"><button class="irx-file-remove-button">Remove</button></div> <div class="irx-file-download-button-wrapper"><button class="irx-file-download-button">Download</button></div></div><ul class="irx_filetree_list irx_listGrid" data-filetree=""></ul></div><div class="irx_infoBox "><div class="irx-chart-wrapper"><div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div><div class="irx-canvas-wrapper"><canvas class="irx-chart-canvas"></canvas></div><div class="irx-chart-file-size"></div><div class="irx-chart-file-count"></div></div><div class="irx-preview-wrapper"> <div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div> <div class="irx-preview-element"> <img src="" class="irx-preview-image"> </div> <div class="irx-preview-file-name"></div> <div class="irx-preview-file-size"></div></div><div class="irx-mass-wrapper"><div class="irx-mass-file-title"></div><div class="irx-mass-file-size"></div><div class="irx-mass-file-content"></div><div class="irx-chart-btn-group"><div class="irx-mass-toggle">×</div></div><div class="irx-mass-wrapper-paper-image"></div></div></div>',contextMenu:'<div class="__irx context-menu-layer" style="display:none;"></div><ul class="__irx context-menu-list context-menu-root innorix" style="display:none; text-align: left;"><li class="context-menu-item action-openFileDialog" data-action="openFileDialog">'+e("context.addFile")+'</li><li class="context-menu-item action-upload" data-action="upload">'+e("context.upload")+'</li><li class="context-menu-item action-downloadSelectedFiles" data-action="downloadSelectedFiles">'+e("context.downloadSelect")+'</li><li class="context-menu-item action-download" data-action="download">'+e("context.download")+'</li><li class="context-menu-item action-downloadAndOpen" data-action="downloadAndOpen">'+e("context.downloadAndOpen")+'</li><li class="context-menu-item action-removeSelectedFiles" data-action="removeSelectedFiles">'+e("context.removeSelect")+'</li><li class="context-menu-item action-clearFiles" data-action="clearFiles">'+e("context.removeAll")+"</li></ul>"}}),innorix("ControlBox/Skin/Basic/View",function(t){"use strict";var e,i=t("innoJquery"),n=t("klass"),o=t("ControlBox/Skin/View"),r=t("ControlBox/Skin/Basic/Dropzone"),s=t("ControlBox/Skin/Basic/ListGrid"),a=t("ControlBox/Skin/Basic/InfoBox"),l=t("ControlBox/Skin/Basic/Empty"),h=t("ControlBox/Skin/Basic/RowSelection"),c=t("ControlBox/Skin/Basic/Loading");return n([o],{constructor:function(n,u){e=t("ControlBox/Skin/Basic/template"),o.call(this,n,u),this.controlBox=u,this.$el=n,this.$inner=i(e.controlBox).appendTo(n),this.$contenxtMenu=i(e.contextMenu).appendTo(n),this.$first=this.$inner.children(".irx_first"),this.$contents=this.$inner.children(".irx_contents"),this.dropzone=new r(this.$inner,u),this.listGrid=new s(this.$inner,u),this.infoBox=new a(this.$inner,u),this.empty=new l(this.$inner,u),this.rowSelection=new h(this.$inner,u),this.loading=new c(this.$inner,u),this.addThemeIfExist(),this.controlBox.option.useContextMenu&&this.contextMenuEvent(u)},contextMenuEvent:function(){var t=this;t.menuLayer=t.$el.find(".__irx.context-menu-layer"),t.menuList=t.$el.find(".__irx.context-menu-list"),t.$el.on("contextmenu",function(e){t.showContextMenu(e)}),t.menuList.on("contextmenu",function(t){t.preventDefault()}),t.menuList.find("li").on("click contextmenu",function(e){t.hideContextMenu(e);var n=i(this).attr("data-action");t.controlBox[n]()}),t.menuLayer.on("click",function(e){t.hideContextMenu(e)})},showContextMenu:function(t){if(t.preventDefault(),0==this.controlBox.getControlDisabledState()){var e=this,n=e.controlBox,o=n.option.transferMode,r={total:0,select:0,upload:0,uploadSelect:0,download:0,downloadSelect:0},s=n.getAllFiles();for(var a in s)s.hasOwnProperty(a)&&(r.total++,1==s[a].selected&&r.select++,"upload"==s[a].mode&&(r.upload++,1==s[a].selected&&r.uploadSelect++),"download"==s[a].mode&&(r.download++,1==s[a].selected&&r.downloadSelect++));if(this.menuList.find("li").hide(),"upload"==o)this.menuList.find("li.action-openFileDialog").show(),r.total>0&&(this.menuList.find("li.action-upload").show(),this.menuList.find("li.action-clearFiles").show()),r.select>0&&this.menuList.find("li.action-removeSelectedFiles").show();else if("download"==o){if(0==r.total)return!1;this.menuList.find("li.action-download").show(),this.menuList.find("li.action-clearFiles").show(),r.select>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show(),this.menuList.find("li.action-removeSelectedFiles").show())}else this.menuList.find("li.action-openFileDialog").show(),r.total>0&&this.menuList.find("li.action-clearFiles").show(),r.select>0&&this.menuList.find("li.action-removeSelectedFiles").show(),r.upload>0&&this.menuList.find("li.action-upload").show(),r.download>0&&this.menuList.find("li.action-download").show(),r.downloadSelect>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show());var l=t.clientY,h=t.pageX;if(this.controlBox.option.limitContextMenu){this.menuList.css("position","absolute");var l=t.pageY-i(this.$el).offset().top}var c=this.menuList.width();h+c+50>i(window).width()&&(h-=c),this.menuList.css({top:l+"px",left:h+"px"}),this.menuLayer.show(),this.menuList.show()}},hideContextMenu:function(t){t.preventDefault(),this.menuLayer.hide(),this.menuList.hide()},addThemeIfExist:function(){var t=this.controlBox.option.skinTheme;t&&this.$el.addClass("irx_theme_"+t)},defaultSize:{width:550,height:200},skinName:"basic"})}),innorix("ControlBox/Skin/Compact/Dropzone",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$inner=t,this.controlBox=e,this.lastDropId="",this.dropzone=this.$inner.parent(),this.attachEvents(),this.listenControlBox()},attachEvents:function(){this.dropzone.on("dragenter",e.proxy(this.onDragEnter,this)),this.dropzone.on("drop",e.proxy(this.onDrop,this)),this.dropzone.on("dragover",e.proxy(this.onDrop,this))},listenControlBox:function(){this.controlBox.on(o.DROPZONE_SHOW,e.proxy(this.renderShow,this)),this.controlBox.on(o.DROPZONE_HIDE,e.proxy(this.renderHide,this)),this.controlBox.on(o.DROPZONE_STATE_SHOW,e.proxy(this.renderLoadingShow,this)),this.controlBox.on(o.DROPZONE_STATE_HIDE,e.proxy(this.renderLoadingHide,this)),this.controlBox.on(o.FILE_PROCESSING_STATE_SHOW,e.proxy(this.renderFileLoadingShow,this)),this.controlBox.on(o.FILE_PROCESSING_STATE_HIDE,e.proxy(this.renderFileLoadingHide,this)),this.controlBox.on(o.CONTROL_DESTROY,e.proxy(this.resetEvent,this))},resetEvent:function(t){this.controlBox.off(o.DROPZONE_SHOW,e.proxy(this.renderShow,this)),this.controlBox.off(o.DROPZONE_HIDE,e.proxy(this.renderHide,this)),this.controlBox.off(o.DROPZONE_STATE_SHOW,e.proxy(this.renderLoadingShow,this)),this.controlBox.off(o.DROPZONE_STATE_HIDE,e.proxy(this.renderLoadingHide,this)),this.controlBox.off(o.FILE_PROCESSING_STATE_SHOW,e.proxy(this.renderFileLoadingShow,this)),this.controlBox.off(o.FILE_PROCESSING_STATE_HIDE,e.proxy(this.renderFileLoadingHide,this)),this.controlBox.off(o.CONTROL_DESTROY,e.proxy(this.resetEvent,this)),this.dropzone.off("dragenter",e.proxy(this.onDragEnter,this)),this.dropzone.off("drop",e.proxy(this.onDrop,this)),this.dropzone.off("dragover",e.proxy(this.onDrop,this))},onDragEnter:function(t){var e=n.getBoundingScreenRect(t.originalEvent,this.dropzone.get(0),this.controlBox.option),i=n.string.generateUUID();this.lastDropId=i,this.controlBox.showDropState({dropId:i,uuid:i}),this.controlBox.showDropZone({x:parseInt(e.left-10),y:parseInt(e.top-10),width:parseInt(e.width+20),height:parseInt(e.height+20),dropId:i,uuid:i,addEmptyDirectory:!0,debug:this.controlBox.option.isDebugDropZone})},onDrop:function(t){t.preventDefault()},renderShow:function(){this.controlBox.view.$el.addClass("_irx_dragging"),this.$inner.addClass("_irx_dragging")},renderHide:function(){this.controlBox.view.$el.removeClass("_irx_dragging"),this.$inner.removeClass("_irx_dragging")},renderLoadingShow:function(){this.$inner.find(".loading-layout").show()},renderLoadingHide:function(){this.$inner.find(".loading-layout").hide()},renderFileLoadingShow:function(){this.$inner.find(".loading-layout-file-processing").show()},renderFileLoadingHide:function(){this.$inner.find(".loading-layout-file-processing").hide()}})}),innorix("ControlBox/Skin/Compact/Empty",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$empty=t.children(".irx_empty"),this.$contents=t.children(".irx_contents"),this.controlBox=e,this.listenControlBox()},listenControlBox:function(){var t=e.proxy(this.render,this);this.controlBox.on(n.CONTROL_AFTER_ADD_FILES,t),this.controlBox.on(n.CONTROL_REMOVE_FILES,t)},render:function(){this.controlBox.getFileCount()>0?(this.$empty.hide(),this.$contents.show()):(this.$empty.show(),this.$contents.hide())}})}),innorix("ControlBox/Skin/Compact/InfoBox",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("i18n/lang"),r=t("CONSTANT/ENV"),s=t("CONSTANT/EVENT");return i({constructor:function(t,i){this.$inner=t,this.$infobox=e(t[1]),this.$fileSizeWrapper=t.find(".irx-chart-file-size"),this.$fileCountWrapper=t.find(".irx-chart-file-count"),this.$massFileWrapper=t.find(".irx-mass-wrapper"),this.$massFileWrapperTitle=t.find(".irx-mass-file-title"),this.$massFileWrapperSize=t.find(".irx-mass-file-size"),this.$massFileWrapperCount=t.find(".irx-mass-file-count"),this.$massFileWrapperContent=t.find(".irx-mass-file-content"),this.$chartCanvas=t.find(".irx-chart-canvas"),this.$chartObj=null,this.controlBox=i,this.listenControlBox(),this.attachEvents(),this.hideGraph(),this.controlBox.option.showGraph&&this.showGraph()},listenControlBox:function(){var t=e.proxy(this.renderChart,this);this.controlBox.on(s.CONTROL_AFTER_ADD_FILES,e.proxy(this.renderChart,this)),this.controlBox.on(s.CONTROL_REMOVE_FILES,t),this.controlBox.on(s.CONTROL_SELECT_ROWS,t),this.controlBox.on(s.CONTROL_UNSELECT_ROWS,t)},attachEvents:function(){this.$infobox.on("click",".irx-chart-toggle",e.proxy(this.hideGraph,this)),this.$infobox.on("click",".irx-mass-toggle",e.proxy(this.hideMass,this))},renderChart:function(){var t=this;setTimeout(function(){t.$massFileWrapperTitle.html(o("controlBox.massFileTitle")),t.$massFileWrapperContent.html(o("controlBox.massFileContent"));var e=t.controlBox.getTotalSize(),i=t.controlBox.getSelectSize(),r=n.string.humanFileSizeObject(e),s=r.number.toFixed(2),a=r.unit
|
|
;r=r.number.toFixed(2)+r.unit;var l=n.string.humanFileSizeObject(i);l=l.number.toFixed(2)+l.unit;var h=t.controlBox.getSelectedFileCount(),c=t.controlBox.getFileCount(),u=t.controlBox.getTotalFolderCount(),d=t.controlBox.getSelectedFolderCount(),p='<div class="selected-file-size">'+l+"</div><br/>";if(p+='<div class="total-file-size"></div>',h>0){p='<div class="selected-file-size">'+l+"</div>",p+='<div class="total-file-size"><div class="topBorder"></div>'+r+"</div>";var f="file",g="folder";d>1&&(g="folders"),h>1&&(f="files"),t.$fileSizeWrapper.addClass("file-select"),t.$fileCountWrapper.html(o("controlBox.fileTotalSelInfo",{totalFolderSelected:d,totalItemSelected:h,textItem:f,textFolder:g}))}else{var f="file",g="folder";u>1&&(g="folders"),c>1&&(f="files"),p='<div class="selected-file-size">'+r+"</div>",t.$fileSizeWrapper.removeClass("file-select"),t.$fileCountWrapper.html(o("controlBox.fileTotalCount",{totalItem:c,totalFolder:u,textItem:f,textFolder:g}))}t.$massFileWrapperSize.html(o("controlBox.massFileInfo",{totalItemSize:s,totalItemSizeInfo:a,totalItemCount:c,totalItemFolderCount:u}));t.controlBox.option.maxMassFileListCount<c?t.$massFileWrapper.show():t.$massFileWrapper.hide(),t.$fileSizeWrapper.html(p);var m={labels:["SELECTED FILESIZE","TOTAL FILESIZE"],datasets:[{data:[i,0===e?1:e-i],backgroundColor:["#44C8FF","#09A3E4"],borderWidth:[0,0]}]};null!==t.$chartObj&&t.$chartObj.destroy(),"undefined"==typeof HTMLCanvasElement||t.controlBox.option.usePlugin&&(t.$chartObj=new Chart(t.$chartCanvas,{type:"doughnut",data:m,options:{legend:{display:!1},tooltips:{enabled:!1},animation:!1,hover:!1,cutoutPercentage:75}}))},200);var i=this.controlBox.getSelectedFiles(),s=null;if(e.each(i,function(t,e){s="picture"==e.fileExtType?e:null}),s&&this.controlBox.option.showPreviewImage)if("picture"==s.fileExtType){var a=n.string.humanFileSizeObject(s.fileSize);if(a=a.number.toFixed(2)+a.unit,a=a.replace(/\.00([^\d])/g,"$1"),this.controlBox.option.agent){var l=r.AGENT_HTTP_URL;"https:"==window.location.protocol&&(l=r.AGENT_HTTPS_URL),this.$inner.find(".irx-preview-image").attr("src",l+s.thumbnailUrl)}else this.$inner.find(".irx-preview-image").attr("src",URL.createObjectURL(s.file));this.$inner.find(".irx-preview-file-name").text(s.printFileName),this.$inner.find(".irx-preview-file-size").text(a),this.$inner.find(".irx-preview-image").show(),this.$inner.parent().addClass("preview-show")}else this.$inner.find(".irx-preview-file-name").text(""),this.$inner.find(".irx-preview-file-size").text(""),this.$inner.find(".irx-preview-image").hide(),this.$inner.parent().addClass("preview-show");else this.$inner.find(".irx-preview-image").attr("src",""),this.$inner.parent().removeClass("preview-show")},toggleChart:function(){this.controlBox.option.$el.toggleClass("chart-hide")},showGraph:function(){if(this.controlBox.option.showGraph){this.controlBox.option.$el.removeClass("chart-hide"),this.renderChart()}},hideGraph:function(){var t=this.controlBox.option.$el;t.addClass("chart-hide"),t.removeClass("preview-show")},hideMass:function(){this.controlBox.clearFiles(),this.$massFileWrapper.hide()}})}),innorix("ControlBox/Skin/Compact/ListGrid",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$listGrid=t.find(".irx_listGrid"),this.controlBox=e,this.lastOdd=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(o.CONTROL_REMOVE_FILES,e.proxy(this.renderRemoveFiles,this)),this.controlBox.on(o.CONTROL_AFTER_ADD_FILES,e.proxy(this.renderAddFiles,this)),0==this.controlBox.option.useFuncBtn&&this.controlBox.on(o.CONTROL_AFTER_ADD_FILES,e.proxy(this.sortableList,this)),this.controlBox.on(o.CONTROL_REMOVE_FILES,e.proxy(this.updateListGrid,this)),this.controlBox.on(o.CONTROL_AFTER_ADD_FILES,e.proxy(this.updateListGrid,this))},attachEvents:function(){this.$listGrid.off("click"),0==this.controlBox.option.useFuncBtn&&this.$listGrid.on("click",".irx_remove",e.proxy(this.onRemoveClick,this)),this.controlBox.option.showFolderItemsTree&&this.$listGrid.on("click",".tree-icon.directory",e.proxy(this.toggleFileTree,this))},renderAddFiles:function(t){var i=this,o="",r=this.controlBox.option.folderIntact;this.controlBox.option.maxMassFileListCount>=this.controlBox.getFileCount()&&e.each(t,function(t,e){if(0==e.thumbnail){var s=e.printFileName;e.description&&(s+=" "+e.description);var a=e.filePath?e.filePath:e.printFileName,l=n.string.getFileExt(e.printFileName).toLowerCase();0!=e.isFile&&1!=e.isVirtual||(l="directory");var h="";if(e.fileSize)if(1==i.controlBox.option.showByteSize)var h="("+n.string.formatMoney(e.fileSize)+" Byte)";else var h="("+n.string.humanFileSize(e.fileSize)+")";var c="";if(1==r)var c=e.rootName;var u=i.getRootObj(c),d=!1;e.isRemove&&(d=e.isRemove);e.isFile;var p="display:none;";i.controlBox.option.showTransferFileStatus&&(p=""),o='<li id="'+e.id+'" class="irx-file-wrapper is-file '+(d?"is-removed":"")+'" title="'+a+'"><div class="irx-file-inner-wrapper" data-fileId="'+e.id+'"> <div class="tree-icon filetree-checkbox"></div> <div class="tree-icon file-icon ext_'+l+'"></div> <div class="filename">'+s+'</div> <div class="filesize">'+(d?"(file not found)":h)+'</div> <div class="filestatus" style="'+p+'"><span style="color:blue;">Ready</div>',0==i.controlBox.option.useFuncBtn&&(o+=' <div class="btn-group"> <span class="irx_btn_move"> </span> <span class="irx_btn_del irx_remove"> </span> </div>'),o+="</div></li>",u.append(o)}}),this.updateListGrid(),this.controlBox.option.showFolderItems&&this.showAllFolderItems(),this.controlBox.option.transferWindowMode&&this.controlBox.download(),this.controlBox.option.transferWindowModeOpen&&this.controlBox.downloadAndOpen()},sortableList:function(){var t=this.controlBox.view.$el.find(".irx_filetree").find("ul");this.controlBox.option.usePlugin&&e(t).sortable({connectWith:t,axis:"y",stop:e.proxy(this.sortableStop,this),sort:function(){}})},sortableStop:function(){this.updateFileIndex(),this.updateListGrid()},updateFileIndex:function(){var t,i=e(this.controlBox.fileList.files),n=this.$listGrid.find("li"),o=[];n.each(function(n,r){t=r.id,i.each(function(i,n){t===n.id&&(n.rootName=e("#"+t).closest("ul").attr("data-root"),o.push(n))})}),this.controlBox.fileList.files=o},renderClearFiles:function(){this.$listGrid.empty()},renderRemoveFiles:function(t){if(0===this.controlBox.getFileCount())return void this.renderClearFiles();var i=this.$listGrid;e.each(t,function(t,e){i.find("#"+e.id).remove()})},onRemoveClick:function(t){if(t.stopPropagation(),0==this.controlBox.getControlDisabledState()){var i=this,n=e(t.currentTarget).closest("li");if(n.hasClass("is-directory")){n.find(".irx-file-wrapper.is-file").each(function(){var t=e(this).attr("id");i.controlBox.removeFileById(t)});n.find("ul").eq(0).attr("data-root").split("/");n.remove()}else{var o=n.attr("id");i.controlBox.removeFileById(o)}}},updateListGrid:function(){0==this.$listGrid.find("li.irx-file-wrapper").length?"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().addClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").text(this.controlBox.option.emptyDownloadFileText),this.$listGrid.parent().find(".irx-empty-download-text").show()):this.$listGrid.parent().addClass("empty-uploader"):"download"==this.controlBox.option.transferMode?(this.$listGrid.parent().removeClass("empty-downloader"),this.$listGrid.parent().find(".irx-empty-download-text").hide()):this.$listGrid.parent().removeClass("empty-uploader");var t=this.controlBox.view.$el.parents().length;this.$listGrid.find("li.irx-file-wrapper").each(function(){var i=e(this).parents().length-t-3,n=e(this).find(".irx-file-inner-wrapper").eq(0);i>0?n.css({"padding-left":10*i+"px"}):n.css({"padding-left":"0px"})})},getRootObj:function(t){var i=this;if(!t||0==t.length)return this.$listGrid;t=t.split("/");for(var n=this.$listGrid,o="",r=0;r<t.length;r++){var s=!1;i.controlBox.option.$el.find("ul.irx_filetree_list").each(function(){o+t[r]==e(this).attr("data-root")&&(s=!0,n=e(this))}),0==s&&(n=i.addRootObj(t[r],n,o+t[r])),o=o+t[r]+"/"}return n},addRootObj:function(t,i,n){var o=e('<li class="irx-file-wrapper is-directory" title="fileURI">');0==n.length&&(n="");var r='<div class="irx-file-inner-wrapper"> <div class="tree-icon filetree-checkbox"></div> <div class="tree-icon directory"></div> <div class="filename">'+t+'</div> <div class="filesize"></div> <div class="btn-group"> <span class="irx_btn_move"> </span> <span class="irx_btn_del irx_remove"> </span> </div></div><ul class="irx_filetree_list irx_listGrid" style="display: none;" data-root="'+n+'"></ul>';return o.append(r).appendTo(i),o.find("ul.irx_filetree_list").eq(0)},toggleFileTree:function(t){if(0==this.controlBox.getControlDisabledState()){var i=e(t.target),n=i.closest("li.irx-file-wrapper");i.hasClass("open")?(i.removeClass("open"),n.find("ul.irx_filetree_list").eq(0).hide()):(i.addClass("open"),n.find("ul.irx_filetree_list").eq(0).show())}return!1},showAllFolderItems:function(){return this.$listGrid.find(".directory").each(function(){var t=e(this),i=t.closest("li.irx-file-wrapper");t.hasClass("open")?(t.removeClass("open"),i.find("ul.irx_filetree_list").eq(0).hide()):(t.addClass("open"),i.find("ul.irx_filetree_list").eq(0).show())}),!1}})}),innorix("ControlBox/Skin/Compact/Loading",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("singleton/agent"),o=t("CONSTANT/EVENT"),r=["openFileDialog"];return i({constructor:function(t){this.$loading=t.children(".irx_loading"),this.commandStackCount=0,this.listenAgent()},listenAgent:function(){var t=n.event;t.on(o.AGENT_ADD_COMMAND,e.proxy(this.renderShow,this)),t.on(o.AGENT_COMPLETE_COMMAND,e.proxy(this.renderHide,this))},renderShow:function(t){-1!==r.indexOf(t.action)&&0==this.commandStackCount++&&this.$loading.show()},renderHide:function(t){-1!==r.indexOf(t.action)&&0==--this.commandStackCount&&this.$loading.hide()}})}),innorix("ControlBox/Skin/Compact/RowSelection",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$inner=t,this.$listGrid=t.find(".irx_listGrid"),this.controlBox=e,this.lastSelectedIndex=!1,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){this.controlBox.on(n.CONTROL_SELECT_ROWS,e.proxy(this.renderSelectRows,this)),this.controlBox.on(n.CONTROL_UNSELECT_ROWS,e.proxy(this.renderUnSelectRows,this))},renderSelectRows:function(t){var i=this.$listGrid,n=null;if(e.each(t,function(t,e){n="picture"==e.fileExtType?e:null,i.find("#"+e.id).addClass("selected").find(":checkbox").prop("checked",!0)}),n&&this.controlBox.option.showPreviewImage)if("picture"==n.fileExtType){var o=util.string.humanFileSizeObject(n.fileSize);if(o=o.number.toFixed(2)+o.unit,o=o.replace(/\.00([^\d])/g,"$1"),this.controlBox.option.agent){var r=ENV.AGENT_HTTP_URL;"https:"==window.location.protocol&&(r=ENV.AGENT_HTTPS_URL),this.$inner.find(".irx-preview-image").attr("src",r+n.thumbnailUrl)}else this.$inner.find(".irx-preview-image").attr("src",URL.createObjectURL(n.file));this.$inner.find(".irx-preview-file-name").text(n.printFileName),this.$inner.find(".irx-preview-file-size").text(o),this.$inner.find(".irx-preview-image").show(),this.$inner.parent().addClass("preview-show")}else this.$inner.find(".irx-preview-file-name").text(""),this.$inner.find(".irx-preview-file-size").text(""),this.$inner.find(".irx-preview-image").hide(),this.$inner.parent().addClass("preview-show");else this.$inner.find(".irx-preview-image").attr("src",""),this.$inner.parent().removeClass("preview-show")},renderUnSelectRows:function(t){var i=this.$listGrid,n=this;e.each(t,function(t,e){n.$inner.find(".irx-preview-file-name").text()==e.printFileName&&(n.$inner.find(".irx-preview-image").attr("src",""),n.$inner.parent().removeClass("preview-show")),i.find("#"+e.id).removeClass("selected").find(":checkbox").prop("checked",!1)})},attachEvents:function(){this.$listGrid.on("click dblclick contextmenu","li > div",e.proxy(this.onRowClick,this))},onRowClick:function(t){if(0==this.controlBox.getControlDisabledState()){var i=this,o=e(t.currentTarget).closest("li");o.removeClass("dblClick");var r=o.hasClass("is-directory"),s=o.index(),a=o.hasClass("selected");if(a&&"contextmenu"==t.originalEvent.type)return!0;if(r)a?o.removeClass("selected"):o.addClass("selected"),o.find(".irx-file-wrapper.is-file").each(function(){var t=e(this).attr("id");a?i.unSelectRow(t):i.selectRow(t)});else{var l=o.attr("id"),h=this.controlBox.getFileById(l);"dblclick"==t.originalEvent.type&&(this.controlBox.emit(n.CONTROL_DBL_CLICK_ROWS,h),o.addClass("dblClick")),h.selected?setTimeout(function(){o.hasClass("dblClick")||i.unSelectRow(l)},175):i.selectRow(l)}this.lastSelectedIndex=s,this.updateDirectorySelect()}},selectMultipleRows:function(t,i,n){t>i&&(i=[t,t=i][0]);var o=this.controlBox.getAllFiles().slice(t,i+1),r=e.map(o,function(t){return t.id});n||this.controlBox.unSelectFilesById(),this.controlBox.addSelectFilesById(r)},selectRow:function(t){this.controlBox.addSelectFilesById([t])},unSelectRow:function(t){this.controlBox.unSelectFilesById([t])},updateDirectorySelect:function(){this.$listGrid.find(".irx-file-wrapper.is-directory").each(function(){var t=!0;0==e(this).find(".irx-file-wrapper.is-file").length&&(t=!1),e(this).find(".irx-file-wrapper.is-file").each(function(){e(this).hasClass("selected")||(t=!1)}),t?e(this).addClass("selected"):e(this).removeClass("selected")})}})}),innorix("ControlBox/Skin/Compact/template",function(t){"use strict";var e=(t("innoJquery"),t("i18n/lang"));return{controlBox:'<div class="irx_filetree empty-uploader"><ul class="irx_filetree_list irx_listGrid" data-filetree=""></ul></div><div class="irx_infoBox "><div class="irx-chart-wrapper"><div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div><div class="irx-canvas-wrapper"><canvas class="irx-chart-canvas"></canvas></div><div class="irx-chart-file-size"></div><div class="irx-chart-file-count"></div></div><div class="irx-preview-wrapper"> <div class="irx-chart-btn-group"><div class="irx_btn_del irx-chart-toggle"></div></div> <div class="irx-preview-element"> <img src="" class="irx-preview-image"> </div> <div class="irx-preview-file-name"></div> <div class="irx-preview-file-size"></div></div><div class="irx-mass-wrapper"><div class="irx-mass-file-title"></div><div class="irx-mass-file-size"></div><div class="irx-mass-file-content"></div><div class="irx-chart-btn-group"><div class="irx-mass-toggle">×</div></div><div class="irx-mass-wrapper-paper-image"></div></div></div><div class="cust-transfer-window-wrapper"></div></div>',contextMenu:'<div class="__irx context-menu-layer" style="display:none;"></div><ul class="__irx context-menu-list context-menu-root innorix" style="display:none;"><li class="context-menu-item action-openFileDialog" data-action="openFileDialog">'+e("context.addFile")+'</li><li class="context-menu-item action-upload" data-action="upload">'+e("context.upload")+'</li><li class="context-menu-item action-downloadSelectedFiles" data-action="downloadSelectedFiles">'+e("context.downloadSelect")+'</li><li class="context-menu-item action-download" data-action="download">'+e("context.download")+'</li><li class="context-menu-item action-downloadAndOpen" data-action="downloadAndOpen">'+e("context.downloadAndOpen")+'</li><li class="context-menu-item action-removeSelectedFiles" data-action="removeSelectedFiles">'+e("context.removeSelect")+'</li><li class="context-menu-item action-clearFiles" data-action="clearFiles">'+e("context.removeAll")+"</li></ul>"}}),innorix("ControlBox/Skin/Compact/View",function(t){"use strict";var e,i=t("innoJquery"),n=t("klass"),o=t("ControlBox/Skin/View"),r=t("ControlBox/Skin/Compact/Dropzone"),s=t("ControlBox/Skin/Compact/ListGrid"),a=t("ControlBox/Skin/Compact/InfoBox"),l=t("ControlBox/Skin/Compact/Empty"),h=t("ControlBox/Skin/Compact/RowSelection"),c=t("ControlBox/Skin/Compact/Loading");return n([o],{constructor:function(n,u){e=t("ControlBox/Skin/Compact/template"),o.call(this,n,u),this.controlBox=u,this.$el=n,this.$inner=i(e.controlBox).appendTo(n),this.$contenxtMenu=i(e.contextMenu).appendTo(n),this.$first=this.$inner.children(".irx_first"),this.$contents=this.$inner.children(".irx_contents"),this.dropzone=new r(this.$inner,u),this.listGrid=new s(this.$inner,u),this.infoBox=new a(this.$inner,u),this.empty=new l(this.$inner,u),this.rowSelection=new h(this.$inner,u),this.loading=new c(this.$inner,u);this.addThemeIfExist(),this.controlBox.option.useContextMenu&&this.contextMenuEvent(u)},contextMenuEvent:function(){var t=this;t.menuLayer=t.$el.find(".__irx.context-menu-layer"),t.menuList=t.$el.find(".__irx.context-menu-list"),t.$el.on("contextmenu",function(e){t.showContextMenu(e)}),t.menuList.on("contextmenu",function(t){t.preventDefault()}),t.menuList.find("li").on("click contextmenu",function(e){t.hideContextMenu(e);var n=i(this).attr("data-action");t.controlBox[n]()}),t.menuLayer.on("click",function(e){t.hideContextMenu(e)})},showContextMenu:function(t){if(t.preventDefault(),0==this.controlBox.getControlDisabledState()){var e=this,n=e.controlBox,o=n.option.transferMode,r={total:0,select:0,upload:0,uploadSelect:0,download:0,downloadSelect:0},s=n.getAllFiles();for(var a in s)s.hasOwnProperty(a)&&(r.total++,1==s[a].selected&&r.select++,"upload"==s[a].mode&&(r.upload++,1==s[a].selected&&r.uploadSelect++),"download"==s[a].mode&&(r.download++,1==s[a].selected&&r.downloadSelect++));if(this.menuList.find("li").hide(),"upload"==o)this.menuList.find("li.action-openFileDialog").show(),r.total>0&&(this.menuList.find("li.action-upload").show(),this.menuList.find("li.action-clearFiles").show()),r.select>0&&this.menuList.find("li.action-removeSelectedFiles").show();else if("download"==o){if(0==r.total)return!1;this.menuList.find("li.action-download").show(),this.menuList.find("li.action-clearFiles").show(),r.select>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show(),this.menuList.find("li.action-removeSelectedFiles").show())}else this.menuList.find("li.action-openFileDialog").show(),r.total>0&&this.menuList.find("li.action-clearFiles").show(),r.select>0&&this.menuList.find("li.action-removeSelectedFiles").show(),r.upload>0&&this.menuList.find("li.action-upload").show(),r.download>0&&this.menuList.find("li.action-download").show(),r.downloadSelect>0&&(this.menuList.find("li.action-downloadSelectedFiles").show(),this.menuList.find("li.action-downloadAndOpen").show());var l=t.pageY,h=t.pageX,c=this.menuList.width();h+c+50>i(window).width()&&(h-=c),this.menuList.css({top:l+"px",left:h+"px"}),this.menuLayer.show(),this.menuList.show()}},hideContextMenu:function(t){t.preventDefault(),this.menuLayer.hide(),this.menuList.hide()},addThemeIfExist:function(){var t=this.controlBox.option.skinTheme;t&&this.$el.addClass("irx_theme_"+t)},defaultSize:{width:550,height:300},skinName:"compact"})}),innorix("ControlBox/Skin/Input/Download",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("i18n/lang"),r=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$el=t.find(".irx_download").show(),this.$input=t.find(".irx_download_input"),this.controlBox=e,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){var t=e.proxy(this.render,this);this.controlBox.on(r.CONTROL_REMOVE_FILES,t),this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,t)},attachEvents:function(){this.$el.find(".irx_download_button").click(e.proxy(this.controlBox.downloadAll,this.controlBox))},render:function(){var t=this.controlBox.getDownloadFiles(),e=t.length;if(0===e)return void this.$input.text("");var i,r=t[0],s=n.string.humanFileSize(this.controlBox.getDownloadFilesSize());i=e>1?o("controlBox.input.descriptionMany",{fileName:r.printFileName,size:s,count:e}):o("controlBox.input.descriptionOne",{fileName:r.printFileName,size:s}),this.$input.text(i)}})}),innorix("ControlBox/Skin/Input/template",function(t){"use strict";var e=t("innoJquery");t("i18n/lang");return e.parseHTML('<div class="irx_inner"> <div class="irx_upload"> <span class="irx_upload_input"></span> <input class="irx_upload_button" type="button" value="Upload"> </div> <div class="irx_download"> <span class="irx_download_input"></span> <input class="irx_download_button" type="button" value="Download"> </div></div>')}),innorix("ControlBox/Skin/Input/Upload",function(t){"use strict";var e=t("innoJquery"),i=t("klass"),n=t("util"),o=t("i18n/lang"),r=t("CONSTANT/EVENT");return i({constructor:function(t,e){this.$el=t.find(".irx_upload").show(),this.$input=t.find(".irx_upload_input"),this.controlBox=e,this.listenControlBox(),this.attachEvents()},listenControlBox:function(){var t=e.proxy(this.render,this);this.controlBox.on(r.CONTROL_REMOVE_FILES,t),this.controlBox.on(r.CONTROL_AFTER_ADD_FILES,t)},attachEvents:function(){this.$el.find(".irx_upload_input").click(e.proxy(this.controlBox.openFileDialogInput,this.controlBox)),this.$el.find(".irx_upload_button").click(e.proxy(this.controlBox.uploadInput,this.controlBox))},render:function(){var t=this.controlBox.getUploadFiles(),e=t.length;if(0===e)return void this.$input.text("");var i,r=t[0],s=n.string.humanFileSize(this.controlBox.getUploadFilesSize());i=e>1?o("controlBox.input.descriptionMany",{fileName:r.printFileName,size:s,count:e}):o("controlBox.input.descriptionOne",{fileName:r.printFileName,size:s}),this.$input.text(i)}})}),innorix("ControlBox/Skin/Input/View",function(t){"use strict";var e,i=t("innoJquery"),n=t("klass"),o=t("i18n/lang"),r=t("ControlBox/Skin/View"),s=t("ControlBox/Skin/Input/Upload"),a=t("ControlBox/Skin/Input/Download");return n([r],{constructor:function(n,o){e=t("ControlBox/Skin/Input/template"),r.call(this,n,o),this.$inner=i(e).appendTo(n),"upload"===o.getTransferMode()&&(this.upload=new s(this.$inner,o)),"download"===o.getTransferMode()&&(this.download=new a(this.$inner,o)),"both"===o.getTransferMode()&&(this.upload=new s(this.$inner,o),this.download=new a(this.$inner,o),this.defaultSize.height*=2)},defaultSize:{width:480,height:30},skinName:"input",initLanguage:function(){this.$el.find(".irx_upload_button").val(o("controlBox.input.uploadBtn")),this.$el.find(".irx_download_button").val(o("controlBox.input.downloadBtn"))}})}),function(t){"use strict";var e=t._load("innoJquery"),i=t._load("api"),n=t._load("server");e.extend(t,i,{server:n}),"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports&&(module.exports=t)}(innorix); |