From 18def302d679180876cfa6a98ea8d043faf2912d Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 9 Oct 2015 00:33:53 +1030 Subject: [PATCH] Bundle unminified JS; minify via ClosureCompilerService when in production Falls back to a less effective minification library if ClosureCompilerService errors or is unavailable. Minification takes a while (20 seconds or so), but it only happens when assets are modified. Still, this means enabling/disabling extensions is taking far too long. Possible solutions: - Don't minify initially; set a process running in the background to do minification, and server unminified assets in the meantime. - Refactor compiler to send each JS file to CCS individually, only if that particular file has been modified. flarum/gulp has also been updated to no longer support uglification. closes #582 --- js/admin/dist/app.js | 23124 ++++++++++- js/forum/dist/app.js | 32695 +++++++++++++++- src/Asset/JsCompiler.php | 76 +- src/Asset/LessCompiler.php | 3 +- src/Asset/RevisionCompiler.php | 26 +- src/Formatter/Formatter.php | 4 - src/Formatter/MinifyMinifier.php | 35 - src/Foundation/Application.php | 12 +- .../Controller/AbstractClientController.php | 2 +- 9 files changed, 55904 insertions(+), 73 deletions(-) delete mode 100644 src/Formatter/MinifyMinifier.php diff --git a/js/admin/dist/app.js b/js/admin/dist/app.js index 3c4c35591..8d0c8b4b4 100644 --- a/js/admin/dist/app.js +++ b/js/admin/dist/app.js @@ -1,9 +1,23115 @@ -!function(e){var t=e.babelHelpers={};t.inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},t.defaults=function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.hasOwn=Object.prototype.hasOwnProperty,t.slice=Array.prototype.slice,t.bind=Function.prototype.bind,t.defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.asyncToGenerator=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(r,s){try{var a=t[r](s),u=a.value}catch(l){return void n(l)}a.done?e(u):Promise.resolve(u).then(o,i)}var o=r.bind(null,"next"),i=r.bind(null,"throw");o()})}},t.interopRequireWildcard=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t._typeof=function(e){return e&&e.constructor===Symbol?"symbol":typeof e},t._extends=Object.assign||function(e){for(var t=1;t1)&&(R(t.nodes,t),s=[le.createTextNode(e)]),f(n,s[0],o,e))),t=new e.constructor(e),t.nodes=s,t}function T(e,t,n,r,o,i,s){return 0===e.nodes.length?C(t,r,n):e.valueOf()!==t.valueOf()||o===!0?_(t,e,r,i,n,s):(e.nodes.intact=!0,e)}function S(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(he(e))return e.length;return 1}function D(e,t,r,o,i,s,a,u,c){e=d(e);var f=[],p=t.length===e.length,h=0,v={},b=!1;l(t,function(e,n){b=!0,v[t[n].attrs.key]={action:xe,index:n}}),y(e),b&&(t=m(e,t,v,r));for(var w=0,x=0,k=e.length;k>x;x++){var C=$(r,i,t,o,e[x],t[w],s,o+h||h,a,u,c);C!==n&&(p=p&&C.nodes.intact,h+=S(C),t[w++]=C)}return p||g(e,t,f),t}function N(e,t,n,r,o){if(null!=t){if(me.call(t)===me.call(e))return t;if(o&&o.nodes){var i=n-r,s=i+(he(e)?e:t.nodes).length;R(o.nodes.slice(i,s),o.slice(i,s))}else t.nodes&&R(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function O(e,t){return t===n?e.attrs.is?le.createElement(e.tag,e.attrs.is):le.createElement(e.tag):e.attrs.is?le.createElementNS(t,e.tag,e.attrs.is):le.createElementNS(t,e.tag)}function E(e,t,n,r){return r?F(t,e.tag,e.attrs,{},n):e.attrs}function M(e,t,r,o,i,s){return null!=e.children&&e.children.length>0?$(t,e.tag,n,n,e.children,r.children,!0,0,e.attrs.contenteditable?t:o,i,s):e.children}function H(e,t,n,r,o,i,s){var a={tag:e.tag,attrs:t,children:n,nodes:[r]};return w(a,i,s),a.children&&!a.children.nodes&&(a.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&F(r,e.tag,{value:e.attrs.value},{},o),a}function A(e,t,n,r){var o="diff"===a.redraw.strategy()&&e?e.indexOf(t):-1;return o>-1?n[o]:"function"==typeof r?new r:{}}function P(e,t,n,r){null!=r.onunload&&je.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function j(e,t,n,r,o,i){var s=A(n.views,t,r,e.controller),a=+(e&&e.attrs&&e.attrs.key);return e=0===Be||$e||r&&r.indexOf(s)>-1?e.view(s):{tag:"placeholder"},"retain"===e.subtree?n:(a===a&&((e.attrs=e.attrs||{}).key=a),P(i,o,t,s),e)}function I(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=j(e,e.view.$original||e.view,t,o,r,n);return e}function L(e,t,n,r,o,s,a,u){var l=[],c=[];if(e=I(e,t,l,c),!e.tag&&c.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var f=Object.keys(e.attrs),d=f.length>("key"in e.attrs?1:0);if(v(e,t,f),i(e.tag)){var h=0===t.nodes.length;a=b(e,a);var m;if(h){m=O(e,a);var g=E(e,m,a,d),y=M(e,m,t,n,a,u);t=H(e,g,y,m,a,l,c)}else m=k(t,e,n,d,a,l,u,c);return(h||s===!0&&null!=m)&&p(r,m,o),x(u,e,m,h,t),t}}function $(e,t,n,i,s,a,u,l,f,d,p){return s=c(s),"retain"===s.subtree?a:(a=N(s,a,l,i,n),he(s)?D(s,a,e,l,t,u,f,d,p):null!=s&&o(s)?L(s,a,f,e,l,u,d,p):r(s)?a:T(a,s,l,e,u,f,t))}function B(e,t){return e.action-t.action||e.index-t.index}function F(e,t,n,i,s){for(var a in n){var u=n[a],l=i[a];if(a in i&&l===u)"value"===a&&"input"===t&&e.value!=u&&(e.value=u);else{i[a]=u;try{if("config"===a||"key"===a)continue;if(r(u)&&"on"===a.slice(0,2))e[a]=U(u,e);else if("style"===a&&null!=u&&o(u)){for(var c in u)(null==l||l[c]!==u[c])&&(e.style[c]=u[c]);for(var c in l)c in u||(e.style[c]="")}else null!=s?"href"===a?e.setAttributeNS("http://www.w3.org/1999/xlink","href",u):e.setAttribute("className"===a?"class":a,u):a in e&&"list"!==a&&"style"!==a&&"form"!==a&&"type"!==a&&"width"!==a&&"height"!==a?("input"!==t||e[a]!==u)&&(e[a]=u):e.setAttribute(a,u)}catch(f){if(f.message.indexOf("Invalid argument")<0)throw f}}}return i}function R(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&Y(t[n])}e.length&&(e.length=0)}function Y(e){e.configContext&&r(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&u(e.controllers,function(e){r(e.onunload)&&e.onunload({preventDefault:be})}),e.children&&(he(e.children)?u(e.children,Y):e.children.tag&&Y(e.children))}function q(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,i=le.createElement("span");o?(e.insertBefore(i,r||null),i.insertAdjacentHTML("beforebegin",n),e.removeChild(i)):r.insertAdjacentHTML("beforebegin",n)}else e.insertAdjacentHTML("beforeend",n);for(var s=[];e.childNodes[t]!==r;)s.push(e.childNodes[t]),t++;return s}function U(e,t){return function(n){n=n||event,a.redraw.strategy("diff"),a.startComputation();try{return e.call(t,n)}finally{X()}}}function z(e){var t=Te.indexOf(e);return 0>t?Te.push(e)-1:t}function W(e){var t=function(){return arguments.length&&(e=arguments[0]),e};return t.toJSON=function(){return e},t}function G(e,t){var n=function(){return(e.controller||be).apply(this,t)||this};e.controller&&(n.prototype=e.controller.prototype);var r=function(n){var r=arguments.length>1?t.concat([].slice.call(arguments,1)):t;return e.view.apply(e,r?[n].concat(r):[n])};r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function V(){Ae&&(Ae(),Ae=null),u(Ne,function(e,t){var n=Oe[t];if(Ee[t]){var r=[Ee[t]];a.render(e,n.view?n.view(Ee[t],r):"")}}),Pe&&(Pe(),Pe=null),Me=null,He=new Date,a.redraw.strategy("diff")}function X(){"none"===a.redraw.strategy()?(Be--,a.redraw.strategy("diff")):a.endComputation()}function J(e){return e.slice(Ye[a.route.mode].length)}function Z(e,t,n){Fe={};var r=n.indexOf("?");-1!==r&&(Fe=te(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),i=o.indexOf(n);if(-1!==i)return a.mount(e,t[o[i]]),!0;for(var s in t){if(s===n)return a.mount(e,t[s]),!0;var l=new RegExp("^"+s.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(l.test(n))return n.replace(l,function(){var n=s.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);u(n,function(e,t){Fe[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),a.mount(e,t[s])}),!0}}function Q(e){if(e=e||event,!e.ctrlKey&&!e.metaKey&&2!==e.which){e.preventDefault?e.preventDefault():e.returnValue=!1;for(var t=e.currentTarget||e.srcElement,n="pathname"===a.route.mode&&t.search?te(t.search.slice(1)):{};t&&"A"!==t.nodeName.toUpperCase();)t=t.parentNode;a.route(t[a.route.mode].slice(Ye[a.route.mode].length),n)}}function K(){"hash"!==a.route.mode&&ce.hash?ce.hash=ce.hash:t.scrollTo(0,0)}function ee(e,t){var r={},i=[];for(var s in e){var a=t?t+"["+s+"]":s,l=e[s];if(null===l)i.push(encodeURIComponent(a));else if(o(l))i.push(ee(l,a));else if(he(l)){var c=[];r[a]=r[a]||{},u(l,function(e){r[a][e]||(r[a][e]=!0,c.push(encodeURIComponent(a)+"="+encodeURIComponent(e)))}),i.push(c.join("&"))}else l!==n&&i.push(encodeURIComponent(a)+"="+encodeURIComponent(l))}return i.join("&")}function te(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return u(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(he(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function ne(e){var t=z(e);R(e.childNodes,Se[t]),Se[t]=n}function re(e,t){var n=a.prop(t);return e.then(n),n.then=function(n,r){return re(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n["finally"]=function(e){var r=function(t){return a.deferred().resolve(e(t)).promise};return n.then(function(e){return re(r(e).then(function(){return e}),t)},function(e){return re(r(e).then(function(){throw new Error(e)}),t)})},n}function oe(e,t){function n(e){p=e||f,m.map(function(e){p===c?e.resolve(h):e.reject(h)})}function i(e,t,n,i){if((null!=h&&o(h)||r(h))&&r(e))try{var s=0;e.call(h,function(e){s++||(h=e,t())},function(e){s++||(h=e,n())})}catch(u){a.deferred.onerror(u),h=u,n()}else i()}function s(){var o;try{o=h&&h.then}catch(f){return a.deferred.onerror(f),h=f,p=l,s()}i(o,function(){p=u,s()},function(){p=l,s()},function(){try{p===u&&r(e)?h=e(h):p===l&&r(t)&&(h=t(h),p=u)}catch(s){return a.deferred.onerror(s),h=s,n()}h===d?(h=TypeError(),n()):i(o,function(){n(c)},n,function(){n(p===u&&c)})})}var u=1,l=2,c=3,f=4,d=this,p=0,h=0,m=[];d.promise={},d.resolve=function(e){return p||(h=e,p=u,s()),this},d.reject=function(e){return p||(h=e,p=l,s()),this},d.promise.then=function(e,t){var n=new oe(e,t);return p===c?n.resolve(h):p===f?n.reject(h):m.push(n),n.promise}}function ie(e){return e}function se(e){if(!e.dataType||"jsonp"!==e.dataType.toLowerCase()){var o=new t.XMLHttpRequest;if(o.open(e.method,e.url,!0,e.user,e.password),o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<300?e.onload({type:"load",target:o}):e.onerror({type:"error",target:o}))},e.serialize===JSON.stringify&&e.data&&"GET"!==e.method&&o.setRequestHeader("Content-Type","application/json; charset=utf-8"),e.deserialize===JSON.parse&&o.setRequestHeader("Accept","application/json, text/*"),r(e.config)){var s=e.config(o,e);null!=s&&(o=s)}var a="GET"!==e.method&&e.data?e.data:"";if(a&&!i(a)&&a.constructor!==t.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return o.send(a),o}var u="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),l=le.createElement("script");t[u]=function(r){l.parentNode.removeChild(l),e.onload({type:"load",target:{responseText:r}}),t[u]=n},l.onerror=function(){return l.parentNode.removeChild(l),e.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),t[u]=n,!1},l.onload=function(){return!1},l.src=e.url+(e.url.indexOf("?")>0?"&":"?")+(e.callbackKey?e.callbackKey:"callback")+"="+u+"&"+ee(e.data||{}),le.body.appendChild(l)}function ae(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=ee(t);e.url=e.url+(o?r+o:"")}else e.data=n(t);return e}function ue(e,t){var n=e.match(/:[a-z]\w+/gi);return n&&t&&u(n,function(n){var r=n.slice(1);e=e.replace(n,t[r]),delete t[r]}),e}var le,ce,fe,de,pe="v0.2.1",he=Array.isArray||function(e){return"[object Array]"===me.call(e)},me={}.toString,ge=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g,ye=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/,ve=/^(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|KEYGEN|LINK|META|PARAM|SOURCE|TRACK|WBR)$/,be=function(){};s(t),a.version=function(){return pe};var we,xe=1,ke=2,Ce=3,_e={appendChild:function(e){we===n&&(we=le.createElement("html")),le.documentElement&&le.documentElement!==e?le.replaceChild(e,le.documentElement):le.appendChild(e),this.childNodes=le.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Te=[],Se={};a.render=function(e,t,r){var o=[];if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var i=z(e),s=e===le,a=s||e===le.documentElement?_e:e;s&&"html"!==t.tag&&(t={tag:"html",attrs:{},children:t}),Se[i]===n&&R(a.childNodes),r===!0&&ne(e),Se[i]=$(a,null,n,n,t,Se[i],!1,0,null,n,o),u(o,function(e){e()})},a.trust=function(e){return e=new String(e),e.$trusted=!0,e},a.prop=function(e){return(null!=e&&o(e)||r(e))&&r(e.then)?re(e):W(e)};var De,Ne=[],Oe=[],Ee=[],Me=null,He=0,Ae=null,Pe=null,je=[],Ie=16;a.component=function(e){for(var t=[],n=1;nn&&(n=Ne.length);var o=!1,i={preventDefault:function(){o=!0,Ae=Pe=null}};if(u(je,function(e){e.handler.call(e.controller,i),e.controller.onunload=null}),o?u(je,function(e){e.controller.onunload=e.handler}):je=[],Ee[n]&&r(Ee[n].onunload)&&Ee[n].onunload(i),!o){a.redraw.strategy("all"),a.startComputation(),Ne[n]=e;var s=De=t?t:t={controller:be},l=new(t.controller||be);return s===De&&(Ee[n]=l,Oe[n]=t),X(),Ee[n]}t||(Ne.splice(n,1),Ee.splice(n,1),Oe.splice(n,1))};var Le=!1,$e=!1;a.redraw=function(e){if(!Le){Le=!0,e&&($e=!0);try{Me&&!e?(fe===t.requestAnimationFrame||new Date-He>Ie)&&(Me>0&&de(Me),Me=fe(V,Ie)):(V(),console.log("redraw..."),Me=fe(function(){Me=null},Ie))}finally{Le=$e=!1}}},a.redraw.strategy=a.prop();var Be=0;a.startComputation=function(){Be++},a.endComputation=function(){Be>1?Be--:(Be=0,a.redraw())},a.withAttr=function(e,t){return function(n){n=n||event;var r=n.currentTarget||this;t(e in r?r[e]:r.getAttribute(e))}};var Fe,Re,Ye={pathname:"",hash:"#",search:"?"},qe=be,Ue=!1;return a.route=function(e,n,r,o){if(0===arguments.length)return Re;if(3===arguments.length&&i(n)){qe=function(t){var o=Re=J(t);if(!Z(e,r,o)){if(Ue)throw new Error("Ensure the default route matches one of the routes defined in m.route");Ue=!0,a.route(n,!0),Ue=!1}};var s="hash"===a.route.mode?"onhashchange":"onpopstate";t[s]=function(){var e=ce[a.route.mode];"pathname"===a.route.mode&&(e+=ce.search),Re!==J(e)&&qe(e)},Ae=K,t[s]()}else if(e.addEventListener||e.attachEvent)e.href=("pathname"!==a.route.mode?ce.pathname:"")+Ye[a.route.mode]+o.attrs.href,e.addEventListener?(e.removeEventListener("click",Q),e.addEventListener("click",Q)):(e.detachEvent("onclick",Q),e.attachEvent("onclick",Q));else if(i(e)){var u=Re;Re=e;var l=n||{},c=Re.indexOf("?"),f=c>-1?te(Re.slice(c+1)):{};for(var d in l)f[d]=l[d];var p=ee(f),h=c>-1?Re.slice(0,c):Re;p&&(Re=h+(-1===h.indexOf("?")?"?":"&")+p);var m=(3===arguments.length?r:n)===!0||u===e;t.history.pushState?(Ae=K,Pe=function(){t.history[m?"replaceState":"pushState"](null,le.title,Ye[a.route.mode]+Re)},qe(Ye[a.route.mode]+Re)):(ce[a.route.mode]=Re,qe(Ye[a.route.mode]+Re))}},a.route.param=function(e){if(!Fe)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return Fe[e]},a.route.mode="search",a.route.buildQueryString=ee,a.route.parseQueryString=te,a.deferred=function(){var e=new oe;return e.promise=re(e.promise),e},a.deferred.onerror=function(e){if("[object Error]"===me.call(e)&&!e.constructor.toString().match(/ Error/))throw Be=0,e},a.sync=function(e){function t(e,t){return function(s){return i[e]=s,t||(n="reject"),0===--o&&(r.promise(i),r[n](i)),s}}var n="resolve",r=a.deferred(),o=e.length,i=new Array(o);return e.length>0?u(e,function(e,n){e.then(t(n,!0),t(n,!1))}):r.resolve([]),r.promise},a.request=function(e){e.background!==!0&&a.startComputation();var t=new oe,n=e.dataType&&"jsonp"===e.dataType.toLowerCase(),r=e.serialize=n?ie:e.serialize||JSON.stringify,o=e.deserialize=n?ie:e.deserialize||JSON.parse,i=n?function(e){return e.responseText}:e.extract||function(e){return 0===e.responseText.length&&o===JSON.parse?null:e.responseText};return e.method=(e.method||"GET").toUpperCase(),e.url=ue(e.url,e.data),e=ae(e,e.data,r),e.onload=e.onerror=function(n){try{n=n||event;var r=("load"===n.type?e.unwrapSuccess:e.unwrapError)||ie,s=r(o(i(n.target,e)),n.target);"load"===n.type&&(he(s)&&e.type?u(s,function(t,n){s[n]=new e.type(t)}):e.type&&(s=new e.type(s))),t["load"===n.type?"resolve":"reject"](s)}catch(n){a.deferred.onerror(n),t.reject(n)}e.background!==!0&&a.endComputation()},se(e),t.promise=re(t.promise,e.initialValue),t.promise},a.deps=function(e){return s(t=e||t),t},a.deps.factory=e,a}("undefined"!=typeof window?window:{});"object"==typeof module&&null!=module&&module.exports?module.exports=m:"function"==typeof define&&define.amd&&define(function(){return m}),function(e){"function"==typeof define&&define.amd?define(["mithril"],e):"object"==typeof exports?module.exports=e(require("mithril")):e(m)}(function(e){function t(e,t){var n="select"===e.tag?e.attrs.multi?"multi":"select":e.attrs.type;return"multi"===n?e.attrs.onchange=function(){t([].slice.call(this.selectedOptions,function(e){return e.value}))}:"select"===n?e.attrs.onchange=function(e){t(this.selectedOptions[0].value)}:"checkbox"===n?e.attrs.onchange=function(e){t(this.checked)}:e.attrs.onchange=e.attrs.oninput=function(e){t(this.value)},"select"===e.tag?e.children.forEach(function(e){(e.attrs.value===t()||e.children[0]===t())&&(e.attrs.selected=!0)}):"checkbox"===n?e.attrs.checked=t():"radio"===n?e.attrs.checked=t()===e.attrs.value:e.attrs.value=t(),e}return t.view=function(e,n,r){return t(n,n.attrs.bidi)},e.attrs&&(e.attrs.bidi=t),e.bidi=t,t}),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t="length"in e&&e.length,n=K.type(e);return"function"===n||K.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(K.isFunction(t))return K.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return K.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return K.filter(t,e,n);t=K.filter(t,e)}return K.grep(e,function(e){return W.call(t,e)>=0!==n})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function i(e){var t=he[e]={};return K.each(e.match(pe)||[],function(e,n){t[n]=!0}),t}function s(){Z.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),K.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=K.expando+a.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:be.test(n)?K.parseJSON(n):n}catch(o){}ve.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return Z.activeElement}catch(e){}}function d(e,t){return K.nodeName(e,"table")&&K.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Ie.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n=0,r=e.length;r>n;n++)ye.set(e[n],"globalEval",!t||ye.get(t[n],"globalEval"))}function g(e,t){var n,r,o,i,s,a,u,l;if(1===t.nodeType){if(ye.hasData(e)&&(i=ye.access(e),s=ye.set(t,i),l=i.events)){delete s.handle,s.events={};for(o in l)for(n=0,r=l[o].length;r>n;n++)K.event.add(t,o,l[o][n])}ve.hasData(e)&&(a=ve.access(e),u=K.extend({},a),ve.set(t,u))}}function y(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&K.nodeName(e,t)?K.merge([e],n):n}function v(e,t){var n=t.nodeName.toLowerCase();"input"===n&&_e.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var r,o=K(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(o[0]))?r.display:K.css(o[0],"display");return o.detach(),i}function w(e){var t=Z,n=Fe[e];return n||(n=b(e,t),"none"!==n&&n||(Be=(Be||K("